8MB bug

How to: Fix an unbootable Intel SSD suffering from the 8MB bug

A friend of mine was having issues booting his laptop. The BIOS recognized his SSD, an Intel SSD sa2bw120g3a, but Windows was nowhere to be found. Even bootable partition and hard drive managers showed no sign of the SSD. This got me thinking that the SSD was dead, which was odd, as the BIOS was still recognizing it.

Several minutes of Googling lead me into the right direction; My friend’s SSD was suffering from the 8MB bug that was discovered in (almost all) Intel SSD firmwares, back in July 2011. As my friend never encountered issues with his SSD and wasn’t up to date about this fact, he never updated his SSD’s firmware, which could have prevented this bug from happening.

The 8MB bug is caused by an unexpected power loss under specific conditions. This will reduce the capacity of the SSD to 8MB and change the serial number to “BAD_CTX 0000013x”. Once this error occurs, no data on the SSD can be accessed and the user cannot write to or read from the SSD. The only way to get the SSD back to work is to erase it. That’s right, all data on the drive is permanently lost.

Some people have been able to start from scratch by wiping the drive’s contents with utilities such as HDDErase and Parted Magic but this only works if your SSD is not ‘frozen’. And since my friend has all the luck in the world, sure enough his SSD was frozen. Fixing a frozen Intel SSD suffering from the 8MB bug requires a more technical approach but it’s no rocket science once you know what you have to do. So, let’s get started!

You need:
– Hiren’s Boot CD / USB: http://www.hirensbootcd.org/hbcd-v132/
Update 21-11-2016: Mini Linux was removed from recent Hiren’s Boot CD versions. The last Hiren’s Boot CD to include Mini Linux is version 13.2 which you can download from the link above (scroll all the way down).
– Physical access to your SSD (i.e. open up your computer case)

1. Insert Hiren’s Boot CD / USB into your computer and boot from it.

2. Select ‘Mini Linux’ from the menu and hit Enter.

3. Once Linux has loaded, right click on the wallpaper and select ‘Xterm

4. A command prompt / terminal should open. Enter the following command to get a list of all available harddrives in your computer:

 fdisk –l

Locate your Intel SSD in the list and take a note of the device name, for example /dev/sda

5. Type the command:

 sudo hdparm -I /dev/sdX

where  sdX  is your SSD device.
This command will just print out some info about the drive. If you see in the output this: Serial Number: BAD_CTX that confirms that you are hit by this bug.
If at the Security section it reads frozen you CANNOT continue, you have to use a workaround to eliminate the freeze before you can continue:
Unplug and then replug the SATA data cable of your Intel SSD while the system is still powered on. So, leave your computer powered on, open up your case, locate the SATA data cable of your Intel SSD, unplug it and then replug it. This should unfreeze your SSD.

6. Type the command:

 sudo hdparm --user-master u --security-set-pass SOMEPASS /dev/sdX

Again /dev/sdX is your SSD drive, and SOMEPASS is a password you want to set for the SSD. (This password doesn’t lock the SSD or anything similar, it is just needed for these low-level dealing with the SSD.) We will need that SOMEPASS later on, so remember it/write it down. (But after the secure erase this password will be reset anyway so it is not important in the longterm.)

7. Check the drive again:

 sudo hdparm -I /dev/sdX

Now it should say enabled and not frozen at the security section:Security:
Master password revision code = 65534
supported
enabled
not     locked
not     frozen
not     expired: security count
supported: enhanced erase

8. Type the command:

 sudo hdparm --user-master u --security-erase SOMEPASS /dev/sdX

This issues the secure erase command. Again /dev/sdX is your SSD, SOMEPASS is the password set before. The completion of this operation can take a few minutes. After this your SSD should be functional, if not, try again with this command:

 sudo hdparm –user-master u –security-erase-enhanced SOMEPASS /dev/sdX

This latter command takes much more time (30-40 minutes) and you will have to reset the password (with step 4.) before running it because SOMEPASS is likely already reset by the previous command.

9. After this check the drive again

 sudo hdparm -I /dev/sdX

The BAD_CTX thing should be gone and your drive should be functional. You can now reinstall your O/S. After all this don’t forget to update the firmware of our SSD using Intel SSD Toolbox to prevent the bug from happening again in the future.

Source & Credits: http://askubuntu.com/questions/409684/image-or-reset-broken-ssd