Grub2 – Set Windows as default OS in Dual Boot with Ubuntu

Grub2 - Set Windows as default OS in Dual Boot with Ubuntu - 4

Grub2 – Set Windows as default OS in Dual Boot with Ubuntu

grub2

When you dual boot Ubuntu along Windows, you’ll notice that GRUB loader treats Ubuntu as it’s default booting option. If you are a regular Windows user, you may find this annoying. But wait, what if you can change it? Yes! You can change it with some simple tweaks in Ubuntu.
There are several methods to accomplish this. In this Tutorial, I’ll show you two often used methods.

Method 1: Using a Third Party Application

grub customizer

There is a graphical tool Grub-Customizer that helps you change boot order. It does not come pre-installed in Ubuntu, so you have to install it before using.
Before proceeding, make sure you are connected to the Internet. Now follow these steps –
1. Open Terminal (Hot Key: Ctrl+Alt+T) and type the following commands one by one:

                    sudo add-apt-repository ppa:danielrichter2007/grub-customizer

                    sudo apt-get update

                   sudo apt-get install grub-customizer

You may have to enter your root password after the first command.
NOTE: If you get any error “unable to locate package” after the first command, then follow these steps –
Open System Settings and Click on Softwares & Updates

Screenshot from 2014-07-02 23:12:16

On the window that opens, under the tab Ubuntu Software make sure all the Check Boxes are marked

Screenshot from 2014-07-02 23:12:46

Under the “Other Software” tab, mark all the boxes

Screenshot from 2014-07-02 23:13:11

Click Close. On the next window, click Reload

Screenshot from 2014-07-02 23:13:31

Wait until updating finishes.

Screenshot from 2014-07-02 23:13:43

2. After it is installed, launch Grub-Customizer by the following command in Terminal –

                             sudo grub-customizer

3. Once it starts, you’ll see something similar to this –

Screenshot from 2014-07-02 23:33:27

4. Select Windows entry and then use the up arrow button to take it to the Top position. Save and Exit.

Now Reboot and You’ll find Windows as the default choice for GRUB loader.

Method 2: Modifying the Configuration File

You can change the GRUB boot order by modifying the settings in the file /etc/default/grub.
1. Open Terminal (Hot Key: Ctrl+Alt+T) and type the following command –

                      grep menuentry /boot/grub/grub.cfg

A list of Menu entries from GRUB will appear –

Screenshot from 2014-07-03 00:14:23

Select the last entry, in the above case ‘Windows 7 (loader) (on /dev/sda1)’ and copy it (Do Not Forget the Quotes)
2. Now open the /etc/default/grub file. To do this, type the following command and hit enter-

                                     sudo gedit /etc/default/grub

This will open the grub file gedit text editor.

Screenshot from 2014-07-03 00:20:53

3. Find out the line GRUB_DEFAULT=0.
4. Replace the 0 (zero) with the previously copied text from step 1.

Screenshot from 2014-07-03 00:23:31

5. Save and Exit
6. Update the grub settings by entering following command in the terminal –

                      sudo update-grub

7. Restart to see the effect

NOTE: I have used Ubuntu 14.04 LTS to demonstrate the above. If you are using any different version of Ubuntu, the above screenshots may vary. 

Total
0
Share