Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I have a dual boot system that works great. I have CentOS (grub) and XP 64 on one disk and XP on another disk. The Linux boot loader asks me which system to boot, but if I reboot and forget to hit a button, it goes to Linux by default. I would like to boot to XP by default, but somehow retain the option of choosing.

I apologize. My brain was not working. I have Ubuntu on another system. This multi-boot system is running CentOS. See comment below for details.

share|improve this question
    
What boot loader are you using? You'll need to change its configuration. –  Roger Pate Apr 9 '10 at 17:40
    
it seems GRUB due to Ubuntu –  Ye Lin Aung Apr 9 '10 at 17:45

2 Answers 2

up vote 2 down vote accepted

first, go to Ubuntu .. and try in terminal

sudo gedit /boot/grub/menu.lst

find this section of the file

## default num
# Set the default entry to the entry number NUM. Numbering starts from 0, and
# 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

The important line is the last one. You will need to change that number 0 to match the Windows boot section. Typically it’s always going to be 4 on a default dual-boot configuration. Change this value to 4, and then save and reboot your machine. You should go into Windows instead of Ubuntu automatically.

Note: The blocks at the bottom of the file match the items in the menu. You can change this value to match whichever item you want as default, just remember that numbering starts at 0.

from HowToGeek.

share|improve this answer
1  
I think this will work, except I'm not sure 4 is correct. I have two hard drives, one with XP64 and CentOS (using grub) and the other with XP. I want to default to the disk with XP. –  lions_leash Apr 9 '10 at 18:19
1  
So 1 worked but I ran into other problems in Windows. Thanks for the answer! –  lions_leash Apr 9 '10 at 18:24

In Ubuntu Server 14, edit your grub.cfg file to change the default OS to start at boot. (/boot/grub/grub.cfg) (Note: Different distributions may locate this configuration file in other folders and change the name, but if you find your file, the theory still applies.)

Before you edit, take a good look at your loader screen. The first line is the default of "0", the second line is the default of "1", and so on. The number you want to put in for your default operating system is keyed to the line number. On most dual boot systems this will be the 5th line down, and is represented by inserting the number "4" as the default. (Remember, you started numbering at "0") This can change depending on which, and how many OS's you have, so again, look at your loader screen to determine which line (OS) you wish to start as default.

Then:

sudo nano /boot/grub/grub.cfg 

(I use Nano, but others, like Vi, work just as well.)

Edit the line {default = "0"} to reflect your line choice. (Keep the quotes)

Save the file and reboot. You should have just solved your challenge.

share|improve this answer
    
Could you expand your answer a little with more specific instructions on exactly how to do this. A newbie won't know what to do with your answer. thanks. –  fixer1234 Dec 13 at 0:09

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.