Showing posts with label grub2. Show all posts
Showing posts with label grub2. Show all posts

Tuesday, October 26, 2010

Get Grub2 to save last chosen entry

Every piece of pseudo-help I've read on this matter says:

"edit /etc/default/grub, and set GRUB_DEFAULT=saved" to save your default boot choice.

While this is true, its not complete. It's not what 90+% of the people are looking for. It's a question of semantics.

I want to save my default boot choice EVERY TIME I BOOT... i.e. save the last chosen entry every time I boot - for multi-OS systems, I believe this is fundamental.

For this to happen, you need to ADD to /etc/default/grub (it's missing altogether in the file) the entry:

GRUB_SAVEDEFAULT=true

This solves this issue. Without this line, /boot/grub/grubenv never gets updated when you choose you boot entry in grub boot menu.

This option is listed in 'info grub', but appears nowhere in the /etc/grub.d/* files.

Following the usual notation, the entry should be in the file, set as false and commented, indicating the default option if omitted:

#GRUB_SAVEDEFAULT=false

[ trackback ]