From: "Eric Bénard" <eric@eukrea.com>
To: Cliff Brake <cliff.brake@gmail.com>
Cc: openembedded-core@lists.openembedded.org
Subject: Re: read only rootfs?
Date: Tue, 6 Mar 2012 09:13:58 +0100 [thread overview]
Message-ID: <20120306091358.6c9d5b49@eb-e6520> (raw)
In-Reply-To: <CAOd_LFz2nUOW4D4Q9YuDHzwvs6qTwgS2TJZA5UnJbYaROCiSGg@mail.gmail.com>
Hi Cliff,
Le Mon, 5 Mar 2012 15:39:36 -0500,
Cliff Brake <cliff.brake@gmail.com> a écrit :
> 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.
>
I've just done a squashfs image (using angstrom and based on
systemd-image) which was designed to run from a USB stick on an
OMAP3 board (for production testing purpose).
I went this way :
- build an ext3 image and run it read write to check it works fine,
- flash again the same ext3 image and run it read only to check which
init scripts fail,
- amend the corresponding recipes to create links to tmpfs for the files
that the init or postinstall scripts are creating, the first recipe to
amend is base-files that angstrom modifies to not have volatile var/*
directories which is a big problem when running read only (or simply
when running on a flash where erase/write cycles are counted),
other problematic recipes are those which install files in /var/log
for example,
- run the new ext3 image read only to validate all the scripts are
fixed (I'm using ext3 as it's easy to turn it rw to check how to fix
a problem on the target without loosing to much time)
- once the ext3 image works fine ro, build the squasfs image and it
should run fine.
Eric
--
http://eukrea.com/en/news/104-2012
next prev parent reply other threads:[~2012-03-06 8:22 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-05 20:39 read only rootfs? Cliff Brake
2012-03-05 20:56 ` Otavio Salvador
2012-03-05 21:47 ` Cliff Brake
2012-03-05 21:50 ` Otavio Salvador
2012-03-06 8:13 ` Eric Bénard [this message]
-- strict thread matches above, loose matches on Subject: below --
2012-03-06 8:56 Hauser, Wolfgang (external)
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120306091358.6c9d5b49@eb-e6520 \
--to=eric@eukrea.com \
--cc=cliff.brake@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox