Tales from the flying Disk Doctor - A close shave

Copyright Dr Alan Solomon, 1986-1995

This disk started out as nearly impossible, turned into a piece of 
cake, and then turned out to be extremely difficult again. Let me
explain.

Jim came to me with a problem. He had his entire customer database on 
a 20Mb hard disk, and something had gone wrong - he couldn't read it, 
as the disk was reporting bad sectors. He wanted to do a mail shot to 
tell all his old customers about a rather splendid new product he was 
launching. He had great faith that I could fix it - he realised it 
wouldn't be easy, or cheap, but he wanted me to have a go. He had such 
faith that he sent the disk round immediately - no computer, not even a 
controller card, just the disk. I hooked up the disk to faithful old 
Dobbin, my generic XT clone, using a Western Digital controller card. 
It didn't work. I tried an old IBM XT controller, and it worked after a 
fashion. I got read errors on about one in ten sectors, which was 
obviously the problem Jim had; that didn't bother me, as I know ways to 
persuade reluctant disks to speak to me. What was going to be rather a 
poser was the fact that the IBM card would only step the heads half way 
down the disk. It came from an old IBM 10Mb disk (remember those?) and 
didn't seem to know how to get past track 305.

I phoned up Jim - "Can I have the original card please?" "You don't 
need it", said Jim, "just use an IBM controller." "I did, and I can 
only access the first 10MB", I said. "Oh, you have to change the
jumpers", said Jim. I expect he was right, in a way. Most controllers 
will control a wide variety of disks, if you set the jumpers up right. 
But the old IBM controller didn't have any jumpers, because IBM would 
sell you any hard disk as long as it was 10MB and had IBM on it. So 
there was no need to control any other disk, so there were no jumpers. 
I explained all this to Jim, and he said he'd send me his card.

A month passed, and there was no card. I phoned Jim, who said "The 
sales department are supposed to have done that, I'll chase them." 
Another month passed, cardlessly. I was not in a hurry, but I thought 
perhaps Jim was. I phoned him up again. "Done it yet?" he asked. "No 
card." I replied succinctly.

At Christmas, I got a card. Well, actually, I got a lot of cards, 
mostly from suppliers trying to persuade me to buy their brand of 
printer ribbon. But one of the cards was Jim's, and it didn't have 
mince pies on it, it had chips. Along with the card, there was a hard 
disk, and a note saying "Merry Christmas".

My memory is about four bytes, and I use it as a pointer to my Filofax. 
If I can't find my Filofax, I start getting withdrawal symptoms; my 
hands start to shake, I sweat, and I rush madly around the house 
looking in ridiculous places for it. Susan usually finds it by saying 
"Now if I were him, where would I have put it", and there it is. I 
don't know how she does it, and I don't think she's really using logic, 
but then I often do things that I can't explain afterwards how I knew 
to do them.

But my short memory, combined with an endless stream of disks that need 
data recoveries, explains why it was that I assumed that the disk that 
came with the card was the one I was supposed to be quacking. I put the 
disk into Dobbin, with its controller, and had a look. About one sector 
in two was bad, but I could read down to the end of the disk now. I 
also found that if I tapped the disk underneath, I could sometimes read 
the bad sectors. But there are 40,000 sectors or thereabouts (41820, to 
be exact), and I didn't fancy the length of time it would take. I 
needed an automatic bottom-tapper. And if you think that's funny you 
wait till you hear the next bit.

On of the principles of lateral thinking is to take any problem, and 
turn it upside down; lateral thinking is second nature to me now, which 
is why people so often come to me with impossible problems, and then 
afterwards say to me "Well yes, of course, I didn't need you to tell me 
it could be solved *that* way". Instead of tapping the disk on the 
bottom, I thought of turning the disk upside down, and tapping what 
would then be the top, as it's easier to tap downwards than up. But 
then I got an even better idea.

I put a broomstick across two chairs, suspended the disk at all four 
corners using a string cradle, tied the string to a spring, and 
attached the spring to the broomstick. The disk bounced nicely in this 
apparatus, and as it bounced, it kept bumping against the 
carpet. So all I had to do was keep the disk bouncing while my programs 
read the data off the disk.

Heath Robinson, eat your heart out. I wish I could show you a picture 
of me sitting next to this contraption, bouncing the disk and watching 
Dobbin's monitor counting off the disk sectors. It worked a 
treat, and soon I had the first megabyte off. I decided to stop 
bouncing, and have a look at it.

With the first megabyte, you get the directory, so you can see what is 
on the disk, even though the data isn't actually there. I had a look at 
the directory, and it was nothing like what Jim was after. I phoned him 
up and told him the bad news. He laughed. "I asked Sales to send 
you a good disk with the card, to put the data on." I had been bouncing 
a disk that had nothing useful on it; I guess the Post Office had put 
it through their Christmas Mail Mangling machine. 

With this reminder, my memory yielded up the information that I had put 
Jim's disk at the back of the wardrobe, for safety. I dug it out, and 
attached it to the bouncing cradle; I also interfaced one of my good 
disks, to copy the data on to. The data came off so fast, I stopped 
bouncing for a moment, and the data still flew off. I didn't need a 
bounce to do this one - great. Then I noticed something that made me 
feel ill. The disk light on the other disk, the one I was copying on 
to, wasn't flashing.

I'd assumed that this dud disk wouldn't work, and that therefore my 
good disk would be drive C. So I was copying the data onto drive C, 
only drive C was the disk in the bouncing cradle. I was copying that 
disk onto itself, and I'd made a complete dog's breakfast of what was 
actually an easy job. I switched off immediately.

When you've done something as stupid as that, your first instinct is to 
go in both-handed to fix things. That's a very bad idea. What I did, 
was take a couple of deep breaths, and then go downstairs to have a cup 
of coffee. By the time I'd been through the coffee ritual, I'd calmed 
down again; the adrenaline had subsided and I could think rationally.
Perhaps all was not lost; perhaps I could do a data recovery on this 
disk.

I went back upstairs to the computer room, and very carefully had a 
look at the disk. The File Allocation Table was overwritten, 
and the directory was trashed. But I searched down to where I'd done 
the copy, and there were bits of the FAT, and the root directory. It 
was all in the wrong place, of course, but I know how to fix that. 
There are 41 sectors of FAT on this type of disk, and there is a second 
copy immediately after the first. I'd copied data over parts of the 
FAT, but I was hoping that maybe I could make one good one out of the 
two bad ones. I crossed my fingers, toes and anything else that would 
cross, and searched through the two FATs. My luck was in. The 
parts that had been overwritten on one FAT, were still there on the 
other. Someone up there must love me; I wonder if the Greeks had a god 
of data recovery? 

Very, very carefully, I stitched together the pieces of FAT to make one 
good one, then I copied it into the right place, put a copy of it next 
door, and copied the directory back to its right place. I rebooted, and 
the disk worked, and seemed to know where its data was. Some of the 
earlier data sectors had been overwritten by my blunder, but they were 
unimportant, since it was just DOS and 123. I copied Jim's customer 
database off onto floppies and sent them off to him. 

My new year's resolution is to be more careful. I don't think I can 
take another experience like that.