Thursday, August 16, 2007

How to change Grub boot order in a XP/Linux system

The default boot system in a XP/Linux system is Linux. In order to change the default system to XP, you have to log-in as root, edit the file /boot/grub/menu.lst.

Change "default=x" option to the number you expect.
--------------------------------------------------------------------------------
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,1)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/sda
default=2
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.22.1-41.fc7)
root (hd0,1)
kernel /vmlinuz-2.6.22.1-41.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.22.1-41.fc7.img
title Fedora (2.6.21-1.3194.fc7)
root (hd0,1)
kernel /vmlinuz-2.6.21-1.3194.fc7 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.21-1.3194.fc7.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1
--------------------------------------------------------------------------------