• Welcome to TechPowerUp Forums, Guest! Please check out our forum guidelines for info related to our community.

Securely erasing old SSD - Ubuntu

Joined
Sep 14, 2006
Messages
671 (0.10/day)
Location
QLD, Australia
Processor Ryzen 9 7950X3D
Motherboard Asus ROG X670E Gene mATX
Cooling Phanteks Glacier One 280MPH AIO
Memory G.Skill 48GB (2x24GB) F5-8000J4048F24GX2-TZ5RK Trident Z5 RGB 8000MHz DDR5
Video Card(s) ASUS TUF Gaming Radeon RX 7900 XTX OC Edition 24GB GDDR6
Storage Crucial T700 Gen5 2TB NVMe | Crucial P5 Plus Gen4 2TB NVMe | Crucial P5 Plus Gen4 1TB NVMe
Display(s) AOC U3277PWQU 32in 4K
Case Phanteks Enthoo Evolv mATX TG
Audio Device(s) Onboard SPDIF --> Logitech Z-5500
Power Supply Seasonic ATX 3.0 VERTEX-GX-1000
Mouse Razer Mamba Chroma
Keyboard Razer Cynosa V2 Chroma
Software Arch Linux (CachyOS Kernel)
Very inexperienced with Linux and have been playing around lately with Ubuntu 17.10 successfully recovering data from a bad HDD, quite impressed by it also.

First question is. I have an old OCZ Vertex 3 120GB that has been lying around forever and want to wipe it to factory settings and install Ubuntu on it (so I don't need to run Windows side by side on my current OS drive). I'm assuming the easiest way to do this is to do the following?
  1. Boot Ubuntu from USB installer
  2. Select 'Try Ubuntu before you install it'
  3. Open the Terminal and
  4. Use the Command-line to Simple Secure Erase i.e. hdparm --security-erase PASS /dev/sdX
My second question is, if the above will work do I then need to format the entire SSD in ext4 or does the installer by default format/partition the SSD when 'Erase disk and install Ubuntu' is selected?

25d1eb9e8b23d55b.jpg
 
The installer will automatically partition the disk. It will probably make a swap partition the size of physical memory then use the rest of the space for "/" with ext4. That's what it does out of the box, more or less iirc. If you want something else, you need to tell it or you need to configure it before or afterwards (if it's not your boot device.) This formats the drive but, it does not zero it out beforehand. For someone booting from a software RAID, this will usually be customized to first mount "/boot" from a non-RAID device to load the kernel and driver into memory before mounting "/", stuff like that but, that's not important in most cases.
 
Thanks for the response. Good to go then :toast:
 
To secure erase an SSD you need to use the manufactures utility
To secure erase just about anything in Linux by doing something like "sudo dd bs=1M if=/dev/zero of=/dev/sdX" where X is the number of the block device for your drive.
 
'Secure erase' in case of a SSD should never be done by zeroing!
Do not use ubuntu installer 'secure erase' or 'dd' on a SSD.
This is a tourture for the flash cells and massivly shortens life of the device.
One way is to use the provided tool of the manufacturer - which in most cases only works with windows.
The other way is to use hdparm under linux.
Secure Erase aka "memory cell clearing" of a SSD is done by just deleting the internal encyption key and gererating an new one so the formerly data cannot be read anymore. This is not done by the ubuntu installer!
 
SSDs work completely differently to HDDs, so all you need to do to securely erase them is a full format, ie writes to every sector.
 
All good, well took some trial and error. SSD was reported frozen, unlocked by enabling hot plugging, secure erased SSD then used gparted, installed Ubuntu 17.10 without any issues. Thanks guys.
 
Back
Top