From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Lsl7f-0006h4-8G for mharc-grub-devel@gnu.org; Sat, 11 Apr 2009 17:52:23 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Lsl7d-0006gU-6L for grub-devel@gnu.org; Sat, 11 Apr 2009 17:52:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Lsl7Y-0006ez-Ac for grub-devel@gnu.org; Sat, 11 Apr 2009 17:52:20 -0400 Received: from [199.232.76.173] (port=39855 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Lsl7Y-0006et-76 for grub-devel@gnu.org; Sat, 11 Apr 2009 17:52:16 -0400 Received: from moutng.kundenserver.de ([212.227.126.171]:60809) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Lsl7X-0001cb-Kc for grub-devel@gnu.org; Sat, 11 Apr 2009 17:52:16 -0400 Received: from [85.180.24.233] (e180024233.adsl.alicedsl.de [85.180.24.233]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MKv1o-1Lsl7W0lOO-000jUI; Sat, 11 Apr 2009 23:52:14 +0200 From: Felix Zielcke To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="=-aGU01EI7Q4nbCVHsPhls" Date: Sat, 11 Apr 2009 23:52:13 +0200 Message-Id: <1239486733.3685.3.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.24.5 X-Provags-ID: V01U2FsdGVkX186jzKwel7LAjustuawnY7Swk5E+tzfi6LXQbP zsOf5Dj1rn91Id7W+ZXbJgVeYXbdaE74KDknE9I6H23owt6dsi MgYezrSVQbosDs+qFcXsA== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [PATCH] remove BSD partition number from install_drive/grub_drive in grub-install X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Apr 2009 21:52:21 -0000 --=-aGU01EI7Q4nbCVHsPhls Content-Type: text/plain Content-Transfer-Encoding: 7bit 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 --=-aGU01EI7Q4nbCVHsPhls Content-Disposition: attachment; filename="remove_bsd_partnumber.diff" Content-Type: text/x-patch; name="remove_bsd_partnumber.diff"; charset="UTF-8" Content-Transfer-Encoding: 7bit 2009-04-12 Felix Zielcke * 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}`" --=-aGU01EI7Q4nbCVHsPhls--