From a8c2e5f14dc2a1892c99acfc54a32efe5748b07c Mon Sep 17 00:00:00 2001 From: Michael Prokop Date: Thu, 4 Jun 2015 14:11:22 +0200 Subject: [PATCH] Honor GRUB_DISABLE_LINUX_UUID=true and don't set root=UUID then According to the bug report pygrub doesn't support the UUID magic. If the user explicitely sets GRUB_DISABLE_LINUX_UUID=true in /etc/default/grub we should honor that. Don't adjust grub.cfg but instead prompt a warning then. Fixes #65 @ github --- grml-debootstrap | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/grml-debootstrap b/grml-debootstrap index 7fd52a2..1e7b598 100755 --- a/grml-debootstrap +++ b/grml-debootstrap @@ -1199,8 +1199,13 @@ fi case "$RELEASE" in lenny|squeeze|wheezy) - einfo "Adjusting grub.cfg for successful boot sequence." - sed -i "s;root=[^ ]\+;root=UUID=$TARGET_UUID;" "${MNTPOINT}"/boot/grub/grub.cfg + if grep -q '^GRUB_DISABLE_LINUX_UUID=true' "${MNTPOINT}"/etc/default/grub 2>/dev/null ; then + ewarn "GRUB_DISABLE_LINUX_UUID is set to true in /etc/default/grub, not adjusting root= in grub.cfg." + ewarn "Please note that your system might NOT be able to properly boot." + else + einfo "Adjusting grub.cfg for successful boot sequence." + sed -i "s;root=[^ ]\+;root=UUID=$TARGET_UUID;" "${MNTPOINT}"/boot/grub/grub.cfg + fi ;; esac -- 2.1.4