Blog Archives

Ubuntu: Reboot into the desired OS

I have found it a bit trouble some having to reboot and wait in front of the system for grub to load and select my OS. I will always be running around after setting my system to reboot. And grub boots into my latest Kernel image by default.

I decided to make a tool that would help us boot into our desired one in the grub menu. I even named it “boothis”. After this tide of inventive and inspiring idea, i decide to Google it. And guess what? I found a way to do it!!

Well here is the method:

Step 1: Become root

  • This can be easily done by typing in terminal “su” and then giving the root password.
  • If you do not know how to set a root password, or if you havent set one, goto: Setting a root password
  • Step 2 Changing GRUB_DEFAULT

    • Type into terminal: gedit /etc/default/grub &
    • In the opened file, find GRUB_DEFAULT and set it to ‘saved’.Save it once it looks like this:
      GRUB_DEFAULT=saved

    Step 3: Updating grub

    • Type into terminal: update-grub
      • Step 4: Setting grub default load

        • To set a default selection from the menu always run in terminal: grub-set-default [num]
          where [num] is the position of this entry in the grub menu.
        • eg:”grub-set-default 0″ will set the grub to load the first item in your grub menu.

        Step 5 Finally,we are all set for grub-reboot

        • Type in terminal: grub-reboot [num]
        • This will reboot into the choice in the grub menu which is at position [num].
        • eg:”grub-reboot 5″ will boot into your 4th item in the menu list

        To make it all easier the second time around, you can give

        “grub-reboot 5;reboot” to reboot into your 4th item in the list immediately.

        Advertisements