If it’s a spinning disk hard drive then do a low level format i.e. do a security write zeros on the whole disk (be sure to delete all partitions first). This will try to write a zero to every single sector, and any bad sectors will be removed from use.
I don’t think you need to delete the partitions separately, since it’s just a table at the very beginning of which parts of the disk belong to which partition?
So if you dd zeroes over everything, the first thing that gets deleted is the partitioning table
I might be wrong here, or maybe it doesn’t apply to every situation, but that’s how I’ve understood it to work
Also a tip for OP: don’t write zeroes over it, but random data (ddif=/dev/urandom ...). It’s a bit more secure as it makes it harder to see the size and location of the encrypted data on the disk
I’ve found that on some systems and some utility apps, if there are partitions present then doing a zeroing pass only zeros the partition rather than the entire drive itself
Correct, it was the built it disk utility app on Mac. I had a giant drive with a few partitions and clicked to do a zero pass and it finished in a half second. Obviously there was no way it completed that fast. I did some empirical testing based on completion time and sure enough it only zeroes a single partition rather than the entire disk
If it’s a spinning disk hard drive then do a low level format i.e. do a security write zeros on the whole disk (be sure to delete all partitions first). This will try to write a zero to every single sector, and any bad sectors will be removed from use.
https://wiki.archlinux.org/title/Badblocks
dd /dev/urandom after if you’re encrypting the disk
I don’t think you need to delete the partitions separately, since it’s just a table at the very beginning of which parts of the disk belong to which partition?
So if you
dd
zeroes over everything, the first thing that gets deleted is the partitioning tableI might be wrong here, or maybe it doesn’t apply to every situation, but that’s how I’ve understood it to work
Also a tip for OP: don’t write zeroes over it, but random data (
dd if=/dev/urandom ...
). It’s a bit more secure as it makes it harder to see the size and location of the encrypted data on the diskI’ve found that on some systems and some utility apps, if there are partitions present then doing a zeroing pass only zeros the partition rather than the entire drive itself
I’m guessing that is not dd
Correct, it was the built it disk utility app on Mac. I had a giant drive with a few partitions and clicked to do a zero pass and it finished in a half second. Obviously there was no way it completed that fast. I did some empirical testing based on completion time and sure enough it only zeroes a single partition rather than the entire disk
I miss when Disk Utility was good and simple and predictable on MacOS. It’s such steaming shit now.
Yeah, dd does as told and doesn’t care about your tears about the stupid typo