Hard drive weirdness.

Rashkae ubuntu at tigershaunt.com
Wed Jul 23 14:44:04 UTC 2008


David Gibb wrote:
> I'm experiencing some weird behaviour with my disk drives, and I was
> hoping someone might be able to give me some hints.
> 
> I have an oldish computer (AMD athlon 850) that I wanted to use as a
> file server. I had a 20GB PATA drive lying about, and I bought a
> promise sata300 tx4 card plus 2 500GB sata drives that were on
> special.
> 
> I hooked the 2 sata drives to the card, and the PATA drive to the
> motherboard's controller, and then I installed ubuntu server 8.04 on
> the 20GB drive. Everything went smoothly until I rebooted after the
> install, when it couldn't find the system drive. I played around with
> the boot settings in the bios until I found that none of the 'IDE-X'
> settings worked, but 'SCSI' did. Once ubuntu started up, I found that
> the 20GB pata drive showed up as /dev/sdc, and the 2 500GB SATA drives
> showed up as /dev/sda and /dev/sdb. I found this to be a touch weird,
> but everything seemed to be working so I left it as is.
> 
> I then installed software RAID 1 on the two 500GB drives, then LVM on
> top of them, samba, etc, etc. Everything works great. I still wanted
> to simulate a drive failure, so that I could verify that the RAID
> mirroring was working, and to figure out which physical drive was
> which. Here's when the trouble started.
> 
> When I pulled sata drive #1, I get a blank screen with a blinking
> cursor. No GRUB, no nothing. When I pulled sata drive #2, I get "GRUB
> Hard disk error". When I pull both disks, I get a "System disk not
> found" error.
> 
> I guess my questions are as follows:
> 
> 1) Does anyone know why my PATA drive isn't showing up as /dev/hda?
> 2) I guess I could possibly explain the "GRUB Hard disk error" if the
> absence of a drive caused the drive number to change, but I don't know
> why the absence of the other drive causes a blank screen.
> 3) Any idea how I should tinker with this system so that I can still
> boot it in case one of the raid drives fails?
> 
> Thanks!
> David
> 

Your BIOS is playing musical boot drive sequence.  What really causes
the problem here is you are installing Ubuntu on the PATA, but Ubuntu,
and possibly the BIOS, thinks that one your SATA's is the boot drive,
and installs the Master boot record on that drive.  The master boot
record has to know on which hard drive the Grub stage 2 loader is found
(or is that stage 1.5,, I can never this part straight), but if the
drive numbering scheme changes (ie, a drive is removed or added),
between the boot record and the grub install on /boot, everything asplodes.

(BTW, PATA drives will now normally show up as sd? if the drive is
attached to a controller that uses the shiny new libata drivers...
Nothing to be excited about here.)

The solution to your woes:

Install Ubuntu on the PATA drive with *only* that drive attached.  Once
you have  working Ubuntu install, then you can add the SATA drives and
do your stuff with them.  In this case, the Master boot record and Grub
files will both reside on the same hard drive, and so long as you tell
your BIOS to boot from that hard drive, the drive numbering can never
get confused (it will always be drive 0)

(you can re-use your current installation by unplugging the SATA drives,
 and use a boot CD to do a grub-install/repair, then you can re-attach
SATA.  Just remember when you do that you probably have to go in BIOS
and explicitly make PATA your boot drive.)




More information about the ubuntu-users mailing list