The system will not keep sda as my boot drive

Hi everyone!

A very frustrating night!!! I installed a new linux server on my system that has IDE drives and SATA drives. At the time of installation I only had IDE drive plugged in and that is where I install the linux. Everything works fine until I shut the system down and plug in my SATA backup drive. During boot, kernel panic appears and the system will not boot! My backup drive appears to be sda now!!!! And of course since my fstab has sda1 listed as the root partition it fails. I know you can assign certain drives using udev, but this happens before the system even boots.

The real question is, and I have been trying to find it all over the net and I am very surprised that nobody has even asked, and that is:

How can I keep my sda to be ALWAYS that IDE drive? Just like in the good old days when hda was always hda and as long as it is connected to the first IDE controller and it is the first drive it will always be hda and nothing else. This sda, sdb issue is really very frustrating, or I am missing something here?

Please help!!!!

Anybody has an idea how to do this??

It has been asked many times I'm sure, though perhaps not in the same way you're looking for it. It's not the boot order you're worried about, but Linux's disk detection order -- they really have little to do with each other.

Two ways.

1) Don't build the drivers for things you don't want to appear, in your kernel. Make them modules. The kernel won't see the disks you don't want until it loads enough for udev to start autoloading modules for you, by which time the disk you want will already be sda.

2) Use an initramfs system, a RAMdisk filesystem the kernel preloads, with software in it to detect and mount the right root disk and chroot into that.

We eventually ended up doing the latter, because our problem was more complicated -- RAID and non-RAID disks on the same controller -- but solution #1 might actually work if you're lucky.

Corona688,

Thank you for your advice! In my situation, I have the two main drives configured for RAID on the motherboard controller, and the backup drive on the PCIe SATA controller. For some reason the kernel always detects the backup drive before the main drives (in other words loads the promise tech. driver before the AMD driver) so I end up with:

sda - backup drive
sdb - RAID drive 1
sdc - RAID drive 2

When I physically disconnect the backup drive, the main drives appear as sda and sdb. I think I will end up trying your second solution first and if that fails will play with loading modules for the promise tech. controller after the system boots.