It was also actually pretty fun!

    • cm0002@lemmy.worldOP
      link
      fedilink
      arrow-up
      1
      ·
      2 months ago

      Not really, I pulled it together from a bunch of random posts lol

      Maybe I should write one, but in essence you:

      • Stop all non-OS essential services

      • Create a filesystem in a chunk of RAM

      • Pull essential OS files from the installed OS into it recreating needed directories (Though you could probably just use a tiny pre-built distro but meh)

      • Pivot root into it

      • Reload services (when they restart they’ll be restarted in the context of where you pivot rooted, prior they’re still running under the context of the installed OS)

      • Unmount the boot drive

      • Then do what ever you need to do

      • ???

      • Profit

      • Wilzax@lemmy.world
        link
        fedilink
        arrow-up
        1
        ·
        1 month ago

        Imagining this process, despite having never done 50% of the steps on the list, makes my brain imagine this: Turning a sphere outside in

      • exu@feditown.com
        link
        fedilink
        English
        arrow-up
        1
        ·
        2 months ago

        How exactly so you pivot root? Simply chroot or something more involved?

        • cm0002@lemmy.worldOP
          link
          fedilink
          arrow-up
          1
          ·
          2 months ago

          chroot isn’t enough, you need “real” pivot_root

          chroot just changes the shells root point, pivot_root actually changes the root mount point and enables this trick to work