2

I recently acquired two 750gb HDDs. Not knowing the previous owner, I used dd to format them. Formatting them was easy, (dd bs=8M if=/dev/zero of=/dev/sdb) it went without a hitch, and I figured I'd boot the live USB I had.

The live usb booted, but neither drive is visible. Can't mount with mount -a or with mountall. I cannot see them in Gparted and they appear as 0GB in my BIOS. Using Ubuntu 14.04, 64 bit How can I revive them? Why did this happen?

3 Answers3

2

dd is "block copy" program, not formatter. Try using

sudo fdisk /dev/sdb

and create single primary partition with n command (then p and accept suggested values). Don't forget to write changes with w before quitting with q. This way fsck will create new Master Boot Record on that disk.

Then comes actual format process of your choice (initiating filesystem), eg. with GUI tool, or something like this:

sudo mkfs.ext4 /dev/sdb1 -L MyNewDrive
madneon
  • 2,063
  • 1
  • 14
  • 20
1

I am aware that hdd manufacturers write firmware on the hdd platters (it has been done like this since more modern drives have firmware requirements that outstrip the embedded controller storage availability).

I don't know if the firmware hides itself from you by offsetting addresses, and whether dd would be able to ignore or bypass such an offset, but if the drives worked before, and they don't work now, it sounds to me like you wiped a section of the drive firmware.

See http://www.databe.com/articles/article6.html for more info on the topic.

1

Was running dd really the first thing that came to your mind?

If you buy used hardware you should always check its condition visually before installing it. You don't want to damage your system by carelessly installing hardware with short circuits. After that you can install the hardware and check if it is detected properly by looking into system logfiles.

S.M.A.R.T.can be used to check the condition and wear of consumer HDDs and SSDs. You can run the Disks program from a live session which will display all SMART data for each drive in a submenu. The general recommendation is, if any of these values is not okay, then you shouldn't use the drive any longer and try to backup what you can. ddrescue is recommended over dd, but it should be noted that such programs put very much stress onto a device, so using dd to "format" a drive in an unknown condition may not be a good idea in the first place.

A similar question has been posted on the Unix & Linux site of the StackExchange network (which AskUbuntu is part of): Hard disk drive disappeared

LiveWireBT
  • 29,597