0

I am going to sell my notebook and want to erase my 256GB SDD before so that data cannot be restored under any circumstances.

Using tools like shred and dd I can do that with certain partitions which I am not currently running my OS from.

But since I only have one partition on my notebook, I am wondering how/which tool I can use to safely erase/overwrite the content?

CD86
  • 151
  • Is the SSD an NVMe device or does it have a SATA interface? – matigo Jan 22 '22 at 12:56
  • 1
  • matigo how to I find that out? – CD86 Jan 22 '22 at 13:11
  • 2
    You should not try to destroy the contents of your disk while you've booted to it. If you want to completely destroy everything, boot to a usb device and destroy it from there – Jad Jan 22 '22 at 13:15
  • If you open Terminal and type lsblk, you will see the layout for the storage devices. If your main storage device is something like nvme0n1p1, then it's an NVMe storage device. If you see /dev/sda, then it's using a SATA interface (even if it's in an m.2 slot). If you are using an NVMe disk, then you can (probably) wipe your disk in a half-second without killing it with a full shred or dd sequence ... – matigo Jan 22 '22 at 14:05
  • "under any circumstances" ? Suggestion... Boot from live usb. Use gparted to delete the partitions, add a new partition formatted to ntfs or exfat. Use shred to fill the card completely with zeros: single pass. Install the new o/s. To verify, you will need to create another live usb specific to the forensics environment, then see what residual fragments may be possibly recoverable. Expect this process to consume days of time. – rob grune Jan 23 '22 at 01:25

2 Answers2

3

You cannot sit on the chair while sawing the legs off. Similarly, a partition you want to wipe should not be in use.

Start a live session using a live USB or DVD, or alternatively, boot into a recovery prompt, and shred the partition from there.

Consider whether shredding is worthy the time and trouble. Reformatting the partition or erasing partitions will be quite faster. Recovering binary data after that already will be very difficult. Someone will really need to have high interest in your data to spend the effort and time recovering these.

FedKad
  • 10,515
vanadium
  • 88,010
1

If you are using an NVMe storage device, then you can securely erase all data with the nvme-cli utility:

  1. Boot the computer with an Ubuntu installation USB and choose “Try Ubuntu”
  2. Open Terminal
  3. Erase the encryption key for the flash modules:
    sudo nvme format -s2 /dev/nvme0n1
    
    Note: Be sure to replace nvme0n1 with the actual device you wish to clear.
  4. TRIM and zero the flash modules:
    sudo blkdiscard /dev/nvme0n1
    

After this is done, it is pretty much impossible to get any data back.

matigo
  • 22,138
  • 7
  • 45
  • 75