Here's an exercise in extreme masochism:
from semperverus@lemmy.world to linux@lemmy.ml on 19 Mar 06:22
https://lemmy.world/post/27038717

The Linux Ship of Theseus

  1. pick any distro and install it.

  2. 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.

#linux

threaded - newest

gashead76@lemmy.world on 19 Mar 06:39 next collapse

“Medium: Same as easy but go from the derivative to the base.”

I can’t quite recall, but I think I did exactly that with Ubuntu -> Debian once upon a time. I think Ubuntu was only a year or so old though, so there wasn’t a huge amount of divergence back then. As a bonus anecdote I also attempted a semi-successful build of Gentoo on a PPC Mac around the same time (nothing before or after that has compared in its level of nightmare).

StrawberryPigtails@lemmy.sdf.org on 19 Mar 09:14 collapse

I also attempted a semi-successful build of Gentoo on a PPC Mac around the same time (nothing before or after that has compared in its level of nightmare).

Amen!

OsrsNeedsF2P@lemmy.ml on 19 Mar 06:45 next collapse

I would watch a YouTube series doing this

tourist@lemmy.world on 19 Mar 09:21 next collapse

whoever runs the channel will singlehandedly cause a worldwide antidepressant shortage

sasquash@sopuli.xyz on 19 Mar 11:07 next collapse

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.

rutrum@programming.dev on 19 Mar 12:59 collapse

Love him. His lego island port has been a pleasure to watch.

AlligatorBlizzard@sh.itjust.works on 19 Mar 13:41 collapse

Oh he’s the Lego Island guy, I thought he sounded familiar.

merthyr1831@lemmy.ml on 23 Mar 02:52 collapse

Not quite the same but you might like the Linux from Nothing series, building out a Linux install from first principles.

Obviously lots of linux youtubers have done videos on linux from scratch too but the step by step nature is pretty enjoyable to watch.

ryannathans@aussie.zone on 19 Mar 06:59 next collapse

Reminds me of a recent post someone converted their system from Debian to OpenBSD via SSH only

slazer2au@lemmy.world on 20 Mar 21:35 collapse

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.

ryannathans@aussie.zone on 20 Mar 22:33 collapse

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

Shimitar@downonthestreet.eu on 19 Mar 07:21 next collapse

Linux From Scratch rulez!

Migrate from Nix to Linux From Scratch!

zerofk@lemm.ee on 19 Mar 07:33 next collapse

Hell: from macOS to WSL.

antsu@lemmy.wtf on 19 Mar 09:42 collapse

But the rules say the system must be usable.

sir_pronoun@lemmy.world on 19 Mar 08:15 next collapse

To add sadism on top of masochism, tell all your friends how you did it in great detail

N0x0n@lemmy.ml on 19 Mar 08:17 next collapse

Is that even possible? I’m already in panic when I remove a package and it’s dependencies with pacman 😅.

Sure I did replaced Thunar with Nemo, but a few things don’t work exactly how it should, like opening the download directory from Firefox (Known issue BTW) even though all mime-types are correctly set !

Even switching from Alternative -> Base distro seems like a really difficult task :/

kkj@lemmy.dbzer0.com on 19 Mar 09:53 next collapse

Possible? Absolutely. Pleasant? Hell, no.

Arcka@midwest.social on 21 Mar 01:15 collapse

I helped do the easy scenario at large scale in a fortune 50 several years ago after the vendor thought they could get greedy on the support contract renewal. Only required small changes to a few files and packages.

steeznson@lemmy.world on 19 Mar 08:19 next collapse

It is quite easy to go slackware -> gentoo from what I remember but minimalist distros might be cheating

Overspark@feddit.nl on 19 Mar 08:33 next collapse

I once switched from Debian i386 to amd64 in-place. That was MUCH harder than you would expect, I guess somewhere between medium and hard in your list. That server is still running that install btw, so in the end it all worked out.

gashead76@lemmy.world on 19 Mar 23:23 next collapse

I had forgotten about doing that myself. I did that on a couple servers once the distros had full 64 bit builds. Does that technically count as an architecture swap in-place as well?

Overspark@feddit.nl on 20 Mar 07:02 collapse

Absolutely, that’s basically the same thing

umbrella@lemmy.ml on 21 Mar 00:10 collapse

i did a bit of back and forth with a couple of debian based distros in the past but it always ended up buggy and weird. it was a desktop install though, i imagine servers would be simpler.

villainy@lemmy.world on 19 Mar 10:14 next collapse

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.

Kraiden@kbin.earth on 19 Mar 10:34 next collapse

New Game+: speedrun it

FrameXX@discuss.tchncs.de on 19 Mar 10:56 next collapse

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.

patatahooligan@lemmy.world on 19 Mar 11:18 next collapse

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?

communism@lemmy.ml on 19 Mar 11:29 next collapse

No? It’s the same amount of “strain” as doing two full OS installs of the different distros.

FrameXX@discuss.tchncs.de on 19 Mar 17:19 collapse

You are kind of right. I should have thought about that before commenting.

semperverus@lemmy.world on 19 Mar 17:48 collapse

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.

GoOnASteamTrain@lemmy.ml on 19 Mar 11:42 next collapse

I “broke” linux mint just by trying to pop KDE on, had to timeshift because it messed up my keyboard layout and a whole bunch of other things with my display.

I don’t know how people do these crazy changes without pain, and have a feeling the answer is simply “there’s pain” 😂

BJ_and_the_bear@lemm.ee on 20 Mar 00:21 next collapse

Reminds me of trying NsCDE… it changed a ton of settings and no other desktop looked right after that. I ended just blowing away my home folder and restoring my files

umbrella@lemmy.ml on 21 Mar 00:02 collapse

theres pain but its also very satisfying to pull this kind of stuff off. im more of a stable system kind of guy these days tho.

sntx@lemm.ee on 19 Mar 12:50 next collapse

Shouldn’t everyone that installed Arch the right way be able to do it on most distros, simply after installing Pacman?

Though I think changing (shrink, create new, migrate, delete old) the partition layout would count as installing another distro on top…

Want a challange? Start with something like Silverblue.

swab148@lemm.ee on 19 Mar 13:04 collapse

Arch already has apt in the repo, so I’d imagine it’s not super hard to build your own Debian from there.

nsrxn@lemmy.dbzer0.com on 19 Mar 13:02 next collapse

debootstrap makes this easy, and familiarity with that process introduces chroot skills.

semperverus@lemmy.world on 19 Mar 13:37 collapse

This goes against the spirit of the challenge, but as its a singleplayer game (unless you bring friends and SSH!) you can definitely choose to allow dd, chroot, and similar tools

nsrxn@lemmy.dbzer0.com on 19 Mar 13:52 collapse

it is pretty terrifying to debootstrap over ssh. constantly checking that you’re on the correct system, and using the chrooted terminal. it’s like a high wire act. at least the first few times.

semperverus@lemmy.world on 19 Mar 16:06 collapse

Oh I totally believe that. I can imagine how stressful that is.

d_k_bo@feddit.org on 19 Mar 13:50 next collapse

I think it would be very interesting to convert e.g. a regular Fedora installation into a (so-called “immutable”) Fedora Silverblue installation or vice-versa.

diamond@lemmy.blahaj.zone on 19 Mar 16:33 next collapse

kid named nixos-infect:

EarlGrey@discuss.tchncs.de on 19 Mar 17:36 next collapse

So, any distro to any other distro?

  • Installs Fedora Silverblue
  • Rebases to Bazzite

Jobs done chief!

umbrella@lemmy.ml on 19 Mar 17:45 next collapse

installs ubuntu, converts to mint. bam.

semperverus@lemmy.world on 19 Mar 18:08 collapse

The beauty of this exercise is you can make it as easy or challenging as you want just by changing the targets, and finding different combinations can keep things interesting.

princessnorah@lemmy.blahaj.zone on 21 Mar 11:59 collapse

Bazzite on GNOME? Rebasing from GNOME to KDE causes so many headaches. Ask me how I know (yes I’m aware they tell you not too).

deadbeef79000@lemmy.nz on 19 Mar 23:30 next collapse

Theoretically one could also prohibit rebooting.

IIRC kexec is pivot_root but for the kernel.

BeardedGingerWonder@feddit.uk on 19 Mar 23:45 next collapse

Love the idea of the challenge, my issue would be lack of a validator tool to confirm I’d completed the challenge - any suggestions?

Madagaskar_sky@lemmy.world on 20 Mar 08:46 next collapse

You use the new franken system to do an update to the new version of that distro’s flavour without bricking the system.

semperverus@lemmy.world on 20 Mar 14:22 collapse

After completing the challenge and making sure your system is usable and can survive a reboot:

If you’ve kept the old package manager, search for installed packages and make sure that the package manager itself is the only thing left. Then delete it.

steeznson@lemmy.world on 20 Mar 00:32 next collapse

The compiled distros should be easy instead of nightmare tbh

sockpuppetsociety@lemm.ee on 20 Mar 01:09 next collapse

This is what I was doing with my server. I’ve learned there’s no better feeling than starting from scratch.

limelight79@lemm.ee on 20 Mar 01:15 next collapse

Ummm you go first.

arality@programming.dev on 20 Mar 02:14 next collapse

May, I introduce you to bedrock

mariusafa@lemmy.sdf.org on 20 Mar 12:37 next collapse

Okay i’ll cheat with Guix then

NicolaHaskell@lemmy.ml on 20 Mar 19:41 next collapse

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 the initramfs 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 by alpine-base and linux-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, replace abuild with a bespoke mybuild and apk with tar -x, grapple with signed binaries, reflect on your own identity and authenticity, then take a tour through gentoo and find yourself missing the $HOME you left and its familiar comforts.

sxan@midwest.social on 21 Mar 00:14 next collapse

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.

semperverus@lemmy.world on 21 Mar 16:44 collapse

I like it

ArsonButCute@lemmy.dbzer0.com on 21 Mar 01:46 next collapse

I’ve got a blank macbook air at home waiting for a project.

I’ve never undergone a project like this without cheating by using bedrock linux as an intermediary then “Unbedrocking” my install (officially impossible, unofficially insane) with another PM as my default to convert from debian to arch years ago.

This is gonna be fun, or hellish, idk I’ll find out.

Fizz@lemmy.nz on 21 Mar 03:40 collapse

Easymode: pick a fedora ublue distro and go from bazzite to silver blue :)

Title

You can rebase with a single command I think.