build may exit with dangling mounts leading to forced reboot
Under certain circumstances the build of an image may exit abnormally and leave dangling mounts behind.
This is particularly dangerous in the cases where arch-chroot
has been called and leaves behind rbind (?!) mounts for e.g. /dev
/proc
, etc.
A state like this is not cleanly recoverable, as first all mount points have to be unmounted before the user can remove the work
directory (doing this without the prior unmounts leads to destruction of e.g. /dev
which leads to the need of a reboot of the host system).
Similarly problematic is the unguarded mount of the EFI partition, which can also stay around if a crash or abort happens during make_efiboot()
.
Both scenarios are unrecoverable in the sense, that the iso has to be built from scratch again, while the first can lead to a forced reboot of the host system.
I would like to a) guard the mounts where possible with a trap and b) move towards an architecture in which we can do incremental and reproducible steps, which can be aborted and restarted with a proper cleanup.