Wipe a HDD with Ubuntu

brendon_recce

Honorable
Jul 1, 2013
16
0
10,520
I built a new rig recently and didn't have money for Windows at the time, so I installed Ubuntu. I now have Windows 8 installed on an SSD, and I want to wipe the hard drive with Ubuntu on it and make it 'virgin'. I will be using this drive for storage now, but since Ubuntu is installed on it, I can't do anything. I can't figure out how to wipe it in Windows or Ubuntu, so if someone can shed some light on this for me, that would be great.
 
Solution
You don't have to wipe it out - just repartition it.
You can also wipe out first couple of sectors from Ubunti
Code:
$ sudo fdisk -l
$ sudo dd if=/dev/null of=/dev/XYZ bs=1M count=10
[/code
First command will show you all the partitions on all hard drives, to help you with second command.
where XYZ is device name of your hard drive, e.g. /dev/sdb if this is your second SATA drive. Be extremely carefull with that name!
The count= and bs= parameters will wipe out first ten megabytes from that drive - more than enough for Windows to consider it "virgin" ;)
You don't have to wipe it out - just repartition it.
You can also wipe out first couple of sectors from Ubunti
Code:
$ sudo fdisk -l
$ sudo dd if=/dev/null of=/dev/XYZ bs=1M count=10
[/code
First command will show you all the partitions on all hard drives, to help you with second command.
where XYZ is device name of your hard drive, e.g. /dev/sdb if this is your second SATA drive. Be extremely carefull with that name!
The count= and bs= parameters will wipe out first ten megabytes from that drive - more than enough for Windows to consider it "virgin" ;)
 
Solution

brendon_recce

Honorable
Jul 1, 2013
16
0
10,520