Wednesday, July 16, 2008

Remove Extra Entries on Boot Menu in Ubutnu

Today I got a new kernal update for my home ubuntu system, and I realized that the boot menu now has more entries than you can see on the screen.

To "fix" this, you can bring up a terminal and type this:
sudo gedit /boot/grub/menu.lst
this will bring up your grub menu list in the text editor.

you can comment out the lines you don't want to see by putting a # in front of them.

for example,

if you had these entries:
title        Ubuntu 8.04, kernel 2.6.24-19-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=6d2dc48d-7e9d-40b4-b7d5-d639afddf847 ro quiet splash
initrd /boot/initrd.img-2.6.24-19-generic
quiet

title Ubuntu 8.04, kernel 2.6.24-19-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-19-generic root=UUID=6d2dc48d-7e9d-40b4-b7d5-d639afddf847 ro single
initrd /boot/initrd.img-2.6.24-19-generic

title Ubuntu 8.04, kernel 2.6.24-18-generic
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-18-generic root=UUID=6d2dc48d-7e9d-40b4-b7d5-d639afddf847 ro quiet splash
initrd /boot/initrd.img-2.6.24-18-generic
quiet

title Ubuntu 8.04, kernel 2.6.24-18-generic (recovery mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.24-18-generic root=UUID=6d2dc48d-7e9d-40b4-b7d5-d639afddf847 ro single
initrd /boot/initrd.img-2.6.24-18-generic

adding the # to the last block of text, so it looks like this:

#title        Ubuntu 8.04, kernel 2.6.24-18-generic (recovery mode)
#root (hd0,0)
#kernel /boot/vmlinuz-2.6.24-18-generic root=UUID=6d2dc48d-7e9d-40b4-b7d5-d639afddf847 ro single
#initrd /boot/initrd.img-2.6.24-18-generic
Will remove that last entry from your grub loader screen.

Be sure to only remove the ones you won't be using! I always leave the current and at least one previous version in there, just in case. You still have all your previous versions, and can UN-comment them if for some reason you should you need to boot to them in the future.

note: this has all changed in Karmic
check here.

No comments: