I'm trying to use hdparm to do secure erase of my 512GB SSD SK Hynix. SSD has Windows 10 installed in it.
I boot Ubuntu from a usb flash drive.
sudo fdisk -l
I get a lot of different disks, turns out /dev/sda is my 8gb flash drive, not SSD.
SSD is listed as:
Disk /dev/nvme0n1: 477 GiB, 512110190592 bytes, 1000215216 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt
Now when I try to run: hdparm -I /dev/nvme0n1 terminal gives me error: "/dev/nvme0n1: HDIO_DRIVE_CMD(identify) failed: Inappropriate ioctl for device"
how do I use hdparm secure erase option on my SSD? From suggestion in another page on the internet, nvme-cli package was suggested, but I don't understand how that helps.
using shred command isn't recommended for SSD because SSD has limited read/write cycles, and it works very differently than HDD.
Update: my SSD is an NVMe device, not ATA, therefore hdparm command isn't suitable, use nvme -format instead.