<div dir="ltr"><div>Hi Carsten,</div><div><br></div>Thanks for your help.<div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 2 Aug 2019 at 20:42, Stelling2 Carsten <<a href="mailto:Carsten.Stelling2@goerlitz.com">Carsten.Stelling2@goerlitz.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
<div lang="DE">
<div class="gmail-m_-3697380400908974868WordSection1">
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">Hi Ryan,<u></u><u></u></span></p>
<p class="MsoNormal"><span style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u>Â <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">Regarding to timesyncd, have a look at
<a href="https://wiki.archlinux.org/index.php/systemd-timesyncd" target="_blank">https://wiki.archlinux.org/index.php/systemd-timesyncd</a>, especially the section<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">“Note: The service writes to a local file /var/lib/systemd/timesync/clock with every synchronization.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">This location is hard-coded and cannot be changed. This may be problematic for running off<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">read-only root partition or trying to minimize writes to an SD card.â€</span></p></div></div></blockquote><div><br></div><div>Yes, this looks like it is my problem. I experimented with timesync, and by making /var/lib and a few other places writable, I'm able to start it manually, but not via systemd, which I think is experiencing other issues with the read-only rootfs.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="DE"><div class="gmail-m_-3697380400908974868WordSection1"><p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u>Â <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">See also
<a href="https://github.com/systemd/systemd/issues/5610" target="_blank">https://github.com/systemd/systemd/issues/5610</a> for your problem with systemd-resolved.<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">According to this, /var, /var/tmp, /run, and /tmp should be writable.</span><span style="color:rgb(31,73,125);font-family:Arial,sans-serif;font-size:10pt">Â </span></p></div></div></blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="DE"><div class="gmail-m_-3697380400908974868WordSection1">
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">I think the problem is not Yocto specific, but possibly I overlook something.</span></p></div></div></blockquote><div><br></div><div><div>Again, I think you're right. I need to have these areas writable from boot. But I don't know how.</div></div><div><br></div><div>IÂ suppose my problem is that these areas used to be writable when I was using Sumo, but moving to Warrior has caused something to change. I'm wondering what extra steps I need to do in Warrior to ensure that all these things are mounted with tmpfs as before. I expect my Sumo recipes worked through luck more than design, and now something has changed, I need to improve them.</div><div><br></div><div>It is rather difficult to work out what the relevant changes are.</div><div><br></div><div>Kind regards,</div><div>Ryan.</div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div lang="DE"><div class="gmail-m_-3697380400908974868WordSection1"><p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u>Â <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">Best regards,<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u>Â <u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)">Carsten<u></u><u></u></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:10pt;font-family:Arial,sans-serif;color:rgb(31,73,125)"><u></u>Â <u></u></span></p>
<p class="MsoNormal"><b><span style="font-size:10pt;font-family:Tahoma,sans-serif">Von:</span></b><span style="font-size:10pt;font-family:Tahoma,sans-serif"> <a href="mailto:yocto-bounces@yoctoproject.org" target="_blank">yocto-bounces@yoctoproject.org</a> [mailto:<a href="mailto:yocto-bounces@yoctoproject.org" target="_blank">yocto-bounces@yoctoproject.org</a>]
<b>Im Auftrag von </b>Ryan Harkin<br>
<b>Gesendet:</b> Freitag, 2. August 2019 13:09<br>
<b>An:</b> <a href="mailto:yocto@yoctoproject.org" target="_blank">yocto@yoctoproject.org</a><br>
<b>Cc:</b> openembedded<br>
<b>Betreff:</b> [yocto] /var/volatile not mounted as tmpfs on read-only rootfs when migrating to Warrior<u></u><u></u></span></p>
<p class="MsoNormal"><u></u>Â <u></u></p>
<div>
<p class="MsoNormal">Hi,<u></u><u></u></p>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<div>
<p class="MsoNormal">I have a working system based on Sumo. The system boots with a read-only rootfs, then applies are read-write overlay for /etc.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<div>
<p class="MsoNormal">When I migrate to Warrior, systemd-resolved fails to start. If I mount the same rootfs via NFS, it starts and works fine.  systemd-timesyncd is also failing, but I haven't looked into that yet. It also works fine on the NFS mounted system.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<div>
<p class="MsoNormal">The resolve problem seems to be caused by two things:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Â Â - /var/volatile is read-only<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Â Â - /run/systemd/resolve has the wrong ownership<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">   drwxr-xr-x  2 systemd-network systemd-journal  80 Jul 12 16:23 resolve/<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Â Â Â I think this permissions problem may be a result of the /var/volatile mounting<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Â Â Â problems; it looks fine on the NFS mounted system.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<div>
<p class="MsoNormal">If I manually mount /var/volatile (it's in fstab) and change the ownership on /run/systemd/resolve, the service starts just fine.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<div>
<p class="MsoNormal">I also notice that /tmp is not mounted at all, which may be related.<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<div>
<p class="MsoNormal">Here are the various tmp mount points on my read-only rootfs:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<div>
<p class="MsoNormal">$ mount | grep tmp<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">devtmpfs on /dev type devtmpfs (rw,nosuid,size=112036k,nr_inodes=28009,mode=755)<br>
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)<br>
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)<br>
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)<br>
overlay on /etc type overlay (rw,relatime,lowerdir=/tmp/lower/etc,upperdir=/tmp/upper/etc,workdir=/tmp/upper/work/etc)<br>
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=23840k,mode=700)<br>
<br>
On the NFS mounted system, I see these:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<div>
<p class="MsoNormal">$ mount | grep tmp<br>
devtmpfs on /dev type devtmpfs (rw,relatime,size=118180k,nr_inodes=29545,mode=755)<br>
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)<br>
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)<br>
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)<br>
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)<br>
tmpfs on /var/volatile type tmpfs (rw,relatime)<br>
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=23840k,mode=700)<br>
<br>
As you can see, NFS has these extra mounts:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<p class="MsoNormal">tmpfs on /tmp type tmpfs (rw,nosuid,nodev)<u></u><u></u></p>
<div>
<p class="MsoNormal">tmpfs on /var/volatile type tmpfs (rw,relatime)<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<div>
<p class="MsoNormal">I've tried reverting a few commits that may be related, but I haven't had any luck working out things have changed, eg:<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<div>
<p class="MsoNormal">c4acf1b531  2018-10-19  volatile-binds: use overlayfs if available            [Matt Hoosier] <u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<div>
<p class="MsoNormal">Advice would be appreciated. Are there any particular areas I should be looking to work out what's going wrong?<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal"><u></u>Â <u></u></p>
</div>
<div>
<p class="MsoNormal">Kind regards,<u></u><u></u></p>
</div>
<div>
<p class="MsoNormal">Ryan.<u></u><u></u></p>
</div>
</div>
</div>
</div>
-- <br>
_______________________________________________<br>
yocto mailing list<br>
<a href="mailto:yocto@yoctoproject.org" target="_blank">yocto@yoctoproject.org</a><br>
<a href="https://lists.yoctoproject.org/listinfo/yocto" rel="noreferrer" target="_blank">https://lists.yoctoproject.org/listinfo/yocto</a><br>
</blockquote></div></div></div>