Fixing my HDD with a Raspberry Pi 2014-01-05 18:32:17
This is easily the nerdiest thing I have done outside work in quite a while, but it worked, and has saved me a lot of pain. Also, first blog post in over a year, woo!
So it turns out that Seagate Barracuda 7200.11 drives suffer from a known firmware bug which can effectively leave them bricked; with the drive physically intact, and all data still present, but no way to access them* without some surgery. The problem can be fixed without returning the drive, but this does require interacting with the firmware directly via a serial terminal.
Specifically, you need to be able to communicate with the drive at 38400 Bd, at a level of around 3 to 5 volts. Various places give instructions on how to make your own adapters, hooked up to a USB port, or even a plain old-fashioned serial port. However, if you happen to have a Raspberry Pi, three jumper wires and some insulating tape handy, it just so happens that the serial port pins on the GPIO header will do the job nicely.
Firstly, you will need to disable the Pi's own serial console support (if enabled), to free up the UART pins for your own usage; instructions for those using Raspbian can be found here. Once you've done that, arbitrary data can be sent over the UART using minicom on /dev/ttyAMA0. The easiest way to test this is by simply connecting the RX & TX pins together, then firing up minicom and - with local echo disabled, of course - verifying that you can receive what you type. Instructions for fixing the drive itself can be found here; you can skip the section on preparing an RS232-to-TTL adapter, and hook up the drive's GND, RX and TX directly to the Pi's UART pins.
lolz i have no idea what im doing
Not-very-close-up of the drive with Pi attached. The drive needs to be powered during the process, hence the tethering to the nearby tower.
Anyway, I am happy to report that my main machine is now up and running again, with the drive's firmware updated and no data lost. I suppose now would be a good time to start thinking about back-ups.
If you don't have a Pi, but do have access to a second machine with such modern conveniences as USB ports, one of these will probably let you get the job done from Windows using PuTTY. I haven't tried this, but since it can interface with a Pi, and I know the Pi's UART voltage is sufficient to talk to the drive, I would expect this cable will interface with the drive nicely. But where's the fun in that?
- Yes, I am using "data" as a plural. SCIENCE!
You must be logged in to post comments.