LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 02-04-2008, 03:09 PM   #1
darins
LQ Newbie
 
Registered: Feb 2008
Location: Dallas, TX
Posts: 4

Rep: Reputation: 0
GRUB won't install--due to ata enumeration?


Back when FC4 was the hottest thing going, I built a little fileserver on it. As time went by, I built up a collection of drives and controllers but as it was stable and firewalled, I didn't bother updating it to later versions of Fedora.

Now, I want to add a couple of packages, but of course it is either compile from scratch (and hope my libraries are up to snuff) or go up to a more modern distribution.

My hardware setup:
OLD Athlon 1.3ghz box -- 2 onboard IDE controllers
(2) Promise TX4 SATA controllers
(1) 80GB IDE drive to boot from (1st IDE controller, master)
(1) CDROM drive (2nd IDE controller, master)
(8) SATA drives setup in a software RAID5
a few USB drives setup with LVM...not worried about those

So I went and bought a new 120GB IDE/PATA drive so I can keep my working config safe on the old 80GB drive. I replaced the 80GB drive with the new blank drive and set off to install FC8.

I noticed it found my new drive as /dev/sdi, which I thought strange (used to be /dev/hda). I knew that things had changed to place everything under /dev/sdx, so no biggie, right?

Well, the OS installed fine, and it asked if I wanted GRUB installed and I said yes, to MBR of the drive I was installing to (/dev/sdi, which it thinks maps to grub hd(8,0)).

Reboot, and... nothing.

So I figure out that GRUB didn't get installed. Boot into rescue mode, it finds my drive and I chroot to it. Check out grub.conf, set to use hd(8,0). My drive still appears as /dev/sdi. It is apparantly enumerating my 8 SATA drives on the PCI expansion cards (I didn't say this was a fast config...) before my on-board IDE drive.

I run grub. I do: find /boot/grub/stage1

It can't find the file. So then it do:

root hd( and hit TAB

It shows me hd0 through hd7...grub cannot see hd8, which is my drive. Why? An 8-drive limitation seems kind of wacky... I'm not about to wreck my SW-RAID by writing anything to one of those discs outside of the SW-RAID environment...besides, I'm not trying to boot off the RAID.

So now I am stuck. Is there a way (perhaps by modifying the initrd) to force identification of my IDE drive first, like it used to be? And how will grub handle that?

I am concerned, because I *could* go ahead and upgrade my mobo to say a Gigabyte board with 8 on-board SATA and one onboard PATA...and pick up lots of drive bandwidth...but then I may be back in the same boat. What if it enumerates the SATA ports before the IDE port in that case? Then I would be stuck adding a PCIe SATA adapter and moving one of the SW-RAID drives to it, replace the IDE drive with a SATA drive on the first SATA port. While that would work, it seems like a real waste of cash just to get around an enumeration problem.

While I may eventually upgrade to more modern hardware to get more speed, better drive bandwidth, and speedstep or cool'n'quiet, I want to find out if there is a way around my issue first.

Does anyone have any advice?

Thanks in advance,

Darin
 
Old 02-04-2008, 06:31 PM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
grub counts from 0 as first drive so hd7 is drive 8

2) read my signature for more info...but basically its your bios boot order and I assume you did not change it so 80 g mbr is what is being booted at moment.

which drive is the one you currently have detected first?


3) because you have so many drives you need to take more care....I can see you have already done very well so I have confidence in you.

4) assuming 80 g is ide controller first..jumper as master as you say...does it already have grub in mbr?

if so ....just go to its booting files in its /boot and edit its /boot/grub/menu.lst....that is the great joy of grub....if already in a mbr....just add an entry for hd7
 
Old 02-04-2008, 07:31 PM   #3
darins
LQ Newbie
 
Registered: Feb 2008
Location: Dallas, TX
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by aus9 View Post
grub counts from 0 as first drive so hd7 is drive 8
Yes, but I have 9 drives: the boot drive on the IDE host controller on the motherboard, and 8 SATA drives on 2 PCI cards. It is seeing the 8 SATA drives and nothing more.

Quote:
Originally Posted by aus9 View Post
2) read my signature for more info...but basically its your bios boot order and I assume you did not change it so 80 g mbr is what is being booted at moment.

which drive is the one you currently have detected first?
I didn't change the BIOS boot order. I can stick the old 80G drive back in and it boots fine (since it has a bootloader that the bios can find). The BIOS knows nothing of the SATA drives on the PCI cards. GRUB and Linux are enumerating the SATA drives on the PCI cards before the IDE controller...which is really annoying in this case.

Quote:
Originally Posted by aus9 View Post
3) because you have so many drives you need to take more care....I can see you have already done very well so I have confidence in you.
I'm absolutely not going to write anything to disk unless I know for certain which drive I'm talking to.

Quote:
Originally Posted by aus9 View Post
4) assuming 80 g is ide controller first..jumper as master as you say...does it already have grub in mbr?

if so ....just go to its booting files in its /boot and edit its /boot/grub/menu.lst....that is the great joy of grub....if already in a mbr....just add an entry for hd7

I *had* an 80G on the IDE controller and it works fine--it has FC4 on it. Instead of writing over what was there and risking getting totally hosed, I took it out and put in a brand new 120G drive in its place to install FC8 to (thus, it doesn't yet have a bootloader in the MBR). That way, when something like this happens, I can drop the old drive back in and at least get back to what I had.

The kernel that FC8 boots (via the install CD...it looks like an Ubuntu CD does similarly) enumerates the PCI based SATA drives first and calls the (new) IDE drive /dev/sdi. For some reason, grub won't see hd(8,0) (the 9th drive, /dev/sdi) and so the bootloader doesn't get written to it. One thing I might try is to pull the PCI cards temporarily so that the only thing to see would be the IDE drive, then boot in rescue mode and manually set root to be hd(8,0) and write the bootloader. At this point, that's all I can think to do about it.

Thanks,

Darin
 
Old 02-04-2008, 11:05 PM   #4
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
forgive me, I will have to read better.

now lets start again. the 80g was replaced with the 120G is that correct?

2) please double check the jumper is set to master?

3) I do not have the money for 9 drives but if the jumper is correct, please consider the following.

a) I am not aware of 8 drive limit for grub.
b) lets pretend its true...tho, then remove optical drive leave it jumper as is, but put in 80 g as master....rejumper new ide as slave....change bios boot order to boot ide drives first.
c) 80g should boot, yes?
within that drive...use partition tools to partition your new drive which is now either hdb or sdb.....

format it to ext3 to use fedora 8

d) remove 80g...change jumper on optical to master and add it...leave new drive as slave
e) change bios boot order to optical first and see if Fedora installs?

4) I have only just added some kernel lines in my howto which cover fedora label...but IMHO...you are better off with changing to the UUID kernel lines and I await your response on this post.

Unfortunately I have to go away for a week. so good luck
if I can get to a machine I will attempt to follow up

Last edited by aus9; 02-04-2008 at 11:08 PM.
 
Old 02-04-2008, 11:06 PM   #5
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Quote:
I run grub. I do: find /boot/grub/stage1
Do you have a separate /boot partition ???. Try it as "find /grub/stage1"
I'm wondering if the installer uses something like grub-install - it's just a script, check it out; you'll see how it parses the parms.

As for only seeing 8 possible devices, that would be a BIOS limitation - but it should see your disk, as you could boot the 80 Gig.
 
Old 02-04-2008, 11:13 PM   #6
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
oh forgot to add....the good news....when you have a mbr you know with partitions in it, grub should find it.

I wonder if grub did not see it because the mbr was blank?
Do they sell drives unformatted now a days?
 
Old 02-05-2008, 10:16 AM   #7
darins
LQ Newbie
 
Registered: Feb 2008
Location: Dallas, TX
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
Do you have a separate /boot partition ???. Try it as "find /grub/stage1"
I'm wondering if the installer uses something like grub-install - it's just a script, check it out; you'll see how it parses the parms.

As for only seeing 8 possible devices, that would be a BIOS limitation - but it should see your disk, as you could boot the 80 Gig.
Well, this is probably part of it, though I'm pretty sure I also tried to find /grub/stage1.

I did a test with my 80g drive back in there on FC4. I ran grub and sure enough, find /grub/stage1 finds (hd0,0). Now for the interesting part...I do root (hd[TAB] and it only lists 8 drives. So it would appear that somehow it is getting limited to only seeing 8 drives--at least from the command-line. So I will have to try either adding the new one in as a slave as you recommend or temporarily pulling the SATA adapters to load an mbr on there. Hopefully, if I can just get grub in place in the mbr, it will be able to find (hd8,0) to get to the boot partition. Maybe it will influence the enumeration order even...I'll just have to try it and see.

Thanks for all the ideas. If I can get it to work and prove to myself that it will work OK, then I think I'll upgrade the motherboard, proc, and RAM to get all my SATA drives on a PCI-Express bus and get the speed they should support out of them. I'm sure in my current config I'm saturating the PCI bus when reading...especially since when I stream it is reading from the SW-RAID over PCI, then hitting the same PCI bus for access to the network card. And a 65W Core2Duo with SpeedStep configured will likely be much more power-efficient, especially if I combine it with one of the new PSUs with power-factor-correction. Then I'll cross my fingers and see if I dare spin down the RAID drives when they aren't being accessed. Not sure how comfortable I am with that, though.

Darin
 
Old 02-05-2008, 02:38 PM   #8
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,129

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Don't be misled by Anancondas (mis-)representation of (hd8). Grub doesn't ship a menu.lst - Anaconda builds it. And Anaconda is full of problems.
Grab the 120 Gig, and throw some odd-ball number of partitions at it - 3, 5, 9 whatever. Get into grub command line on hd0 and "tab complete" to determine how many partitions grub sees. Problem solved.
 
Old 02-05-2008, 11:52 PM   #9
darins
LQ Newbie
 
Registered: Feb 2008
Location: Dallas, TX
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by syg00 View Post
Don't be misled by Anancondas (mis-)representation of (hd8). Grub doesn't ship a menu.lst - Anaconda builds it. And Anaconda is full of problems.
Grab the 120 Gig, and throw some odd-ball number of partitions at it - 3, 5, 9 whatever. Get into grub command line on hd0 and "tab complete" to determine how many partitions grub sees. Problem solved.
Well, I played around with it tonight and finally got it booting. It turns out that when booting via the CD, the kernel and/or anaconda was always enumerating the on-board IDE drive after the SATA drives, and so grub and grub-install could not see that drive at all. I went looking for the partitions and just nothing.

The solution was to pull out the SATA PCI cards and boot--now it could see exactly one drive--the one I was after, as hd0. I setup grub and rebooted and it now could boot. Shutdown, plugged in the PCI cards, and now my IDE drive is /dev/sda and the PCI drives start at /dev/sdb (I'm assuming that the kernel gets it correct since it knows where it was booted from--that apparantly forces the ide driver to load first).

So I now have FC8 up and running, got my RAID array recognized again, and various other things. Now I'm sorting out all kinds of Samba weirdness and doing updates to the latest versions of packages. I might re-install, turning off SELinux since this is a box behind a firewall and I don't really care to fight SELinux permissions at every turn.

Thanks for all the help everyone!
 
  


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
Linux USB Enumeration Vs Windows USB Enumeration rajasekarpadmanaban Linux - Software 1 05-02-2007 03:36 AM
Grub problem due to full hard drive nixnix Linux - General 2 08-19-2005 10:35 AM
Grub, Windows XP & Serial ATA tlangehaug Linux - Software 5 09-02-2004 06:35 PM
RedHat 9 / GRUB / ATA RAID Trouble Fuzzeepimp Linux - Newbie 0 02-09-2004 11:39 PM
help. ATA/SCSI Serial-ATA error: "ATA: Abnormal Status" xin Linux - Hardware 10 09-05-2003 10:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 11:33 PM.

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