LinuxQuestions.org
Help answer threads with 0 replies.
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 02-16-2004, 06:01 PM   #1
geek in the Lou
LQ Newbie
 
Registered: Feb 2004
Distribution: Fedora Core, so far
Posts: 3

Rep: Reputation: 0
can't boot XP from second hard drive after Fedora install


Newbie, searched forum and found similar but nothing that helped me fix:

I installed Fedora Core today, on a second hard drive.

Per advice from a friend, I re-jumpered the drive that has XP on it to SLAVE and unplugged it during the install.

Fedora installed fine and runs great! Plugged the XP drive back in and added an entry to grub.conf that said:

# Windows XP Entry
title windows XP
rootnoverify (hd1,0)
chainloader +1
makeactive

REbooted, and grub shows me a menu with two items, but when I select windows it says "Error 21: Selected disk does not exist."

Do I have to modify the XP disk in some way? I'm pretty sure it hasn't been touched and I could move the jumper and boot, if needed. It's not Fat32 I don't think, and will have to get back into it and figure out how to find out, if I have to know.

How do I know if "(hd1,0)" is correct? Should I try something else? Is it risky to experiement? Couldn't find examples. I also tried adding:

map (hd0) (hd1)
map (hd1) (hd0)

but that didn't help either.

Many thanks for your patience and help,

geek in the Lou
 
Old 02-16-2004, 06:41 PM   #2
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
If your Windows drive is the second one, you should be able to boot with that setting, I'd think, but who am I to sy. I could never get grub to do what I wanted. (hd1,0) is the 2nd IDE hard drive and the first partition of it. Is that where Windows is on your machine right now?
 
Old 02-18-2004, 07:30 PM   #3
geek in the Lou
LQ Newbie
 
Registered: Feb 2004
Distribution: Fedora Core, so far
Posts: 3

Original Poster
Rep: Reputation: 0
grub config problem I THINK!

Situation has changed, but not fixed. Previously I had slave drive showing up as "not installed" in CMOS. Now have both drives set AUTO in CMOS, does that sound good to everybody? Tried USER for slave, no help. With CMOS settings at AUTO, I no longer get "Error 21 can't find disk" but it still won't boot XP.

So here's my situation, with pastes of files and command outputs below:

Older install of XP on it's own hard drive which is now jumpered to be slave, and on the IDE slave connector, and powered up. This drive will not boot now, not even if I jumper it Master and unplug the other one. That now gets me "GRUB disk error" or something close to that. I ran a grub-install on that drive, and I'm guessing that now means it grub dependent??

Master IDE drive has new install of Fedora Core, which boots and runs fine.

When I chose Windows XP from the grub boot menu, I get a black screen that echos the entries from the Windows section in grub.conf, and it just sits there until I con-alt-del.

There is no OS on the slave drive except XP, so I can't imagine that it's not on the first partition (hd1,0). It was installed long ago and I had some help (yes I'm a newbie lamer) but still, I can't imagine why we wouldn't have put it on the first partition.

Below, I'm going to show my grub.conf file, the output of some fdisk commands, and I'll egrep out "hd|ide" from dmesg. Also I previously ran grub_install commands on each drive, and I'll display the output below.

If anyone can help I would be most grateful, and will donate to LinuxQuestions in your honor!

########
Here's my grub.conf file:

# 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,0)
# kernel /vmlinuz-version ro root=/dev/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
password --md5 $1$ojxLF7Us$UODDO1axs35GYdSBJJF4T0
title Fedora Core (2.4.22-1.2115.nptl)
root (hd0,0)
kernel /vmlinuz-2.4.22-1.2115.nptl ro root=LABEL=/ hdc=ide-scsi rhgb
initrd /initrd-2.4.22-1.2115.nptl.img
title Windows XP
rootnoverify (hd1,0)
chainloader +1
##########
Here's fdisk info on each drive:

[root@localhost sbin]# ./fdisk -l /dev/hda

Disk /dev/hda: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 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 4933 39519900 83 Linux
/dev/hda3 4934 4998 522112+ 82 Linux swap

[root@localhost sbin]# ./fdisk -l /dev/hdb

Disk /dev/hdb: 40.0 GB, 40020664320 bytes
255 heads, 63 sectors/track, 4865 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 4864 39070048+ 7 HPFS/NTFS

##############

And here, if you want to slog through it, is the messy output from dmesg, grepping out ide and hd:

[root@localhost sbin]# dmesg |egrep -i "ide|hd"

BIOS-provided physical RAM map:
Kernel command line: ro root=LABEL=/ hdc=ide-scsi rhgb
ide_setup: hdc=ide-scsi
Uniform Multi-Platform E-IDE driver Revision: 7.00beta4-2.4
ide: Assuming 33MHz system bus speed for PIO modes; override with idebus=xx
VP_IDE: IDE controller at PCI slot 00:11.1
VP_IDE: chipset revision 6
VP_IDE: not 100% native mode: will probe irqs later
VP_IDE: VIA vt8235 (rev 00) IDE UDMA133 controller on pci00:11.1
ide0: BM-DMA at 0xfc00-0xfc07, BIOS settings: hdaMA, hdbMA
ide1: BM-DMA at 0xfc08-0xfc0f, BIOS settings: hdcMA, hddMA
hda: Maxtor 6E040L0, ATA DISK drive
hdb: WDC WD400JB-00ENA0, ATA DISK drive
hdc: CD-RW IDE4816, ATAPI CD/DVD-ROM drive
hdd: TOSHIBA DVD-ROM SD-M1712, ATAPI CD/DVD-ROM drive
ide0 at 0x1f0-0x1f7,0x3f6 on irq 14
ide1 at 0x170-0x177,0x376 on irq 15
hda: attached ide-disk driver.
hda: host protected area => 1
hda: 80293248 sectors (41110 MB) w/2048KiB Cache, CHS=4998/255/63, UDMA(133)
hdb: attached ide-disk driver.
hdb: host protected area => 1
hdb: 78165360 sectors (40021 MB) w/8192KiB Cache, CHS=4865/255/63, UDMA(100)
hda: hda1 hda2 hda3
hdb: hdb1
ide: late registration of driver.
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,2), internal journal
EXT3 FS 2.4-0.9.19, 19 August 2002 on ide0(3,1), internal journal
hdd: attached ide-cdrom driver.
hdd: ATAPI 48X DVD-ROM drive, 128kB Cache, UDMA(33)
hdc: attached ide-scsi driver.
scsi0 : SCSI host adapter emulation for IDE ATAPI devices
Vendor: CDWRITER Model: IDE4816 Rev: 482S

Can anyone spot the problem for me in this long and messy post? A million thanks!
 
Old 02-18-2004, 08:16 PM   #4
Demonbane
LQ Guru
 
Registered: Aug 2003
Location: Sydney, Australia
Distribution: Gentoo
Posts: 1,796

Rep: Reputation: 47
Now that its detected properly in bios, use the map method so that WinXP thinks its on primary master like it was before:
Code:
title Windows XP
rootnoverify (hd1,0)
map (hd0)(hd1)
map (hd1)(hd0)
chainloader +1
 
Old 02-18-2004, 08:35 PM   #5
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 84
In my experience, the only way you can successfully dual boot Windows and Linux is to let Windows occupy the first partition of the Master drive (meaning /dev/hda1) There is no other way that I'm aware of - if Windows is installed on the slave, it just won't work, and there is no way to install Windows behind Linux on the master because Windows will overwrite your MBR.

Since you just installed Linux today, my recommendation would be to put the Windows drive back as the Primary Master drive on IDE1, and either install the second drive on IDE1 as the Primary Slave or on IDE2, as either the Secondary Master or the Secondary Slave depending on how any other devices (such as the CD) is configured. Verify that Windows boot successfully, and assuming it does, then reinstall Linux on the second drive. I've been down this same path and based on the struggles I had, it will probably take a lot less time just to start fresh and reinstall Linux than it will to spend hours and hours of time trying to find a workaround. Unfortunately Windows does not play nice with other OS's, and therefore it's less stressful to just let it have what it wants (meaning /dev/hda1) and move forward. Good luck -- J.W.
 
Old 02-18-2004, 09:57 PM   #6
geek in the Lou
LQ Newbie
 
Registered: Feb 2004
Distribution: Fedora Core, so far
Posts: 3

Original Poster
Rep: Reputation: 0
My thanks to all! I fixed it with a grub.conf entry similar to what Demonbane suggested. Here's mine:

title Windows XP Pro
map (hd0) (hd1)
map (hd1) (hd0)
root (hd1,0)
chainloader +1

Windows is still on the Slave drive (I relish the mental picture of Gates in chains) and it boots and works fine. Although I will probably be using it less as I learn more about Linux.

Thank you again!
 
Old 02-19-2004, 11:47 PM   #7
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Quote:
Originally posted by J.W.
In my experience, the only way you can successfully dual boot Windows and Linux is to let Windows occupy the first partition of the Master drive (meaning /dev/hda1) There is no other way that I'm aware of - if Windows is installed on the slave, it just won't work, and there is no way to install Windows behind Linux on the master because Windows will overwrite your MBR.

Since you just installed Linux today, my recommendation would be to put the Windows drive back as the Primary Master drive on IDE1, and either install the second drive on IDE1 as the Primary Slave or on IDE2, as either the Secondary Master or the Secondary Slave depending on how any other devices (such as the CD) is configured. Verify that Windows boot successfully, and assuming it does, then reinstall Linux on the second drive. I've been down this same path and based on the struggles I had, it will probably take a lot less time just to start fresh and reinstall Linux than it will to spend hours and hours of time trying to find a workaround. Unfortunately Windows does not play nice with other OS's, and therefore it's less stressful to just let it have what it wants (meaning /dev/hda1) and move forward. Good luck -- J.W.
You're sorta right, but i am writing this from within Windows (forgot to compile in Joliet extensions on my cdrom and can't see my data cds in Mandy right yet) on the second drive (slave cable). I installed it second (as I needed it for reading the data, I reinstalled it). Here's how: I unplugged the first drive with Mandrake on it and plugged the other drive into the master slot of the primary controller. I installed Windows XP. Had to use a '98 floppy to fdisk and format the drive before it would get past that moronic system check screen so I could install. It went daa daa on me until I did that. Seems that Windows XP's installer won't deal well with a drive that's been formatted with Linux (funny, it works the other way around every time...). Once installed, I put it back to its rightful position as slave and modified my bootloader conf file. I use LILO. As I have printed before, I used a stanza like this:

other="/dev/hdb1"
title="Windows"
boot-as=0x80 #which is the same as the table= and map-drive= stuff in only one line


I ran LILO and now I have Windows where it belongs (for now, until I get those extensions installed) and Mandy has first dibs. Easy, slick , and reversable.

The advantage of this approach is that you can get two standalone systems if you want. If you want a Windows machine, put the drive back on the master and boot 'er up. If you want a Linux machine, delete (or at least comment out) the Windows stanza in your /etc/lilo.conf file. No boot laoders to reinstall. No floppies to find. No rescue disks required. Since the second drive is used for experimenting here, It works well for me. Done it a few times. It always works for me, but trying lilo or grub in the mbr of the windows disk always caused me grief.

But, to each his own.
 
Old 02-20-2004, 01:53 AM   #8
J.W.
LQ Veteran
 
Registered: Mar 2003
Location: Boise, ID
Distribution: Mint
Posts: 6,642

Rep: Reputation: 84
Dude - I think you just validated my point, namely that in order to install Windows successfully, it has to be installed onto the Primary Master. As you yourself describe, you

Quote:
Originally posted by vectordrake
... unplugged the first drive with Mandrake on it and plugged the other drive into the master slot of the primary controller. I installed Windows XP. ... Once installed, I put it back to its rightful position as slave ... [/B]
Which was exactly my point. Sure, maybe _after_ XP is installed on the Primary Master I suppose there are various tricks and tweaks that would let you rearrange the disks so that the XP disk _becomes_ the slave or secondary drive, but that's a completely different thing than attempting to install XP directly on the slave or secondary drive. Why go through all the extra and unnecessary hassle? It's a lot simpler and a lot faster just to let Windows sit on the master and let Linux sit on the slave, which was the rationale behind my post. But as you say, to each his own -- J.W.
 
Old 02-20-2004, 07:00 AM   #9
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
Actually, between us, I think we got the point across. I intended to hammer home that very thing that you pointed out. But, my added point was that if you fool Win on the 2nd drive into thinking it's the first, then you truely have autonomous drives. If someone wants to get rid of their Linux install (because they are new to it and not ready for its 'differences') they can simply format over it and carry on without fixing the MBR. I have noticed that there are a lot of folks who give Linux a try, but want to be rid of lilo or grub when they get tired of linux. Most people don't know how to restore their MBR. My way, you don't have to.

Conversely, if you have to be rid of Windows, you can always delete the lines pertaining to its existence in your lilo.conf or grub.conf file and be on your way. At least in both situations, the machine will boot.

I came across this method because of the two drive issue. I was never successful at getting a bootloader installed on the first drive when I installed an OS to the second (especially in this situation). It would hang at stage one. Because of this problem, I ended up using my present configuration. I wish to point out that I have never had this problem with same-drive installs. After a whole day of googling for the answer to my situation at the time (Windows and two Linux installs on two drives), I pieced together the means to do this way. If you think about it, the method's quite elegant, as far as the end product is concerned. Granted, you have to use a bit of physical intervention, which is not elegant, but the results are splendid.

My advice to anyone reading this thread looking to install on a single drive, to please ignore our discussion, as it doesn't pertain to our situation.

I'm thinking about figuring out a way for an addendum to the lilo and grub how-tos (but I want the additions to actually make sense, which is why I haven't written one for public consumption yet. Anyone? I bet the maintainer of the how-to would love to have so useful input), as this type of dual boot is not explained as well as it could have been, and I know from just reading the questions here on http://www.linuxquestions.org that there are a lot of people who are dual booting with their second drive. I hope that they come here for their answers, as this site seems to be the best and friendliest compendium for answers to linux questions that make sense. Perhaps the search button up top should be more prominent.
 
Old 02-20-2004, 07:01 AM   #10
vectordrake
Senior Member
 
Registered: Nov 2003
Location: NB,Canada
Distribution: Something alpha or beta, binary or source...
Posts: 2,280
Blog Entries: 4

Rep: Reputation: 47
"Once installed, I put it back to its rightful position as slave"

love how you quoted that part verbatim.
 
  


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
install fedora 4 FROM hard drive blizunt7 Fedora 8 09-07-2005 01:02 PM
Install Additional Hard Drive in Fedora lennysokol Linux - Hardware 4 03-10-2005 04:44 PM
Fedora 1 will not install on USB hard drive sidehillbill Linux - Newbie 2 02-08-2005 04:48 PM
Install Fedora on external USB 2.0 hard drive neomatic Linux - Hardware 0 07-30-2004 04:54 PM
Install from boot floppies to hard drive? mlsw Linux - Laptop and Netbook 3 10-02-2003 01:06 AM


All times are GMT -5. The time now is 08:06 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