[CentOS] Centos 4.4 in a cf card + ramdisk

Wed Jan 24 10:31:18 UTC 2007
Daniel de Kok <daniel-lists at taickim.com>

On Tue, 23 Jan 2007 11:48:42 -0500
"Erick Perez" <eaperezh at gmail.com> wrote:
> What documents can I read to make /var and /tmp sit on a ram disk and
> boot the operating system in read write and switch to read only after
> booting?

One approach that you could take is mounting the filesystem read-only,
and mounting a tmpfs filesystem as a writable overlay using unionfs.
The following paper describes various approaches how you could do this:

http://www.am-utils.org/docs/sipek-ols2006/index.html

The CentOS live CD also uses unionfs (and squashfs), so it could be
useful to look at that as a sample implementation.

-- Daniel

PS. unionfs is an additional kernel patch, and adding that to the
CentOS kernel makes it an unsupported kernel. Though, precompiled
kernels with unionfs are available through the Live CD build
infrastructure on CentOS mirrors (/centos/4.4/build/livecd).