xenix redux (or, how to bring back a dead xenix pc)

Brad Parker brad at heeltoe.com
Sat Jan 17 06:35:19 CST 2009


This is a short story about getting data off an old xenix pc.  delete
now if that is not interesting :-)

A while ago friend brought over an old pc which was dead.  It's a 386
Compaq, very old.  It had been running xenix and it was never turned off
but one day the power failed.  When the power came back it would not
boot - the clock battery was long since dead and had lost it's disk
setup.

Inside is a 386 with about 4mb of ram and a Compaq ESDI controller.  And
a dead Dallas clock chip.

I dremel tooled the Dallas clock chip and soldered in a new battery
pack.  I got a floppy disk image to reset the bios from someone here
(thanks!)  But despite many tries it would not boot.  The diag program
would not let me set the disk parameters exactly the way they needed to
be set.  most frustrating.

So, I yanked the controller (ESDI), changed the jumpers and put
it in another old pc which had linux on it.  I booted linux and
gave it the disk geometry via the command line ("hdc=1224,15,34")

Once in linux I made an image of the disk using dd.  It turns out that
the "conv=" option is very important.  I used "conv=noerrors,notrunc,sync".
Originally I use "conv=noerrors" and the resulting image was bad because
the disk had errors.

	dd conv=noerrors,notrunc,sync if=/dev/hdc of=disk.img

I then put the resulting disk image on another linux box and wrote a
tiny C program to search for valid sysv super blocks.  It found 3.  I
then used "dd" to copy part of the image, with an offset (the start of
the first superblock), to a new file.

	dd if=disk.img of=d4 bs=512 skip=2040

With that I had a valid sysv file system in a single file.  I then
mounted the new file using the loopback option:

	mount d4 /mnt -t sysv -o loop

and viola!  I could see all the files and could make a tar file of
the root directory.

Flush with success (don't you just love it when things actually work? :-)
I decided to try and boot it.  I used a recent copy of qemu and told
it the geometry of the original disk

	qemu -hdachs 1000,15,34 -boot c -hda disk.img

Much to my shock, it booted xenix, cleaned the file system and gave me a
login prompt.

Now I just have to clean up the mess in my office :-)  Man that thing
had a lot of dust and dirt in it.

-brad



More information about the cctalk mailing list