Wiping Out Data

Carsten Aulbert carsten at welcomes-you.com
Wed Mar 28 08:45:19 UTC 2007

Jeffrey F. Bloss wrote:
> I don't believe this is correct because dd doesn't work at that
> level. The command you suggested... 'dd if=/dev/random of=/dev/sdb'
> *should* fail with a "no media" error unless sdb is mounted. Actually
> it should fail either way because you're not pointing dd at an
> accessible target partition. But there may be file system specific
> factors that make YMMV applicable. ;)

Certainly it does work at that level. Try it out yourself with

dd if=/dev/zero of=/dev/hda bs=1M count=1

on a not needed harddisk. After that you won't find the partition table
of the hard drive anymore. dd does only work on block devices and does
not care if there is a partition or not.

dd if=/dev/random of=/dev/hda1

will put garbage on the first partition of hda1 regardless whether it's
mounted or not.

dd is a very low level tool which can cause havoc to a system, if used
unwise :)



More information about the ubuntu-users mailing list