Make Windows boot by Default in a Windows + Linux Dual-Boot System

After hearing many praises for the Linux based operating systems, I recently went ahead to try out the much praised Linux Mint coupled with the cinnamon desktop. Although the OS is pretty interesting and powerful at the same time, I was not interested to boot into Linux Mint every time the system was turned on. This is because firstly I’m not the only user of this PC and secondly I’m not interested to completely shift to Linux while still testing it out. Here is how I was able to make the system boot into Windows by default.

GRUB Screen DualBoot

GRUB Screen

Configuring GRUB to Boot Windows by Default

When you setup a dual-boot system, the OS choices are presented by the Linux GRUB menu and it is responsible for selecting the default OS and booting it up. With a little customization to the GRUB file, we can change the basics such as – which choice is selected by default and how long should the GRUB wait before automatically booting to the selected choice.

  1. Turn on your PC and take a look at the GRUB screen. Note the position Windows loader is at and then proceed with booting up with your Linux install.
  2. Log into your user account and open the terminal (Menu> Use the command line). You can also use the keyboard shortcut Ctrl + Alt + T to open the terminal window.
  3. Type or copy>paste the command below in the terminal window and hit return (enter).
    sudo nano /etc/default/grub

    This will open up your grub configuration file in the nano editor. Alternatively if you want to avoid the terminal, you can open filesystem> etc> default> grub file. Be sure to open the folder as root (w/ elevated privileges), else you won’t have the write access to the file.

  4. In the file editor, look for GRUB_DEFAULT= command. It should be present towards the top of the file.grub edit default
  5. In most common cases, the value of command will be set to 0 (zero). All you need to do is to set it to the position at which Windows was listed in the GRUB (counting from zero). So simply, as in the picture at the top, the Windows 8 loader is listed at 5th position, but counting from zero will make it the 4th position. So I’ve set the value of command to 4.
  6. Save the file (CTRL + O; then press Enter) and then run the following command in the terminal so as to update the GRUB.
    sudo update-grub
  7. Restart you computer and you’ll see the option selected by default will now be Windows.
You can also change the seconds till which the GRUB waits before booting up the default Operating System. It is marked by the else set timeout= command. Edit it to your preference.

, ,

5 Responses to Make Windows boot by Default in a Windows + Linux Dual-Boot System

  1. maggo July 31, 2014 at 7:54 pm #

    Hi,

    I’m sorry, but you got this totally wrong and your solution is not working.

    Didn’t you notice this at the top of /boot/grub/grub.cfg?

    # DO NOT EDIT THIS FILE
    #
    # It is automatically generated by grub-mkconfig using templates
    # from /etc/grub.d and settings from /etc/default/grub

    When you change this file and do an update-grub, the value present in /etc/default/grub overwrites the changes you made in grub.cfg…

    You need to edit /etc/default/grub as follow:

    # If you change this file, run ‘update-grub’ afterwards to update
    # /boot/grub/grub.cfg.
    # For full documentation of the options in this file, see:
    # info -f grub -n ‘Simple configuration’

    GRUB_DEFAULT=4

    THEN

    sudo update-grub

    HTH

    Maggo

    • Narender Singh August 1, 2014 at 12:42 am #

      Apologies. When I researched about this, that was the only solution I found and it actually worked. So never bothered exploring further.
      But, thank you. I will check it out and update the post accordingly. Thanks a lot.

    • Charley Sullivan September 7, 2015 at 10:14 pm #

      100% correct (this comment), this will work and does work. However, what they are saying does not and you are wasting your time because you’re just undoing your work when you do the update (the default is changed back to 0)

  2. Simo Karppinen October 23, 2015 at 6:35 pm #

    100% correct.

    in Finnish : ‘Ohjeet on Ok, maggo kommentti ei’ .

  3. woty June 22, 2016 at 8:16 am #

    it works.. thanks..

Leave a Reply