2010/09/03

Show GRUB2 Menu Only If Shift Key Is Pressed in Multi-Boot System

Let's say you have a multi-boot system with Linux and other OS installed. You use Linux most of the time and have Grub to boot Linux by default. Now you want to skip Grub menu display while booting into Linux but have the chance to be able to display the Grub menu whenever you want to boot the other OS. Follow the next steps to be able to display Grub menu upon pressing (and keeping pressed until the menu is displayed) any of two shift keys while Grub is loading (that's the moment you see Grub's blinking underscore in the  terminal).
gksudo /etc/grub.d/09_os-prober
# Comment the first "if" line at the beggining of adjust_timeout function:
if [ "x${found_other_os}" = "x" ] ; then
# Comment the last "fi" line at the end of the function.
# Save the file.
gksudo /etc/default/grub
# Set hidden timeout to 0:
GRUB_HIDDEN_TIMEOUT=0
# Set timeout to any positive number
GRUB_TIMEOUT=5
# Save the file and update grub menu:
sudo update-grub