Hi all,

Is there a method out there that can “save a hibernate state” to disk, and just permanently boot immediately into that state every time?

It would be OK to lose data used after this point. And ot would also be OK if it required building a custom image based on the hardware, similar to embedded systems.

The goal is to be able to, as quickly as possible, spin up a GPU server when needed, but without using suspend/resume.

Thanks.

  • Die4Ever@retrolemmy.com
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    10 hours ago

    Pretty sure you just have to enable hibernation and give it a file to write to? Then just set your PC to go into hibernate on idle

    I kind of doubt you would have to change distros. What distro are you on now?

    • HelloRoot@lemy.lol
      link
      fedilink
      English
      arrow-up
      1
      ·
      edit-2
      5 hours ago

      For my two systems (pc and laptop)with 32GB RAM each it takes ~4 minutes to boot from hibernation.

      Which is expexted afaik.

      Thats the opposite of “instant”.

        • HelloRoot@lemy.lol
          link
          fedilink
          English
          arrow-up
          1
          ·
          edit-2
          4 hours ago

          No not really.

          It’s how long it takes to read 32GB from my swap. 170 MB/s continuous read speed ≈ 188 sec (3 min 8 sec) add the normal boot time to it (bios, grub, kernel initramfs) and you get the 4 minutes.

          When the system boots cold it doesn’t have to read 32GB, just 0.5-2GB maybe.

          • Sims@lemmy.ml
            link
            fedilink
            arrow-up
            2
            ·
            4 hours ago

            Just for the record, Linux can do with less swap-space than the memory you have, also for hibernation. The system doesn’t write every byte to swap, and it uses compression. With 32gb I would choose a default swapsize of ~10gb max, but test it first as it depends on the specific content of your ram, and usage patterns oc. However, its an instant time-saver during boot.

            • HelloRoot@lemy.lol
              link
              fedilink
              English
              arrow-up
              1
              ·
              edit-2
              2 hours ago

              Didn’t work for me, it would cancel the hibernation saying there is not enough space in swap. I followed the setup instructions on arch wiki.

              Do you have a guide for that?