Sunday, October 14, 2012

Change Boot Order in GNU GRUB

If you installed Ubuntu then you probably got GNU GRUB 2 with it. It is this thing that allows you to choose what operating system (or tool) you want to boot. Default option is usually your new Ubuntu installation and you have 10 seconds by default to boot something else.

In case if you want to use Windows as your primary operating system and just got Ubuntu for some special case (e.g. I just wanted to play with EXT4 file system), booting Ubuntu by default is not the best option for you. Sometimes you are just not near your computer to choose another OS during this 10 seconds period (happened kind of a lot with me). So, let's change that.

  1. Count the number of the entry you want to boot by default (its row number in GNU GRUB) when you machine starts. 
  2. Load Ubuntu and start Terminal.
  3. Type sudo gedit /etc/default/grub.
  4. Change GRUB_DEFAULT to the number of the entry you want to boot by default (0 is the first entry (row), 1 is the second, etc.). I have 7 entries and want to load the last one, so  GRUB_DEFAULT=6.
  5. You can change GRUB_TIMEOUT to change how much time (in seconds) the system will wait before loading the default option.
  6. Type sudo update-grub in terminal to update GRUB configuration.
  7. Restart Ubuntu and enjoy.

No comments:

Post a Comment