Received: from list by lists.gnu.org with archive (Exim 4.71) id 1SoTl0-0008TF-7x for mharc-grub-devel@gnu.org; Tue, 10 Jul 2012 02:17:10 -0400 Received: from eggs.gnu.org ([208.118.235.92]:35868) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoKAK-0005Gf-JX for grub-devel@gnu.org; Mon, 09 Jul 2012 16:02:45 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SoKAG-0006Ad-IP for grub-devel@gnu.org; Mon, 09 Jul 2012 16:02:40 -0400 Received: from mail.pripojeni.net ([178.22.112.14]:36827 helo=smtp.pripojeni.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SoKAG-0006A4-Ax for grub-devel@gnu.org; Mon, 09 Jul 2012 16:02:36 -0400 Received: from anemoi.localdomain ([178.22.113.142]) by smtp.pripojeni.net (Kerio Connect 7.2.2); Mon, 9 Jul 2012 22:02:31 +0200 From: Jiri Slaby To: grub-devel@gnu.org Subject: [PATCH 2/5] grub-install: add --skip-fs-probe Date: Mon, 9 Jul 2012 22:02:27 +0200 Message-Id: <1341864150-9588-2-git-send-email-jslaby@suse.cz> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1341864150-9588-1-git-send-email-jslaby@suse.cz> References: <1341864150-9588-1-git-send-email-jslaby@suse.cz> X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 1) X-Received-From: 178.22.112.14 X-Mailman-Approved-At: Tue, 10 Jul 2012 02:17:09 -0400 Cc: Michael Chang , Jiri Slaby X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 09 Jul 2012 20:02:45 -0000 From: Michael Chang To be able to install grub on an extended partition, user, if they are convinced it is a good idea, has to use --skip-fs-probe for grub-setup. For convenience, let us support --skip-fs-probe directly in grub-install and pass it to grub-setup internally. Otherwise with such a setup: Device Boot Start End Blocks Id System /dev/sda1 2048 4208639 2103296 82 Linux swap / Solaris /dev/sda2 * 4208640 213921791 104856576 f W95 Ext'd (LBA) /dev/sda5 4210688 46153727 20971520 83 Linux This fails: $ grub2-install --force /dev/sda2 /usr/sbin/grub2-probe: error: cannot find a GRUB drive for /dev/sda2. Check your device.map. Signed-off-by: Jiri Slaby References: https://bugzilla.novell.com/show_bug.cgi?id=750897 --- util/grub-install.in | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/util/grub-install.in b/util/grub-install.in index e19f1cd..3a7d332 100644 --- a/util/grub-install.in +++ b/util/grub-install.in @@ -253,6 +253,9 @@ do -f | --force) setup_force="--force" ;; + -s | --skip-fs-probe) + setup_skip_fs_probe="--skip-fs-probe" ;; + -*) gettext_printf "Unrecognized option \`%s'\n" "$option" 1>&2 usage @@ -738,7 +741,7 @@ fi # Perform the grub_modinfo_platform-dependent install if [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-pc" ] || [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "sparc64-ieee1275" ] ; then # Now perform the installation. - "$grub_setup" ${allow_floppy} ${setup_verbose} ${setup_force} --directory="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform" \ + "$grub_setup" ${allow_floppy} ${setup_verbose} ${setup_force} ${setup_skip_fs_probe} --directory="${grubdir}/${grub_modinfo_target_cpu}-$grub_modinfo_platform" \ --device-map="${device_map}" "${install_device}" || exit 1 elif [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "i386-ieee1275" ] || [ "${grub_modinfo_target_cpu}-${grub_modinfo_platform}" = "powerpc-ieee1275" ]; then -- 1.7.10.4