You are not logged in.
Hi all,
I've got an embedded system (custom hardware & kernel, using ArchLinux arm multi-platform) that I'm configuring so that the root file system is mounted read-only via fstab.
On bootup, the Network time synchronization service (systemd-timesyncd) fails to start because it is a root file system. The error message according to journalctl is:
systemd-timesyncd.service failed to run 'start' task: Read-only file systemI haven't managed to figure out what file(s) the service is using so that I can move those to a rw partition. Anyone know?
Alternatively, are there any other ntp clients in the Arch repos that can operate without the need for a rw rootfs?
Thanks,
Amr
Offline
On my system, the 'systemd-timesyncd.service' writes:
/var/lib/systemd/clock
It's a file which is regularly touched.
And there is a private tmp directory under /tmp
If you want to change that, you will need to change the '/usr/lib/systemd/system/systemd-timesyncd.service':
first copy it to /etc/systemd/system
and edit the copy, which will takes precedence over the original one
Change the line:
RequiresMountsFor=/var/lib/systemd/clock
to something elsewhere...
Offline
Although this is a architecture-independent question, you will probably get more suggestions over at the Arch Linux ARM forums.
Sakura:-
Mobo: MSI MAG X570S TORPEDO MAX // Processor: AMD Ryzen 9 5950X @4.9GHz // GFX: AMD Radeon RX 5700 XT // RAM: 32GB (4x 8GB) Corsair DDR4 (@ 3000MHz) // Storage: 1x 3TB HDD, 6x 1TB SSD, 2x 120GB SSD, 1x 275GB M2 SSD
Making lemonade from lemons since 2015.
Offline
@berbae: Thanks for the pointer. For this test, I modified the original file in /usr/lib/systemd/system/systemd-timesyncd.service and changed the line RequiredMountsFor to point to a directory on my rw partition. Unfortunately, this doesn't seem to solve the problem - timesyncd still fails to start because it says the file system is readonly (according to its journal logs). Any thoughts?
@WorMzy: I figured this was a generic ArchLinux issue rather than ARM specific, hence why I posted here first. We'll see how we get on here.
Offline
OK I see that what I suggested to you doesn't work.
From 'man systemd.unit':
RequiresMountsFor=
Takes a space-separated list of absolute paths. Automatically adds dependencies of type Requires= and After= for all
mount units required to access the specified path.
So this option cannot be used to change the specified path. It only tells systemd to mount what is required to access the path.
Unfortunately, looking into the 'timesyncd.c' source file, the '/var/lib/systemd/clock' path is hard coded, and consequently can be modified only by editing the source file and re-building systemd.
Either you do that or you try to place /var in another rw partition.
By the way, I presume that you keep the systemd journal volatile, because if not it needs to write to '/var/log/journal/...'; can you confirm?
Last edited by berbae (2014-09-15 14:40:19)
Offline
@berbae - thanks for your reply. Guess that confirms that then. Yes, I am indeed keeping the journal volatile by mounting /var/log as tmpfs.
What I've ended up doing is installing and running Openntpd, which seems to work fine with a read only file system and does the same basic job.
Thanks for your help - really appreciate it.
Offline