It was also actually pretty fun!

  • smb@lemmy.ml
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    3 months ago

    i had experimented with kexec and takeover.sh to install a distro that was not available by my provider.

    it resulted in some scripts i now (triggered by this thread) have published (in a nonready state):

    http://github.com/tobinq/goaround

    the scripts may be in bad shape but i successfully changed one preinstalled ubuntu to a devuan with what is in these scripts. however i didn’t work on them for month now and am not sure about that last state… so its experimental only.

    • cm0002@lemmy.worldOP
      link
      fedilink
      arrow-up
      4
      ·
      3 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

  • aMockTie@lemmy.world
    link
    fedilink
    arrow-up
    0
    ·
    3 months ago

    What happens if the SSH session closes before dd finishes? Sounds pretty badass but I don’t think I would trust this approach in prod lol

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

      Well the 1 SSH session bit was for dramatic meme-effect lol, you can actually connect back without issue (at least it did for me) so worst case if you weren’t working in tmux you’d just have to start dd again

      Worst worst case, you’d just end up back where you were probably heading before anyways, KVM/IPMI