Ubuntu – Using Gparted to Completely Clear A Drive

gpartedhard drivepartitioning

What I need is to 100% clear and un-format a 3TB drive. Nothing more. It seems doing this from GParted, however when I try to put information onto the drive after formatting with another source, it says the drive is full. This is not a problem with the other source because it was able to copy to my 2nd 3TB drive very well and quickly. Can anyone help me to reset this drive? I am currently away from home, but I am using the Ubuntu "Disks" app to format it, and I have it set to overwrite existing data. Will edit if that changed it.

Best Answer

If you want to have a really blank disk just do

dd if=/dev/zero of=$YOUR_DEV bs=1M

Under normal conditions this is not necessary but it may be necessary to swipe out the beginning and the end of the disk, because there may be data of a secondary GPT at the end of the disk.

So what I do to clean a disk is:

YOUR_DEV=/dev/sdX
dd if=/dev/zero of=$YOUR_DEV bs=512 count=100
dd if=/dev/zero of=$YOUR_DEV bs=512 seek=$(( $(blockdev --getsz $YOUR_DEV) - 100 )) count=100

Now, no OS installer of my knowledge finds any old partitions nor any old installed OS and will setup the disk right correct to the BIOS- and OS-settings (MBR or GPT).

Related Question