From 43c700a247256407bf14a3c0a080422df4ccc116 Mon Sep 17 00:00:00 2001 From: Lluis Campos Date: Wed, 9 Sep 2020 15:42:39 +0200 Subject: [PATCH 1/2] MEN-3912: Warn user when converting read-only fs breaking Delta updates Changelog: Warn user when converting read-only file systems that would result in unstable checksums, making the image incompatible with Mender Delta updates. Signed-off-by: Lluis Campos --- mender-convert-modify | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/mender-convert-modify b/mender-convert-modify index 8a72629..176236c 100755 --- a/mender-convert-modify +++ b/mender-convert-modify @@ -261,6 +261,14 @@ if [ "${MENDER_DATA_PART_GROWFS}" == "y" ]; then MENDER_DATA_PART_FSTAB_OPTS="${MENDER_DATA_PART_FSTAB_OPTS},x-systemd.growfs" fi +if echo ${MENDER_ROOT_PART_FSTAB_OPTS} | tr ',' '\n' | egrep -q "^ro$"; then + if ! echo "${MENDER_ROOT_PART_MKFS_OPTS}" | fgrep -q -- "-O ^64bit"; then + log_warn "EXT4 64bits feature is known to create unstable checksums on read-only file systems, add \"-O ^64bit\" to MENDER_ROOT_PART_MKFS_OPTS to remove it" + fi + if ! echo "${MENDER_ROOT_PART_MKFS_OPTS}" | fgrep -q -- "-O ^has_journal"; then + log_warn "EXT4 journal feature is known to create unstable checksums on read-only file systems, add \"-O ^has_journal\" to MENDER_ROOT_PART_MKFS_OPTS to remove it" + fi +fi log_info "Using boot partition device in fstab: $boot_part_device" log_info "Using data partition device in fstab: $data_part_device" From f101914f352d61474e752954280f9e6ab31086a2 Mon Sep 17 00:00:00 2001 From: Lluis Campos Date: Fri, 11 Sep 2020 11:22:16 +0200 Subject: [PATCH 2/2] Rephrase MENDER_ROOT_PART_FS_PASSNO description It is not an strict requirement Changelog: None Signed-off-by: Lluis Campos --- configs/mender_convert_config | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/configs/mender_convert_config b/configs/mender_convert_config index f845246..7ed997b 100644 --- a/configs/mender_convert_config +++ b/configs/mender_convert_config @@ -38,7 +38,8 @@ MENDER_ROOT_PART_MKFS_OPTS="" # Set the fstab options for mounting the root partition MENDER_ROOT_PART_FSTAB_OPTS="defaults" -# Set to 0 to disable fsck; needed for read-only rootfs support + +# Set to 0 to disable fsck; recommended for read-only rootfs MENDER_ROOT_PART_FS_PASSNO="1" # Set the fstab options for mounting the data partition