The right way to do this would be to cut and paste your entries from /boot/grub/grub.cfg to /etc/grub.d/40_custom in this form;
Code:
echo "Adding Main on sda6 (2.6.24-24-generic)" >&2
cat << EOF
menuentry "Main, kernel 2.6.24-24-generic (sda6)" {
set root=(hd0,6)
search --no-floppy --fs-uuid --set e2e3cd65-bc09-487f-be96-a83fcc282e38
linux /boot/vmlinuz-2.6.24-24-generic root=UUID=e2e3cd65-bc09-487f-be96-a83fcc282e38 ro quiet vga=773
initrd /boot/initrd.img-2.6.24-24-generic
}
EOF
that is an entry for hardy.
For my grub2 using OS' I use;
Code:
echo "Adding Lounge on sda7" >&2
cat << EOF
menuentry "Lounge on sda7" {
set root=(hd0,7)
linux /vmlinuz root=/dev/sda7 so quiet splash
initrd /initrd.img
}
EOF
that is a great entry. It never needs updated. It works if you change the OS from 9.04 to 9.10 (or in this case 10.04testing).
If you cut paste the info from your /boot/grub/grub.cfg it needs the;
Code:
echo "Adding Lounge on sda7" >&2
cat << EOF
before the entry and;
after it. Make sure you get the last } in the right place.
Should look something like this;
Code:
echo "Adding Stoned-Lizard1.0 on sda8" >&2
cat << EOF
menuentry "Ubuntu, Linux 2.6.32-2-generic" {
recordfail=1
if [ -n ${have_grubenv} ]; then save_env recordfail; fi
set quiet=1
insmod ext2
set root=(hd0,8)
search --no-floppy --fs-uuid --set 97dd103f-06ce-4aa8-a3aa-307ad432c355
linux /boot/vmlinuz-2.6.32-2-generic root=UUID=97dd103f-06ce-4aa8-a3aa-307ad432c355 ro quiet splash
initrd /boot/initrd.img-2.6.32-2-generic
}
EOF
When you get your file built, save it as 06_custom and then it will be at the top of your menu on the screen.
You will need to run;
This will over write your /boot/grub/grub.cfg file and impliment the changes. That is how it is done.
If this is to much. Check the link to the intro I gave you before. Somewhere toward the bottom of the link listed there in, is one about something like "if grub2 is too much". It will guide you to have grub-legacy. Follow the directions, there are pitfalls you do NOT want to deal with.
Remember that grub-legacy (0.97) is no longer supported.