I am giving away a shitty 128GB SSD, which was used with LUKS 2 for most of it’s lifetime. As far as I know, it’s good practice to secure-erase it, but I’m too lazy to reinstall the OS on it (I already did it once). Is it really needed?
Everything that was luks encrypted is unrecoverable once you overwrite the luks header. Trying to guess the master key takes longer than the lifetime of the universe.
Just make sure that is gone and you are good. If you deleted all partitions and installed another (unencrypted) OS on the drive there is a very good chance the luks headers are gone for good.
Cool, thanks for the info. Will remember that.
Secure erase just drops the ssd controllers table of where logical blocks are in the physical memory and trims the disk. Which is good and you should do.
That means a person would have to address the memory directly with flying leads or a bed of nails or something. Or have special software that makes the controller tell them what’s on each physical block and then put that data together into a bunch of files.
If that worries you, do dd if=/dev/urandom of=/dev/<disk> before you secure erase.
Then everything on the drive will be random static before the secure erase drops the block table and trims, so even if someone uses magic power to read the block contents directly they just get to see static.
That has the benefit of speeding up the drive by resetting read fatigue at the expense of one layer of writes which is always worth it.
Ah, fun fact, dd won’t actually cover all the blocks since SSDs have reserve blocks and IIRC they do rotate which ones are in use vs which are not, to even out wear
Yes of course this will only rewrite some number of blocks that total the disks reported capacity. In the case that a person is worried about hidden blocks being preserved by a wear leveling algorithm they could just run the same command again and that would get em all.
You don’t have to install anything on it, just connect it to a running PC and do a dd if=/dev/zero, that should be enough to get rid of any remnants directly accessible.
Unless you are part of a drug distribution organization, in that case just use a hammer, a microwave and a blowtorch.I think one TRIM cycle should make any data unrecoverable by all but the most determined. Feel free to correct me if i’m wrong though.
It you really care, throw this on a usb stick and sleep well. It replaces to old dban system, which has gone commercial. https://github.com/PartialVolume/shredos.x86_64
Do not dban an SSD.
SSDs do not physically store data the way platter drives do. It may reduce the lifespan of the drive.
There are other methods for securely erasing SSDs.
https://www.tomshardware.com/how-to/secure-erase-ssd-or-hard-drive
That’s quite right, which is why nwipe (the core tool of ShredOS) has a different mode for SSD vs HDD.
Cool while others informed me I don’t have to do it, I will remember for future uses.
deleted by creator
Should have thought of that before reinstalling the OS. Thanks, will remember for later.
Follow the steps here to perform a secure erase that resets the cells and wipes any on-device encryption keys:
https://wiki.archlinux.org/title/Solid_state_drive/Memory_cell_clearing
You can do this from a live-boot environment if you wish. I would very strongly recommend disconnecting ALL other drives before performing this step as the best precaution against accidentally nuking the wrong drive. However if you choose to do this with other drives connected triple check you have the right drive selected before each step.
parted_magic has gui tools for this (among many other things) on a bootable image. it’s not free, but a one-off download is only like 20 bucks (use that version forever). secure erase and running smart tests are about the only things i use it for, and even just for that it is definitely worth the lunch money.
You said that:
I am giving away a shitty 128GB SSD, which was used with LUKS 2 for most of it’s lifetime.
This leads me to assume that it is not now? Is this the case? If it still has LUK2 on it, you can run cryptsetup-erase on the luks2 container. This won’t wipe any unencrypted data, though.
One needs to be careful and avoid block level wipes wherever possible for SSD as this will wear it out quicker. Obviously, if you have sensitive data unencrypted, you may have to. Shred is your friend, here. It works on entire devices as well as individual files. The individual files option is preferable if you the sensitive data is at known locations.
Does shred work on journaling file systems?
I doubt it. I think some filesystems have mount options that disable the journal for that session.
Huh, pretty serendipitous exchange. I found this: https://www.webconn.tech/kb/disable-or-enable-journaling-on-ext4-filesystem
Most likely not. Did you have anything on it that you would even be concerned about someone else finding? Is anyone even likely to be curious enough to look?
Is anyone even likely to be curious enough to look?
Well, can only speak for me, but first thing I do.
I mean, you can never know which administrative scandal you might uncover…
I stop the moment I find private stuff, though.
Had that three or four times already, the only case I was considering doing something about it was a completely unsecured and unerased phone still containing a bunch of business emails that clearly were sensitive or even confidential stuff.
I just told the seller how he screwed up here, instead of making a bigger fuss out of it.Sure, but are you pulling out forensic analysis tools, or just checking what didn’t even get erased in the first place?
The devices in question all were fat formatted, for which it is quite easy to reconstruct most of the “deleted” content using readily available simple tools (which I did).
But that was some time in the past, nowadays most systems use some kind of base encryption, making it less likely to easily find something.
The phone, on the other hand, was just not doing a factory reset before selling it, but only deleting files (and missing stuff, like some mail folders) and not having a password-protection at all… 😬
run photorec on it after trashing the luks header if you want to be sure
deleted by creator
What type of SSD? NVMe usually has a special instruction which will reset each whole NAND chip, and usually takes a few seconds. I think SATA does as well, but it’s not commonly supported.






