Nature40 / pimod

Reconfigure Raspberry Pi images with an easy, Docker-like configuration file
GNU General Public License v3.0
122 stars 19 forks source link

Unable to unmount when based on broken image #60

Open adur1990 opened 2 years ago

adur1990 commented 2 years ago

Hi there,

this might be a somewhat very special issue, but something that I encountered working with once or twice.

When you start pimod with a FROM statement and stop it with CTRL-C, pimod will stop gracefully. The subsequent passes, however, will be stuck:

Working inplace BTree.img.
add map loop1p1 (253:2): 0 87851 linear 7:1 8192
device-mapper: reload ioctl on loop1p2 (253:3) failed: Invalid argument
create/reload failed on loop1p2

This error seems legit, as the FROM statement was interruppted in the first run resulting in a damages image. But then the following happens:

./modules/chroot.sh: line 32: CHROOT_MOUNT: unbound variable
umount: bad usage
Try 'umount --help' for more information.
umount: bad usage
Try 'umount --help' for more information.
umount: bad usage
Try 'umount --help' for more information.
umount: bad usage
Try 'umount --help' for more information.
umount: bad usage
Try 'umount --help' for more information.
umount: bad usage
Try 'umount --help' for more information.
umount: bad usage
Try 'umount --help' for more information.
umount: bad usage
Try 'umount --help' for more information.
umount: bad usage
Try 'umount --help' for more information.
umount: bad usage
Try 'umount --help' for more information.
./modules/chroot.sh: line 42: CHROOT_MOUNT: unbound variable
### Error: "BTree.img" returned 1, cleaning up...

This should be handled gracefully I guess.