--- /usr/lib/grub/grub-mkconfig_lib 2010-10-23 15:16:16.000000000 +0100 +++ grub-mkconfig_lib 2010-11-02 22:31:03.000000000 +0000 @@ -120,10 +120,15 @@ # If there's a filesystem UUID that GRUB is capable of identifying, use it; # otherwise set root as per value in device.map. +# If a label is available and GRUB_USE_LABEL=true then use label (bcj) +if [ "x${GRUB_DEVICE_LABEL}" != "x" ] && [ "x${GRUB_USE_LABEL}" = "xtrue" ]; then + echo "search --no-floppy --label --set ${GRUB_DEVICE_LABEL}" +else echo "set root='`${grub_probe} --device ${device} --target=drive`'" if fs_uuid="`${grub_probe} --device ${device} --target=fs_uuid 2> /dev/null`" ; then echo "search --no-floppy --fs-uuid --set ${fs_uuid}" fi +fi } grub_file_is_not_garbage ()