How to completely erase a hard disk

Rashkae ubuntu at
Sun Sep 30 17:32:31 UTC 2007

Juan Pablo Mazzini wrote:
> I`ve made a mistake instaling an Ubuntu 7 server with RAID disk 1.  
> Now when i try to install again de instaler is unable to make a new  
> raid cause the old one is still configured somewhere, anyone knows a  
> metod taht i can use to put both hard disk in like new and erase all  
> the information stored in them including the booth sector in order to  
> install again.

This might be a bit extreme to your particular situation (which could be 
worked around with a bit of finesse and finer grained understanding of 
Raid and it's relative command line tools)

But to simply answer your question and get you on your way, boot from a 
Live CD (I suggest Knoppix for stuff like this, though there is no 
reason you can't use Ubuntu install CD), identify the hard drive device 
you want to erase (Like /dev/hda or /dev/sda)...   If there are multiple 
hard drives, I suggest eliminating any chance of error by disconnecting 
the ones you do not want to erase.

Then dd if=/dev/zero of=/dev/hda (or dd if=/dev/zero of=/dev/sda)

More information about the ubuntu-users mailing list