2008-06-15 Robert Millan <rmh@aybabtu.com>

* util/grub.d/10_linux.in: Use the underliing device for loop-AES
        devices.
        Reported by Max Vozeler.
This commit is contained in:
robertmh 2008-06-15 20:15:57 +00:00
parent a920728493
commit 50465dd603
2 changed files with 16 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2008-06-15 Robert Millan <rmh@aybabtu.com>
* util/grub.d/10_linux.in: Use the underliing device for loop-AES
devices.
Reported by Max Vozeler.
2008-06-15 Robert Millan <rmh@aybabtu.com> 2008-06-15 Robert Millan <rmh@aybabtu.com>
* util/i386/pc/grub-mkimage.c (generate_image): If we included a drive * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive

View file

@ -28,7 +28,16 @@ else
fi fi
if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] ; then if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] ; then
# loop-AES arranges things so that /dev/loop/X can be our root device, but
# the initrds that Linux uses don't like that.
case ${GRUB_DEVICE} in
/dev/loop/*|/dev/loop[0-9])
LINUX_ROOT_DEVICE=`losetup ${GRUB_DEVICE} | sed -e "s/^[^(]*(\([^)]\+\)).*/\1/"`
;;
*)
LINUX_ROOT_DEVICE=${GRUB_DEVICE} LINUX_ROOT_DEVICE=${GRUB_DEVICE}
;;
esac
else else
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID} LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi fi