Fast secure erase of /dev/nvme0n1 using Ubuntu 22.04 LTS live

Check your disk:
sudo -i
apt install nvme-cli
nvme list

Erase your disk:
nvme format -s1 /dev/nvme0n1

Verify it is really all zeros:
cmp /dev/nvme0n1 /dev/zero

Verify with a progress bar:
apt install pv
pv /dev/nvme0n1 | cmp /dev/zero

Really all zeros:
cmp: EOF on after byte 512110190592, in line 1

Not really all zeros:
/dev/zero differ: byte 449, line 1


No comments: