From 193dab416944cf0ed1999dd5309a23857f408cb0 Mon Sep 17 00:00:00 2001 From: Alexis Lahouze Date: Thu, 13 Jan 2022 16:50:03 +0100 Subject: [PATCH] Sync before removing mappings with kpartx to avoid "block device in use" error. --- common.sh.in | 1 + 1 file changed, 1 insertion(+) diff --git a/common.sh.in b/common.sh.in index d21ed0c..0a86d37 100644 --- a/common.sh.in +++ b/common.sh.in @@ -126,6 +126,7 @@ map_disk0() { } unmap_disk0() { + sync kpartx -d -p- $1 }