]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
2008-06-15 Robert Millan <rmh@aybabtu.com>
authorrobertmh <robertmh@localhost>
Sun, 15 Jun 2008 20:15:57 +0000 (20:15 +0000)
committerrobertmh <robertmh@localhost>
Sun, 15 Jun 2008 20:15:57 +0000 (20:15 +0000)
        * util/grub.d/10_linux.in: Use the underliing device for loop-AES
        devices.
        Reported by Max Vozeler.

ChangeLog
util/grub.d/10_linux.in

index 9de46681db9bbb3277eb785076371de2aee5064d..b307b5668e8834db4c7f0f6ad2dbe6dc35a84a83 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
        * util/i386/pc/grub-mkimage.c (generate_image): If we included a drive
index 9aac6327bbc7704c46fd15b16aee8e0bcd2edc57..1ae1e1e51777303277c8a955b9b4f97043c470c9 100644 (file)
@@ -28,7 +28,16 @@ else
 fi
 
 if [ "x${GRUB_DEVICE_UUID}" = "x" ] || [ "x${GRUB_DISABLE_LINUX_UUID}" = "xtrue" ] ; then
-  LINUX_ROOT_DEVICE=${GRUB_DEVICE}
+  # 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}
+    ;;
+  esac
 else
   LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
 fi