-
RO root file system
hello group,
I have a simple issue. I am currently developing an embedded linux
system, based on the following hardware characteristics:
via eden 800mhz(aka i586)
256 mb EmbedDisk
128 mb ram
The system that i am going to build must hold this:
- sshd
- snmpd
- an application
Beside all that, I am seriously thinking of keeping a read-only root
filesystem. I created a minimal system, which features an ext2
filesystem, mounted rw, and everyting works just fine. If i try to
leave the rootfs mounted ro, then sshd will not allow any logins, if i
don't instruct it NOT to allocate a pty on login. This is a solution,
i admit it, but an inelegant one, IMHO.
Now, here come the questions:
1. Of the possible ways all that can be done I thought of:
a. partitioning the disk in more partitions, keeping / ro, and /
dev,/tmp and /home rw, in a separate partition each one (cannot find a
good reason to discard this option)
b. use udev to create a dynamic /dev structure, and use tmpfs for /
tmp and /var (and just assume that /home will be ro, for simplicity)
(maybe the memory footprint of all that will be too large)
I like much more b, but is it feasible? would it be an option on a 64
mb ram system? Which one do you think to be the more appropriate way?
2. Which filesystem should i use for the read only root filesystem?
RomFS? SquashFS? CRAMFS?
3. I am quite sure that the EmbedDisk is some kind of flash disk, like
CF cards. If this is the case,
should i use journalling fs or the ordinary ext2?
I do not have too much experience building embedded systems, I like it
and would like to learn new techniques. Saying so, i am looking
forward to any comments.
Thank you,
Vasilis.
-
Re: RO root file system
Vasilis <VASILI3000@hotmail.com> wrote:
[color=blue]
> 3. I am quite sure that the EmbedDisk is some kind of flash disk, like
> CF cards. If this is the case,
> should i use journalling fs or the ordinary ext2?[/color]
I'd stay clear of journaled filesystems. Each write ends up as at least
3 writes - write the change to the journal, read the journal and do the
file change, update the journal entry as done.