Index: chromeos-install |
diff --git a/chromeos-install b/chromeos-install |
index 8cd1a31e43a23d013f27c4b5b96fca04fef22640..6fe82e022b50e05ea19894b85d5a73363ce809b0 100755 |
--- a/chromeos-install |
+++ b/chromeos-install |
@@ -452,6 +452,9 @@ if [ "${FLAGS_preserve_stateful}" -eq "${FLAGS_FALSE}" ]; then |
loop_offset_setup $DST $START_STATEFUL |
sudo mkfs.ext3 -F -b 4096 -L "H-STATE" ${LOOP_DEV} \ |
$(($NUM_STATEFUL_SECTORS / 8)) |
+ # Need to synchronize before releasing loop device, otherwise the losetup -d |
+ # may get device busy. |
+ sync |
loop_offset_cleanup |
fi |