[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Upgrading persistent overlay?

Hello Andrew,

On Sat, Sep 24, 2011 at 10:14:20AM -0400, Andrew wrote:
> Dear Klaus,
> > Hello Andrew,
> >
> > Sorry for not having answered your other mails yet. :-(
> No worries. :)  Thanks so much for this prompt, thoughtful, and detailed
> one.  I can wait a little longer for the others.

Should I forget to answer, just write again until I do. ;-)

> 1.) Thanks for the insight provided by how _you_ handle this.  I will try
> retaining /etc, /home, and /root (wireshark config, etc.).
> 2.) But I am adding packages. :(

Adding or overwriting packages in "Live mode" is indeed a problem
yet-to-be-solved for updates. One possible solution could be using the
"HD install" option instead of "Flash install", which creates (almost)
an installed Debian system from Knoppix that can just be upgraded via
aptitude or apt-get. But because data gets uncompressed, you would at
least need a 16 GB USB flash disk, and it will be somewhat slower than
the compressed version, because in-memory decompression is faster than
physical reads of uncompressed data, even for flash memory or slow CPUs.

> I am also concerned about quickly wearing out the flash memory.  For
> example, I see lots of volatile files in /home/knoppix/.mozilla/firefox/
> like "cookies".  Maybe I could also keep an image on hdd for sustained
> loading and sync to/from flash when I come and go, or at least reduce
> write cycles somehow.

I don't think that you have to be afraid of that. Only for embedded
flash chips that don't have an "intelligent" microcontroller, something
like JFFS2 with its own wear leveling algorithms makes sense.

> What is your experience with flash drive life?

I have not killed a flash disk or SD card with excessive writes yet, no
matter how often I overwrote the data or wrote the "same block" again.
However, I did manage to kill a few flash disks by (accidentially, of
course...) unplugging them during a write/sync, probably because this
confuses the internal controller, and therefore it forgets its "disk

Wikipedia has a good entry point about wear leveling
http://en.wikipedia.org/wiki/Wear_leveling, from which I take this

 "On most contemporary flash memory devices, such as CompactFlash and
 Secure Digital cards, these techniques [wear leveling] are implemented
 in hardware by a built-in microcontroller. On such devices, wear
 leveling is transparent and most conventional file systems can be used
 as-is on them."

Because of this, I don't think that even FAT32, which tends to overwrite
the first sectors containing the allocation map and the file allocation
table very often, is a problem on flash disks.

Nevertheless, Knoppix sets the delay between writebacks of data to 30
seconds, which also reduces the number of physical write cycles in a
given time and increases the effect of the dynamic memory cache.


Reply to: