I want to reinstall Linux on my SSD. How do I reset the SSD such that the SSD controller is informed that every block is now indeed free?

Can I do this with hdparm's --trim-sector-ranges? If so, what arguments should I give that command?

I don't fully understand the example in the manpage:

hdparm --trim-sector-ranges 1000:4 7894:16 /dev/sdz

With the syntax [LBA]:[sector count]

Can I simply do hdparm --trim-sector-ranges 0:[number of sectors in total] [device]?

How can I confirm that the the SSD has indeed been reset?

TobiSGD

01-19-2013 05:40 PM

If you want to reset your SSD you can use its Secure Erase feature, it will do what you want to achieve:

Code:

sudo hdparm --security-erase NULL /dev/sda

malloc

01-19-2013 06:03 PM

Quote:

Originally Posted by TobiSGD
(Post 4873733)

If you want to reset your SSD you can use its Secure Erase feature, it will do what you want to achieve:

Code:

sudo hdparm --security-erase NULL /dev/sda

Thanks, are you sure this is correct though? There is no mention in the manual that --security-erase actually uses TRIM or that it in any other way tells the controller this data has been deleted using TRIM. Simply deleting the contents of the device, e.g. sending it arbitrary data to fill every byte, will not erase anything as far as the SSD controller is concerned.

Also, I'm still wondering how it can be verified that the device has been reset.