Remembering the Last Grub OS
If you are dual booting Linux and Windows, you might want to have Grub automatically select the last booted OS instead of just going with the default. The whole trick rests on adding just two lines to /etc/default/grub:
GRUB\_DEFAULT=saved GRUB\_SAVEDEFAULT=trueOf course that has to be followed by update-grub:
sudo update-grubNow Grub will track which OS you booted last and preselect that menu entry.
PS: If you have custom menu entries, do not forget that you need to have savedefault option present.