mount ramdisk rootfs /etc directory to jffs2 filesystem.
Johnny Hung
johnny.hacking at gmail.com
Fri Jan 22 14:01:45 EST 2010
2010/1/20 Ricard Wanderlof <ricard.wanderlof at axis.com>:
>
> On Wed, 20 Jan 2010, Johnny Hung wrote:
>
>>> i'd also recommend you to consider if you really need the
>>> ramdisk. when using a ram disk its entire content is loaded to the RAM
>>> occupying space, even if you don't use certain files (or part of
>>> them). other filesystems are more efficient in this aspect.
>>> if the main purpose is to have a read only rootfs, i'd suggest a look
>>> at squashfs.
>>
>> I consider to use ramdisk as rootfs because worry about wrong
>> operation in rootfs (is use jffs2 rootfs) and it will cause system
>> boot up failed.
>
> You have a point, however, you could do two things to help:
>
> a) Mount the root file system as read-only. That way you can never write to
> it, unless you remount it read-write. But you can still reflash that
> partition if you need to upgrade.
>
> b) Register the mtd partition holding the root file system as read-only.
> This is even more seecure as remounting the file system won't permit writes.
> However, it also means you can't write to it for upgrading. (I
> don't think the mtd core permits changing an already registered mtd
> partition from readonly to writable, but I could be wrong.)
>
>> Another query, does the syslogd/klogd log files also store in jffs2
>> rootfs? Write to jffs2 frequently will reduce flash life cycle.
>
> I think it is fairly common to have a combination of devices:
>
> / (root) is a readonly flash device (mtd partition)
> /etc is a writable flash device (mtd partition)
> /tmp and /var are ramdisks (tmpfs), so they are writable, but lost when
> power is cycled.
I think it's a good combination for my board. How do I sepcific the
/etc to another mtd part?
The busybox init will parse /etc/inittab after setup signal handler
and initializes console. I only
know to do it is to re-mount etc directory from another mtd to /etc.
Is it right?
Thank your help.
BRs, H. Johnny
>
> /Ricard
> --
> Ricard Wolf Wanderlöf ricardw(at)axis.com
> Axis Communications AB, Lund, Sweden www.axis.com
> Phone +46 46 272 2016 Fax +46 46 13 61 30
>
More information about the Linuxppc-dev
mailing list