All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove BSD partition number from install_drive/grub_drive in grub-install
@ 2009-04-11 21:52 Felix Zielcke
  2009-04-11 23:45 ` Chip Panarchy
  2009-04-13 11:44 ` Felix Zielcke
  0 siblings, 2 replies; 13+ messages in thread
From: Felix Zielcke @ 2009-04-11 21:52 UTC (permalink / raw)
  To: The development of GRUB 2

[-- Attachment #1: Type: text/plain, Size: 427 bytes --]

Hi,

on BSD grub-install thinks that you're wanting to do a cross-install
when in fact you won't.
The problem is that in install_drive the BSD partition number isn't
removed before doing the cross-install check.
I'm not sure if the regexp is okay so or if it could be better, but at
least it works for me.
Though then grub-install still fails with `grub-setup: error: cannot
open `/dev/da0' in open_device()'
-- 
Felix Zielcke

[-- Attachment #2: remove_bsd_partnumber.diff --]
[-- Type: text/x-patch, Size: 965 bytes --]

2009-04-12  Felix Zielcke  <fzielcke@z-51.de>

	* util/i386/pc/grub-install.in (install_drive): Remove the BSD
	partition number.
	(grub_drive): Likewise.

Index: util/i386/pc/grub-install.in
===================================================================
--- util/i386/pc/grub-install.in	(revision 2083)
+++ util/i386/pc/grub-install.in	(working copy)
@@ -262,8 +262,8 @@ if [ "x${devabstraction_module}" = "x" ]
     grub_drive="`$grub_probe --target=drive --device ${grub_device}`"
 
     # Strip partition number
-    install_drive="`echo ${install_drive} | sed -e s/,[0-9]*//g`"
-    grub_drive="`echo ${grub_drive} | sed -e s/,[0-9]*//g`"
+    install_drive="`echo ${install_drive} | sed -e s/,[0-9]*[a-z]*//g`"
+    grub_drive="`echo ${grub_drive} | sed -e s/,[0-9]*[a-z]*//g`"
     if [ "${target_cpu}-${platform}" != "i386-pc" ] ; then
         # generic method (used on coreboot)
         uuid="`$grub_probe --target=fs_uuid --device ${grub_device}`"

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2009-04-15 10:53 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-11 21:52 [PATCH] remove BSD partition number from install_drive/grub_drive in grub-install Felix Zielcke
2009-04-11 23:45 ` Chip Panarchy
2009-04-12  7:08   ` Felix Zielcke
2009-04-12  7:12     ` Chip Panarchy
2009-04-12  7:28       ` Felix Zielcke
2009-04-12 10:39       ` phcoder
2009-04-13  2:52         ` Chip Panarchy
2009-04-13  9:08           ` phcoder
2009-04-13 11:32             ` Chip Panarchy
2009-04-13 11:44 ` Felix Zielcke
2009-04-14  8:21   ` Chip Panarchy
2009-04-14 21:40     ` Joey Korkames
2009-04-15 10:53       ` Chip Panarchy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.