LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-01-2003, 11:03 AM   #1
thefetus
Member
 
Registered: Nov 2003
Posts: 51

Rep: Reputation: 15
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?
 
Old 12-01-2003, 12:00 PM   #2
captainstorm
Member
 
Registered: Jun 2003
Location: Oricola, Italy
Distribution: RH 9, so far
Posts: 261

Rep: Reputation: 30
Do you mean that you did not install any bootloader during RedHat9? Did you following the automatic step by step procedure?
 
Old 12-01-2003, 01:48 PM   #3
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
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).
 
Old 12-01-2003, 01:57 PM   #4
Tap-Out
Member
 
Registered: Oct 2002
Location: Halifax, NS
Distribution: Ubuntu, Mepis, Debian
Posts: 130

Rep: Reputation: 15
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
 
Old 12-01-2003, 02:43 PM   #5
thefetus
Member
 
Registered: Nov 2003
Posts: 51

Original Poster
Rep: Reputation: 15
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
 
Old 12-01-2003, 02:58 PM   #6
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
(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'.
 
Old 12-01-2003, 05:24 PM   #7
thefetus
Member
 
Registered: Nov 2003
Posts: 51

Original Poster
Rep: Reputation: 15
hd0, hd1, hd3 ..... none of those worked :/
 
Old 12-01-2003, 06:46 PM   #8
aaa
LQ Guru
 
Registered: Jul 2003
Location: VA
Distribution: Slack 10.1
Posts: 2,194

Rep: Reputation: 46
Post the output of the 'fdisk -l' command in Linux.
 
Old 12-01-2003, 08:35 PM   #9
thefetus
Member
 
Registered: Nov 2003
Posts: 51

Original Poster
Rep: Reputation: 15
[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
 
Old 12-01-2003, 08:38 PM   #10
thefetus
Member
 
Registered: Nov 2003
Posts: 51

Original Poster
Rep: Reputation: 15
fdisk command isnt working properly :/
 
Old 12-01-2003, 08:46 PM   #11
thefetus
Member
 
Registered: Nov 2003
Posts: 51

Original Poster
Rep: Reputation: 15
[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]#
 
Old 12-01-2003, 09:05 PM   #12
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
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).

Last edited by Demonbane; 12-01-2003 at 09:06 PM.
 
Old 12-01-2003, 09:32 PM   #13
thefetus
Member
 
Registered: Nov 2003
Posts: 51

Original Poster
Rep: Reputation: 15
Thanks! Problem solved.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Problems With Dual Boot / Dual Drive Setup Norab Linux - Hardware 1 08-07-2005 10:15 PM
Fedora Core 3 Dual Boot, Dual Hard drives, Grub Boot Loader Denali03 Linux - Newbie 1 03-04-2005 02:44 PM
hOw to dual boot linux suse with a dual boot win98/xp pc walterkai SUSE / openSUSE 1 12-14-2004 06:04 PM
Advice (and some) Needed: Dual-HDD, Dual-Boot - Linux, WinXP elnomadkvn Linux - General 1 03-28-2004 11:11 AM
Newbie needs Mandrake/Win98 dual-HD, dual boot system design help... buddha Linux - Newbie 20 09-04-2003 09:57 PM


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

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration