12/03/2022
Dealing with a batch of Hard Drives which are showing up in the BIOS incorrect size. As it turns out they are cinema hard drives distributed to Theaters. Apparently they Protect an area of the drive that will not be visible to the BIOS or any partition manager. After a little research you can remove the protection and make them usable by doing the following: (Data will be lost!)
hdparm provides a command line interface to various kernel interfaces supported by the Linux SATA/PATA/SAS "libata" subsystem and the older IDE driver subsystem.
Boot up your favorite flavor of Linux on a stick with the hard drive attached of course.
hdparm -N /dev/sdx
Where x is the hd in question. (-N) Get/set max visible number of sectors, also known as the Host Protected Area setting. We are only getting the info we need at this point.
Output:
/dev/sdx:
max sectors = 312581808/312581945, HPA is enabled
We are only using the second number reported back by your device in our case 312581945
Now we can remove the protection:
hdparm -N p312581945 /dev/sdx
Output:
/dev/sdx:
setting max visible sectors to 312581945 (permanent)
max sectors = 312581808/312581945, HPA is disabled
A reboot is required but should now see the full capacity of the device!
Link to a really nice article on this below:
Background: I got some malware in Windows, possibly a rootkit or bootkit. I didn't want to take any chances, so foolishly wiped my drive with DBAN (PRNG, 8 pass). Later came to know that DBAN does...