# How to select default OS in GRUB boot loader



## FlyingPenguins (Jul 2, 2006)

I am dual-booting Windows XP and Mandriva Linux using GRUB to select my OS at boot, but I use Windows a lot more (the above was just in case you didn't already know). The problem is, when I installed Linux, GRUB defaulted to Linux as for the first entry, with it automantically booting to Linux in 10 seconds if I don't select anything, which is a problem if I turn my computer on, leave to get something to eat, then forget, making me have to restart the computer at the Mandriva login in order to get to Windows. However, I want Windows at the top of the list, making it the default. How do I do this?


----------



## Skie (Mar 15, 2003)

Login as "root" and edit your /boot/grub/grub.conf file. You'll see a line saying something like "default 0". Change the 0 to 1 or 2 or whatever is needed. The way you tell is based on what order your Linux and Windows options are listed in. If Windows is the second option to choose from, then use "default 1". Save the file and reboot.


----------



## FlyingPenguins (Jul 2, 2006)

Thanks for your reply. I am currently under Linux, but I can't find a grub.conf. However, I did find a menu.lst that looks like it's the one to modify. I still don't really get it, so I'll post the contents of the file here. What do I do or modify?

```
timeout 10
color black/cyan yellow/cyan
shade 1
viewport 3 2 77 22
splashimage (hd0,4)/boot/grub/mdv-grub_splash.xpm.gz
default 0

title linux
kernel (hd0,4)/boot/vmlinuz root=/dev/hda5  resume=/dev/hda6 splash=silent vga=788
initrd (hd0,4)/boot/initrd.img

title linux-nonfb
kernel (hd0,4)/boot/vmlinuz root=/dev/hda5  resume=/dev/hda6
initrd (hd0,4)/boot/initrd.img

title failsafe
kernel (hd0,4)/boot/vmlinuz root=/dev/hda5  failsafe resume=/dev/hda6
initrd (hd0,4)/boot/initrd.img

title windows
root (hd0,0)
chainloader +1
```
(btw, on the boot loader screen, the options are linux, linux-nonfb, failsafe, and windows.)


----------



## Skie (Mar 15, 2003)

Generally, menu.lst is just a link/shortcut to grub.conf. But, they're both the same file. grub.conf may have been in a different location. For your setup, you'll want to use "default 3".


----------



## FlyingPenguins (Jul 2, 2006)

It works! I was thinking it would put Windows on the top of the list in the boot loader, but oh well. Thanks Skie! :grin:


----------



## Skie (Mar 15, 2003)

For that, you would need to physically re-order the acutal list. If you want, I can make a copy for you to use. But only if you're picky. It's not really needed however.


----------



## FlyingPenguins (Jul 2, 2006)

Haha no thanks, I'm not _that_ picky... :winkgrin: But if I decide I want to be picky, I'll just make a backup of the config file and rearrange the list.


----------



## Skie (Mar 15, 2003)

Yeah, always make a bacup before doing anything drastic. And just make sure you keep each set of 3 lines together.


----------

