How to safely wipe the MBR of an SSD

Write tutorials here
There are more tutorials here
Forum rules
Please don't add support questions to tutorials,start your own thread in the appropriate sub-forum instead. Before you post please read this
User avatar
Level 10
Level 10
Posts: 3016
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

How to safely wipe the MBR of an SSD

Postby catweazel » Sat Apr 13, 2013 8:53 pm

This tutorial applies only to SSDs that use a SandForce controller. You should check the specifications for your SSD before using this tip.

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.
Mint Donor #6036
If your problem is fixed, please mark your thread as [SOLVED] by editing the title of the first message in the thread.

Return to “Tutorials”

Who is online

Users browsing this forum: No registered users and 5 guests