Atomic I/O letters column #124

Originally published 2011, in Atomic: Maximum Power Computing
Reprinted here December 11, 2011
Last modified 16-Jan-2015.
 

Brain transplants

Is swapping the controller board on a dead hard drive to try to recover the data as bad an idea as the data recovery companies claim?

A friend of my wife's has an Asus netbook, on which she stores everything, and for which she (of course) has no backup whatever - as you say, any data you have which isn't backed up is data you don't want to keep. And of course, the 2.5" hard disk in it gave up the ghost, so she came to me for help.

Powering up the netbook resulted in a delay and "no hard disk detected"-type messages. Pulling it out I found it was a SATA disk, so I stuck it into a drive dock attached to my main machine (which runs Linux). The drive is identified but times out or responds with garbage to commands sent to it.

The drive is spinning and sounds fine (not varying in speed/etc), so I figured it was the electronics that had gone bad. The friend isn't willing to spend what the professional data recovery companies want to recover it (seems $600 or so is the going rate if it doesn't need the clean-room treatment) but would like to try to get digital photos off of it.

I searched eBay for an identical drive (Seagate ST9160310AS, 160GB from their Momentus 5400.5 series) with the same model, PN (part number?), and firmware version and found one for not much, so it's on its way to me. I've not replaced the board on a hard drive before, though I used to build computers for a living and have disassembled/destroyed enough hard disks for paranoid customers looking for proof their data is wiped that it seems simple enough.

In searching for prices on data recovery, I found a number of firms with advice against swapping controller boards on these drives - though clearly they have a vested interest in you not saving your data yourself. I was wondering, is there anything to these warnings? One reason these warnings sound like marketing to me is that frequently these companies will have exactly the same text on pages for essentially every hard drive model number in existence, like in a link farm.

Examples:

"Please note, that in many cases, a simple PCB swap will not fix the hard drive. Most circuit boards are unique to their hard drives! There are extra steps that have to be taken to insure that a foreign PCB is able to adapt with another hard drive. Some of the steps are impossible without experience and professional equipment."
"The controller board of most drives stores unique adaptive data that can only be associated with the drive that it was originally a part of. In other words, it's very seldom that you can just swap out a controller board from one drive to another and get the dead drive functioning again."
"It is essential that you do not attempt to replace a faulty controller board with one from a working drive. Information on the board may be specific to the drive it has been attached to and may not function anywhere else."

Are these warnings just attempts to get people to use their services rather than try replacing the logic board themselves? And do you have any other advice on me attempting this other than taking ESD precautions?

Charles

Answer:
This question keeps coming around, and it's difficult to answer, mainly because hard-drive technology keeps getting more and more refined. To drag out the overused automotive analogy, modern hard drives are like modern cars, in that they're much more reliable than they used to be - vastly more reliable, if you're talking failures-per-megabyte - but more and more opaque when something goes wrong.

That said, it is definitely still possible to swap the controller board on a modern drive for an identical board - which very probably does mean the same revision and same firmware - and get a drive from which you can recover most, if not all, of the data. Note that this is only about recovering data, not resurrecting the drive; a modern drive with a new controller board on it probably won't be very reliable. If we're being charitable, that could be what the recovery companies are talking about when they say you can't "fix" a drive just by swapping in a new board. You should only expect the drive to be fixed enough for data recovery, at best.

Whether or not the board-swap makes the dead drive readable, after you recover whatever you can from it, you should rip that drive apart, as is traditional, and extract the fridge magnets and wall decorations.

The list of ways a board-swap can go wrong keeps getting longer. Even if you don't screw up in some elementary way like not taking anti-static precautions and annihilating the donor drive just by touching it.

A drive with a new controller board attached to it should, for instance, be expected to be significantly unhappy because of good old-fashioned bad-block mapping, where failing blocks on an otherwise healthy drive are invisibly replaced with standby blocks from a section of the drive set aside for this purpose. If the controller board keeps track of the block mapping, swapping in a new controller board can obviously cause problems. At worst, these problems can prevent you from even reading some data on the drive, let alone successfully writing to it.

There are more subtleties in recent drives, though. Like, the controller board may be calibrated at the factory to match the individual oddities of the particular head assembly in that one drive. The fantastically small tolerances and staggeringly high data densities in modern drives require a lot of this sort of subtle trickery.

Again, though, you may at least be able to read some of the drive provided your board is a close enough match. And if it doesn't work, you can at least put the board back on the donor drive and have that work.

(In a follow-up e-mail, Charles informed me that, annoyingly, the "dead" drive decided to work again for long enough for Charles to recover the photos from it without having to swap the board at all. Then he just put the was-to-be-board-donor drive into the netbook unmolested.)

 

Or buy a piano

I have a cat, called Boris. Boris walks on my keyboard. All the time. Sometimes I come back to the PC and I swear he's been trying to see if one cat can write Shakespeare faster than a million monkeys.

I usually deal with this by just opening an empty browser tab and leaving that as the active window. Boris hasn't figured out how to do Ctrl-Alt-Del yet, so about the worst he can do to a browser tab is sit on F1 and open hundreds of Google Chrome Help tabs. But there has to be a better way.

I tried a couple of "anti toddler" utilities that're supposed to lock your keyboard until you press some key combination that toddler hands can't reach, but they just... didn't work, at least not on 64-bit Win7. So rather than troubleshoot the software, I grabbed the chance to solve the problem in hardware!

Surely you could easily make a switch that interrupts the keyboard signal, for USB or PS/2. They both only have 4 conductors, and I bet you could just interrupt one data wire with a basic single-pole toggle switch. But I also remember being warned never to plug or unplug PS/2 devices with the computer turned on, because it could blow a motherboard fuse or something.

So could a $2 keyboard cable switch cost me $200 for a new motherboard? Do you need to switch all 4 wires?

Nicholas

Answer:
You could probably harmlessly disable a PS/2 keyboard by switching only one data pin; pin 1 on the DIN connector is data for a PS/2 keyboard, and pins 2 and 3 are data for USB. You can in theory blow a PS/2-port fuse by connecting and disconnecting the power and ground pins, but if you don't switch those you should be fine. USB is more robust, but you'll have to wait a couple of seconds between re-"connecting" your keyboard before you can use it.

Tell you what I'd do in this situation, though: Buy the finest, cheapest KVM (Keyboard, Video, Mouse) switch you can find, and just don't plug anything into one of its sets of sockets. Switch from your keyboard to an empty socket, and the keyboard's locked out.

Cheap KVM

The PS/2-and-VGA switch in the picture cost me $AU6.05 delivered on eBay. It runs from keyboard-port power, and works fine with my monster vintage IBM keyboard. Like other dirt-cheap KVMs, this one came with no cables, but all you need for this project is one PS/2 cable. That'll only cost you a couple of bucks delivered.

Going back to boring old software, there's also that "PawSense" thing that specifically detects "cat-like typing" (specifically, multiple adjacent keys pressed at once) and plays an alarming noise when it happens. But PawSense is commercial software, and nobody ever seems to have made a free version.

 

We never had these problems with punched cards

I have an external hard drive that I'm re-purposing, so I've taken all the data off of it and reformatted. I know that formatting always takes up some space, and there's some difference between the powers-of-10 the manufacturers use to calculate space versus the powers-of-2 the operating system uses (you've mentioned this yourself on one or two occasions... maybe three or four), but what I saw afterwards has me really confused.

The advertised disk space on the drive's sticker is 320Gb. I used the NTFS file system when I formatted it, and now Windows reports that there's 298Gb of available space. All good so far, and what I was expecting.

However, it also reports there's 319,966,433,280 bytes of free space (I've attached a screen shot to illustrate). So, what gives? Why is Windows telling me there's almost the entire 320 gigabytes free, but it's only letting me access 298? If it makes a difference, this is on Windows 7 32-bit.

Michael

Drive-capacity number confusion
I dream of the day when this stuff is obscure trivia.

Answer:
On exactly one thing, the people who insist a megabyte is a million bytes agree with the people who insist a megabyte is 1,048,576 bytes: A byte is eight bits. So byte-counts are the same for both systems.

If we use the kilo-, mega-, giga- prefixes to mean powers of ten, and kibi-, mebi-, gibi- et cetera to mean powers of two, your very-nearly-320-billion bytes adds up to 298 gibibytes, and 320 gigabytes.

A byte isn't necessarily eight bits, by the way. Early computers used bytes with several odd lengths, and there's also the concept of the "word", which is the amount of data a processor deals with at a time. Just the other day I was reading the first of Charles Sheffield's "Proteus" books, which on the first page has people in a future world when all medicine has been superseded by wholesale bodily re-engineering being taken aback by something that requires "four billion words" of computer storage.

A modern PC has, at most, 64-bit words, making four billion words only 29.8 gibibytes. Even if you say that's RAM, not drive space, it's trivially little for a future world with space colonies and people turning themselves into birds.

If we presume the future computers have some monstrous word-size like 2^24 bits, then four billion words becomes a more impressive 7,812,500 gibibytes. But drive capacity has been increasing (and cost-per-megabyte has been falling), in a pretty good exponential curve since about 1980.

If that continues, we'll have drives exceeding 7,812,500 gibibytes before 2030.

(Incidentally, this is one of the few sci-fi imagination failures that didn't snare Star Trek, at least by the time of The Next Generation. TNG and later referred to computer storage with a unit called the "quad", which remained as fuzzily defined as every other unit, technology, chemical element and subatomic particle on the show.)

 

Other letters columns

I/O #1
I/O #2
I/O #3
I/O #4
I/O #5
I/O #6
I/O #7
I/O #8
I/O #9
I/O #10
I/O #11
I/O #12
I/O #13
I/O #14
I/O #15
I/O #16
I/O #17
I/O #18
I/O #19
I/O #20
I/O #21
I/O #22
I/O #23
I/O #24
I/O #25
I/O #26
I/O #27
I/O #28
I/O #29
I/O #30
I/O #31
I/O #32
I/O #33
I/O #34
I/O #35
I/O #36
I/O #37
I/O #38
I/O #39
I/O #40
I/O #41
I/O #42
I/O #43
I/O #44
I/O #45
I/O #46
I/O #47
I/O #48
I/O #49
I/O #50
I/O #51
I/O #52
I/O #53
I/O #54
I/O #55
I/O #56
I/O #57
I/O #58
I/O #59
I/O #60
I/O #61
I/O #62
I/O #63
I/O #64
I/O #65
I/O #66
I/O #67
I/O #68
I/O #69
I/O #70
I/O #71
I/O #72
I/O #73
I/O #74
I/O #75
I/O #76
I/O #77
I/O #78
I/O #79
I/O #80
I/O #81
I/O #82
I/O #83
I/O #84
I/O #85
I/O #86
I/O #87
I/O #88
I/O #89
I/O #90
I/O #91
I/O #92
I/O #93
I/O #94
I/O #95
I/O #96
I/O #97
I/O #98
I/O #99
I/O #100
I/O #101
I/O #102
I/O #103
I/O #104
I/O #105
I/O #106
I/O #107
I/O #108
I/O #109
I/O #109
I/O #110
I/O #111
I/O #112
I/O #113
I/O #114
I/O #115
I/O #116
I/O #117
I/O #118
I/O #119
I/O #120
I/O #121
I/O #122
I/O #123
I/O #124
I/O #125
I/O #126
I/O #127
I/O #128
I/O #129
I/O #130
I/O #131
I/O #132
I/O #133
I/O #134
I/O #135
I/O #136
I/O #137
I/O #138
I/O #139
I/O #140
I/O #141
I/O #142
I/O #143
I/O #144
I/O #145
I/O #146
I/O #147
I/O #148
I/O #149
I/O #150
I/O #151
I/O #152
I/O #153
I/O #154
I/O #155
I/O #156
I/O #157
I/O #158
I/O #159
I/O #160
I/O #161
I/O #162
I/O #163
I/O #164
Dan's Data letters #1
Dan's Data letters #2
Dan's Data letters #3
Dan's Data letters #4
Dan's Data letters #5
Dan's Data letters #6
Dan's Data letters #7
Dan's Data letters #8
Dan's Data letters #9
Dan's Data letters #10
Dan's Data letters #11
Dan's Data letters #12
Dan's Data letters #13
Dan's Data letters #14
Dan's Data letters #15
Dan's Data letters #16
Dan's Data letters #17
Dan's Data letters #18
Dan's Data letters #19
Dan's Data letters #20
Dan's Data letters #21
Dan's Data letters #22
Dan's Data letters #23
Dan's Data letters #24
Dan's Data letters #25
Dan's Data letters #26
Dan's Data letters #27
Dan's Data letters #28
Dan's Data letters #29
Dan's Data letters #30
Dan's Data letters #31
Dan's Data letters #32
Dan's Data letters #33
Dan's Data letters #34
Dan's Data letters #35
Dan's Data letters #36
Dan's Data letters #37
Dan's Data letters #38
Dan's Data letters #39
Dan's Data letters #40
Dan's Data letters #41
Dan's Data letters #42
Dan's Data letters #43
Dan's Data letters #44
Dan's Data letters #45
Dan's Data letters #46
Dan's Data letters #47
Dan's Data letters #48
Dan's Data letters #49
Dan's Data letters #50
Dan's Data letters #51
Dan's Data letters #52
Dan's Data letters #53
Dan's Data letters #54
Dan's Data letters #55
Dan's Data letters #56
Dan's Data letters #57
Dan's Data letters #58
Dan's Data letters #59
Dan's Data letters #60
Dan's Data letters #61
Dan's Data letters #62
Dan's Data letters #63
Dan's Data letters #64
Dan's Data letters #65
Dan's Data letters #66
Dan's Data letters #67
Dan's Data letters #68
Dan's Data letters #69
Dan's Data letters #70
Dan's Data letters #71
Dan's Data letters #72
Dan's Data letters #73
Dan's Data letters #74
Dan's Data letters #75
Dan's Data letters #76
Dan's Data letters #77
Dan's Data letters #78
Dan's Data letters #79
Dan's Data letters #80
Dan's Data letters #81
Dan's Data letters #82
Dan's Data letters #83
Dan's Data letters #84
Dan's Data letters #85
Dan's Data letters #86
Dan's Data letters #87
Dan's Data letters #88
Dan's Data letters #89
Dan's Data letters #90
Dan's Data letters #91
Dan's Data letters #92
Dan's Data letters #93
Dan's Data letters #94
Dan's Data letters #95
Dan's Data letters #96
Dan's Data letters #97
Dan's Data letters #98
Dan's Data letters #99
Dan's Data letters #100
Dan's Data letters #101
Dan's Data letters #102
Dan's Data letters #103
Dan's Data letters #104
Dan's Data letters #105
Dan's Data letters #106
Dan's Data letters #107
Dan's Data letters #108
Dan's Data letters #109
Dan's Data letters #110
Dan's Data letters #111
Dan's Data letters #112
Dan's Data letters #113
Dan's Data letters #114
Dan's Data letters #115
Dan's Data letters #116
Dan's Data letters #117
Dan's Data letters #118
Dan's Data letters #119
Dan's Data letters #120
Dan's Data letters #121
Dan's Data letters #122
Dan's Data letters #123
Dan's Data letters #124
Dan's Data letters #125
Dan's Data letters #126
Dan's Data letters #127
Dan's Data letters #128
Dan's Data letters #129
Dan's Data letters #130
Dan's Data letters #131
Dan's Data letters #132
Dan's Data letters #133
Dan's Data letters #134
Dan's Data letters #135
Dan's Data letters #136
Dan's Data letters #137
Dan's Data letters #138
Dan's Data letters #139
Dan's Data letters #140
Dan's Data letters #141
Dan's Data letters #142
Dan's Data letters #143
Dan's Data letters #144
Dan's Data letters #145
Dan's Data letters #146
Dan's Data letters #147
Dan's Data letters #148
Dan's Data letters #149
Dan's Data letters #150
Dan's Data letters #151
Dan's Data letters #152
Dan's Data letters #153
Dan's Data letters #154
Dan's Data letters #155
Dan's Data letters #156
Dan's Data letters #157
Dan's Data letters #158
Dan's Data letters #159
Dan's Data letters #160
Dan's Data letters #161
Dan's Data letters #162
Dan's Data letters #163
Dan's Data letters #164
Dan's Data letters #165
Dan's Data letters #166
Dan's Data letters #167
Dan's Data letters #168
Dan's Data letters #169
Dan's Data letters #170
Dan's Data letters #171
Dan's Data letters #172
Dan's Data letters #173
Dan's Data letters #174
Dan's Data letters #175
Dan's Data letters #176
Dan's Data letters #177
Dan's Data letters #178
Dan's Data letters #179
Dan's Data letters #180
Dan's Data letters #181
Dan's Data letters #182
Dan's Data letters #183
Dan's Data letters #184
Dan's Data letters #185
Dan's Data letters #186
Dan's Data letters #187
Dan's Data letters #188
Dan's Data letters #189
Dan's Data letters #190
Dan's Data letters #191
Dan's Data letters #192
Dan's Data letters #193
Dan's Data letters #194
Dan's Data letters #195
Dan's Data letters #196
Dan's Data letters #197
Dan's Data letters #198
Dan's Data letters #199
Dan's Data letters #200
Dan's Data letters #201
Dan's Data letters #202
Dan's Data letters #203
Dan's Data letters #204
Dan's Data letters #205
Dan's Data letters #206
Dan's Data letters #207
Dan's Data letters #208
Dan's Data letters #209
Dan's Data letters #210



Give Dan some money!
(and no-one gets hurt)