Upgrading libc6—the hard way

So Branden arrived here in Oldenburg a few hours ago, and brought tortoise with him, his Mac Quadra 840AV that he's got. Since he took it apart to add more RAM about three or four years ago, he couldn't get it back together so now it's been lying there in pieces for ages. No, that doesn't mean Branden doesn't know how to work with hardware—macs are weird. We had some fun putting it back together up to a state where it works, sortof (there's still one piece left that neither of us knows where to put) and then powered it up again. It had a potato install in it, and a Debian 2.2r2 CD as well (which, occasionally, happened to be the NONUS version, so he probably broke US Export laws by taking it with him).

After looking at the /dev/sdb4 has not been checked in 1484 days, check forced etc for a while, the machine was finally running again. For the first time in many, many years. Since Branden had bought it to be able to compile X on that machine, it's probably fair to say that the potato installation is fairly useless to him. So we set out to upgrade it to unstable.

Now there's a slight little problem here: upgrades from potato straight to sid are not supported at this point in time (they were only briefly, during the period of August 2000, when Potato was released, 'till about November 2000, when Woody was created). The only supported upgrade path from Potato to Sid is to upgrade to Woody first (which is oldstable by now), then to Sarge, then to Sid. Since there's no chance I'm going to upgrade this box three times, I skipped that and tried to upgrade to sid immediately. Obviously, there would be problems, but I was sure I could handle them.

First attempt: install aptitude.

apt-get install aptitude

This triggered a conflicts loop between libc6 and e2fsprogs (e2fsprogs in unstable needs a more recent version of libc6 than is in potato, while libc6 in unstable has a versioned conflicts with e2fsprogs, and the one in potato is too old). Since I couldn't seem to be able to get it fixed properly, I eventually gave up, made sure the packages I needed were all downloaded, went to /var/cache/apt/archives, and said "dpkg --force-all -i *".

Bad idea.

tortoise login: root
Last login: Sat Sep 24 21:49:27 2005 on tty2
Linux tortoise 2.2.19 #1 Tue Jul 10 21:47:25 BST 2001 m68k unknown

Most of the programs included with the Debian GNU/Linux system are
permitted by applicable law.
-bash: /lib/libc.so.6: version `GLIBC_2.3' not found (required by /lib/libncurses.so.5)

Debian GNU/Linux testing/unstable tortoise tty2

tortoise login:

Whoops. Obviously, that meant all sorts of postinst and prerm scripts started to fail, and after a while dpkg just plain gave up. So, I tried to install libc6:

dpkg -i libc6_2.3.5-6_m68k.deb
-bash: /lib/libc.so.6: version `GLIBC_2.3' not found (required by /lib/libncurses.so.5)

... followed by some error message by dpkg that the old postinst failed, that it'll try with the new postinst, but that I shouldn't hold my breath.


Luckily, the dpkg format is reasonably easy to open with other tools.

tortoise:~# cd /
tortoise:/# ar x var/cache/apt/archives/libc6_2.3.5-6_m68k.deb
tortoise:/# tar xzf data.tar.gz
tortoise:/# ldconfig

... and I could log in again. Luckily.

Skipping releases is not for the faint of heart; but it sure is fun to do if you know what you're doing...