* base-files: invalid 'strictatime' on /run
@ 2025-07-08 4:31 Daniel F. Dickinson
2025-07-08 17:00 ` [yocto] " Gyorgy Sarvari
0 siblings, 1 reply; 3+ messages in thread
From: Daniel F. Dickinson @ 2025-07-08 4:31 UTC (permalink / raw)
To: yocto
Currently in OE-Core meta/recipes-core/base-files/base-files/fstab
(which becomes /etc/fstab on-device) has
tmpfs /run tmpfs
mode=0755,nodev,nosuid,strictatime 0 0
which for qemuarm64 (from OE-core) and raspberrypi5 (from
meta-raspberrypi) both
emit an error in dmesg during boot "invalid mount option 'strictatime'".
With busybox this seems to be cosmetic (strictatime simply ignored), but
with using
toybox the mount error results in /run not being mounted, which causes
problems
for other packages (like udev) when using sysvinit.
Before I create a patch, I'd like to understand why this is occurring,
and the preferred fix.
1. Is this arm/arm64 specific due to defconfig not being aligned with
e.g. x64, or
2. Is this a result of a change in default kernel config across the board?
3. Or, am I missing something about this?
In the case of 1, is the preferred resolution to add strictatime to
arm/arm64 defconfig?
In the case of 2, should the 'strictatime' be dropped entirely or
replace with a different
'atime' option?
Oh, and should busybox config be changed so that an invalid mount option
is not
silently ignored?
Regards,
Daniel
--
Daniel F. Dickinson, B. Computing, A+ · ce
https://www.wildtechgarden.ca - Technical documentation, website, and blog
https://www.danielfdickinson.ca - Personal professional blog, website, and resume
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [yocto] base-files: invalid 'strictatime' on /run
2025-07-08 4:31 base-files: invalid 'strictatime' on /run Daniel F. Dickinson
@ 2025-07-08 17:00 ` Gyorgy Sarvari
2025-07-12 20:41 ` Daniel F. Dickinson
0 siblings, 1 reply; 3+ messages in thread
From: Gyorgy Sarvari @ 2025-07-08 17:00 UTC (permalink / raw)
To: yocto, daniel
On 7/8/25 06:31, Daniel F. Dickinson via lists.yoctoproject.org wrote:
> Currently in OE-Core meta/recipes-core/base-files/base-files/fstab
>
> (which becomes /etc/fstab on-device) has
>
>
> tmpfs /run tmpfs
> mode=0755,nodev,nosuid,strictatime 0 0
>
> which for qemuarm64 (from OE-core) and raspberrypi5 (from
> meta-raspberrypi) both
>
> emit an error in dmesg during boot "invalid mount option 'strictatime'".
>
> With busybox this seems to be cosmetic (strictatime simply ignored), but
> with using
>
> toybox the mount error results in /run not being mounted, which causes
> problems
>
> for other packages (like udev) when using sysvinit.
>
>
> Before I create a patch, I'd like to understand why this is occurring,
> and the preferred fix.
>
>
> 1. Is this arm/arm64 specific due to defconfig not being aligned with
> e.g. x64, or
>
> 2. Is this a result of a change in default kernel config across the board?
>
> 3. Or, am I missing something about this?
>
>
> In the case of 1, is the preferred resolution to add strictatime to
> arm/arm64 defconfig?
>
> In the case of 2, should the 'strictatime' be dropped entirely or
> replace with a different
>
> 'atime' option?
>
>
> Oh, and should busybox config be changed so that an invalid mount option
> is not
>
> silently ignored?
I did some quick tests with qemuarm64, with largely default config. I
did not see busybox ignoring this flag, it seems to be handled and
converted to a flag in the call. (Did you use some custom config with it
maybe? Or did I do something incorrectly?). The issue doesn't look arch
nor kernel specific to me.
Looking at the syscalls, the following shows up when running "mkdir aaa
&& mount -t tmpfs -o mode=0755,nodev,nosuid,strictatime tmpfs ./aaa":
toybox:
mount("tmpfs", "./aaa", "tmpfs", MS_NOSUID|MS_NODEV|MS_SILENT,
"mode=0755,strictatime") = -1 EINVAL (Invalid argument)
busybox:
mount("tmpfs", "./aaa", "tmpfs",
MS_NOSUID|MS_NODEV|MS_SILENT|MS_STRICTATIME, "mode=0755") = 0
The error[1] itself seems to originate from the kernel because of this
unrecognized option[2].
Looking at toybox source, it seems that it doesn't know about this
flag/option, it is mentioned in a comment also[3], so it just passes to
the kernel as it is, as opposed to busybox[4], which does recognize it.
Personally I would just use a custom a fstab without strictatime option
- the one in oe-core is meant to be a sample. Patches are always great
of course, especially if it can be made toybox-friendly without removing
busybox features.
If you would like to use this option along with toybox, instead of
changing the options in Yocto, I would check in toybox if adding this
flag to the options list works out of the box. If it works, why not open
a PR with them.
[1]: option parser, that returns EINVAL in case of unrecognized option,
based on the function's docs:
https://github.com/torvalds/linux/blob/master/fs/fs_parser.c#L101
[2]: recognized options for tmpfs:
https://github.com/torvalds/linux/blob/master/mm/shmem.c#L4512
[3]: https://github.com/landley/toybox/blob/master/toys/lsb/mount.c#L116
[4]: https://github.com/mirror/busybox/blob/master/util-linux/mount.c#L431
>
>
> Regards,
>
> Daniel
>
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#65624): https://lists.yoctoproject.org/g/yocto/message/65624
> Mute This Topic: https://lists.yoctoproject.org/mt/114041657/6084445
> Group Owner: yocto+owner@lists.yoctoproject.org
> Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [skandigraun@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [yocto] base-files: invalid 'strictatime' on /run
2025-07-08 17:00 ` [yocto] " Gyorgy Sarvari
@ 2025-07-12 20:41 ` Daniel F. Dickinson
0 siblings, 0 replies; 3+ messages in thread
From: Daniel F. Dickinson @ 2025-07-12 20:41 UTC (permalink / raw)
To: yocto, skandigraun
On 2025-07-08 13:00, Gyorgy Sarvari via lists.yoctoproject.org wrote:
>
> On 7/8/25 06:31, Daniel F. Dickinson via lists.yoctoproject.org wrote:
>> Currently in OE-Core meta/recipes-core/base-files/base-files/fstab
>>
>> (which becomes /etc/fstab on-device) has
>>
>>
>> tmpfs /run tmpfs
>> mode=0755,nodev,nosuid,strictatime 0 0
>>
>> which for qemuarm64 (from OE-core) and raspberrypi5 (from
>> meta-raspberrypi) both
>>
>> emit an error in dmesg during boot "invalid mount option 'strictatime'".
>>
>> With busybox this seems to be cosmetic (strictatime simply ignored), but
>> with using
>>
>> toybox the mount error results in /run not being mounted, which causes
>> problems
>>
>> for other packages (like udev) when using sysvinit.
>>
>>
>> Before I create a patch, I'd like to understand why this is occurring,
>> and the preferred fix.
>>
>>
>> 1. Is this arm/arm64 specific due to defconfig not being aligned with
>> e.g. x64, or
>>
>> 2. Is this a result of a change in default kernel config across the board?
>>
>> 3. Or, am I missing something about this?
>>
>>
>> In the case of 1, is the preferred resolution to add strictatime to
>> arm/arm64 defconfig?
>>
>> In the case of 2, should the 'strictatime' be dropped entirely or
>> replace with a different
>>
>> 'atime' option?
>>
>>
>> Oh, and should busybox config be changed so that an invalid mount option
>> is not
>>
>> silently ignored?
> I did some quick tests with qemuarm64, with largely default config. I
> did not see busybox ignoring this flag, it seems to be handled and
> converted to a flag in the call. (Did you use some custom config with it
> maybe? Or did I do something incorrectly?). The issue doesn't look arch
> nor kernel specific to me.
I looked again and I guess I previously missed seeing the 'strictatime'
on the mounted filesystem, when using busybox. Sorry for the noise.
I guess I am a bit over exuberant with getting back into firmware
and having a tonne of stuff to relearn and catch up on.
> Looking at the syscalls, the following shows up when running "mkdir aaa
> && mount -t tmpfs -o mode=0755,nodev,nosuid,strictatime tmpfs ./aaa":
>
> toybox:
> mount("tmpfs", "./aaa", "tmpfs", MS_NOSUID|MS_NODEV|MS_SILENT,
> "mode=0755,strictatime") = -1 EINVAL (Invalid argument)
>
> busybox:
> mount("tmpfs", "./aaa", "tmpfs",
> MS_NOSUID|MS_NODEV|MS_SILENT|MS_STRICTATIME, "mode=0755") = 0
>
> The error[1] itself seems to originate from the kernel because of this
> unrecognized option[2].
>
> Looking at toybox source, it seems that it doesn't know about this
> flag/option, it is mentioned in a comment also[3], so it just passes to
> the kernel as it is, as opposed to busybox[4], which does recognize it.
>
> Personally I would just use a custom a fstab without strictatime option
> - the one in oe-core is meant to be a sample. Patches are always great
> of course, especially if it can be made toybox-friendly without removing
> busybox features.
Custom fstab is what I have done, for now (and would have needed to
at some point anyway).
> If you would like to use this option along with toybox, instead of
> changing the options in Yocto, I would check in toybox if adding this
> flag to the options list works out of the box. If it works, why not open
> a PR with them.
This seems to me to be the preferable option. It is now on my to do
list...for what that's worth.
> [1]: option parser, that returns EINVAL in case of unrecognized option,
> based on the function's docs:
> https://github.com/torvalds/linux/blob/master/fs/fs_parser.c#L101
> [2]: recognized options for tmpfs:
> https://github.com/torvalds/linux/blob/master/mm/shmem.c#L4512
> [3]: https://github.com/landley/toybox/blob/master/toys/lsb/mount.c#L116
> [4]: https://github.com/mirror/busybox/blob/master/util-linux/mount.c#L431
>
Thank you again for your help.
As an aside, I know there is a link 'somewhere' in the Yocto universe that
points to a really great guide to configuring a plethora of email clients
for development lists, but the life of me I cannot find it (and we'll not go
into the decline of search engine effectiveness). Do you happen to know
where it is? I use Thunderbird, and I can't seem to get the width limits to
cooperate, even with defaulting to plaintext for emails and setting what
are supposedly parameters which control that.
--
Daniel F. Dickinson, B. Computing, A+ · ce
https://www.wildtechgarden.ca - Technical documentation, website, and blog
https://www.danielfdickinson.ca - Personal professional blog, website, and resume
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2025-07-12 20:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-07-08 4:31 base-files: invalid 'strictatime' on /run Daniel F. Dickinson
2025-07-08 17:00 ` [yocto] " Gyorgy Sarvari
2025-07-12 20:41 ` Daniel F. Dickinson
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).