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 ;-)
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: fail_hook( ), and try_failure_ hooks() , and the inline comment just above try_failure_ hooks() .
* scripts/functions, add_mountroot_
For an example of how to create/use a failure hook, pull the mdadm sources and see: initramfs/ init-premount
* debian/
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