Skip to content

Commit

Permalink
Execute kpartx in sync mode to avoid race conditions
Browse files Browse the repository at this point in the history
Otherwise the according loop device might not be present yet
when we're trying to access it (via mkfs).
  • Loading branch information
mika committed Oct 13, 2014
1 parent a227187 commit 092274d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion grml-debootstrap
Expand Up @@ -1036,7 +1036,7 @@ prepare_vm() {
fi
fi

DEVINFO=$(kpartx -av "$TARGET") # 'add map loop1p1 (253:0): 0 6289408 linear /dev/loop1 2048'
DEVINFO=$(kpartx -asv "$TARGET") # 'add map loop1p1 (253:0): 0 6289408 linear /dev/loop1 2048'
if [ -z "${DEVINFO}" ] ; then
eerror "Error setting up loopback device." ; eend 1
bailout 1
Expand Down

0 comments on commit 092274d

Please sign in to comment.