grub uses a configuration file called /boot/grub/grub.conf .
In this file you'll find (near the top) a line that read
default= followed by a number (probably zero).
What you need to do is edit this file, as the root/super user, and change the default= number to be the number of the title that you want to load by default.
In English, that means that you will either logon as root, or open up a terminal/console window and type 'su -' followed by the root's password, and then type kedit, or gedit, or kate (ie. the name of a text editor).
You'll then open the /boot/grub/grub.conf file and notice that each operating system has an entry that starts with a 'title' line (starting to get the picture?). So, count (starting at zero, not one) the title line of the operating system (WinXP) that you want to be the default.
Example (taken from the tutorial area of this forum) :-
Here is the /boot/grub/grub.conf file :-
Code:
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core 2 (2.6.5-1.358)
root (hd0,0)
kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/1 hda=38792,16,63
initrd /initrd-2.6.5-1.358.img
title Mandrake 10.0
root (hd0,0)
kernel /vmlinuz-2.6.3-4mdk ro root=/dev/hda6 hda=38792,16,63
initrd /initrd-2.6.3-4mdk.img
title Slackware
root (hd0,4)
kernel /boot/vmlinuz-ide-2.4.22 ro root=/dev/hda5 hda=38792,16,63
title BeOS
map (hd0) (hd2)
map (hd2) (hd0)
rootnoverify (hd2,4)
chainloader +1
title Windows 98 SE
map (hd0) (hd2)
map (hd2) (hd0)
rootnoverify (hd2,0)
makeactive
chainloader +1
title Fedora Core 1 (2.4.22-1.2188.nptl)
root (hd1,0)
kernel /boot/vmlinuz-2.4.22-1.2188.nptl ro root=/dev/hdc1
initrd /boot/initrd-2.4.22-1.2188.nptl.img
And we can see from this that the default operating system is zero (Fedora Core 2 (2.6.5-1.358 ).
To change it so that Windows boots by default I change the number in default to 4 (it's the fifth title, but we count starting at zero), like so :-
Code:
default=4
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core 2 (2.6.5-1.358)
root (hd0,0)
kernel /vmlinuz-2.6.5-1.358 ro root=LABEL=/1 hda=38792,16,63
initrd /initrd-2.6.5-1.358.img
title Mandrake 10.0
root (hd0,0)
kernel /vmlinuz-2.6.3-4mdk ro root=/dev/hda6 hda=38792,16,63
initrd /initrd-2.6.3-4mdk.img
title Slackware
root (hd0,4)
kernel /boot/vmlinuz-ide-2.4.22 ro root=/dev/hda5 hda=38792,16,63
title BeOS
map (hd0) (hd2)
map (hd2) (hd0)
rootnoverify (hd2,4)
chainloader +1
title Windows 98 SE
map (hd0) (hd2)
map (hd2) (hd0)
rootnoverify (hd2,0)
makeactive
chainloader +1
title Fedora Core 1 (2.4.22-1.2188.nptl)
root (hd1,0)
kernel /boot/vmlinuz-2.4.22-1.2188.nptl ro root=/dev/hdc1
initrd /boot/initrd-2.4.22-1.2188.nptl.img
And there you have it.
have fun
Nerderello