[systemd-devel] Antw: [EXT] Re: date/time set to epoch when using readonly rootfs
Ulrich Windl
Ulrich.Windl at rz.uni-regensburg.de
Mon Oct 26 08:02:56 UTC 2020
>>> Lennart Poettering <lennart at poettering.net> schrieb am 23.10.2020 um 13:00
in
Nachricht <20201023110051.GA326204 at gardel-login>:
> On Fr, 23.10.20 10:37, Belisko Marek (marek.belisko at gmail.com) wrote:
>
>> > > Sorry I mixed up things. Can you pls guide where can I find code which
>> > > set date/time from timestamp? Thanks
>> >
>> > This is the stuff PID 1 calls during earliest boot:
>> >
>> >
https://github.com/systemd/systemd/blob/master/src/shared/clock‑util.c#L147
>> Thanks a lot. I found an issue. The build system set config flag
>> ‑time‑epoch=0 (reason was to avoid performing fsck on every boot when
>> inavlid date/time is detected for boards which don't have rtc [0])
>> and this resulted in date 1.1.1970.
>
> All RH‑based distro have patched the time check out of e2fsck since a
> long time. In particular in RTC‑less systems it sounds like a very
> poor idea to leave that in. The right fix is certainly to remove this
> behaviour from fsck, and not to force an unnecessarily wrong time.
Hi!
I don't know, but: Can't the time-based check be disabled by tuning the fs
("-i0"), or is there a special condition for "time zero"?
Also: Doesn't mean "fsck" a "journal replay" (read: very fast) these days?
Regards,
Ulrich
>
> Lennart
>
> ‑‑
> Lennart Poettering, Berlin
> _______________________________________________
> systemd‑devel mailing list
> systemd‑devel at lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/systemd‑devel
More information about the systemd-devel
mailing list