Please note that this is for the “legacy” version of GRUB still widely in use, not the next-generation GRUB 2. If unsure, check out this guide on how to find out which version of GRUB you are using.
You can quite simply change GRUB‘s preference for Ubuntu being the default operating system (the one it boots to after the countdown has finished) to that of whichever was used last. It will then boot to that when you press Enter or the countdown finishes. Simply open menu.lst for editing as superuser by pasting the following into a terminal:
sudo gedit /boot/grub/menu.lst
and when you see right near the top:
simply edit it to this:
Close and save menu.lst and GRUB will automatically boot the last used OS from then onwards. Note that you will still be able to choose other OSes from the boot menu, and that whenever you boot to another, it will become the new default (until you boot another).
Did this information make your day? Did it rescue you from hours of headache? Then please consider making a donation via PayPal, to buy me a donut, beer, or some fish’n’chips for my time and effort! Many thanks!