Saturday, April 23, 2011

grub2 default menu entry

Under Debian or Ubuntu: edit /etc/default/grub, add or uncomment these two lines


GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

And, run update-grub again;

If you want more customized menu entries, you could add them under /etc/grub.d/40_custom, you also need to run update-grub manually; this file would get updated into /boot/grub/grub.cfg automatically in future when you got kernel updates;

Or you could use /boot/grub/custom.cfg directly (if not exist, create it); in this file you don't need to run update-grub; (if you want to know why, read /etc/grub.d/41_custom)