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.

About Manu Mohan

Just another 20yr old...With a screwed up college life and feels hes doesn't fit in..:)

Posted on December 2, 2011, in Linux Adventures, Ubuntu and tagged , , , , , . Bookmark the permalink. 1 Comment.

  1. Easiest solution – Use one OS! But considering I have 7 of them… Well..

    Nice one. I’m going to do this on my Desktop.

Cracking your skull open while you hit it on the desk? Let me know about it...

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: