Error when running ‘hdparm –dco-identify’ in Linux

hard drivehdparmlinux

DCO: Device Configuration Overlay

HPA: Host Protected Area

Both are 'hidden' areas on a HDD.

I am trying to detect if my HDD has a DCO and remove it/ restore to factory settings. This is so that I can then securely erase all data on the HDD properly. I do not want hidden data in the HPA and DCO to get left behind. HPA is disabled so I am checking for a DCO.

I entered "sudo hdparm –dco-identify /dev/sda"

Terminal returned "HDIO_DRIVE_CMD(dco_identify) failed: Input/output error"

Does this mean I don't have a DCO or have I made an error in entering the command?


When I run "sudo hdparm -I /dev/sda"
Security says:

Security:

Master password revision code = [redacted just in case it's sensitive
data]

supported

not enabled

not locked

frozen

not expired: security count

supported: enhanced erase

Could this have something to do with the error? My drive is "frozen". Both my laptop and desktop drives say this.

Related post: How to un freeze drive in Linux?

Best Answer

SOLVED!

Refer to How to un freeze drive in Linux? for answer.

Success!! I managed to unfreeze my drive by making the SATA port it is connected to hot-swappable. This involved me going into my BIOS. How you can achieve this will vary depending on your BIOS manufacturer.

Once the SATA port was hot-swappable, I did the following: 1) turned pc off 2) disconnected the SATA data cable from my motherboard. Left power cable connected. 3) turned PC on and booted into Linux 4) Connected HDD and Viola! It was unfrozen and "sudo hdparm --dco-identify /dev/sdb" was working! 5) I checked to confirm it was unfrozen by running "sudo hdparm -I /dev/sdb"

Note: device is at sdb now and not sda (as you will find in my other thread - linked above) because the HDD was connected after Linux was booted into!

Credit: https://linustechtips.com/main/topic/714345-connecting-hdd-after-computer-has-been-turned-on/#comment-9107915

If you cannot make your drive hot-swappable, you will have to buy a SATA-USB cable and connect your drive via USB.