LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Dual Boot Help (https://www.linuxquestions.org/questions/linux-newbie-8/dual-boot-help-121611/)

thefetus 12-01-2003 10:03 AM

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?

captainstorm 12-01-2003 11:00 AM

Do you mean that you did not install any bootloader during RedHat9? Did you following the automatic step by step procedure?

aaa 12-01-2003 12:48 PM

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).

Tap-Out 12-01-2003 12:57 PM

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

thefetus 12-01-2003 01:43 PM

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 :(

aaa 12-01-2003 01:58 PM

(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'.

thefetus 12-01-2003 04:24 PM

hd0, hd1, hd3 ..... none of those worked :/

aaa 12-01-2003 05:46 PM

Post the output of the 'fdisk -l' command in Linux.

thefetus 12-01-2003 07:35 PM

[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

thefetus 12-01-2003 07:38 PM

fdisk command isnt working properly :/

thefetus 12-01-2003 07:46 PM

[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]#

Demonbane 12-01-2003 08:05 PM

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).

thefetus 12-01-2003 08:32 PM

Thanks! Problem solved.


All times are GMT -5. The time now is 10:57 AM.