You are not logged in.

#1 2008-11-15 06:08:36

edenxavier
Member
Registered: 2008-03-02
Posts: 35

Adding new hard drive to PC prevents arch from booting

More specifically, adding an IDE drive prevents me from booting arch at all.

I have a PC that I'm using as a slave PC for downloading stuff.  Here's my setup:

- Two internal SATA drives connected to a RAID card in RAID 0.  This is where my Arch system resides in.My Arch system is sda.
- I have two SATA hotswap bays with two SATA hard drives in each one.  I can now see these as /dev/sdb and /dev/sdc.
- I have an IDE removeable rack with the IDE drive, though it's not turned on so Arch can't see it and so obviously I'm in my Arch system at the moment, however, when I do turn it on and then let my system reboot, my Arch system now becomes known as sdb, and as it attempts to do a filesystem check, a couple of partitions are checked successfully until it suddenly says it fails and then asks me to repair things manually.  I do try to run things manually, and upon rebooting I still get filesystem check fail asking me to repair and check things manually again.  Turning off the IDE external bay brings things back to normal.

Here's my fstab if it helps:

# 
# /etc/fstab: static file system information
#
# <file system>        <dir>         <type>    <options>          <dump> <pass>
none                   /dev/pts      devpts    defaults            0      0
none                   /dev/shm      tmpfs     defaults            0      0


/dev/cdrom /media/cdrom   auto    ro,user,noauto,unhide   0      0
/dev/dvd /media/dvd   auto    ro,user,noauto,unhide   0      0
/dev/sda10 /media reiserfs defaults,noatime,nodiratime 0 1
/dev/sda11 /backup reiserfs defaults,noatime,nodiratime 0 1
//192.168.0.50/ada /mnt/ada cifs noauto,users,noatime 0 0
//192.168.0.50/athena /mnt/athena cifs noauto,users,noatime, 0 0
//192.168.0.50/neoma /mnt/neoma cifs noauto,users,noatime 0 0
UUID=27e99717-0217-41b8-a4bb-1d0c2ec2a7ab /docs reiserfs defaults,noatime,nodiratime 0 1
UUID=34ba9905-4be0-4cd5-9d7c-8619cef2d7a9 /home reiserfs defaults,noatime,nodiratime 0 1
UUID=52e52a65-ce93-4003-bbc5-c4ca0c041391 /tmp reiserfs defaults,noatime,nodiratime 0 1
UUID=70becb71-61ec-49ab-9e4a-7dd390a07270 swap swap defaults,noatime,nodiratime 0 0
UUID=7628d159-f15b-4f79-979c-63d51e3a7c22 /boot ext2 defaults,noatime,nodiratime 0 1
UUID=bf2c37d8-cbcb-464e-8231-1626d7043f22 /var reiserfs defaults,noatime,nodiratime 0 1
UUID=f02f3b16-d296-4dd3-a68b-a4c8011c6a33 / reiserfs defaults,noatime,nodiratime 0 1

I could disable filesystem checking in my fstab, but that's sidestepping the issue. sad  My goal is to at least have all external drives in the bays visible in /dev so that I can set things up for shfs or nfs.  Any feedback would be appreciated!

Offline

#2 2008-11-15 17:58:54

Pudge
Arch Linux f@h Team Member
Registered: 2006-01-23
Posts: 300

Re: Adding new hard drive to PC prevents arch from booting

When your computer goes through POST at bootup, the BIOS looks to see what hardware you have.  When it looks for hard drives, it looks for IDE devices first, then looks for SATA devices.  When it looks for IDE devices, it looks at the primary master IDE controller, then primary slave controller.  If it has two IDE connectors, then it looks at the secondary master IDE controller, and then the secondary slave contoller.  If BIOS finds any hard drives on the IDE controllers, it starts naming them in the order just mentioned, sda, sdb, etc for Linux, and C:, D:, and etc for Windows.  Then BIOS starts looking at the SATA ports.  SATA1 first, then SATA2, etc for however many SATA ports you have.  BIOS then assigns drive names in that order picking up where it left off after assigning IDE drive numbers, if any where found on IDE. 

So, when you do not have have your IDE drive active, the first Hard drive found is on the SATA port.  Since it calls it sda, it must be on the first SATA port that has something plugged into it.  Now, when you make the IDE hard drive active, BIOS finds it first and calls it sda, and your SATA drive is found after the IDE check and now becomes sdb.  When the BIOS tries to boot strap an Operating System, it looks at the available hard drives in the order it found them.  With out the IDE hard drive active, the SATA drive was found first, becomes sda, it tries to boot from it first, finds GRUB, and GRUB says boot a linux kernel on drive SDA.  BIOS finds the kernel and everything boots fine.  Now you make the IDE hard drive active.  Bios finds the IDE drive first, it becomes the first drive, and the SATA drive is discovered second so it becomes sdb for Linux.  I'm guessing that BIOS goes to the IDE drive, and doesn't find a valid MBR (Master Boot Record) to boot up an Operating system.  So BIOS goes down the list of Hard drives it found.  Next on the list is your SATA drive.  It finds GRUB, and Grub doesn't know that your Linux kernel is now on sdb, so it goes looking for a linux kernel on sda just like GRUB told it to.

If you get into BIOS, you should find in one of the BOIS submenus a list of hard drives discovered.  Most BIOS's will let you change the hard drive boot order.  If you tell it to specifically boot from the SATA RAID first, it will.  However, as you keep activating and de-activating the IDE, you will probably need to get into BIOS everytime you change the IDE drive from inactive to active.

HTH

Pudge

Offline

#3 2009-09-15 19:46:48

diesel1
Arch Linux f@h Team Member
From: Leeds, UK.
Registered: 2007-07-19
Posts: 267

Re: Adding new hard drive to PC prevents arch from booting

Hi Pudge,

Now I know this is an old thread but.....

I have had no end of trouble when running systems with both IDE and SATA drives and recently I made the mistake of mixing them again.  The symptoms are....

Install system on IDE master controller, master drive - /dev/sda (initially smile ).
reboot and happily run system.
boot again for some reason (upgrade/power down) and now get grub errors/kernel panics.  Seems to be one of the drives is down/missing.
reboot and wow there is the drive again and everything is fine until next boot which starts the cycle again.  (I have 2 or 3 IDE drives lying around that have probably been swapped out for no real reason!)

I have run cfdisk in between boots and come to the conclusion my drives are being named in different order on different boots.

1st boot
IDE 1  -  /dev/sda
IDE 2  -  /dev/sdb
SATA 1 - /dev/sdc
SATA 2 - /dev/sdd

2nd boot
IDE 1  -  /dev/sdc
IDE 2  -  /dev/sdd
SATA 1 - /dev/sda
SATA 2 - /dev/sdb

And other variations as well.

I have had this behaviour on K/Ubuntu, Arch and another variety of GNU/Linux and on different MOBO's.

I now run exclusively SATA or IDE systems to avoid this.

Can you help?

Diesel1.


Registered GNU/Linux user #140607.

Offline

Board footer

Powered by FluxBB