How to get grub2 to remember last choice?
The documentation in this case is wrong. All variables in /etc/default/grub
start with GRUB_
, so it's GRUB_DEFAULT=saved
, not DEFAULT=saved
. I've corrected the Ubuntu wiki to reflect that.
The official grub manual describes this correctly: http://www.gnu.org/software/grub/manual/grub.html#Simple-configuration
Put the following in /etc/default/grub
(command line: gedit admin:///etc/default/grub
):
GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true
Then run:
sudo update-grub
In my case it was not working for entries defined via /etc/grub.d/40_custom
which were missing the savedefault
line.
menuentry "Chameleon" {
savedefault ### <<<< this must be added
set root="(hd1)"
chainloader +1
}
You are forgetting the number (ie. the "ENTRY is a number or a menu item title." in your text).
sudo grub-set-default 1
for option 1 to be the default.
Always run sudo update-grub
after modifying the /etc/default/grub
file to apply the changes.