[maemo-users] question on booting from mmc

From: Theodore Tso tytso at mit.edu
Date: Fri Jul 13 16:40:25 EEST 2007
On Fri, Jul 13, 2007 at 09:14:09AM +0200, Frantisek Dufka wrote:
> Theodore Tso wrote:
> >Yeah, but the ext3 journal wears out the flash card much more quickly.
> Since you know better than anyone how ext3 works can you quantify what 
> means 'much more quickly' with default date=ordered mode? 2x 10x 100x ?

It depends on how much metadata updates you do --- I would definitely
recommend using the noatime mount option, but probably somewhere
between 1.2x and 2x.  Basically, each time you update some part of the
metadata, it will result in the block being written to the journal,
before it is ultimately written to the primary location on disk.  So
the number of writes will go up by 2x for metadata blocks.  So the big
question is the ratio between metadata updates and data block updates.   

> This is slightly problematic. There is no fsck in initfs partition and 
> space is really tight there. Also we have no keyboard so realistically 
> -y is the only option which may sometimes do something wrong. From the 
> manpage: ...  Sometimes an  expert  may  be  able to do better driving 
> the fsck manually. ... AUTHOR Theodore Tso

Well, the initfs partition could mount the original jffs2 partition
and grab the fsck from there.  Or you could do what Linux systems did
before initfs, which is to mount the root partition read-only, and
then run e2fsck, and if the root filesystem was changed, force a
reboot; else remount the root partition read/write.

As far as e2fsck -y, 99% of the time if the machine just shutsdown
uncleanly, the e2fsck -p (preen mode) will do the job just fine.  If
we do need to run e2fsck interactively, yeah, the only way to do that
would be to boot back to the jffs root image, bring up an xterm, and
then run it interactively from there.  But that hopefully should be a
relatively rare case.

I'm assuming here that most of the time those people who are using the
ext2/3 filesystem on an MMC is keeping a viable boot image in the
original jffs2 device, so that can be used as the way to run e2fsck if
necessary --- and as the source for the e2fsck binary from the initrd
environment, if necessary.


						- Ted

More information about the maemo-users mailing list