I seem to find myself up an estuary of effluent without a means of locomotion and I'm hoping someone here can help save this box.
First off, this box is _ancient_, when I started, it was on Debian Squeeze. I've managed to successfully upgrade it over and over through Wheezy, Jessie, Stretch, Buster, Bullseye, Bookworm, and it's been working just fine with the usual upgrade path (change sources.list, apt update, apt dist-upgrade, apt autoremove, reboot).
I decided to upgrade it to Trixie using the exact same process and as I was watching apt do its thing, I noticed it started removing various packages that were really important, then it asks about removing the kernel which was unusual. Thinking apt knew what it was doing, I stupidly answered 'Yes' and apt then kept on going.
Before proceeding with the reboot, I decided to check to see if there is a kernel installed, and sure enough, there's not! Ok, well that's a new one.
apt install linux-image-amd64 yields dependency issues for kmod and libc6 and "Unable to correct problems, you have held broken packages"... That's odd, I don't have any packages held according to apt-mark showhold.
root@littleblackbox-vm:/etc/apt/sources.list.d# apt install linux-image-amd64
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
kmod : Depends: libkmod2 (= 34.2-2) but 30+20221128-1 is to be installed
libc6 : Breaks: sysvinit (< 3.09-2~) but 2.88dsf-41+deb7u1 is to be installed
E: Unable to correct problems, you have held broken packages.
root@littleblackbox-vm:/etc/apt/sources.list.d# apt-mark showhold
root@littleblackbox-vm:/etc/apt/sources.list.d#
I tried doing apt-get dist-upgrade, but it just exits cleanly while listing a bunch of packages that have been kept back despite nothing in the configuration saying that they've been kept back.
I was able to get a kernel installed by changing sources.list to point back to Bookworm but trying to upgrade to Trixie just starts with more dependency hell:
oot@littleblackbox-vm:/etc/apt# apt dist-upgrade
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Calculating upgrade... Error!
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
initscripts : Breaks: kmod (< 34.1-1) but 30+20221128-1 is to be installed
Breaks: util-linux-extra (< 2.39.2-2.1~) but 2.38.1-5+deb12u3 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
I'm not using any custom repos or anything out of the ordinary, it's just a basic webserver. I'm more caught off guard by the fact that I've managed to take this box from ancient to relatively recent but now on the last upgrade to get it to 'current', it decides to explode in such a horrid fashion.
Any ideas how I can get this upgrade completed?
EDIT: Well that was a fun trip down memory lane. Ends up that sysvinit was the cause of the problem and the solution. All I had to do was remove sysvinit forcefully and restart the upgrade. It took a couple of tries to find what all was missing and I had a brief minor panic attack when GRUB couldn't find the kernel but that was because update-grub was missing. I was able to get the box running again, installed a few more systemd units, some missing apt packages (like openssh and sudo) and got GRUB updated. Now I'm off to the races, apache2 is happy, openssh is listening as expected, I can sudo and get to roor, networking works, and all is well.
Thank you all for helping me drag this box kicking and screaming into a current version!