[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    RE: busybox mount does not use fstab mount options for root partition
From:       Andreas Hilse <andreas.hilse () ipcomm ! de>
Date:       2020-03-05 11:05:21
Message-ID: 008901d5f2dd$f64d1a40$e2e74ec0$ () ipcomm ! de
[Download RAW message or body]

This is a multipart message in MIME format.

--===============8521802140813610063==
Content-Language: de
Content-Type: multipart/signed;
	protocol="application/x-pkcs7-signature";
	micalg=2.16.840.1.101.3.4.2.1;
	boundary="----=_NextPart_000_0084_01D5F2E6.579C2B30"

This is a multipart message in MIME format.


I took a look at mount.c

As root partition is already mounted, 'mount -a' does nothing with it.
https://git.busybox.net/busybox/tree/util-linux/mount.c#n2364

When remounting, mtab is always favored instead of fstab so no option change
possible.
https://git.busybox.net/busybox/tree/util-linux/mount.c#n2291
	// Open either fstab or mtab
	if (cmdopt_flags & MS_REMOUNT) {
		// WARNING. I am not sure this matches util-linux's
		// behavior. It's possible util-linux does not
		// take -o opts from mtab (takes only mount source).
		fstabname = bb_path_mtab_file;
	}
	fstab = setmntent(fstabname, "r");

From my understanding it is currently not possible in a standard
buildroot/busybox environment that mount options from /etc/fstab for the
root partition are taken into consideration.
The only option I see right now is manually adding the mount options to
either kernel command line or e.g. the 
mount commands in /etc/inittab.
Please correct me if I'm wrong. I'd also be happy for any suggestions.

Taking a quick glance at mount.c in util-linux there is some merging of
fstab/mtab flags going on.

Thanks & best regards
Andreas Hilse

["smime.p7s" (application/pkcs7-signature)]

_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox

--===============8521802140813610063==--

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic