Skip to content

Commit 04c8647

Browse files
committed
board/common: fix boot warnings, follow-up to 45efa94
In 45efa94 we introduced new mount options for the: 'aux', 'cfg', and 'var' partitions. To save boot time, we also disabled the periodic fsck check, which does not affect journal replay or other Ext4 safety or integrity checks. The latter involved calling tune2fs at runtime, but this caused the following to appear for the 'aux' partition, which is a reduced ext4 for systems that need to change U-Boot settings, e.g., to set MAC address on systems without a VPD. EXT4-fs: Mount option(s) incompatible with ext2 Note, this is a "bogus" warning, setting the fstypt to ext2 in fstab is not the way around this one. That's been tried. To make matters worse, the new mount option(s), e.g., 'commit=30', gave us another set of warnings from the kernel. This was due to the fstype being 'auto', so the kernel objected to options not being applicable to every filesystem it tried before ending up with extfs: squashfs: Unknown parameter 'commit' vfat: Unknown parameter 'commit' exfat: Unknown parameter 'commit' fuseblk: Unknown parameter 'commit' btrfs: Unknown parameter 'errors' This commit explicitly sets cfg and var to ext4, leaving mnt as auto, we also check before calling tune2fs that the partition/disk image is ext4. Signed-off-by: Joachim Wiberg <[email protected]>
1 parent 9c220d8 commit 04c8647

File tree

2 files changed

+10
-8
lines changed
  • board/common/rootfs

2 files changed

+10
-8
lines changed

board/common/rootfs/etc/fstab

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@ cfgfs /config configfs nofail,noauto 0 0
1515
# The chosen backing storage for the overlays placed on /cfg, /etc,
1616
# /home, /root, and /var, are determined dynamically by /usr/libexec/infix/mnt
1717
# depending on the available devices.
18-
mnttmp /mnt/tmp tmpfs defaults 0 0
19-
LABEL=aux /mnt/aux auto noatime,nodiratime,noauto,commit=30,errors=remount-ro 0 0
20-
LABEL=var /mnt/var auto noatime,nodiratime,noauto,commit=30,errors=remount-ro 0 0
21-
LABEL=cfg /mnt/cfg auto noatime,nodiratime,noauto,commit=30,errors=remount-ro 0 0
22-
hostfs /mnt/host 9p cache=none,msize=16384,noauto 0 0
23-
/usr/libexec/infix/mnt# /cfg helper none 0 0
18+
mnttmp /mnt/tmp tmpfs defaults 0 0
19+
LABEL=aux /mnt/aux auto noatime,nodiratime,noauto,errors=remount-ro 0 0
20+
LABEL=var /mnt/var ext4 noatime,nodiratime,noauto,commit=30,errors=remount-ro 0 0
21+
LABEL=cfg /mnt/cfg ext4 noatime,nodiratime,noauto,commit=30,errors=remount-ro 0 0
22+
hostfs /mnt/host 9p cache=none,msize=16384,noauto 0 0
23+
/usr/libexec/infix/mnt# /cfg helper none 0 0

board/common/rootfs/usr/libexec/infix/mnt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -292,8 +292,10 @@ mount_rw()
292292

293293
# TODO: Also look for UBI partitions
294294

295-
#
296-
tune2fs -c 0 -i 0 LABEL="$1" 2>/dev/null
295+
# Disable periodic fsck, yet keeping safety checks on ext4
296+
if grep "LABEL=$label" /etc/fstab |grep -q ext4; then
297+
tune2fs -c 0 -i 0 LABEL="$1" 2>/dev/null
298+
fi
297299
mount LABEL="$1" 2>/dev/null && return 0
298300

299301
return 1

0 commit comments

Comments
 (0)