The Case of the Crack of Doom

Copyright Dr Alan Solomon, 1986-1995

I was relaxing with Starglider on my 1512;  Holmes was making a foul
smell with his pipe and making an even fouler noise with his violin.  I
turned up the sound knob to drown out his amateurish attempts, but he
only redoubled his efforts.  It was really rather lucky that we heard
Mrs Hudson knocking on our door above that din.  Distracted by the
commotion, I crashed into an energy tower and died, so I turned round
and gave my full attention to the man who had just come in.

"Sit down", said Holmes.  "You must be exhausted after driving a Hackney
cab all that way, and you so out of practice." "How did you know I used
to be a cabbie?" said the man, astonished.  Holmes smiled.  He never
revealed how he made these astonishing deductions, but I had seen him
looking out of the window, and guessed that he had seen the cab draw up
and the cabbie enter the house.  And even I could see the welt on the
man's thumb where the whip is usually held, so typical of the
professional cabbie.

He was a picture of misery.  "Holmes, you have to help me", he sobbed.
"I'm ruined - I've lost everything." The man was distraught, so I
prescribed a sedative for him, and as the soothing effect of the tea and
muffins took hold, he began to calm down and explain his predicament.

His name was Joe Partridge, and he ran a string of Hackney cabs. He
owned each horse and carriage, and shared the daily take with the
cabbie.  Different cabbies were on different commission rates and had
different areas to work in.  He also dispatched cabs on demand to pick
up passengers, and when goods needed to be transported in a hurry, it
was often one of his cabs that did the job.  He had over 100 cabs, plus
extra horses, and stables for the horses.  The business was quite
complex, and when the PC1512 came out, he had decided that a computer
would simplify his life.

Now his books were all kept using Sage Accountant, he kept track of the
cabs and cabbies using PC-File, he sent out all his letters using
PC-Write, and he planned each coming week's work using VP Planner.  It
was all very organised.  There was just one problem.

"We dropped the Amstrad", he said.  They had been moving it to a larger
office as it had taken on such importance to the business, and it had
slid off the trolley onto the cobbled yard.  The case had survived the
impact, but the big problem was, the hard disk didn't work.

Holmes sucked at his pipe and frowned.  "All you need to do is replace
the disk, restore your backup, and you're back in business." There was a
long silence, and I knew that this man was another optimist who never
backed up.  "Holmes, you have to help me.  Without the data on my hard
disk, I don't know who owes me money, or who I owe money to, or how much
to pay my staff, or..."

Holmes frowned, and pursed his lips, as he weighed the man up.  I could
see what was going through his mind - he wasn't thinking about the job
at hand, but carefully estimating just how large a golden egg could be
extracted from this particular Partridge.  I guess he must have thought
that the goose was quite fat, because he named a figure that made me say
"Ump", but Holmes is quite good at this, and the cabbie swallowed,
thought about it, and nodded.  "Bring us the machine", said Holmes.

Next day, Joe arrived carrying his PC1512.  It looked very much the
worse for wear;  one of the corners was cracked and the whole machine
was filthy.  We removed the four main screws, and the three screws
holding down the side brackets, and removed the top.  I'm always
startled when it makes that loud click as the top comes off, even though
I know it's coming.  It always sounds to me as if I've broken something
- I call it the "Crack of Doom".  Inside, we could see the recalcitrant
hard disk.  Holmes rubbed his hands together gleefully and said "The
game's afoot, Watson".  I hadn't a clue what he was talking about.  It
wasn't a game, we weren't on foot and my name isn't Watson.  We decided
not to use this machine for our efforts, as there was no telling what
other side effects dropping it onto cobbles might have had.  So we undid
the four screws holding down the hard disk, disconnected the cables and
lifted it out.

The reverse process put the cabby's hard disk into my own faithful 1512,
and I powered up, with an MS-Dos boot disk in drive A.  When the Amstrad
came up, I tried to do a directory on drive C, but it said that there
was no hard disk there; that was the problem.

I doctor a lot of disks like this;  my medical practice has long since
given way to a disk doctoring practice.  When DOS refuses to read a hard
disk, but just gives read errors, it's time to get out the special
toolkit and start digging.  My special toolkit, by the way, is Not For
Sale;  rather like a sharp scalpel you can do infinite damage to a disk
with some of my tools, as well as curing it.  The first tool I used,
allows me to look at the disk cylinder by cylinder, bypassing DOS to
control the hardware more directly;  I call it DiskXray.  Amstrad has
documented how to do this in the splendid Technical Reference manual,
and it's worth buying for this alone.

My DiskXray showed me that the problem was with one of the four heads of
the disk.  Most 20 megabyte disks are made from two plates covered with
a magnetic coating.  Each side of these two plates has a read/write
head, like a tape recorder, so there are four heads, numbered from 0 to
3.  Everything in the computer world is numbered from zero - have you
noticed?  The heads move in and out along a radius to access different
parts of the disk;  each different position of the head is called a
track and a cylinder is all four tracks with the heads positioned at one
place.  So cylinder 0 is the outermost position, and cylinder 614 (on a
20 meg disk) is the innermost.  Cylinder 0 contains the all-important
boot sector, the directory, and the table that shows what pieces of disk
belong to which files.  We call this table the FAT, short for File
Allocation Table.  It's all kept on cylinder 0 because in theory, that
should be the most reliable, as it has the largest circumference, and so
the packing density of the bytes is least.

Each track is divided into sectors, and the sectors are numbered from 1
to 17, (yes, 1, not 0, it is one of those irritating little quirks that
make computers such fun).

My DiskXray told me that head 2 was defective, and it was refusing to
read anything at all.  Head 2, cylinder 0 is right in the middle of the
FAT, so we had mega problems, as without the FAT, files cannot be read.
But as I Xrayed down the disk, I found that apart from the defective
head 2, the rest of the disk was in good shape.

"Well, Holmes", I said, "What do you make of it?" "Interesting", said
Holmes.  "The fall has obviously made the head bang against the magnetic
coating, and it is probably completely stuck.  Shall we operate?"

Holmes was referring to our clean room.  You shouldn't open up a sealed
hard disk unit unless you do it in a clean room.  Even a minute speck of
dust is huge compared to the distance between the read/write head and
the disk platter, so opening up a hard disk in an ordinary environment
is sudden death.  Our clean room room was kept meticulously so by Mrs
Hudson, who Hoovered and dusted each day, and wiped down the windows.
Even so, there was a lot of dust in the air, and the smole from Holmes'
foul pipe, and we didn't like to use it unless we had to.

"Let's see what we can do with software, first", I suggested.  We hooked
up a second 20 meg drive to the Amstrad using the second block of pins
on the controller card, and an extension to the main lead.  We had to
leave the top off the 1512, as there wasn't anywhere inside to mount the
second disk, and we took the power from an external power supply, as the
1512 isn't really designed for two hard disks at once.  We powered this
contraption up and booted from a DOS floppy.

The next tool I took from my little black bag is called Hoover.  It
reads a hard disk in a very determined manner, Hoovering the data off
each sector, and passing it on to the other good disk.  If it can't read
a sector it tries several times before giving up, and so Hoover takes a
very long time to run.  We left it running overnight and turned our
attention to the evening's gastronomic delights.

Next day, we had a look at what Hoover had got for us.  It didn't look
good.  There were 51 good sectors, the 17 bad ones, then 51 good ones,
and so on.  But on the principle that 75% is better than nothing, we
decided to press on.

Now we had all the data off that disk that we could get, and it was
clear that the disk could never be used again. We decided that we had
very little to lose - it was time for the clean room.  I insisted that
Holmes leave his foul pipe outside, and we put my beloved Amstrad onto
the operating table.  We then sprayed the entire room with an atomiser,
spraying distilled water, so that the dust would be dragged down to the
floor.  We put on our face masks, aprons and rubber gloves, and we were
ready.  I made the first incision - well actually, what I did was remove
the sealing case of the hard disk using an Allen key.  Now we had to
work fast.  Our environment was clean, but not completely without
contamination, and the longer that disk was left open, the more likely
it was to become dirty and unusable.

Inside, we could see the platters and the read/write heads at the
outside circumference.  Holmes powered up the Amstrad, and used DiskXray
to move the heads while I watched carefully;  the heads all seemed to
move correctly, and were at the correct distance from the platters.
Holmes got out his magnifying glass, and after a few minutes inspection,
cried "AHA!" He showed me what he'd seen - one of the minute wires
connected to head 2 had come loose.  Holmes used his smallest soldering
iron to reconnect it, and we now stood a chance to read that platter.

We had to work fast - every second increased the danger to our client's
data.  We decided not to put the disk back together, as that would take
several minutes, but to run it as it was.  We connected up a second hard
disk and then powered up again.  Once more, we ran our Hoover program,
but this time we told it to get data only from head 2.  Then we watched
as the program ran.

We could see that the head was still having some trouble reading the
disk, but it seemed to cope, as it was only retrying occasionally.  We
watched the data coming off, scarcely daring to move or breath, for fear
of disturbing the delicate mechanism.  Suddenly there was a loud knock
at the door.  Holmes and I looked at one another - not now, not now.
"Go away", I shouted through my mask, but whoever it was ignored me and
the door opened, letting in unknown quantities of dust.  It was Mrs

"Go away", we both shouted, and shooed her out.  She took the hint and
closed the door, but the damage had been done.  Anxiously, we watched
the disk;  it seemed to be retrying more and more often, until
eventually we could see that there was no point in running it any
longer, as every sector was taking ten retries and then failing - we
would get no more data off this disk.

We took off our masks and gloves, and I reassembled the disk, although
there was little point.  I took the Amstrad back into the study, while
Holmes went to tear Mrs Hudson limb from limb.  I could hear a lot of
shouting going on in the distance, and a slammed door, and by the time
Holmes returned to the study, I had DiskXray looking at our copy of the
client's disk.  I knew that the earlier tracks would be fine, and I knew
that the later ones would not.  What I didn't know was whether the later
ones were important - perhaps they were unused tracks.

When DOS writes to a disk, it writes to the sectors on the outside
tracks, and as the disk fills up, it gradually works its way inwards.  I
found that the tracks that we had rescued all had data on them, and that
when I reached the point (cylinder 433) at which the reads had failed,
there was still data.  This meant that we had indeed lost some data
forever, but there was still a chance - perhaps it was something

We mounted the two disks that we had used so far into the 1512 together,
and carefully, I copied the missing platter-full of data into place.
That gave us a disk that was a perfect copy of our client's disk down as
far as cylinder 433, and with 75% of the data thereafter.  We exited to
DOS and had a look at the disk using DIR - it seemed to be garbage, and
my heart sank.  All that work, and we'd got so near.  Then I had a
thought - we should have got the root directory at least, so why could
we only see garbage?  Then I realised;  one of us was being really
stupid, and it wasn't Holmes.

The most important thing about a hard disk, from DOS's point of view,
isn't its speed or capacity.  The important thing is the fact that it is
a fixed, non-removable disk.  So anything that is on the disk, will
still be on it a few minutes later, unless DOS has changed it, in which
case DOS knows that it is changed.  So DOS can keep a copy of important
things like the FAT in memory, and can rely on it always being correct.
But I had changed the disk without going via DOS!  I had to tell DOS
that the disk had different contents to what it thought.  How do you do
that?  Simple - I switched off and on again.

When the Amstrad had finished booting off the floppy, I did a DIR of the
hard disk.  It showed me all the files in the root directory and the
subdirectory, and Holmes and I grinned at each other.  "Yes, but." said
Holmes, and I knew what he meant.

When you do a DIR, DOS is just looking at the directory.  It will show
you the file names, but that doesn't prove that the files are there, or
that they are uncorrupted.  To discover that, you have to run the
programs, load the data, type the files.  And if anything is missing,
only the client can tell whether it is important or not.

Holmes lifted the telephone handset from the wall apparatus, and wound
the generator handle on the side, vigorously.  The current he generated
flowed down the wires, out of the house, and in to the exchange, three
streets away, where it caused a bell to ring.  The operator was alerted
by this bell, and Holmes asked for a connection to be made to our cabbie
friend.  She connected the plug that was attached to our circuit, to the
socket that led to his device, and Holmes wound the handle to activate
his bell.  After he had been doing this for a while, he got an answer,
and we asked Joe to come round.  He was here within ten minutes, looking
hopeful.  We fired up the Amstrad, and did a DIR.

Seeing a client's face when he sees his data again is one of the best
parts of our profession.  The mixture of amazement, relief and happiness
is something that people experience only rarely, and few people try to
hide their feelings at such an emotional time.  For us, it's a bit like
basking in warm sunshine.

Joe ran his programs, looked at his accounts, loaded his spreadsheets.
Everything worked fine, until he went into a subdirectory called
"OTHER", and when he tried to run the programs there, every one of them
crashed.  This was the area of disk that had been wrecked by Mrs
Hudson's interruption.  "Is it important?" asked Holmes, anxiously.  Joe
turned to us and grinned, "No, that's only my games subdirectory." We
both grinned back.

We gave Joe back his PC1512, and told him that he should probably
downgrade it to doing unimportant jobs, like playing games.  A computer
that has been dropped is not a good candidate for running your business
on - I suggested that he buy one of the new, superior, PC1640s, and Joe
agreed.  I also explained to him about the importance of backup, which
he now already knew, and about the best way to back up a computer that
your business depends on.  Every mechanical device must fail eventually;
it's only a matter of when.  Hard disks rotate at 3600 revolutions per
minute, and if the read/write head touches the recording surface, it
digs a groove in the soft oxide, destroying the data and perhaps even
ruining the head.  There are many ways to lose all your data, starting
with somebody accidentally deleting the wrong subdirectory, and going
all the way up to having your computer stolen.  The only sure protection
is a security copy of your data, and perhaps even a second copy at
another site.  Joe promised to do regular backups from now on, so we
gave him his Amstrad back, gave him some free games, lightened his
wallet and sent him on his way.  Holmes asked if we could keep the
wrecked disk, but was very mysterious about why he wanted it.

A few days later I found out.  He was knocking out his foul pipe into a
new ashtray - I took a closer look at it, and realised what it was.
He'd removed the disk platters, varnished the outside and the drive
electronics, and he had the highest-tech ashtray in the world.