Ok, think I've fixed this. I've changed the /usr/share/initramfs- tools/hooks/mdadm function, so that as well as putting mdadm.conf in the /etc/mdadm folder when generating an initramfs, it also generates a /etc/mdadm/boot_required file, which is a list of devices and UUID which the hook deduced from /etc/fstab, would prevent a boot (ie the pass field is non-zero).
Then I've extended the /usr/share/initramfs-tools/scripts/mdadm- functions file to include a couple of extra functions, which can ultimately use mdadm to work out the device name and uuid for any degraded arrays, and check that agains the list of devices needed for a successful boot. If either the list of required devices is empty, or none of the degraded devices match anything in the file, then the degraded_arrays_needed_for_boot functions will return 1. So it only returns ok, when a degraded device is listed in the boot_required file Finally I've changed /usr/share/initramfs-tools/scripts/local- premount/mdadm to use the combination of the degraded_array and the degraded_arrays_needed_for_boot functions when trying to determine an error which might warrant dropping to a shell (and I've added a helpful hint as to how one might continue with a boot, if you do find yourself at a shell). I'll post a unified diff patch as the next comment. -- You received this bug notification because you are a member of Ubuntu Bugs, which is subscribed to Ubuntu. https://bugs.launchpad.net/bugs/872220 Title: Fails to boot when there's problems with softraid To manage notifications about this bug go to: https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/872220/+subscriptions -- ubuntu-bugs mailing list ubuntu-bugs@lists.ubuntu.com https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs