Improve checks to make sure loop and dm-mod module are present
authorDarshaka Pathirana <dpat@syn-net.org>
Tue, 24 Jul 2018 11:34:45 +0000 (13:34 +0200)
committerDarshaka Pathirana <dpat@syn-net.org>
Tue, 24 Jul 2018 11:34:45 +0000 (13:34 +0200)
commit2df0d24da7f57e90fc823d628d1e1a699e35a973
tree9f80c485ff0fd562b4e296c44fe9ba30e7f5521f
parent242470ab3c7a4b31e025eab3eb1b9d1fef874606
Improve checks to make sure loop and dm-mod module are present

This fix was triggered because running --vmfile to create a virtual
machine image file caused the following error:

| device-mapper: reload ioctl on loop1p1p1 failed: Device or resource busy
| create/reload failed on loop1p1p1

This was caused because kpartx was run twice. The first run was used to test if
the Device-mapper was ready and the second run was actually add the partition
mappings. This used to fail under some circumstances.
grml-debootstrap