Dual Boot Help
I have Linux Redhat 9 on my primary hard drive, and Windows XP Home on my secondary hard drive (NTFS)
Does anyone know the command line I need to add to GRUB in order for me to be prompted to either boot up Linux or Windows XP? |
Do you mean that you did not install any bootloader during RedHat9? Did you following the automatic step by step procedure?
|
Boot Linux, and open the /etc/grub.conf file with a text-editor. Add these lines:
title Windows XP rootnoverify (hd2,0) makeactive chainloader +1 Note the (hd2,0), this refers to the Secondary Master disk's first partition. (hd3,0) is for Secondary Slave, (hd1,0) for Primary Slave. You may also have to edit Windows files (like boot.ini). |
Once you get the Grub.conf file changed as suggested by aaa, then run (as root) " /sbin/grub-install /dev/hda " and you should be presented with your GRUB screen at your next boot
|
hmm i got it to appear in the boot list now...but it still wont load up XP.
its giving me an error relating to the (hd2,0) part of that line. its saying it cant find that device. how do i find out the correct device name for that hard drive :( |
(hd0,0) is the 1st partition of the Primary Master device.
(hd1,0) is the 1st partition of the Primary Slave device. (hd2,0) is the 1st partition of the Secondary Master device. (hd3,0) is the 1st partition of the Secondary Slave device. If grub is already installed, then you don't need 'grub-install'. |
hd0, hd1, hd3 ..... none of those worked :/
|
Post the output of the 'fdisk -l' command in Linux.
|
[fetus@localhost sbin]$ ./fdisk
Usage: fdisk [-l] [-b SSZ] [-u] device E.g.: fdisk /dev/hda (for the first IDE disk) or: fdisk /dev/sdc (for the third SCSI disk) or: fdisk /dev/eda (for the first PS/2 ESDI drive) or: fdisk /dev/rd/c0d0 or: fdisk /dev/ida/c0d0 (for RAID devices) ... [fetus@localhost sbin]$ cd /sbin [fetus@localhost sbin]$ ./fdisk -l Cannot open /dev/hda Cannot open /dev/hdb |
fdisk command isnt working properly :/
|
[root@localhost sbin]# ./fdisk -l /dev/hda
Disk /dev/hda: 40.0 GB, 40027029504 bytes 255 heads, 63 sectors/track, 4866 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hda1 * 1 13 104391 83 Linux /dev/hda2 14 4736 37937497+ 83 Linux /dev/hda3 4737 4866 1044225 82 Linux swap [root@localhost sbin]# --- [root@localhost sbin]# ./fdisk -l /dev/hdb Disk /dev/hdb: 160.0 GB, 160041885696 bytes 255 heads, 63 sectors/track, 19457 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/hdb1 * 1 19457 156288321 7 HPFS/NTFS [root@localhost sbin]# |
try this:
title WinXP rootnoverify (hd1,0) map (hd0) (hd1) map (hd1) (hd0) chainloader +1 btw just to clarify something, in grub naming convention the (hdX) does not correspond to the IDE channel which the drives are on, but rather just the drive number with respect to the total number of harddrives in the system. So if I have 2 harddrives, one on primary master and one on secondary master, the secondary master would be (hd1). |
Thanks! Problem solved.
|
All times are GMT -5. The time now is 10:57 AM. |