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

Re: Overwrite existing partition with zeros without hurting partition table? (Debian Lenny)



Hi,

On Fri, Mar 05, 2010 at 10:44:30PM -0600, Ron Johnson wrote:
> On 2010-03-05 22:14, Mark wrote:
> >>On Fri, Mar 5, 2010 at 5:55 PM, Jochen Schulz <ml@well-adjusted.de> wrote:
> >
> >>>Why do you think you need to blank the partition before installing
> >>>lenny? There *are* reasons to do that, but they have nothing to do with
> >>>the installation of a new OS.
> >
> >Just a habit I've acquired over the years - I like to have the hdd blanked
> >with zeros to ensure there are no ghost/residual files left on any of the
> >sectors before installing anything.
> >
> 
> That's *completely* and *utterly* nonsensical.  mkfs wipes over the
> existing file structures.

Really?  If you really wish to erase data, that seems moderately safe
action to do for me.  

See:

$ dd if=/dev/urandom of=random.img bs=1k count=1000
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 0.195851 s, 5.2 MB/s
$ dd if=/dev/zero of=zero.img bs=1k count=1000
1000+0 records in
1000+0 records out
1024000 bytes (1.0 MB) copied, 0.00926326 s, 111 MB/s
$ mkfs random.img
...
$ mkfs zero.img
...
$ diff -b *.img
Binary files random.img and zero.img differ

As I understand, if you have sensitive data on harddisk, just doing mkfs only
is not enough to erase them all.  It overwrites very small portion of them.  It
certainly makes almost impossible to read them by most of us with limited
time.  Doing dd is one step more safe.  ...

Osamu


Reply to: