Comment 30 for bug 251164

Revision history for this message
Anatoli (anatoli) wrote :

Actually, the solution proposed by François Marier should work, but only if you have one RAID array and this array is called md0.

A completely flexible and at the same time simple solution is to use the function mountroot_fail located at /usr/share/initramfs-tools/scripts/mdadm-functions, which correctly detects the bootdegraded options passed via a kernel param or in the mdadm.conf and knows how to activate all the arrays in the system. This is how degraded arrays are treated when there is no cryptsetup (which interferes in the middle of the mdadm handling scripts).

So, just run this command (adjust the line numbers if your version differs):

echo -e '205a206,212
> \t\t. /scripts/mdadm-functions
> \t\t. /scripts/functions
> \t\tmountroot_fail
> \t\techo "mountroot_fail returned $?\\n"
> \tfi
>
> \tif [ ! -e $cryptsource ]; then' | patch -n /usr/share/initramfs-tools/scripts/local-top/cryptroot

and then

update-initramfs -u -k all

And your system will boot with degraded arrays.

If not yet done, you'll need to change the ID of the disk for EFI partition to its dev name so the system can mount it independently of the disk it boots from, e.g.
/dev/sda1 /boot/efi