--- /etc/grub.d/10_linux 2010-11-02 22:25:19.849508548 +0000 +++ 10_linux 2010-11-02 22:05:31.000000000 +0000 @@ -42,11 +42,17 @@ ;; esac +# If device has no uuid OR GRUB_DISABLE_LINUX_UUID is true OR search for dev with uuid fails (bcj) if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] \ || ! test -e "/dev/disk/by-uuid/${GRUB_DEVICE_UUID}" ; then LINUX_ROOT_DEVICE=${GRUB_DEVICE} else - LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} +# If A label exists and GRUB_USE_LABEL=true is in /etc/default/grub (bcj) + if [ "x${GRUB_DEVICE_LABEL}" != "x" ] && [ "x${GRUB_USE_LABEL}" = "xtrue" ]; then + LINUX_ROOT_DEVICE=LABEL=${GRUB_DEVICE_LABEL} + else + LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} + fi fi linux_entry () @@ -111,7 +117,6 @@ version=`echo $basename | sed -e "s,^[^0-9]*-,,g"` alt_version=`echo $version | sed -e "s,\.old$,,g"` linux_root_device_thisversion="${LINUX_ROOT_DEVICE}" - initrd= for i in "initrd.img-${version}" "initrd-${version}.img" \ "initrd-${version}" "initrd.img-${alt_version}" \