From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MCMmH-00015T-0M for mharc-grub-devel@gnu.org; Thu, 04 Jun 2009 19:55:21 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MCMmF-00014m-I6 for grub-devel@gnu.org; Thu, 04 Jun 2009 19:55:19 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MCMmA-00011f-8M for grub-devel@gnu.org; Thu, 04 Jun 2009 19:55:18 -0400 Received: from [199.232.76.173] (port=48133 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MCMRh-00086n-PL for grub-devel@gnu.org; Thu, 04 Jun 2009 19:34:05 -0400 Received: from moutng.kundenserver.de ([212.227.17.9]:60012) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MCI8O-0001DT-32 for grub-devel@gnu.org; Thu, 04 Jun 2009 14:57:52 -0400 Received: from [85.180.13.174] (e180013174.adsl.alicedsl.de [85.180.13.174]) by mrelayeu.kundenserver.de (node=mrbap1) with ESMTP (Nemesis) id 0MKt2u-1MCI8M2aqw-0005o1; Thu, 04 Jun 2009 20:57:50 +0200 From: Felix Zielcke To: The development of GRUB 2 Content-Type: multipart/mixed; boundary="=-A+aRbJ3YoR43VTBMUVmM" Date: Thu, 04 Jun 2009 20:57:49 +0200 Message-Id: <1244141869.3397.11.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.26.2 X-Provags-ID: V01U2FsdGVkX19pYdq6yPq5GXKgPgRwQoSehQ0sflk20Y7D3b1 XOTETb5YOETo+w9bWWQzDpLIEiuW1OPdFHzRHkOiERrW8U0MKb m1SRvAi/o+4L62+JpDdSycPb2jL1Geu X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [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: Thu, 04 Jun 2009 23:55:19 -0000 --=-A+aRbJ3YoR43VTBMUVmM Content-Type: text/plain Content-Transfer-Encoding: 7bit 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. -- Felix Zielcke --=-A+aRbJ3YoR43VTBMUVmM Content-Disposition: attachment; filename="disk_module.patch" Content-Type: text/x-patch; name="disk_module.patch"; charset="UTF-8" Content-Transfer-Encoding: 7bit 2009-06-04 Felix Zielcke * util/i386/pc/grub-install.in: Add a parameter --disk-module. diff --git a/util/i386/pc/grub-install.in b/util/i386/pc/grub-install.in index 468a72e..7033477 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 +278,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})" --=-A+aRbJ3YoR43VTBMUVmM--