Initramfs: Fixing Kernel Boot Issues with Initramfs
Problem
I just installed a server with many SATA disks. The machine has 4.5TB of storage spread across 2 Areca ARC-1280ML controllers. The Debian/etch installation went without issues using kernel 2.6.18-5-686. After installing the system on 2 disks connected to the motherboard (ICH5R controller using the ata_piix driver), RAID5 volumes are created on the Areca cards (arcmsr driver). However, boot stops at an initramfs command prompt, unable to find the root partition:
|
|
Explanation
What’s happening? Simply put, the new volumes are detected by the kernel before the disk on which the system is installed. As a result, the system is no longer on /dev/sda
but on /dev/sdc
. And the funniest part is that it’s sometimes on /dev/sdb
because the Areca controllers take time to initialize.
How do we fix this issue? By working with the initialization RAM partition, namely initramfs.
Solution
It’s extremely simple. We’ll ask the RAM boot partition to load the SATA modules in the order we want. In our case, the ata_piix driver before arcmsr. Debian tools make this very easy, just add the modules you want loaded during startup to the /etc/initramfs-tools/modules
file. Modules should be listed one per line in the desired loading order. In our case, we just need to specify the module that handles the boot disk.
|
|
Now we need to update the RAM image to apply these changes:
|
|
After a reboot, everything is back to normal. The best part is that when you need to update your kernel, the new kernel will automatically rebuild the initialization RAM image.
Last updated 18 Sep 2007, 22:19 CEST.