Running Linux on a flash drive

Bob Chiodini chiodr at kscems.ksc.nasa.gov
Tue Aug 31 10:50:32 UTC 2004


On Mon, 2004-08-30 at 15:01, Mike Westkamper wrote:
> I am working on making Linux (FC2) run on a flash disk.
> 
> To avoid the write-cycle limits on the flash it must be configured without a
> swap drive and remove any extraneous logging. I have eliminated the swap
> partition, however I am not sure what logs are created and how to eliminate
> them or direct them to /dev/nul. The objective is not to beat the flash to
> death since there is a 1 million write cycle limit.
> 
Mike,

Add noatime to your mount options in fstab.  If possible mounting your
flash file systems read-only will eliminate the write-cycle limits.  I'm
still working on that part. This is my fstab:


/dev/msys/fla2  /               ext3    defaults,noatime        1   1
tmpfs           /var            tmpfs   defaults,size=8M        0   0
/dev/msys/fla1  /boot           msdos   defaults,ro,noatime     0   0
none            /dev/pts        devpts  gid=5,mode=620          0   0
none            /proc           proc    defaults                0   0
/dev/sda1       /mnt/usbdisk    auto    noauto,noatime          0   0
/dev/sda2       /mnt/usbdisk2   auto    noauto,noatime          0   0


> I am also trying to make the kernel static, w/o modules, to keep the speed
> up as the flash is slow. Here my attempts have been less that acceptable. I
> constantly get errors on the build and can't seem to eliminate all the
> modules.
> 

This might not be that important.  The two embedded projects here are
both based on the same OS build, but use different ethernet
controllers.  I built the drivers as modules and alias them in
modules.conf as appropriate for each system.  Here is the output of
lsmod for one of the systems:

Module                  Size  Used by    Not tainted
arcom-0.41              8896   2
usb-ohci               19872   0 (unused)
usbcore                73600   1 [usb-ohci]
eepro100               20428   1
mii                     3832   0 [eepro100]
msdos                   6940   1 (autoclean)
fat                    37400   0 (autoclean)  [msdos]
doc                   160128   2

This board has a built-in eepro interface.

> Finally, to use some sort of sleep mode to avoid the re-boot delay on the
> re-application of power. Once developed the system will not ever see any
> different configuration. Here I can't find much information on how to do
> this.
> 

I'd like this too!

Bob...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <http://listman.redhat.com/archives/fedora-list/attachments/20040831/c6cd784b/attachment-0001.sig>


More information about the fedora-list mailing list