[systemd-devel] Using timedatectl on a readonly rootfile system using mender

Shravan Singh shravan at bluesparq.com
Fri Sep 4 18:10:11 UTC 2020


Hello Lennart,

Can you help me in understanding why this push was rejected?
*Make timedatectl nicely work with read-only filesystems #8277 *
If there is some major issue. I would like to take this opportunity to make
it right and submit it again


Regards,
Shravan Singh
(239) 243-0838

Blue Sparq, Inc.
928 NE 24th Lane unit 4 and 5.
Cape Coral, FL 33993

IMPORTANT: The contents of this email and any attachments are confidential.
They are intended for the named recipient(s) only. If you have received
this email by mistake, please notify the sender immediately and do not
disclose the contents to anyone or make copies thereof.


On Fri, Sep 4, 2020 at 11:27 AM Lennart Poettering <lennart at poettering.net>
wrote:

> On Do, 20.08.20 14:22, Shravan Singh (shravan at bluesparq.com) wrote:
>
> > But no one is telling how to resolve my issue with a read-only
> > rootfs.
>
> There's no concept for having some files in /etc writable and others
> not. And you cannot use symlinking for this, nor bind mounts, since
> config files in /etc are usually updated atomically, i.e. new versions
> written in full into temporary files and then moved into place
> atomically so that you either see the old or the new but never
> anything half-written. This means that the dir of the file to update
> needs to be writable and that the old inode goes away entirely on
> update instead of being updated.
>
> I must say I see little point in having "etc mostly read-only"
> though. I mean, either your config is entirely read-only or it
> isn't. If it is read-only /etc being read-only is not a problem. If it
> can be modified then make /etc the source of truth for it and
> writable, and drop everything else from it, so that it only contains
> the writable data you care about. A lot of software these days falls
> back to fallback settings below /usr somewhere if their config files
> in /etc don#t exist, and for the stuff that doesn't work like this,
> move it over and symlink it from /etc (you can create those symlinks
> with tmpfiles.d factory options).
>
> > There are other files which can be overwritten in /etc that are linked
> to a
> > file in /run directory for eg /etc/resolv.conf file.
>
> Well, that file is quite different, resolve.conf is historically was
> configuraiton but today is more state than configuraiton, i.e. it is
> usually configured dynamically via DHCP or so. Hence people started to
> manage it in /run and leave /etc/resolv.conf only as a compat symlink
> in place, if you so will.
>
> > Then why not /etc/localtime. Why is localtime guarded so much
> > I refuse to believe that I am the only person facing this problem. But I
> > did find some leads now. Will keep you posted
>
> /etc/localtime is generally considered to be configuration and not
> state, hence people are typically fine with leaving it in /etc, since
> that's where persistant configuration is supposed to be.
>
> I am sorry, but /etc on Linux is a single directory, and you can only
> cleanly choose between all configuration read only or none, there's no
> nice way for a middle ground. Sorry.
>
> Lennart
>
> --
> Lennart Poettering, Berlin
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200904/a5f1a2d4/attachment.htm>


More information about the systemd-devel mailing list