Bad Blocks
badblocks -wsv /dev/device
SATA
https://grok.lsu.edu/article.aspx?articleid=16716
sudo hdparm -I /dev/sd
sudo hdparm –user-master u –security-set-pass p /dev/sdb
commit with
sudo hdparm –user-master u –security-erase-enhanced p /dev/sdb
or
sudo hdparm –user-master u –security-erase p /dev/sda
NVME
https://manpages.debian.org/testing/nvme-cli/nvme-format.1.en.html
BAD BLOCKS
https://wiki.archlinux.org/title/badblocks
SHRED
shred -vfz [/file/system/path]shredding a ‘disk’
According to the man page, some of the [OPTIONS] you can use with shred are:
- -n, –iterations=N
Instead of the default (3) times, overwrite the data N times. - -z, –zero
Add a final overwrite with zeros to hide shredding. - -f, –force
Force the permissions to allow writing if necessary. - -v, –verbose
Show progress in detail. - -u, –remove
Truncate and remove file after overwriting.
Swap
HDPARM tuning
https://www.linux-magazine.com/Online/Features/Tune-Your-Hard-Disk-with-hdparm