[Bug 872220] Re: Fails to boot when there's problems with softraid
Simon Bazley
872220 at bugs.launchpad.net
Wed Oct 3 15:36:55 UTC 2012
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
Foundations Bugs, which is subscribed to mdadm in Ubuntu.
https://bugs.launchpad.net/bugs/872220
Title:
Fails to boot when there's problems with softraid
Status in “mdadm” package in Ubuntu:
Triaged
Bug description:
Ubuntu 11.10 has a new feature that it warns you while booting if
there's a program with the softraid.
It tells you that a hard disk in the softraid is missing, then asks,
on the console:
Continue to boot? y/N
But it ignores all keypresses. After 5 seconds or so it then times
out, falls to the default "N" option, and dumps you to a emergency
bash prompt, with no indication on how to proceed.
The feature is a good idea, but not in the current broken state.
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mdadm/+bug/872220/+subscriptions
More information about the foundations-bugs
mailing list