Cannot boot from initrd into RAID1
Hi list,
well, I won't bother you with the whole story, so just the important facts. I have to use initrd because I need to preload the module for the
SATA Controller (4port Marvell). I have 4 disks with /<root> and a few
other partitions on RAID1 and others on RAID5. I made a raidtab config and build the arrays with no problems, created fstab an can mount all partitions from my boot/rescue system just fine. The problem is booting the system. After loading the SATA module, linuxrc tries to mount /dev/md0 (which is supposed to be /<root>) and fails with input/output error. ^D -> rescue shell let me do cat /proc/mdstat wich shows something like:
<identities> [raid1 raid5]
but no arrays. I wonder if I need a statically built binary of mdadm or thelike in initrd to initialize the arrays or should a proper configured kernel just do fine?
thanks
Paul
Re: Cannot boot from initrd into RAID1[solved]
Quoted 14 lines · paul kölle
Hi list,
well, I won't bother you with the whole story, so just the important facts. I have to use initrd because I need to preload the module for the
SATA Controller (4port Marvell). I have 4 disks with /<root> and a few
other partitions on RAID1 and others on RAID5. I made a raidtab config and build the arrays with no problems, created fstab an can mount all partitions from my boot/rescue system just fine. The problem is booting the system. After loading the SATA module, linuxrc tries to mount/dev/md0(which is supposed to be /<root>) and fails with input/output error. ^D -> rescue shell let me do cat/proc/mdstatwich shows something like:
<identities> [raid1 raid5]
Quoted 3 lines
but no arrays. I wonder if I need a statically built binary of mdadm or thelike in initrd to initialize the arrays or should a proper configured kernel just do fine?
replying to myself:
As it turned out the problem is that if RAID support is compiled into the kernel but the driver for the disk controller is a module the kernel tries to init the RAID but the disks aren't there yet because the module is loaded later from the initrd system.
There are two possible solutions:
1. Build all RAID support as modules and make sure the modules are loaded in the correct order from initrd. Than with partitions set to FD, the kernel should be able to access the /dev/md* devices (haven't tried this actually).
2. Include a statically build version of mdadm or raidstart into the initrd and run it (through linuxrc) *after* the disk controller has been initialized and *after* the device nodes have been populated by udev.
cheers
Paul
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html