Discuss how to use the shred command effectively.
Discuss how to use the shred command effectively.
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!
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
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.