diff --git a/ChangeLog b/ChangeLog index 0f75bc762..a41f8563e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2010-10-18 BVK Chaitanya + + * util/grub.d/10_linux.in: Fix built-in initramfs image mode for + Linux kernel, reported by Dennis Schridde. + 2010-10-17 Szymon Janc * grub-core/normal/auth.c (grub_auth_check_authentication): diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in index e37bab21b..ceee61154 100644 --- a/util/grub.d/10_linux.in +++ b/util/grub.d/10_linux.in @@ -127,10 +127,20 @@ while [ "x$list" != "x" ] ; do break fi done + + initramfs= + for i in "config-${version}" "config-${alt_version}"; do + if test -e "${dirname}/${i}" ; then + initramfs=`grep CONFIG_INITRAMFS_SOURCE= "${dirname}/${i}" | cut -f2 -d= | tr -d \"` + break + fi + done + if test -n "${initrd}" ; then echo "Found initrd image: ${dirname}/${initrd}" >&2 - else - # "UUID=" magic is parsed by initrds. Since there's no initrd, it can't work here. + elif test -z "${initramfs}" ; then + # "UUID=" magic is parsed by initrd or initramfs. Since there's + # no initrd or builtin initramfs, it can't work here. linux_root_device_thisversion=${GRUB_DEVICE} fi