From c5cdb626e2ccbeb82692fe43dbaf5235eb68c580 Mon Sep 17 00:00:00 2001 From: Drew Moseley Date: Wed, 26 Aug 2020 12:18:58 -0400 Subject: [PATCH] Allow for custom option when mounting filesystems. This is needed for read-only systems. Signed-off-by: Drew Moseley Changelog: Title --- configs/mender_convert_config | 5 +++++ mender-convert-modify | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/configs/mender_convert_config b/configs/mender_convert_config index 220140d..f845246 100644 --- a/configs/mender_convert_config +++ b/configs/mender_convert_config @@ -36,6 +36,11 @@ MENDER_ENABLE_SYSTEMD=y # Custom mkfs options for creating the rootfs partition 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 +MENDER_ROOT_PART_FS_PASSNO="1" + # Set the fstab options for mounting the data partition MENDER_DATA_PART_FSTAB_OPTS="defaults" diff --git a/mender-convert-modify b/mender-convert-modify index 7d8c2d5..8a72629 100755 --- a/mender-convert-modify +++ b/mender-convert-modify @@ -267,7 +267,7 @@ log_info "Using data partition device in fstab: $data_part_device" sudo bash -c "cat <<- EOF > work/rootfs/etc/fstab # stock fstab - you probably want to override this with a machine specific one -/dev/root / auto defaults 1 1 +/dev/root / ext2 ${MENDER_ROOT_PART_FSTAB_OPTS} 1 ${MENDER_ROOT_PART_FS_PASSNO} proc /proc proc defaults 0 0 ${boot_part_device} ${boot_part_mountpoint} auto defaults,sync 0 0