* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
handling of multi-device filesystems.
This commit is contained in:
parent
23c9cc0490
commit
6ccd0b31c1
2 changed files with 12 additions and 9 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2013-03-24 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
|
* util/grub-mkconfig_lib.in (prepare_grub_to_access_device): Fix
|
||||||
|
handling of multi-device filesystems.
|
||||||
|
|
||||||
2013-03-24 Vladimir Serbinenko <phcoder@gmail.com>
|
2013-03-24 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* grub-core/Makefile.core.def (vbe): Disable on coreboot and multiboot
|
* grub-core/Makefile.core.def (vbe): Disable on coreboot and multiboot
|
||||||
|
|
|
@ -115,9 +115,7 @@ EOF
|
||||||
|
|
||||||
prepare_grub_to_access_device ()
|
prepare_grub_to_access_device ()
|
||||||
{
|
{
|
||||||
device="$1"
|
partmap="`"${grub_probe}" --device "$@" --target=partmap`"
|
||||||
|
|
||||||
partmap="`"${grub_probe}" --device "${device}" --target=partmap`"
|
|
||||||
for module in ${partmap} ; do
|
for module in ${partmap} ; do
|
||||||
case "${module}" in
|
case "${module}" in
|
||||||
netbsd | openbsd)
|
netbsd | openbsd)
|
||||||
|
@ -128,30 +126,30 @@ prepare_grub_to_access_device ()
|
||||||
done
|
done
|
||||||
|
|
||||||
# Abstraction modules aren't auto-loaded.
|
# Abstraction modules aren't auto-loaded.
|
||||||
abstraction="`"${grub_probe}" --device "${device}" --target=abstraction`"
|
abstraction="`"${grub_probe}" --device "$@" --target=abstraction`"
|
||||||
for module in ${abstraction} ; do
|
for module in ${abstraction} ; do
|
||||||
echo "insmod ${module}"
|
echo "insmod ${module}"
|
||||||
done
|
done
|
||||||
|
|
||||||
fs="`"${grub_probe}" --device "${device}" --target=fs`"
|
fs="`"${grub_probe}" --device "$@" --target=fs`"
|
||||||
for module in ${fs} ; do
|
for module in ${fs} ; do
|
||||||
echo "insmod ${module}"
|
echo "insmod ${module}"
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ x$GRUB_CRYPTODISK_ENABLE = xy ]; then
|
if [ x$GRUB_CRYPTODISK_ENABLE = xy ]; then
|
||||||
for uuid in "`"${grub_probe}" --device "${device}" --target=cryptodisk_uuid`"; do
|
for uuid in "`"${grub_probe}" --device "$@" --target=cryptodisk_uuid`"; do
|
||||||
echo "cryptomount -u $uuid"
|
echo "cryptomount -u $uuid"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# If there's a filesystem UUID that GRUB is capable of identifying, use it;
|
# If there's a filesystem UUID that GRUB is capable of identifying, use it;
|
||||||
# otherwise set root as per value in device.map.
|
# otherwise set root as per value in device.map.
|
||||||
fs_hint="`"${grub_probe}" --device "${device}" --target=compatibility_hint`"
|
fs_hint="`"${grub_probe}" --device "$@" --target=compatibility_hint`"
|
||||||
if [ "x$fs_hint" != x ]; then
|
if [ "x$fs_hint" != x ]; then
|
||||||
echo "set root='$fs_hint'"
|
echo "set root='$fs_hint'"
|
||||||
fi
|
fi
|
||||||
if fs_uuid="`"${grub_probe}" --device "${device}" --target=fs_uuid 2> /dev/null`" ; then
|
if fs_uuid="`"${grub_probe}" --device "$@" --target=fs_uuid 2> /dev/null`" ; then
|
||||||
hints="`"${grub_probe}" --device "${device}" --target=hints_string 2> /dev/null`" || hints=
|
hints="`"${grub_probe}" --device "$@" --target=hints_string 2> /dev/null`" || hints=
|
||||||
echo "if [ x\$feature_platform_search_hint = xy ]; then"
|
echo "if [ x\$feature_platform_search_hint = xy ]; then"
|
||||||
echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"
|
echo " search --no-floppy --fs-uuid --set=root ${hints} ${fs_uuid}"
|
||||||
echo "else"
|
echo "else"
|
||||||
|
|
Loading…
Reference in a new issue