Computer Archeology
How do you call something that’s been working so perfectly for the past ten years that nobody ever felt the need to touch it?
Obsolete!
…
Let me explain…
So, my company bought out yet another business that’s been making the same product for the past ten years. A very popular product, still, that we’ll have to maintain and provide support for.
An interesting aspect of it is that, ten years ago, people who designed the product thought of nearly everything. How to update it, how to upgrade it, how to adapt it to other countries… except for one thing: this product uses smart cards. A very simple, very cheap model, with an old and reliable chip, the same kind that were used for phone cards when I was a kid.
These cards aren’t produced anymore, we’re slowly eating through our stock.
Oh well, time to update the product, tools and all, I guess! But wait, it gets funnier!
Now, even if we do have some spare cards in store, we still have to write some stuff on them. The company we bought gave us the tool for this. A good old Macintosh IIci, that was very popular back then but… not so much today. Backups? Alternatives?
None.
First thing my boss ordered me to do: “Okay, I want a backup of that. Use whatever means, I want a backup CD with the content of this thing’s hard drive by the end of the week!”
That’s when the fun started!
Know Thy Enemy…
So we basically started poking at this thing:
And we wanted to be able to copy all the data from this computer over to that one:
The old machine’s label reads ‘Macintosh IIci‘ and it’s running Mac OS System 6. The Internets very kindly tell us that it was a Motorola-based architecture with SCSI peripherals. This was easily confirmed by prying the box open. The hard drive looks almost like a good old IDE one, only with many more pins on the back.
Once again, The Internets very kindly tell us it’s called IDC-50. After a while, it also tells us about a few places where to buy SCSI PCI cards to handle such drives. IDC-50 were found on old devices, it’s obviously a bit obsolete, but some cards still have such connectors. Good!
Looks easy. Deceptively easy. Oh well, my boss has me order a 40 euro PCI card, hoping we’ll have it working by the end of the week to prod at that Very Old Hard Drive and maybe, hopefully, grab its content.
So we wait for the package to arrive.
In the mean time, The Internets (well, Wikipedia really) also told us the drive was very likely using the HFS filesystem.
Know Thyself…
Barely three days later, we get the SCSI PCI card. Now comes the tough choice: which computer will we use for that delicate task?
To sum it up: SCSI, old hardware, possibly non-standard filesystem, the need to be able to access a device easily and on a rather low level…
I never gave my usual Windows XP workstation a glance and promptly grabbed our Ubuntu test box. Plugged the PCI card into the box, extracted the hard drive from the Mac to plug it to the PCI card. Crossed fingers when turning the test PC on.
Two minutes later, the file manager (look it just happened to be Dolphin, I don’t control these things. Much…) politely informed me that it had found a drive labeled “Macintosh HD” that was unmounted.
Wait, that’s… it? Already?
At this point, it’s useful to remember what my beloved dragon friend explained about devices and Linux… I did pretty much what he did to salvage his old drive, except it was much easier in my case because:
- The drive was in good condition.
- The entire drive altogether was 80MB in size.
Actually, I first only dumped the partition that Dolphin had identified as “Macintosh HD” (some /dev/sda
affair). This being Ubuntu, usually shipped with 15490138 more things than you need, I vaguely typed ‘modprobe hfs
‘ to tell the system I would need to be able to use such a filesystem soon.
I was expecting the system not to find the module (probably not the right name, or no support for HFS at all, though that was less likely.) Silly me, it just worked, no error, nothing.
If you read Balinares’ post, you should know that Linux allows you to treat a file like a device, and you can tell the system to consider a file as if it was an actual disk drive. So then I tried the good old ‘-o loop
‘ option to mount the dumped file locally just as if that was the actual hard drive and, well, that was it. All the files were there, I could open them, modify them, everything on a modern PC with a wide, flat screen and a mouse with two buttons and a wheel…
And You Will Be Victorious In Battle
So I had the backup my boss wanted. But wait… wouldn’t it be very nice to be able to use these files (I mean, all the data and programs copied from that old Macintosh) on a modern PC as well? That would be much more comfortable!
That’s when emulation came to help us.
In a nutshell, emulating a system is simply replicating this system’s functionality on a different, usually more modern platform. In practice, it means using a program on our PC today that acts just like that age-old Macintosh… Well, such a program exists, it’s called Basilisk.
The details are a bit too technical even for this post, let’s just say that with some bits and pieces of an original Macintosh (mostly ROM data, the digital copy of the old Macintosh’s innards) it’s possible to nearly perfectly imitate Mac OS system 6/7/8 on any modern PC.
And by copying the entire hard drive content of the Mac (not only the partition with our user data but the whole low-level disk data as one file), we just had a digital copy of the whole computer: operating system and hard drive.
It turns out Basilisk doesn’t need more. You give it the ROM file, the hard drive image as a single big 80MB file, and you soon have a nice desktop displayed inside an application window that looks just like what you had on the actual Macintosh, only better and in color.
From this:
To that:
Same data, same applications, but in color and on my brand new PC.
It barely took half an hour, and then I just spent a while fine-tuning settings and making sure everything was working the same as on the old computer.
And it does! We did nothing to upgrade the tools, but at least we can now use them on any computer we want (well, in theory. In practice, it works much better with Linux) and I expect we will.
There is much more to it, but that’s a long and boring enough post already. Maybe next time!
Honestly, I may be less of a geek than I used to be, but you can’t deny that sometimes the simplest console tools are the best for a job like that.
It was easy, and somehow gratifying, in a “I knew it’d work” kind of way.