1

I'm running Ubuntu Server 16.04 LTS on a system with a single drive, an SSD. When 18.04 releases in April, I intend to do a fresh install using a USB installer. I'd like to safely wipe the SSD prior to doing so, but am unfamiliar with how to do so on a Linux system with a single drive.

I've read about ATA Secure Erase, but am not sure if this is something I can do while logged into my 16.04 system. Could I run these commands while Ubuntu is running and then immediately reboot into the installer USB?

Or, perhaps the Ubuntu Server installer USB allows me to run these commands prior to installation? Or should I create a separate bootable USB stick that allows me to run this command?

Jamie S
  • 141

2 Answers2

2

I'd like to safely wipe the SSD prior to doing so, but am unfamiliar with how to do so on a Linux system with a single drive.

There is no need for that since you can do it when the installer is asking for partitioning. It will format everything you tell it to. After installing the operating system it is possible to retrieve the old data but only if you immediately stop using the system (every write after that makes it less likely to be able to restore the old system).

If you still use the hard disk nobody is going to be able to retrieve the previous system unless you let them.

Or, perhaps the Ubuntu Server installer USB allows me to run these commands prior to installation?

It does but it will then start installing too. You would need to kill the installation after the partitioning. To securely wipe a hard disk you probably need to format more than once. Formatting kills the life span of an SSD so I would advice against it.

Nevertheless: if you create a gparted live session you can also do this from a live session. Works similar to the live Ubuntu session but this will show your a partition editor where you can format, remove, shrink, enlarge and delete partitions.

The same can be done from a live Ubuntu session: install gparted inside the live session and you can format the partitions (this is terribly slow though; you should prefer the gparted live session over this method).

Rinzwind
  • 309,379
0

ATA Secure Erase (via the command hdparm) allows one to securely wipe all files off of an SSD without destroying the drive. This is possible because hdparm tells the FTL controller to send a voltage spike to all blocks at once, bypassing the wear-levelling technology that ordinary secure wipe utilities encounter. There is a step-by-step guide to using this utility on the kernel wiki. (EDIT: Life happened, and I never got around to putting in the link, but Karel did. Thank you, Karel.)