Short answer: Delete the 7.10 partition, edit the files in /etc/grub.d/
as needed, then run sudo update-grub
Long answer:
The edit mode in the boot menu is meant for temporary edits, for recovery or testing purposes usually. To change the options permanently you need to boot into the OS that installed Grub to the boot block and change the Grub configuration there.
Ubuntu 10.04 uses Grub2 by default, which eliminates menu.lst
and autogenerates grub.cfg
each time update-grub is run. I wouldn't edit that file manually as your changes will likely get blown away (update-grub is automatically run after various updates, especially those dealing with the kernel).
The first thing I'd do is make sure you're using Grub from your 10.04 partition, and not your 7.10. I believe booting into 10.04 and running sudo update-grub
should be sufficient. If it runs fine, you're using the correct Grub. If it doesn't, it should provide an error message you can use to figure out what needs to be done.
To remove the 7.10 entries, it might be as simple as just wiping that partition and then running sudo update-grub
. Most of the Grub2 entries are autodetected, so if it no longer detects the bootable kernel it won't list it. If that doesn't clear it, the files to edit live in /etc/grub.d/
, look for a file or section specific to 7.10 and delete it (making sure to back up any file you edit/delete first), then rerun sudo update-grub
. If you screw something up, you can fix it by putting your backed up files back and rerunning sudo update-grub
, although you may need to boot off your recovery disc if you manage to blow away your 10.04 entry somehow.
Reordering is trickier, they come from the order of the files in /etc/grub.d/
and the order within those scripts. The Windows entry comes from 30_os-prober
, so you could rename it 11_os-prober
to put it after the entries from 10_linux
but that wouldn't make it the second entry and I'm not sure if that would break with updates.
If you don't mind having the Windows entry first and Linux second (but default) what I did instead was to copy 40_custom
to 01_custom
and then copied the Windows menuentry section from /boot/grub/grub.cfg
verbatim. That put Windows as the first entry, and you can then edit /etc/default/grub
and put GRUB_DEFAULT=1
to make the second entry (it counts from 0) the default (assuming that's 10.04). Note that this will duplicate the Windows entry in your boot menu, which you can eliminate the duplicate by removing the execute bit from 30_os-prober
, but I suggest leaving it in case you need the autoprobed entries from os-prober later.
/boot/grub/menu.lst
then it's Grub Legacy, else if you have a file named/boot/grub/grub.cfg
then it's Grub 2.