From 35462565973e94dc9c1f869c879abfafda5d57c6 Mon Sep 17 00:00:00 2001 From: Michael Marineau Date: Sat, 4 Jan 2014 21:39:31 -0800 Subject: [PATCH] fix(vm_image_util): Unmount STATE before making squashfs --- build_library/vm_image_util.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/build_library/vm_image_util.sh b/build_library/vm_image_util.sh index 4b0c44a406..b4b5eb1299 100644 --- a/build_library/vm_image_util.sh +++ b/build_library/vm_image_util.sh @@ -289,6 +289,12 @@ _write_cpio_disk() { local dst_dir=$(_dst_dir) local vmlinuz_name="$(_dst_name ".vmlinuz")" + # The STATE partition and all of its bind mounts shouldn't be + # packed into the squashfs image. Just ROOT and OEM. + if mountpoint -q "${VM_TMP_ROOT}/media/state"; then + sudo umount --all-targets "${VM_TMP_ROOT}/media/state" + fi + # Build the squashfs, embed squashfs into a gzipped cpio mkdir -p "${cpio_target}" pushd "${cpio_target}" >/dev/null