From: Michael Chang <mch...@suse.com> 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 <jsl...@suse.cz> 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 _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org https://lists.gnu.org/mailman/listinfo/grub-devel