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>
revert-252-rm-only-tag-2.2.x
Drew Moseley 5 years ago
parent
commit
49be511216
  1. 8
      mender-convert-package

8
mender-convert-package

@ -23,8 +23,8 @@ PLATFORM_PACKAGE_HOOKS=(platform_package)
function trap_exit() { function trap_exit() {
echo "mender-convert-package has finished. Cleaning up..." echo "mender-convert-package has finished. Cleaning up..."
sudo umount -f work/boot > /dev/null sudo umount -f work/boot > /dev/null 2>&1 || true
sudo umount -f work/rootfs > /dev/null sudo umount -f work/rootfs > /dev/null 2>&1 || true
} }
function trap_term() { 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" disk_write_at_offset "${output_dir}/boot-gap.bin" "${img_path}" "1"
fi 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 # Burn Partitions
log_info "Writing boot partition image" log_info "Writing boot partition image"
disk_write_at_offset "${boot_part}" "${img_path}" "${boot_part_start}" disk_write_at_offset "${boot_part}" "${img_path}" "${boot_part_start}"

Loading…
Cancel
Save