The FreeBSD Diary

The FreeBSD Diary (TM)

Providing practical examples since 1998

If you buy from Amazon USA, please support us by using this link.
FreeBSD Support
 New Topic  |  Go to Top  |  Go to Topic  |  Search  |  Log In   Newer Topic  |  Older Topic 
 Wiping a drive
Author: Hertie 
Date:   07-04-04 18:25


A have a drive which I need to wipe clean for *some reason*... ;) In other words I need the whole disk to be overwritten with bogus data.

I tried bcwipe from the ports but this is an old version which does not support wiping whol drives instead of files (there are no files left on the drive thanks to a neurotic roomie) and the current source of the project won't compile on my system.

Now I heard, that good ol' dd could do the trick if feed with reandom strings/numbers/bytes. Did anybody ever do this before? How would I do this?

cheers mateys

Reply To This Message
 Re: Wiping a drive
Author: Rob McLeod 
Date:   08-04-04 13:31

I haven't ever tried this, and I'm not going to since I don't have any disks that I *want* to lose the data. :)

As root:

dd if=/dev/urandom of=/dev/ad0s1a

should do the trick. Of course substitute the 'of' attribute with the mount point of your choice.

I'm not entirely sure what will happen when the disk fills up. You may need to use the 'bs' flag. man dd for the syntax.

For an added dose of paranoia, run this command a few times.

Good luck with the feds! :)

Reply To This Message
 Re: Wiping a drive
Author: el_kab0ng 
Date:   16-04-04 05:05

Boots from a floppy and totally 01's a disk. (might take awhile on larger disks)

Reply To This Message
 Re: Wiping a drive
Author: gm 
Date:   18-03-05 11:22

The new BCWipe ( can wipe entire hard drives. You can select from 1 to 35 times.

Reply To This Message
 Forum List  |  Threaded View   Newer Topic  |  Older Topic 

 Forum List  |  Need a Login? Register Here 
 User Login
 User Name:
 Remember my login:
 Forgot Your Password?
Enter your email address or user name below and a new password will be sent to the email address associated with your profile.
How to get the most out of the forum