Friday, March 26, 2010

How I got timeout to work on Grub 2

Well, the problem was after I upgraded my grub from grub-x.y to grub-2, the machine was not automatically starting to boot after the timeout (with the countdown at the bottom of the grub menu).

This is problably a problem only when the grub is upgraded, because on my other machine where I did a fresh install, the problem is not there.

I modified the
set timeout=-1 
set timeout=5
in /etc/grub.d/00_header and then executed the update-grub (of course none of this is possible without sudo)

if [ \${recordfail} = 1 ]; then
  set timeout=5
  set timeout=${GRUB_TIMEOUT}


I am not sure if this is the right way to do it, but it worked!

Friday, March 12, 2010

Grub 2 Cleanup the menu

After few updates on the grub menu keeps building in size. Also like me if you have a small /boot partition, the partition fills up. So, to clean them up and to clean the menu follow the lines below

Delete the unwanted old files in /boot

For example on my ubuntu:

rm abi-2.6.31-19-generic
rm initrd.img-2.6.31-19-generic
rm vmcoreinfo-2.6.31-19-generic
rm config-2.6.31-19-generic
rm vmlinuz-2.6.31-19-generic

Then run the update-grub command as root


Thats it! Next time you boot you dont see all the old releases on the grub boot menu