[OE-core] read only rootfs?

Hauser, Wolfgang (external) Wolfgang.Hauser.external at cassidian.com
Tue Mar 6 08:56:21 UTC 2012


Hello,

we run our system using a readonly rootfs.

The main issues is, to figure out which packages need writeable data, this data have to be linked and managed by volatiles.
- tmpfs in ram for /tmp /var/volatiles
- links in  volatiles for /var/lib/.. (bluez, dhcp, ...); /var/log ;/var/run
- links for all files that have to be writeable from the aplications which are used.

Next step is to modify the packages that need a runtime (first boot) configuration.

- amend (bbappend) or modify the recipes in your own OE layer to avoid runtime (first boot) configuration of packages, most of them are capable to do its configuration offline. (search for pkg_postinst pkg_preinst)
 
Finally we got a working readonly Image directly out of OE. We don't use filesystem overlays like unionfs.
We use ubifs for NAND, because squashfs isn't able to manage bad blocks of NAND.

The number of modified packages isn't that high, so it may be better to spent the work to figure out the volatiles instead of overlaying the filesystems and carry the overhead.

Our user data reside on a USB-Stick connected to the system.

Reagards
Wolfgang

-----Ursprüngliche Nachricht-----
Von: openembedded-core-bounces at lists.openembedded.org [mailto:openembedded-core-bounces at lists.openembedded.org] Im Auftrag von Cliff Brake
Gesendet: Montag, 5. März 2012 21:40
An: Patches and discussions about the oe-core layer
Betreff: [OE-core] read only rootfs?

Hello,

What are the best practices for implementing a read-only rootfs built
with OE?  I've looked at a few things like poky-tiny.conf, but figured
I would ask.

To date, I've been cheating and implementing a tmpfs overlay on top a
RO rootfs using unionfs, but this is less than idea as you need to do
the package install process on every boot.  Others boot the first time
RW, and then switch to RO for subsequent boots.

Thanks,
Cliff

-- 
=================
http://bec-systems.com

_______________________________________________
Openembedded-core mailing list
Openembedded-core at lists.openembedded.org
http://lists.linuxtogo.org/cgi-bin/mailman/listinfo/openembedded-core




More information about the Openembedded-core mailing list