F5F Stay Refreshed Hardware Desktop Discuss how to use the shred command effectively.

Discuss how to use the shred command effectively.

Discuss how to use the shred command effectively.

M
Minimills1020
Junior Member
39
08-30-2024, 10:04 AM
#1
Hi everyone, This could seem like a simple question but I’m seeking some understanding about the shred command in Linux. I planned to format a disk before selling it (it’s a 2.5" SSD) and have used shred several times already. This time I mistakenly chose my boot drive, and I noticed only one step finished successfully. Could it be possible to shred a boot drive that’s currently active? The operating system didn’t show any activity, and the command ran without errors. Probably just for reassurance. Thanks ahead!
M
Minimills1020
08-30-2024, 10:04 AM #1

Hi everyone, This could seem like a simple question but I’m seeking some understanding about the shred command in Linux. I planned to format a disk before selling it (it’s a 2.5" SSD) and have used shred several times already. This time I mistakenly chose my boot drive, and I noticed only one step finished successfully. Could it be possible to shred a boot drive that’s currently active? The operating system didn’t show any activity, and the command ran without errors. Probably just for reassurance. Thanks ahead!

T
TheIgnasLTU
Junior Member
41
09-04-2024, 08:25 AM
#2
Typically it's better to rely on the maker's secure erase tool, if available. Overprovisioning can still overwrite data on an SSD without actually making it gone. Restart your system to confirm if Shred did anything. If your drive was shredded, you won't be able to recover it. Luckily you have backups. Man pages don't reference any protections https://manpages.ubuntu.com/manpages/nob...red.1.html
T
TheIgnasLTU
09-04-2024, 08:25 AM #2

Typically it's better to rely on the maker's secure erase tool, if available. Overprovisioning can still overwrite data on an SSD without actually making it gone. Restart your system to confirm if Shred did anything. If your drive was shredded, you won't be able to recover it. Luckily you have backups. Man pages don't reference any protections https://manpages.ubuntu.com/manpages/nob...red.1.html

A
agent714
Junior Member
3
09-04-2024, 09:27 AM
#3
It's very probable you've completely wiped your boot drive. After the operating system starts, it stays in memory and won't be affected by changes to the physical partition. The reason for mounting the boot drive is to allow updates to the initramfs or bootloader whenever necessary. Before restarting, you should reformat the boot partition and reinstall the bootloader and initramfs—this process varies depending on your distribution and backup options. Generally, fixing this issue should be straightforward since the data on a boot partition is usually intact and can be rebuilt. If you've already restarted, you might notice the drive is missing. I recommend having a bootable USB or similar method ready in such cases.
A
agent714
09-04-2024, 09:27 AM #3

It's very probable you've completely wiped your boot drive. After the operating system starts, it stays in memory and won't be affected by changes to the physical partition. The reason for mounting the boot drive is to allow updates to the initramfs or bootloader whenever necessary. Before restarting, you should reformat the boot partition and reinstall the bootloader and initramfs—this process varies depending on your distribution and backup options. Generally, fixing this issue should be straightforward since the data on a boot partition is usually intact and can be rebuilt. If you've already restarted, you might notice the drive is missing. I recommend having a bootable USB or similar method ready in such cases.

S
seeker07
Senior Member
349
09-04-2024, 04:31 PM
#4
I'm not sure, but I don't have access to current statistics on Linux user distribution.
S
seeker07
09-04-2024, 04:31 PM #4

I'm not sure, but I don't have access to current statistics on Linux user distribution.