CFC - RW - power-donw ?

Brian Norris computersforpeace at gmail.com
Mon Jun 24 18:12:44 EDT 2013


Hi Noel,

On Wed, Jun 19, 2013 at 11:55 PM, Vellemans, Noel
<Noel.Vellemans at visionbms.com> wrote:
> Hi all,
>
> I've a question regarding a PC that needs to boot from CFC (Compact
> Flash card), hope this is the correct place to ask.
>
> I would need a PC to boot from a CFC-card that has R/W enabled.
>
> At this time I have been testing it with EXT2/EXT3 but when POWERING
> down abruptly it seems that the CFC-ext2/ext3 file system gets
> corrupted, finally resulting in a NON bootable system.

That is somewhat expected. The FTLs for cards like Compact Flash are
not documented and are likely unsafe w.r.t. power cuts.

> At this time I have partitioned the CFC into 2 partitions 1-FAT16 (to
> store the kernel) and 1-ext2/ext3 partition that has the root-file
> system.
>
> What would be the correct file-system (and/or mount /build options) to
> put on a CFC ... so that it is able to survive abrupt-power downs ?
>
> Or is the somewhere a guide (URL) that explains me some more stuff
> regarding this.

The Linux MTD website has some information that is somewhat related,
regarding FTL (Flash Translation Layers) and MTDs. Note that CF cards
are not MTDs but are block devices with a simple built-in hardware
FTL. With that in mind, you might read:

http://www.linux-mtd.infradead.org/faq/general.html#L_mtd_what
http://www.linux-mtd.infradead.org/faq/general.html#L_mtd_vs_hdd
http://www.linux-mtd.infradead.org/faq/jffs2.html#L_hdd_jffs2
http://www.linux-mtd.infradead.org/faq/general.html#L_ext2_mtd

I don't have much personal experience with Compact Flash, but my bet
is that you are running into the perils of relying on cheap
proprietary hardware FTL.

And Google will tell you:

https://groups.google.com/forum/#!topic/comp.os.linux.embedded/0DYdL-PUZVY

The advice there seems reasonable and in line with my knowledge: that
CF cards are inherently prone to power-cut data loss.

Brian



More information about the linux-mtd mailing list