From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MCNCc-00082u-VF for mharc-grub-devel@gnu.org; Thu, 04 Jun 2009 20:22:34 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MCNCa-00081M-Pj for grub-devel@gnu.org; Thu, 04 Jun 2009 20:22:32 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MCNCW-0007y3-8R for grub-devel@gnu.org; Thu, 04 Jun 2009 20:22:32 -0400 Received: from [199.232.76.173] (port=52855 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MCMQt-0006jX-NV for grub-devel@gnu.org; Thu, 04 Jun 2009 19:33:16 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:52343) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MCKAA-0005qc-47 for grub-devel@gnu.org; Thu, 04 Jun 2009 17:07:50 -0400 Received: from [85.180.13.174] (e180013174.adsl.alicedsl.de [85.180.13.174]) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis) id 0ML21M-1MCKA80esJ-0002EE; Thu, 04 Jun 2009 23:07:48 +0200 From: Felix Zielcke To: The development of GRUB 2 In-Reply-To: <1244141869.3397.11.camel@fz.local> References: <1244141869.3397.11.camel@fz.local> Content-Type: multipart/mixed; boundary="=-XqHmT/EnhYSR3MFNHdBs" Date: Thu, 04 Jun 2009 23:07:47 +0200 Message-Id: <1244149667.3397.12.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 X-Provags-ID: V01U2FsdGVkX1/EzBfmRZStyLbLbv5vGKsT3ErLobbglUizxFS NC5vA1a3La0yZwThsdlzRYNqbr4tVhSCL+qgTV3w5WQNIcmrK6 2bTZp0uhxkZ7AKW3i8iRn9U7NuyJCIN X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: Re: [PATCH] add a --disk-module option to 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: Fri, 05 Jun 2009 00:22:33 -0000 --=-XqHmT/EnhYSR3MFNHdBs Content-Type: text/plain Content-Transfer-Encoding: 7bit Am Donnerstag, den 04.06.2009, 20:57 +0200 schrieb Felix Zielcke: > Here's a patch which adds --disk-module to grub-install for i386-pc to > make it easier for users to try out ata mod instead of biosdisk. Args I forgot the actual parsing of the option. -- Felix Zielcke --=-XqHmT/EnhYSR3MFNHdBs Content-Disposition: attachment; filename="disk_module.patch.2" Content-Type: text/x-patch; name="disk_module.patch.2"; charset="UTF-8" Content-Transfer-Encoding: 7bit diff --git a/util/i386/pc/grub-install.in b/util/i386/pc/grub-install.in index 468a72e..5f6e556 100644 --- a/util/i386/pc/grub-install.in +++ b/util/i386/pc/grub-install.in @@ -49,6 +49,12 @@ force_lba= recheck=no debug=no +if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then + disk_module=biosdisk +else + disk_module=ata +fi + # Usage: usage # Print the usage. usage () { @@ -68,6 +74,13 @@ Install GRUB on your drive. --no-floppy do not probe any floppy drive --recheck probe a device map even if it already exists --force install even if problems are detected +EOF +if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then + cat < /dev/nul devabstraction_module=`$grub_probe --target=abstraction --device ${grub_device}` # The order in this list is critical. Be careful when modifying it. -if [ "${target_cpu}-${platform}" = "i386-pc" ] ; then - modules="$modules biosdisk" -else - modules="$modules ata" -fi +modules="$modules $disk_module" modules="$modules $fs_module $partmap_module $devabstraction_module" prefix_drive= @@ -269,11 +282,11 @@ if [ "x${devabstraction_module}" = "x" ] ; then # Strip partition number 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) + if [ "$disk_module" = ata ] ; then + # generic method (used on coreboot and ata mod) uuid="`$grub_probe --target=fs_uuid --device ${grub_device}`" if [ "x${uuid}" = "x" ] ; then - echo "UUID needed on this platform, but the filesystem containing ${grubdir} does not support UUIDs." 1>&2 + echo "UUID needed on this platform and with ata mod, but the filesystem containing ${grubdir} does not support UUIDs." 1>&2 exit 1 fi prefix_drive="(UUID=${uuid})" --=-XqHmT/EnhYSR3MFNHdBs--