Comment 9 for bug 251164

Revision history for this message
Dustin Kirkland  (kirkland) wrote : Re: crypdisk boot scripts do not wait properly for source devices to appear

Reinhard-

As discussed in IRC, I do believe that utilizing the failure hooks in the initramfs would be the best approach.

In the initramfs-tools sources, see:
 * scripts/functions, add_mountroot_fail_hook(), and try_failure_hooks(), and the inline comment just above try_failure_hooks().

For an example of how to create/use a failure hook, pull the mdadm sources and see:
 * debian/initramfs/init-premount

Note that the failure hook will exit "0" if it thinks that it did something to positively affect the situation, and "1" otherwise.

Finally, the bit that brings this all together is back in the initramfs-tools sources, in scripts/local, see:
 * if root_missing "${ROOT}" && ! try_failure_hooks; then ....

Hopefully that helps get this a little further along? Reinhard- ping me again on IRC if you need some more help ;-)

:-Dustin