LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 03-02-2005, 03:23 AM   #1
specialist01
LQ Newbie
 
Registered: Jun 2003
Posts: 4

Rep: Reputation: 0
Grub doesn't boot to Windows when CD-Drive attached


I have a question concerning GRUB.

First my hardware configuration

IDE1 master: 80 GB HD with FC3 installation
IDE1 slave: TEAC CD WRITER 52*

IDE2 master: LG CD WRITER 32*
IDE2 slave : TOSHIBA DVD-ROM

SATA1: 160 GB HD with WIN XP PROF installation


I configured my grub bootmanager to be able to start Win XP and Fedora Core 3.
When I unplug the TEAC CD-Writer from IDE1 everything works fine.
As soon as I plug it in and try to boot into Windows I get an error (Booting Linux still works fine).

My grub.conf looks like:

Linux...


Windows

map(hd0)(hd1)
map(hd1)(hd0)
makeactive
rootnoverify(h1,0)
chainloader +1


To be honest I don't get the point. It seems like grub gets mixed up just because I attach a CDwriter as slave.
By now I tried various hardware configurations, swapping the TEAC with the LG and so on. But nothing worked.

Does anyone have a clue ?

Thanks.

Best regards

Mario
 
Old 03-02-2005, 04:04 AM   #2
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
It looks like your drive numbers change so the GRUB config for the SATA drive is no longer current.

GRUB uses hd0 hd1 hd2 etc to number drives... I'd guess hd0 will be the primary master, hd1 the primary slave (if it exists - otherwise the secondary master... you get it?) and so on. Perhaps your SATA drive is hd1 unless the primary slave exists?

Have a look at:

http://www.linuxquestions.org/questi...hreadid=237511

... and read carefully.

You may want to run the mount command or have a look at dmesg to see how the drive labels are assigned. hda = hd0, hdb=hd1 etc. GRUB is expecting SATA/WinXP to be hdb (then swaps the labels because windows wants to be first!) but if you have a primary slave, *that* is usually hdb, which will push all the other drives forward one notch.

Does this help?
 
Old 03-02-2005, 07:41 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Mmmm - something fishy here. grub only sees hard-disks (hd0, hd1, ...) and floppies (fd0, ...) as boot devices.
The CD and DVD drives should be immaterial.
When you get grub menu, hit "e" key before it times out.

Then type
root (hd {and hit the *tab* key}

Tab completion should show you the boot capable devices as grub sees them. Do this with the IDE1 slave plugged in.
Show be instructive.
 
Old 03-02-2005, 08:45 AM   #4
specialist01
LQ Newbie
 
Registered: Jun 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Thanks for the answers so far. I will check your (syg00) idea as soon as I'm at home.

@ Simon Bridge: As syg00 explained, grub shouldn't identify a CD-drive as hd?. So IMHO it shouldn't change the numeration of the hd's. But obviously there's a point I'm missing so far....

I already looked up the drive labels assigned to my devices and tried several combinations using hd2, hd3 and so on with the map command. I got a different error message. Something like disk not found. When I use hd1 it says something like "invalid or unsupportet executable format" if I remember correctly.... So to me it seems like grub found the disk when using hd1, but couldn't boot from it....

I will post the results of my further tests, as soon as I get the chance to give them a try.
 
Old 03-03-2005, 12:11 PM   #5
specialist01
LQ Newbie
 
Registered: Jun 2003
Posts: 4

Original Poster
Rep: Reputation: 0
Hi again.

It tried what syg00 suggested and I get hd0 and hd1 as harddisk in grub when the CD-Writer is attached.

I played around with the Bios settings. My board is a MSI Neo2.

Within BIOS I can set "P-ATA first", that means that the IDE ports get number 1 and 2, SATA ports are 3 and 4 then.
When I set "S-ATA first", S-ATA ports get number 1 and 2, P-ATA get 3 and 4.
I can select native and legacy mode within the same menu, but I don't really understand the difference of the 2 modes.

When I set "S-ATA first" in legacy mode I can boot windows without any problems. When I try to boot Linux then I get some weird IRQ 185 error messages. It keeps on booting, but every boot step shown takes minutes. The error message is repeated several times after every step.

Then I tried the native mode, still with "S-ATA first". Linux bootet without any problems but windows didn't - error message 25 : Disc Read error.

Maybe someone has an idea how to interpret this strange behaviour....

When I set "P-ATA first" it doesn't work as well - That's how my configuration was in the past.
 
Old 03-03-2005, 06:24 PM   #6
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,119

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
I'd be looking at a hardware problem - check the obvious;
- ensure the TEAC is jumpered for slave or cable-select
- swap out the IDE1 cable cable, and test again
- if still bad, swap the opticals and see if problems persists.
- if so, ditch the writer.
- put everything not broken back - so you can find your data

Sounds like you have SATA in the kernel rather than libata, so leave the BIOS as "native".
To use the grub.conf with the drive mapping, you'll need to have the IDE first (i.e. as hd0) - this allows the mapping to work. Be aware that if you put another IDE hard disk in it'll become hd1, and break your windows boot - till you remember, and fix it.
 
Old 03-05-2005, 04:56 AM   #7
Simon Bridge
LQ Guru
 
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
thanx for that - you're right of course, CD's shouldn't count for GRUB - of course, some distributions are CD bootable (DSLinux for eg) but still ...

I note that the TEAC seems to be the newer drive. A thing to try would be to remove the old 32* drive and plug the teac in it's place - does that work. (Especially re the comment about the master/slave jumpers) A problem I've had before, is the manufacturers label for the jumper config being wrong! It takes ages to figure out because you naturally trust the labels.

I look forward to the resolution of this.
 
  


Reply



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
Installed GRUB on 3rd hard drive, how do I boot 1st drive? jesusphreak Linux - Newbie 4 04-06-2005 09:34 AM
External storage for Linux/Windows: Samba or USB 2.0 attached Hard Drive? SparceMatrix Linux - Hardware 1 02-04-2005 02:33 PM
grub Not seeing Windows on 2nd Drive. piagetblix Linux - Newbie 3 09-30-2004 11:05 AM
grub wont boot windows on second hard drive ryan00davis Linux - General 12 05-19-2004 02:13 PM
How to add a boot record which used to startup windows under my Grub boot loader? yunxiang Linux - Newbie 6 02-01-2003 02:22 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 01:14 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
Open Source Consulting | Domain Registration