Unlike hard drives where binary 0 is 0 and binary 1 is 1, SSDs, or at least those based on the SandForce controller, use hexadecimal FF to represent binary 0. It's a lot more complicated than that but it's sufficient for this tutorial. The real story delves into electron traps and the analogue count of electrons used to decide if a NAND cell means 1 or 0...
Anyway, what the binary inversion means in terms of wiping the MBR on SSDs (SandForce, at least), or the entire drive for that matter, is that you cannot use the standard linux disk destoryer (dd) command line without clagging your SSD. The drive will become sluggish because zeroing it actually fills it with data, not emptying it. If you dd /dev/zero an SSD then you are effectively filling it with binary 1s, which means the SSD will have to erase those blocks the next time they are written to thus 'clagging' the drive. Onto the good bits...
Assume we have an SSD on /dev/sdd. Also assume that we want to 'zero' the first partion. We are going to blat the first 2MB of the SSD with hexadecimal FF:
- Code: Select all
$ tr "\000" "\377" < /dev/zero | dd ibs=1k count=100 of=ff-file.bin
$ sudo dd if=ff-file.bin of=/dev/sdd bs=2M count=1
That's it, all done. We created a file filled with hexadecimal FF and dumped it into the first 2MB of the drive, thus wiping the MBR and partition table.