The Linux Ship of Theseus
-
pick any distro and install it.
-
Then, without installing another distro over the top of it, slowly convert it into another distro by replacing package managers, installed packages, and configurations.
System must be usable and fully native to the new distro (all old packages replaced with new ones).
No flatpaks, avoid snaps where physically possible, native packages only.
EDIT: Some clarification on some of the clever tools brought up here:
chroot
, dd
, debootstrap
, and partition editors that allow you to install the new system in an empty container or blanket-overwrite the old system go against the spirit of this challenge.
These are very useful and valid tools under a normal context and I strongly recommend learning them.
You can use them if you prefer, but The ship of Theseus was replaced one board at a time. We are trying to avoid dropping a new ship in the harbor and tugging the old one out.
It may however be a good idea to use them to test out the target system in a safe environment as you perform the migration back in the real root, so you have a reference to go by.
Easy: pick two similar distros, such as Ubuntu and Debian or Manjaro and Arch and go from the base to the derivative.
Medium: Same as easy but go from the derivative to the base.
Hard: Pick two disparate distros like Debian and Artix and go from one to the other.
Nightmare: Make a self-compiled distro your target.
Easymode: pick a fedora ublue distro and go from bazzite to silver blue :)
Title
You can rebase with a single command I think.
without installing another distro over the top of it … [replace] package managers
The package manager is the distro, though.
$ pacman -S apk-tools $ apk add alpine-base linux-lts
Then
kexec
to alpine’s kernel and theinitramfs
generated by its installation (which would incidentally “replace” PID 1 with the new/sbin/init
). For clean up you could take a diff of “tar -t
” for all the installed packages from both distros then delete the files only in the old distro’s packages.Make a self-compiled distro your target.
Replace the first step with a compilation of
apk
,abuild
everything required byalpine-base
andlinux-lts
(git clone aports
to bootstrap that work), then add the package directory to/etc/apk/repositories
before the second step. Next, begin to worry that you haven’t fully broken free yet, replaceabuild
with a bespokemybuild
andapk
withtar -x
, grapple with signed binaries, reflect on your own identity and authenticity, then take a tour throughgentoo
and find yourself missing the$HOME
you left and its familiar comforts.The compiled distros should be easy instead of nightmare tbh
This is what I was doing with my server. I’ve learned there’s no better feeling than starting from scratch.
May, I introduce you to bedrock
I’ve done the Arch to Artix. It wasn’t hard, per se, but it took a while. I think that should be Medium, because Artix isn’t just an Arch derivative.
In fact, might I suggest a different way of looking at the difficulties?
- Replacing the package manager: Hard.
- Replacing the package manager without a live USB: Extreme.
- Going from a basic systemd-based distro (init, log, cron) to anything else: Hard
- Going from a systemd distro that’s bought into the entire systemd stack, including home and boot: Extreme
- Going from one init to another: Medium
- Changing boot systems: grub to UEFI, for example: Easy.
- Replacing all GNU tools with other things: Extreme (mainly because of script expectations).
And so on. You get 1 point for Easy, 2 for Medium, 4 for Hard, and 8 for Extreme. Add 'em up, go for a high score.
I don’t think rolling your own is that hard, TBH, unless you’re expected to also build a package manager. If maintaining it would be harder than building it.
I like it
New Game+: speedrun it
I have seen dozens of systems migrated from Gentoo to CentOS by live swapping the userspace and eventually rebooting into the new kernel. A hair raising experience to be sure.
Reminds me of a recent post someone converted their system from Debian to OpenBSD via SSH only
Why does that sound familiar.
Did they load an OS into ram to run ssh then rebuild the machine, also some VPS that the provider was dragging their feet on remote hands.
I can’t find it now but basically something like that yeah. VPS provider only gave them SSH on linux so couldn’t run the openbsd installer any normal way either
To add sadism on top of masochism, tell all your friends how you did it in great detail
I am not educated enough about this, but don’t these kind of games unnecesarrily strain all the servers that host the packages for people that really need them for download and most of these people run these servers for free in good will and faith that they will serve meaningful needs with positive impact? I am sorry for spoiling the fun, but I felt like I had to point this out.
How is this any less meaningful than any other use case? Is downloading a distro to play video games ok? To shitpost on social media? To watch clickbait videos on youtube? Why is this in particular a bad use of resources?
As other commenters have said, its about as strenuous as doing two normal installs.
However, if you want to do this challenge but feel guilty about the consumed resources, consider donating to the two distros you are performing this with to cover any additional service costs. In all likelihood it’ll only cost them fractions of pennies, but any reason to donate to FOSS is always appreciated.
No? It’s the same amount of “strain” as doing two full OS installs of the different distros.
You are kind of right. I should have thought about that before commenting.
It is quite easy to go slackware -> gentoo from what I remember but minimalist distros might be cheating
I would watch a YouTube series doing this
whoever runs the channel will singlehandedly cause a worldwide antidepressant shortage
Reminds me of MattKC, a guy on YouTube who does similar stuff. He ported the .Net framework to win95. very interesting videos, if think this challenge would be exactly his type.
Love him. His lego island port has been a pleasure to watch.
Oh he’s the Lego Island guy, I thought he sounded familiar.
Hell: from macOS to WSL.
But the rules say the system must be usable.
Linux From Scratch rulez!
Migrate from Nix to Linux From Scratch!