Browse Source

Unmount filesystem images before creating full image.

This results in filesystems with fewer fsck failures in some environments.

Changelog: Title
Signed-off-by: Drew Moseley <drew.moseley@northern.tech>
(cherry picked from commit 49be511216)
2.1.x
Drew Moseley 4 years ago
committed by Kristian Amlie
parent
commit
907e752c44
No known key found for this signature in database GPG Key ID: F464407C996AF03F
  1. 8
      mender-convert-package

8
mender-convert-package

@ -23,8 +23,8 @@ PLATFORM_PACKAGE_HOOKS=(platform_package)
function trap_exit() {
echo "mender-convert-package has finished. Cleaning up..."
sudo umount -f work/boot > /dev/null
sudo umount -f work/rootfs > /dev/null
sudo umount -f work/boot > /dev/null 2>&1 || true
sudo umount -f work/rootfs > /dev/null 2>&1 || true
}
function trap_term() {
@ -255,6 +255,10 @@ if [ "${MENDER_COPY_BOOT_GAP}" == "y" ]; then
disk_write_at_offset "${output_dir}/boot-gap.bin" "${img_path}" "1"
fi
# Unmount filesystem image files
run_and_log_cmd "sudo umount -f work/boot"
run_and_log_cmd "sudo umount -f work/rootfs"
# Burn Partitions
log_info "Writing boot partition image"
disk_write_at_offset "${boot_part}" "${img_path}" "${boot_part_start}"

Loading…
Cancel
Save