Grub Default Last Session

Grub has been around for years, sitting in the boot process allowing us to choose which OS to boot from. One option which I find particularly useful is the ability to remember the last selection and default to that selection. If like me you have ever needed windows in a hurry to realise its half way through installing updates, but never finished because it rebooted into Linux this may be of help.

Edit the /etc/default/grub file and add the following text:

GRUB_DEFAULT=saved
GRUB_SAVEDEFAULT=true

Once you have added those lines, simply issue the command below to update your Grub settings:

sudo update-grub

Simply reboot, and from now on, it will remember your last selection and default to it accordingly. Of course, you still need to boot into windows to start the update process, but at least now you don’t have to watch over it whilst it reboots to install them. 🙂