zenodotus280

Serial Upgrading: Debian 3 to Debian 12

It was a hypnotic and absurd way to spend nearly four hours. A Debian-based time machine: "Ooooh, the Grub2 era is upon us! We're still on SysV? When can I just type 'apt'?" It was easy at first, then after a gauntlet of spurious GPG errors that led me astray I rounded out the late hours racing through menus, through sources.list, and watching the flow of text just. keep. streaming. Add some synthwave pop and it was very different kind of Linux Evening. The instructions below make it look easy but I now know the etch-to-lenny struggle that our IT elders might have faced.

My own exposure to Linux was around 2004 in high school but I never did anything with it beyond admire the simple terminal and blinking cursor - I had no problem to solve and didn't know what was possible. This week I saw a Youtuber discussing older distros and I thought about Debian's long history and the relative simplicity of the upgrade process. A friend of mine has a server running the same instance of Debian since the 2000s. I decided to try and install the oldest version of Debian I could and then see if it was possible to upgrade all the way.

Unfortunately I was unable to get Debian 1.3 or 2.1 functioning ("writing inode tables" kept failing when initializing the partition) but this guy got past the filesystem initialization without much issue. It's likely a problem with my virtualization setup.

Debian Archives did not have a fully offline ISO to use. lafibre did offer up various older distros beyond just Debian. I chose 3.1 but if I can get 1.3 working I will update this.

Hardware Selection

I'm virtualising with Proxmox.

  • Memory: 2 GB
  • CPU: 1-2 cores
  • SeaBIOS
  • IDE Hard Drive (8 GB)
    • install of basic packages was only 2.2 GB before removing old in Debian 11
    • if installing a desktop environment you will need at least 2 GB in your system partition for just Debian 3.1; use the full 8 GB in one partition if trying this
  • Network: Realtek or E1000 (former is allegedly better supported but speeds are slower than the latter); VirtIO not detected

At every prompt I chose:

  • The safest option based on the recommendation; often just the pre-selected option
  • Yes or No based on their suggestions except when installing packages as the default is to forbid unverified
  • all checkboxes or text entry boxes are left as default
  • deviations from this will be noted below
  • I've chained the apt-get commands together for readability but you may need to run individually
  • I've excluded the 'contrib' and 'non-free' repositiories to speed up installation

Initial Boot to sarge (3.1)

I will omit the actual installation as it is not dissimilar from a modern text-based install of Debian. The filesystem will be EXT3.

  • /etc/apt/sources.list: should read as:
    • deb http://archive.debian.org/debian/ sarge main
  • apt-get clean && apt-get update && apt-get upgrade
  • reboot

sarge (3.1) to etch (4.0)

  • /etc/apt/sources.list: changed from 'sarge' to 'etch':
    • deb http://archive.debian.org/debian/ etch main
  • apt-get clean && apt-get update && apt-get dist-upgrade
  • reboot

etch (4.0) to lenny (5.0)

  • apt-get install linux-image-2.6.24-etchnhalf.1-686
    • Installing the kernel prior to upgrading the distribution will avoid backtracking to the 'etch' repo to resolve 'glibc' upgrade issues
    • choosing the '2.6.24' kernel or the '2.6.18' kernel will make no difference but I chose the newer one
  • reboot: best practice following kernel changes
  • /etc/apt/sources.list: changed from 'etch' to 'lenny':
    • deb http://archive.debian.org/debian/ lenny main
  • apt-get clean; apt-get update; apt-get dist-upgrade
    • GPG errors and unverified packages are the norm with the archives - I was able to ignore them without any noticeable consequences
  • reboot
  • apt-get dist-upgrade: some lingering upgrades after boot

lenny (5.0) to squeeze (6.0)

  • /etc/apt/sources.list: changed from 'lenny' to 'squeeze':
    • deb http://archive.debian.org/debian/ squeeze main
  • apt-get clean; apt-get update; apt-get dist-upgrade
  • When asked about "Upgrading udev" select 'Yes'. Do not reboot yet!
  • apt-cache search linux-image-2.6 will show a list of kernels that will ensure the system is usable after boot.
  • apt-get install linux-image-2.6-686: my choice for a generic 32-bit system.
  • reboot
  • You will see an additional phase during the bootloader sequence. This will go away in the Debian 7.

squeeze (6.0) to wheezy (7)

  • /etc/apt/sources.list: changed from 'squeeze' to 'wheezy':
    • deb http://archive.debian.org/debian/ wheezy main
  • apt-get clean && apt-get update && apt-get dist-upgrade
  • When asked for the grub-install location, select the device.
  • reboot

wheezy (7) to jessie (8)

  • /etc/apt/sources.list: changed from 'wheezy' to 'jessie':
    • deb http://archive.debian.org/debian/ jessie main
  • apt-get clean && apt-get update && apt-get dist-upgrade
  • reboot

jessie (8) to stretch (9)

  • /etc/apt/sources.list: changed from 'jessie' to 'stretch' (note the switch from 'archive' to 'deb' in the URL):
    • deb http://deb.debian.org/debian/ stretch main
  • apt-get clean && apt-get update && apt-get dist-upgrade
  • During the upgrade I ended up with a broken install. The problem package was 'libldap2':
    • dpkg --purge --force-all libldap2
    • apt --fix-broken install
  • reboot

stretch (9) to buster (10)

  • /etc/apt/sources.list: changed from 'stretch' to 'buster':
    • http://deb.debian.org/debian/ buster main
  • apt-get clean && apt-get update && apt-get dist-upgrade
  • reboot

buster (10) to bullseye (11)

  • /etc/apt/sources.list: changed from 'buster' to 'bullseye' (note the removal of the trailing slash in the URL):
    • deb http://deb.debian.org/debian bullseye main contrib non-free
    • deb http://deb.debian.org/debian bullseye-updates main contrib non-free
    • deb http://security.debian.org/debian-security bullseye-security main contrib non-free
  • apt-get clean && apt-get update && apt-get dist-upgrade
  • reboot
  • apt autoremove

At this point there are three options: - change the sources to 'stable' - change the sources to 'bookworm' and thereby completing the upgrade to Debian 12 - change the sources to 'sid'

If you do nothing the sources file will become out of date in about 5 years and you'll need to update it to the "archive" version. Debian still supports 32-bit and at some point you would need to 'cross-grade' to 64-bit.

Thoughts? Leave a comment