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.

    • @sasquash@sopuli.xyz
      link
      fedilink
      81 month ago

      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.

    • @merthyr1831@lemmy.ml
      link
      fedilink
      English
      11 month ago

      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.

  • Jonathan
    link
    fedilink
    151 month ago

    “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).

  • @villainy@lemmy.world
    link
    fedilink
    111 month ago

    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.

  • Go-On-A-Steam-Train
    link
    fedilink
    111 month ago

    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
      link
      fedilink
      English
      31 month ago

      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

    • ☂️-
      link
      fedilink
      2
      edit-2
      1 month ago

      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.

      • SemperverusOP
        link
        fedilink
        English
        71 month ago

        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.

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

  • @NicolaHaskell@lemmy.ml
    link
    fedilink
    English
    51 month ago

    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.

  • NSRXN
    link
    fedilink
    41 month ago

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

    • SemperverusOP
      link
      fedilink
      English
      1
      edit-2
      1 month ago

      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
        link
        fedilink
        21 month ago

        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.

        • SemperverusOP
          link
          fedilink
          English
          2
          edit-2
          1 month ago

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

  • Sock Puppet Society
    link
    fedilink
    English
    31 month ago

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

  • IngeniousRocks (They/She)
    link
    fedilink
    31 month ago

    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.

  • @sntx@lemm.ee
    link
    fedilink
    31 month ago

    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
      link
      fedilink
      51 month ago

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