busybox mount does not use fstab mount options for root partition

Andreas Hilse andreas.hilse at ipcomm.de
Tue Mar 3 16:06:35 UTC 2020


Dear Busybox Team,

I recently noticed that given mount options (sync, noatime) for the root
partition in /etc/fstab are not used.

System is built via buildroot 2016.08 - busybox v1.25.0 --- also tested with
buildroot 2019.02.9 - busybox v1.29.3

Root partition is mounted read-only by the kernel (command line:
root=/dev/sda1) and then remounted read-write via busybox init inittab entry
"::sysinit:/bin/mount -o remount,rw" (due to
BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW).
>From my understanding this should be the moment where mount uses /etc/fstab
to put the mount options into effect.
But instead it has the following options in /proc/mounts: "/dev/root / ext3
rw,relatime,data=ordered 0 0"

fstab entry:
/dev/sda1       /              ext3     rw,sync,noatime 0       1

Busybox configuration:
CONFIG_MOUNT=y
CONFIG_FEATURE_MOUNT_FLAGS=y
CONFIG_FEATURE_MOUNT_FSTAB=y

As soon as busybox mount is replaced with util-linux mount
(BR2_PACKAGE_UTIL_LINUX_MOUNT), the mount options from /etc/fstab are used
as expected.

Could this be a bug or is there something wrong with the usage of the mount
command from inittab?

Best regards
Andreas Hilse
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5767 bytes
Desc: not available
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20200303/ebaec48e/attachment.p7s>


More information about the busybox mailing list