Set Windows As Default Booting OS With Ubuntu 10.04 or Higher In Dual Boot

by Abhishek Bhatnagar on August 8, 2010

Advertisement

Ubuntu is one such variant of linux which is is the most easy to understand and use, as per the feedback from the users. Recently I installed ubuntu 10.04 on my windows desktop in dual boot configuration, but once configured I realised that when it boots up, it does not boot in windows by default.

But I wanted it to boot in windows by default, as all other family members who use my desktop in my absence, are not geeky enough that they can recognise the bootloader entries while booting and boot in windows.

In order to make windows to boot by default with ubuntu installed, I needed to change some value in ubuntu grub bootloader, follow the instructions below to make these changes in your case.

Screenshot-1

1. Firstly you will need to boot up in ubuntu

2. Now Run terminal window and run the following command

sudo gedit /boot/grub/menu.lst

if the command in step 2 above runs successfully, find the section below

Find this section of the file:

## default num

# Set the default entry to the entry number NUM. Numbering starts from 0, and

Advertisement

# the entry number 0 is the default if the command is not used.

#

# You can specify ’saved’ instead of a number. In this case, the default entry

# is the entry saved with the command ’savedefault’.

# WARNING: If you are using dmraid do not change this entry to ’saved’ or your

# array will desync and will not let you boot your system.

default 0

In the above code, the which you may find, you will need to change the text from default 0 to default 4 so that it boots windows by default, save the new version of this file and close it without making any further changes. 

Note: If after running the above comment and you see a blank window, without any text then it means that you are running new version of ubuntu in which location of bootloader is different, now you need to run a different command given below

3. Type the following command given below  

sudo gedit /etc/default/grub

Now change the value in the boot loader file, open up in a new window – change the value of GRUB_DEFAULT=4 as shown in the image below [ Highlighted In Gray Color ]

Screenshot

Save the changes, you just did and then close the gedit window. Shutdown your computer, the next time you start your computer it will automatically boot up in windows by default.

If you like this article or this article helped you, you can +1 to recommend this article on google plus.

You can follow us on Twitter or join our Facebook Fan Page. If you have a question to ask us, submit your question at Answers By Trouble Fixers.

Looking for something else? Search here :

{ 4 comments… read them below or add one }

Ankur Chauhan August 8, 2010 at 5:15 pm

that is really very useful for me

would it work for fedora also ?

Martin Plamondon November 6, 2010 at 2:42 am

For the second way where the file to edit is /etc/default/grub, you need to run “sudo update-grub” after for the changes to take effect so it generates a new /boot/grub/grub.cfg file.

Another trick for this new file (Grub 2.0). Instead of putting GRUB_DEFAULT=4, open the /boot/grub/grub.cfg file and find the line that starts with menuentry for Windows (it is generally the last one, but beware on computers which have a Windows restore partition, two of them might show), take the text that follows the menuentry including the double quotes and put that instead of 4 on the GRUB_DEFAULT line in the /etc/default/grub file like this (I have XP Professional on my system):

GRUB_DEFAULT=”Microsoft Windows XP Professional (on /dev/sda1)”

You must include the whole line or Ubuntu won’t find it and will default again to the first line on the menu.

This way, when an update in Ubuntu adds a new kernel, you don’t need to change the 4 for the new line number Windows is on or remove that other kernel for Windows to go back to number 4.

Richard Haas May 1, 2011 at 7:08 pm

Thanks to both. Martin’s comments worked well.

Sadiq November 1, 2011 at 9:09 pm

thanks martin …. for helping me … Gold Bless U

Leave a Comment

Previous post:

Next post:

© TroubleFixers – All about fixing computer troubles2007-2016 . All Rights Reserved.