The love of old stuff

By now, if you don’t know I like having old computer gear lying around and keeping it up and running, you don’t know me very well.

It so happens that my main file server at home is my old’n trusty G5 (dual 2.0Ghz and 4GB of RAM, top o’the range back in the day), running 10.4.11. It has a lot of room to spare and has never ever let me down.

For a project, I needed a PowerPC computer running 10.5.8. I decided that the G5 could suffer a little downtime for the Betterment of Mankind. I therefore setup a new partition, start the installation, set the whole thing up, secure in my conviction that it’s only temporary.

When everything is good to go with the project (cool project, too, maybe I’ll post something about that later), I revert back to my previous setting. Las, ho and behold! The filesystem is completely torn apart. It takes 5 minutes just to mount the drive. A lot of files are missing. What happened? What can possibly be done?

First thing’s first, disk utility cannot even VERIFY the drive. Don’t even think of repairing it. DiskWarrior identifies more than 5000 corrupted files, some of them as important as /bin/ls…

After a long period of trials and errors and copies from another computer I have somewhere running 10.4.11, I finally have a “workable” system. But the base containing the users has been corrupted.

Not to worry, says Apple’s knowledge base! All you have to do is restore the database backup, easy as pie. Just boot in single user (cmd + s at boot time), mount the drives (mount -a), continue the startup (sh /etc/rc), and restore the backup (niload -d -r -t < /var/backups/local.nidump). Reboot for safety.

There’s just one problem with that: continuing the startup starts the windowserver, and you can’t type any command anymore. Oh and the screen stays blue forever.

So here’s the trick: knowing that sh /etc/rc is asynchronous and accounting for the various amounts of time this or that subsystem needs to boot, just type all the commands anyway, and let it deal with it invisibly (hooray for error checking but… better than nothing)

so boot in single user, mount the drive and type
sh /etc/rc ; sleep 120 ;  niload -d -r -t < /var/backups/local.nidump ; sleep 30 ; reboot

The blue screen and the lack of any feedback is sure to stretch time in a way that’s not completely explainable by physical means, but in the end, the system is back online.

Next time the system fails, it’s going to take me 2h instead of 50.


Leave a Reply