On Sunday, 17 September 2017 10:45:16 UTC+3, Britton Kerin wrote: > > On Wed, Sep 6, 2017 at 7:59 AM, Tarmo Kuuse <[email protected] > <javascript:>> wrote: > > On Tuesday, September 5, 2017 at 1:45:05 AM UTC+3, Britton Kerin wrote: > >> > >> Any help modifying the above recipe or pointer to how to do it these > >> days would be appreciated. > > > > > > I just declare the root file system as read-only in fstab and create > some > > ramdisks for stuff that needs to be writable. > > > > LABEL=rootfs / ext4 ro,noatime,errors=remount-ro 0 1 > > debugfs /sys/kernel/debug debugfs defaults 0 0 > > tmpfs /var/log tmpfs defaults,noatime,nosuid,mode=0777,size=128M 0 > 0 > > tmpfs /var/tmp tmpfs defaults,noatime,nosuid,size=16M 0 0 > > tmpfs /tmp tmpfs defaults,noatime,nosuid,size=128M 0 0 > > > > Service generic-board-startup (a.k.a. > /opt/scripts/boot/generic-startup.sh) > > must run once with a writable root to set up a bunch of stuff (on later > > boots it complains, but it doesn't seem to matter). After that you're > stuck > > hacking all the software which expects to be able to write to disk. For > a > > working network, "/etc/resolv.conf" needs symlinking to a writable > location. > > Many services expect to persistently store their stuff under "/var/lib". > > > > I've used tmpfiles.d to create required symlinks, e.g. > > > > $ cat /etc/tmpfiles.d/10-ro-symlinks.conf > > L+ /etc/resolv.conf - - - - /var/run/symlinks/etc/resolv.conf > > L+ /etc/ppp/resolv.conf - - - - /var/run/symlinks/etc/ppp/resolv.conf > > Hmm having tried this I don't get it. This fragment seem to be assuming > that: > > * the dirs /var/run/symlinks/etc etc. are created somehow, maybe > with a d line in the same file? > > * the link target files /var/run/symlinks/etc/resolv.conf exist, > I guess they can just be empty as connection manager is going to fix > them up for me anyway? > > Thanks, > Britton >
Right. I wanted to emphasize only the important lines, but prerequisites are important too :) Here's the full file #Type Path Mode UID GID Age Argument d /var/run/symlinks 0755 - - - d /var/run/symlinks/etc 0755 - - - d /var/run/symlinks/etc/ppp 0755 - - - f /var/run/symlinks/etc/resolv.conf 0755 - - - f /var/run/symlinks/etc/ppp/resolv.conf 0755 - - - # NB! Connman might override this by linking "/usr/lib/tmpfiles.d/connman_resolvconf.conf" to "/run/connman/resolv.conf" L+ /etc/resolv.conf - - - - /var/run/symlinks/etc/resolv.conf L+ /etc/ppp/resolv.conf - - - - /var/run/symlinks/etc/ppp/resolv.conf -- Kind regards, Tarmo Kuuse -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/a62e55b1-bc45-4783-b74f-f98715f6948a%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
