Linux Remove All Partitions or Data And Create Empty Disk

Use the following dd command to remove data from /dev/hdX:

dd if=/dev/zero of=/dev/hdX bs=512 count=1

OR for sata disk, use the following syntax:

dd if=/dev/zero of=/dev/sdX bs=512 count=1

In this example, empty sata disk /dev/sdb, enter (you must be login as the root user):

fdisk /dev/sdb
dd if=/dev/zero of=/dev/sdb bs=512 count=1
fdisk -l /dev/sdb
Share