[yocto] Read-only file system with persistent storage

Matt Schuckmann Matt.Schuckmann at planar.com
Tue Jul 21 09:01:38 PDT 2015


If you are using systemd you can simply create a separate writeable partition and then use the volatile_binds.bb recipe to map files or directories from the read only rootfs to the writable partition via bind mounts. 
If you are not using systemd you can do the same thing with sysVinit you'll just have to write your own recipe equivalent to volatile_binds.bb

This method works and the way volatile_binds is written it takes the default settings from the read only rootfs which is nice. 

The only problem I've found is if you have a bind mount to a file you have to be careful not to delete the file or it will break the mount link.You'd be surprised how often you want to delete the file when you go to update it. Therefore I tend to use directories with volatile_binds.bb instead of individual files. 

Matt S. 

> -----Original Message-----
> From: yocto-bounces at yoctoproject.org [mailto:yocto-
> bounces at yoctoproject.org] On Behalf Of Gary Thomas
> Sent: Thursday, July 16, 2015 4:37 AM
> To: Yocto Project
> Subject: [yocto] Read-only file system with persistent storage
> 
> I'd like to set up a system with a read-only root file system along with some
> persistent read-write storage.  What are the [best] options in Poky/Yocto for
> this?  Is there any support for some type of overlay file system?
> 
> Thanks for any ideas/pointers
> 
> --
> ------------------------------------------------------------
> Gary Thomas                 |  Consulting for the
> MLB Associates              |    Embedded world
> ------------------------------------------------------------
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto




More information about the yocto mailing list