Ubuntu: Reboot into the desired OS
Posted by Manu Mohan
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
- 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:
- Type into terminal: update-grub
- 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.
- 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
Step 2 Changing GRUB_DEFAULT
Step 3: Updating grub
Step 4: Setting grub default load
Step 5 Finally,we are all set for grub-reboot
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 MohanJust 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 auto choose OS from grub at reboot, grub, grub menu selection, grub-reboot, reboot into windows from terminal, select windows. Bookmark the permalink. 1 Comment.