Originally Posted by
nickc78
I echo that sentiment.
I have found my grub config - I am guessing the offending bit is the following:
### BEGIN /etc/grub.d/10_linux ###
menuentry 'Ubuntu, with Linux 2.6.32-02063202-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set a438a18e-d6d0-47d7-b87a-38a04a1fa763
linux /boot/vmlinuz-2.6.32-02063202-generic root=UUID=a438a18e-d6d0-47d7-b87a-38a04a1fa763 ro quiet splash
initrd /boot/initrd.img-2.6.32-02063202-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-02063202-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set a438a18e-d6d0-47d7-b87a-38a04a1fa763
echo 'Loading Linux 2.6.32-02063202-generic ...'
linux /boot/vmlinuz-2.6.32-02063202-generic root=UUID=a438a18e-d6d0-47d7-b87a-38a04a1fa763 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-02063202-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-20-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set a438a18e-d6d0-47d7-b87a-38a04a1fa763
linux /boot/vmlinuz-2.6.32-20-generic root=UUID=a438a18e-d6d0-47d7-b87a-38a04a1fa763 ro quiet splash
initrd /boot/initrd.img-2.6.32-20-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-20-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set a438a18e-d6d0-47d7-b87a-38a04a1fa763
echo 'Loading Linux 2.6.32-20-generic ...'
linux /boot/vmlinuz-2.6.32-20-generic root=UUID=a438a18e-d6d0-47d7-b87a-38a04a1fa763 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-20-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-19-generic' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set a438a18e-d6d0-47d7-b87a-38a04a1fa763
linux /boot/vmlinuz-2.6.32-19-generic root=UUID=a438a18e-d6d0-47d7-b87a-38a04a1fa763 ro quiet splash
initrd /boot/initrd.img-2.6.32-19-generic
}
menuentry 'Ubuntu, with Linux 2.6.32-19-generic (recovery mode)' --class ubuntu --class gnu-linux --class gnu --class os {
recordfail
insmod ext2
set root='(hd0,1)'
search --no-floppy --fs-uuid --set a438a18e-d6d0-47d7-b87a-38a04a1fa763
echo 'Loading Linux 2.6.32-19-generic ...'
linux /boot/vmlinuz-2.6.32-19-generic root=UUID=a438a18e-d6d0-47d7-b87a-38a04a1fa763 ro single
echo 'Loading initial ramdisk ...'
initrd /boot/initrd.img-2.6.32-19-generic
}
### END /etc/grub.d/10_linux ###
I have checked the 10_linux logic and it is the following that is building the above section in the grub config but I cannot work out what is controlling the loop to cause all the entries to be built in the config:
linux_entry ()
{
os="$1"
version="$2"
recovery="$3"
args="$4"
if ${recovery} ; then
title="$(gettext_quoted "%s, with Linux %s (recovery mode)")"
else
title="$(gettext_quoted "%s, with Linux %s")"
fi
printf "menuentry '${title}' ${CLASS} {\n" "${os}" "${version}"
cat << EOF
recordfail
EOF
save_default_entry | sed -e "s/^/\t/"
if [ "x$GRUB_GFXPAYLOAD_LINUX" != x ]; then
cat << EOF
set gfxpayload=$GRUB_GFXPAYLOAD_LINUX
EOF
fi
if [ -z "${prepare_boot_cache}" ]; then
prepare_boot_cache="$(prepare_grub_to_access_devic e ${GRUB_DEVICE_BOOT} | sed -e "s/^/\t/")"
fi
printf '%s\n' "${prepare_boot_cache}"
if [ "x$5" != "xquiet" ]; then
cat << EOF
echo '$(printf "$(gettext_quoted "Loading Linux %s ...")" ${version})'
EOF
fi
cat << EOF
linux ${rel_dirname}/${basename} root=${linux_root_device_thisversion} ro ${args}
EOF
if [ "x$5" != "xquiet" ]; then
cat << EOF
echo '$(gettext_quoted "Loading initial ramdisk ...")'
EOF
fi
if test -n "${initrd}" ; then
cat << EOF
initrd ${rel_dirname}/${initrd}
EOF
fi
cat << EOF
}
EOF
}
Bookmarks