I just got one of the new 12-inch MacBooks and would like to wipe the storage drive. With a conventional SATA drive I'd use the "ATA Secure Erase" command which can be sent from a Linux environment using the hdparm
utility.
With the new NVME drive this does not work. I found a Linux utility called nvme-cli
but even with its format option it fails with an error INVALID_OPCODE(1)
(looks like the NVME controller rejects the command).
I've tried multiple permutations of the command and options, including targeting the raw NVME controller /dev/nvme0
or one of its namespaces instead /dev/nvme0n1
, different parameters to the -s
option, etc. I also bought Parted Magic which claims to be able to secure-erase NVME drives and unfortunately that fails as well.
I'm currently just doing it the old-school way with shred
which writes random data to the drive but obviously this isn't ideal as it's slow and shortens the live of the drive, so I'd love to know the proper method to use in the future.
Regards.