[systemd-devel] date/time set to epoch when using readonly rootfs

Belisko Marek marek.belisko at gmail.com
Thu Oct 22 06:03:13 UTC 2020


On Thu, Oct 22, 2020 at 7:58 AM Tomasz Torcz <tomek at pipebreaker.pl> wrote:
>
> On Wed, Oct 21, 2020 at 10:13:10PM +0200, Belisko Marek wrote:
> > Hi,
> >
> > I'm facing a strange issue. When I boot system using systemd (244.3)
> > and in one service I'm generating some certificates. When checking
> > them I'm getting the result that the certificate was created 1.1.1970
> > which is invalid. I can wait until I get a network connection and only
> > then create certificates but I have only issues that some files are
> > created and I'm getting date/time creation also epoch. Shouldn't it be
> > the date/time of build? Can this be caused somehow by using read only
> > rootfs? Thanks a lot for any pointers.
>
>   Waiting for network is probably a wrong think to do. You want
> After=time-sync.target (see man systemd.special). Of course you need
> something to provide this target.  Do you have
> systemd-timesyncd.service* enabled?
Yes I'm using systemd-timesyncd service to sync date/time.
Any idea why build date/time is not used if not yet synced?
>
> * it's systemd's implementation of SNTP. Also tries to set system time to at
> least time of last shutdown.

Thanks,

marek

>
>
> --
> Tomasz Torcz               “Never underestimate the bandwidth of a station
> tomek at pipebreaker.pl        wagon filled with backup tapes.”  — Jim Gray
>
> _______________________________________________
> 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