dd to a Hitachi HDD

0

Is it safe to perform a dd if=/dev/zero of=/dev/sda bs=512k to an 80GB Hitachi HDD via a bootable linux cd? and format it with a new file system? I hope that won't cause me any problems later, the Hitachi HDD is the only HDD on my old PC and I have no files I need on the HDD and I can't use it as a USB to format it via another PC Thank you in advance

Strike Linux

Posted 2014-04-10T18:59:03.863

Reputation: 83

Answers

0

You can't change the sector size of a hard drive You can change the cluster size (also called the "allocation unit size") of the file system this way.

You should be fine.

Jermal Smith

Posted 2014-04-10T18:59:03.863

Reputation: 1

0

When you do the dd with /dev/zero to the entire drive, you erase everything. The partition table, all partitions and all the filesystems. (Used to be called a "low level" format).

No big deal as Jermal S. pointed out, but you will have to start from scratch to get a usable filesystem back on the drive.

Before you can format it, you'll will need to recreate the partition table and repartition the drive with the correct partition type and size.

Not sure which live linux boot cd you are using, but the new ones should all have GNU parted available. I prefer parted to fdisk, so that's what I'm describing in this answer.

To create a new partition table do: parted /dev/sda mklabel msdos I'm just going to assume that you have no need for a GPT partition and that /dev/sda is the actual drive in question.

To create a new ext4 partition on the whole disk do parted /dev/sda mkpart primary ext2 1M 80G

To create a new NTFS partition instead, do: parted /dev/sda mkpart primary ntfs 1M 80G

Note that neither of these would be set as a bootable partition, so if you need that, you'll need to do parted /dev/sda set 1 boot on

Also note that parted has an interactive mode. just do parted /dev/sda and you get the parted command prompt with help and everything.

Dan L

Posted 2014-04-10T18:59:03.863

Reputation: 171

0

Thank you for your answers as for Dan's answer I understand that I will be erasing every single bit of the HDD that's exactly the point, as for my Live CD it's Kali Linux, and as for Jermal's answer it sounds kinda freaky answer, because I really want to erase every single bit of my HDD and try something new in my life :p

Strike Linux

Posted 2014-04-10T18:59:03.863

Reputation: 83