How to Clean Up Ubuntu Grub Boot Menu After Upgrades

Ubuntu adopted the new version of the Grub boot manager in version 9.10, getting rid of the old problematic menu.lst. Today we look at how to change the boot menu options in Grub2.

Grub2 is a step forward in a lot of ways, and most of the annoying menu.lst issues from the past are gone. Still, if you’re not vigilant with removing old versions of the kernel, the boot list can still end up being longer than it needs to be.

There are few ways to cleanup the list,

1. You may just remove the older kernel packages (identify which is current via "uname -r") and run "sudo update-grub2"

2. You may just move those un-used packages to a folder (as long as not in the /root/ dir), and run the "sudo update-grub2".

eg:

root@Latitude:/boot# uname -r
2.6.35-24-generic
root@Latitude:/boot# mkdir old
root@Latitude:/boot# mv *2.6.35-22* old/
root@Latitude:/boot# update-grub2
Generating grub.cfg ...
Found linux image: /boot/vmlinuz-2.6.35-24-generic
Found initrd image: /boot/initrd.img-2.6.35-24-generic
Found memtest86+ image: /memtest86+.bin
Found Microsoft Windows XP Professional on /dev/sda2
done

No comments: