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

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



Mark wrote:
>>On Fri, Mar 5, 2010 at 3:13 PM, Aioanei Rares
> <debian.dev.list@gmail.com <mailto:debian.dev.list@gmail.com>> wrote:
> 
>     >
>     >Something like dd if=/dev/null of=/dev/hda2 bs=4096
> 

Yes, with emphasis on "something like" ;)  /dev/null would return an
immediate EOF:

  0+0 records in
  0+0 records out
  0 bytes (0 B) copied, 1.1466e-05 seconds, 0.0 kB/s

If you really must do this, use 'if=/dev/zero' instead.

> 
> Thanks Aioanei, I'll give that a try.  I know it's a dumb question I
> just don't want to get it wrong!

But, as others have implied, you don't need to zero out the disk, you
just need to either change the partition boundaries or just reformat.

Using the partitioner's "expert" mode, you would select the partition
you want to overwrite and tell the installer to reformat it.

Cheers,

-- 
Bob McGowan


Reply to: