All of lore.kernel.org
 help / color / mirror / Atom feed
From: Felix Zielcke <fzielcke@z-51.de>
To: The development of GRUB 2 <grub-devel@gnu.org>
Subject: [PATCH] remove BSD partition number from install_drive/grub_drive in grub-install
Date: Sat, 11 Apr 2009 23:52:13 +0200	[thread overview]
Message-ID: <1239486733.3685.3.camel@fz.local> (raw)

[-- 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}`"

             reply	other threads:[~2009-04-11 21:52 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-04-11 21:52 Felix Zielcke [this message]
2009-04-11 23:45 ` [PATCH] remove BSD partition number from install_drive/grub_drive in grub-install 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1239486733.3685.3.camel@fz.local \
    --to=fzielcke@z-51.de \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.