shredding files on a flash drive

Robert P. J. Day rpjday-L09J2beyid0N/H6P543EQg at public.gmane.org
Fri Jan 18 23:45:58 UTC 2008


On Fri, 18 Jan 2008, Lennart Sorensen wrote:

> On Fri, Jan 18, 2008 at 03:09:15PM -0800, Kristian Erik Hermansen wrote:
> > On Jan 18, 2008 2:22 PM, Lennart Sorensen <lsorense-1wCw9BSqJbv44Nm34jS7GywD8/FfD2ys at public.gmane.org> wrote:
> > > The file system has no clue and no say in how things are done under the
> > > hood by a flash based device.  Blocks get remapped all the time as part
> > > of wear leveling and hence spare blocks are rotated into use when other
> > > blocks are overwritten.
> >
> > So are you saying that the secure overwrite will not happen?  Well,
> > then dd if=/dev/zero of=/dev/sda sounds like a good option then :-)
>
> Writing 0xFF is preferable to avoid unnecesary wear (and should be
> faster too if the flash controller has some brains which it probably
> doesn't).
>
> And the dd still only works assuming all spare blocks are always
> erased when they become free, which for performance reasons would be
> the right thing to do (that way the blocks are ready for writes when
> needed rather than having to wait for an erase before write later
> on).  But you have no way to know for sure how the flash controller
> does things.

if you're going to start messing around with flash, you might want to
install the "mtd-utils" package on your system.  if you've never
worked with flash filesystems, prepare to re-learn how to do basic
operations, like clearing the raw filesystem.  you'll be working with
commands like flash_erase and flash_eraseall.

rday
--

========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

Home page:                                         http://crashcourse.ca
Fedora Cookbook:    http://crashcourse.ca/wiki/index.php/Fedora_Cookbook
========================================================================
--
The Toronto Linux Users Group.      Meetings: http://gtalug.org/
TLUG requests: Linux topics, No HTML, wrap text below 80 columns
How to UNSUBSCRIBE: http://gtalug.org/wiki/Mailing_lists





More information about the Legacy mailing list