--- /usr/sbin/grub2-mkconfig 2010-11-02 22:38:20.610505816 +0000 +++ grub2-mkconfig 2010-11-02 22:35:32.000000000 +0000 @@ -122,6 +122,11 @@ GRUB_DEVICE="`${grub_probe} --target=device /`" GRUB_DEVICE_UUID="`${grub_probe} --device ${GRUB_DEVICE} --target=fs_uuid 2> /dev/null`" || true +# In grub 1.98 "grub-probe --target=fs_label" is not supported so using blkid (bcj) +if blkid ${GRUB_DEVICE}| grep -q "LABEL=";then +GRUB_DEVICE_LABEL=$(blkid ${GRUB_DEVICE}| grep "LABEL=" |tr -s 'LABEL=' '*' | cut -d* -f2 | cut -d'"' -f2) +fi + # Device containing our /boot partition. Usually the same as GRUB_DEVICE. GRUB_DEVICE_BOOT="`${grub_probe} --target=device /boot`" GRUB_DEVICE_BOOT_UUID="`${grub_probe} --device ${GRUB_DEVICE_BOOT} --target=fs_uuid 2> /dev/null`" || true @@ -199,6 +204,8 @@ # override them. export GRUB_DEVICE \ GRUB_DEVICE_UUID \ + GRUB_DEVICE_LABEL \ + GRUB_USE_LABEL \ GRUB_DEVICE_BOOT \ GRUB_DEVICE_BOOT_UUID \ GRUB_FS \ @@ -226,6 +233,8 @@ GRUB_INIT_TUNE \ GRUB_SAVEDEFAULT + + if test "x${grub_cfg}" != "x"; then rm -f ${grub_cfg}.new exec > ${grub_cfg}.new