LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Hardware (http://www.linuxquestions.org/questions/linux-hardware-18/)
-   -   Booting with identical drives (http://www.linuxquestions.org/questions/linux-hardware-18/booting-with-identical-drives-830238/)

Woodsman 09-03-2010 08:47 PM

Booting with identical drives
 
How do I boot with two identical drives?

I have two identical Western Digital WD6400AAKS SATA-II 7200 rpm 640 GB hard drives.

One of the drives is an internal drive on one machine. The second is available with a mobile drive bay.

I can't boot the system with both drives installed. The kernel boots fine but then halts when handing off to init.

The error message is:

Warning: unable to open an initial console
...
Kernel panic - not syncing: No init found. Try passing init= option to kernel.

I can place the mobile drive in a different system that does not have the same drive installed and that system will boot fine from either drive.

I'm reasonably certain the problem is caused by the two drives being so identical. I suspect the problem is the kernel cannot distinguish the difference. The model numbers are identical.

No, I don't have other SATA drives to use.

I am not using raid. The BIOS is not configured to use raid.

How do I boot with two identical drives?

littlejoe5 09-03-2010 09:01 PM

booting with two identical drives on the system should not matter. The error your gewtting sounds to me like one of your drives does not have a bootable system on it, or is set (in /boot, or in /boot/grub to be placed in a different position. Probably your "mobile unit". And the bios is set to but from that mobile unit (set to boot from USB.

Try booting with the "mobile" drive disconnected, and then connecting it after you are booted. Udev should pick it up.

Try checking your Bios setting in the computer before boot up and be sure that it is not set to boot from USB.

Woodsman 09-03-2010 10:26 PM

Quote:

The error your getting sounds to me like one of your drives does not have a bootable system on it, or is set (in /boot, or in /boot/grub to be placed in a different position.
I boot from the internal drive. I edited Grub with an entry to boot from the mobile drive. Grub boots with a kernel on the internal drive and the grub options list the mobile drive as /dev/sdb1.

Quote:

Try booting with the "mobile" drive disconnected, and then connecting it after you are booted. Udev should pick it up.
Works fine. I want to boot from the mobile drive, not just use files there. I want a separate boot so the system on the mobile drive does not see the files on the internal drive.

The mobile drive boots fine on a different system.

Quote:

Try checking your Bios setting in the computer before boot up and be sure that it is not set to boot from USB.
The system finds the kernel and boots fine. When the time comes to hand off to init the kernel panics.

The system boots fine without the mobile drive, but when the mobile drive is installed the system won't boot, even when I boot the system from the original internal drive.

Woodsman 09-03-2010 11:52 PM

Solved
 
The problem was caused by the SATA connections on the motherboard. The devices were not connected in numerical order. That is, the internal drive was not connected to the SATA1 port, etc.

I purposely tried some random /dev/sd(x) options in the grub bootloader. That is when I noticed the mobile drive was listed by the kernel as sda and the internal was sdb. That had me staring glassy-eyed for a while.

I next manually edited grub on-the-fly with the next boot and told grub to find the mobile drive root directory at /dev/sda rather than sdb. The system booted.

The mobile drive does not have a bootable MBR. Only the internal drive does. Thus, the BIOS was booting from the correct MBR and grub was booting the kernel correctly. Yet because the drives were connected in an oddball sequence, the kernel decided the mobile drive was sda and the internal was sdb. The kernel was assigning device nodes based upon how the devices were connected on the motherboard.

I never noticed this before because there is only one internal hard drive. Only today had I begun wanting to use the mobile tray and a second drive for some special tasks.

In hindsight the problem was me configuring grub based upon how I thought the devices were connected and not how they actually were connected.

After I reconnected the devices in the correct sequence on the motherboard, the system finally booted from either drive as expected.

Weird. I have no idea how I might have got the connectors crossed like that. :scratch:

syg00 09-04-2010 12:24 AM

This is where the benefit of using device-id (or UUID) proves its worth. Its not too hard to get the same UUID, but I reckon you'e be justified in being cranky if you ever got two devices with the same device string.

The you really could say they were identical ... ;)


All times are GMT -5. The time now is 10:16 AM.