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
dd
's nickname is "diskdestroyer"? Islsblk
showing the drive? – Byte Commander Mar 20 '15 at 11:36dd
to format it, however I have never tried using the same method on an HDD. Here is a link to my answer: http://askubuntu.com/questions/496309/how-to-unboot-my-bootable-usb/496328#496328 Compared to madneon's answer, my method usesfdisk
only to read the drive, not to write anything to it. – karel Mar 20 '15 at 12:51