[yocto] Support for writable files with a read-only root file system

Matt Schuckmann Matt.Schuckmann at planar.com
Tue Nov 25 23:51:33 PST 2014


I've been investigating the support for read only root file systems and trying to suss out how to support persistent writeable files in my image where the root file system is read only, this seems like a very common thing for an embedded Linux system to need but I'm not seeing the support for it. 
 
I should note that I'm working off of the Dylan branch, I'm not sure if things have changed in a newer branch. 

So far I've had to read the code to figure out as much as I have, and I haven't found any documentation for this, am I missing something? 

It appears that my recipe(s) are supposed to install a volatiles file under ${D}${sysconfdir}/default/volatiles/ that lists out the volatile directories, links and files that need to be created in the image. 

For writeable persistent files I would presume that I should specify links that point to some place on a write partition. 

What I don't see is any sort of mechanism for setting up the default files on that writeable partition, am I on my own for this or is there some other recommended mechanism. 

In my early research I found the MentorEmbedded/meta-ro-rootfs layer that had a nifty way of specifying VOLATILE_BINDS to create a list of binds that should occur at boot up and in the process creating the mounts if the target of the bind didn't exist a copy was made from the read only location, this appears to have provided a sort of default to go into the writeable location. Was this functionality abandoned when support for ro-rootfs was brought into oe-core? If so why? 

A good example for the kind of writeable persistent file that I intend to have is /etc/network/interfaces
How do I go about letting the init_ifupdown recipe install it normally and then have another recipe or even the image configure it to be either a link or a bind mount at another location while still preserving the default contents. 

I hope I'm making sense here. 

Thanks,
Matt S. 




More information about the yocto mailing list