2007-05-07 Robert Millan <rmh@aybabtu.com>

* util/i386/pc/grub-probe.c: Add `grub-probe -t partmap' parameter to
	determine partition map module.
	* util/i386/pc/grub-install.in: Use this feature to decide which
	partition module to load, instead of hardcoding pc and gpt.
This commit is contained in:
robertmh committed 2007-05-07 19:54:46 +00:00
1 parent da65cb3645
commit 75f396ccfa
3 files changed
+39 -3

No files matched your search

+10 -2
View File
@@ -216,8 +216,16 @@ if test "x$fs_module" = x -a "x$modules" = x; then
exit 1
fi
# Typically, _chain, pc and gpt are required.
modules="$modules $fs_module _chain pc gpt"
# Then the partition map module.
partmap_module=`$grub_probe --target=partmap --device-map=${device_map} ${grubdir}`
if test "x$partmap_module" = x -a "x$modules" = x; then
echo "Auto-detection of a partition map module failed." 1>&2
echo "Please specify the module with the option \`--modules' explicitly." 1>&2
exit 1
fi
# _chain is often useful
modules="$modules $fs_module $partmap_module _chain"
$grub_mkimage --output=${grubdir}/core.img $modules || exit 1