PDA

View Full Version : My XP/Linux dual boot



Smizack
10-12-2002, 09:50 AM
Props go out to Titan386 at O/C for help on this one.
This is a bit more detailed, but it's actually a very simple way to setup a dual boot with Linux. And it will add Windows to your Grub menu, for those of us that like grub. ;)


This is after XP was installed, resized, and linux was installed in the leftover space, using grub bootloader.


You need to open your /boot/grub/menu.lst file. Use root to do this. For example, to open it for editing with the text editor pico, this is what you would do:
su
type your root password. You are now root.
pico /boot/grub/menu.lst
This should open the file for you. Its possible your file is elsewhere, in which run a search for menu.lst to find its location. You need to add the folllowing lines to the bottom of the file:

title Windows XP
rootnoverify (hd0,0)
chainloader +1

This is assuming that XP is on the first partition of your primary master harddrive.

Once you've added those lines, press ctrl x and hit enter serveral times to verify the promts it gives you. Then reboot and see if it worked.

Here is Titan386's menu.lst file for reference. It boots from 4 different images, 3 different linux kernels, and windows xp.

# 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/hda3
# initrd /initrd-version.img
#boot=/dev/hda
default=3
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.19)
root (hd0,1)
kernel /vmlinuz-2.4.19 ro root=/dev/hda3
title Red Hat Linux (2.4.18-10)
root (hd0,1)
kernel /vmlinuz-2.4.18-10 ro root=/dev/hda3
initrd /initrd-2.4.18-10.img
title Red Hat Linux (2.4.18-3)
root (hd0,1)
kernel /vmlinuz-2.4.18-3 ro root=/dev/hda3
initrd /initrd-2.4.18-3.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1