Skip to content

Instantly share code, notes, and snippets.

@charasyn
Last active April 23, 2021 06:49
Show Gist options
  • Select an option

  • Save charasyn/50a9f47589a2023fc7746ae50d535ed1 to your computer and use it in GitHub Desktop.

Select an option

Save charasyn/50a9f47589a2023fc7746ae50d535ed1 to your computer and use it in GitHub Desktop.
Upgrading Debian Jessie to Unstable on iBook G4

Ok, I'm just documenting this here so that if someone has the same struggles as me, they will have a lead on what to do.

Getting packages under Debian Jessie in 2021 (or later)

This is a pain in the butt - in fact, this is the main reason why I updated to Unstable, but I might as well toss it here. Long story short, put this in your sources.list (comment everything else out):

deb http://archive.debian.org/debian jessie main contrib non-free

Additionally, add the following in a new file /etc/apt/apt.conf.d/99unauthenticated:

APT::Get::AllowUnauthenticated "false";

If you do end up upgrading to Unstable, you may need this during the upgrade process. I know, chain of trust broken, but whatever. If this is a high-stakes system, re-evaluate your life choices in running Debian Unstable on a marginally-supported platform. If you're a goofball like me, please proceed.

The Upgrade

This is gonna be painful. First step: uninstall all your unimportant software. I uninstalled X, and that wasn't enough. The smaller your system is now, the less it'll hurt dealing with the issues that pop up. In particular, REMOVE DBUS because it does not play nice and will force you to restart during the middle of your system upgrade. I didn't want to do that so I just said bye-bye dbus - don't worry, you can install it after you restart into your brand-new system. Speaking of, the general process will be this:

sudo nano /etc/apt/sources.list
# comment everything out, and put `deb http://ftp.ports.debian.org/debian-ports unstable main`
sudo apt update

# repeat the following until it doesn't fail
sudo apt full-upgrade
# things will go wrong, sort them out then do:
sudo apt install -f
# rinse and repeat until you have upgraded
sudo reboot
# enjoy your newly updated system!

The main issue is with the things that go wrong. Here are some things that went wrong for me:

libc6-dev

Some stuff wasn't able to update because some dev libraries had version conflicts. Remove the *-dev packages and re-install later. Be smarter than me and write down what you uninstalled.

init-system-helpers and sysvinit-utils

Uh oh. There seems to be some files that were changed from one package to the other, and apt was freaking out trying to install them. This gives an error like:

dpkg: error processing <package_a>.deb (--unpack):
 trying to overwrite '<file>', which is also in package <package_b> <version>

This error format, but substitute in the correct packages and filenames, because this is an example copied off google. Since Package A (updated version) will have the file, and Package B (old version) currently has the file, there is a conflict. The solution is to manually update Package B using dpkg:

dpkg -i /var/cache/apt/archives/<package_b><version>.deb

This will update Package B to the new version without the file, and then you can do apt install -f <package_a> to update it. Note that I also hit the same issue trying to update Package B with dpkg, requiring me to update another Package C first, after which I could update Package B, then Package A. If there was a circular dependency you would maybe have to bust out some --force and --overwrite stuff, but you should be able to avoid it by manually updating the packages in the right order. (If only Apt could do that for us.)

bash-completion

Oh yeah you have to manually install bash-completion due to a similar issue.

dbus, bluez

I literally have no idea how to update dbus. It hangs during apt's post-install script phase, which is very rude of it! Then you have to hit Ctrl+C to kill apt, or if that doesn't work, Ctrl+Z and then find apt's PID and do kill -9 $apt_pid. It really wants you to restart your computer to fix dbus, and the only way I was able to update was by uninstalling it. Again, you can reinstall it later. I also had to uninstall bluez (I think it needs dbus so I tshould go with it anyways).

Finishing touches

OK! After all of that I did a final:

apt-get autoremove
apt full-upgrade
apt-get autoremove

And then I double-checked that /boot had new kernel files and that /etc/yaboot.conf was set to point to them properly (it pointed to /boot/vmlinux which was automatically symlinked, nice). Finally, sudo reboot. Hopefully your machine reboots properly.

What now?

Now that your packages are fresh, crisp, and up-to-date, it's time to get even more of them. Edit sources.list again and add:

deb [arch=all] http://ftp.debian.org/debian unstable main contrib non-free

Unfortunately, ports.debian.org doesn't seem to have contrib and non-free, which is annoying since there are some firmware images in non-free that could be useful (I'm sure there's other stuff too). But if you just put this line without the [arch=all] Apt will freak out and refuse to get those perfectly good platform-independent packages just because the main server doesn't have powerpc. So we tell it only to try to get the "all" architecture packages from the main server, and bada bing bada boom we've got packages. Do a final:

apt update
apt upgrade

and all your packages should finally be updated! Thank gosh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment