mlfh

  • 0 Posts
  • 63 Comments
Joined 4 months ago
cake
Cake day: April 7th, 2026

help-circle


  • mlfhAtoLinux@programming.devInstant boot Linux?
    link
    fedilink
    English
    arrow-up
    21
    ·
    edit-2
    6 days ago

    I was really curious about the possibilities here for a re-usable “saved hibernation state”, and did a lot of digging around and testing in exploration of that idea. Please note that the following is wacky as hell and is not a good way to run a server at all, but is possible:

    1. Set up a swap partition that can fit your full system memory.
    2. Enable swap and set up hibernation (https://wiki.archlinux.org/title/Power_management/Suspend_and_hibernate#Hibernation )
    3. Hibernate your system to the swap partition in the state you want to use as your perpetual checkpoint.
    4. Boot from a live usb, NOT your regular system (when the linux kernel boots with the resume=uuid=xxxx parameter which enables hibernation/resume, it checks that partition for a hibernation signature and immediately clears it, preventing multiple boots of the same hibernated state. You need to preserve this signature).
    5. From the live usb system, copy the swap partition that contains your main system’s hibernated state to an .img file on a filesystem mounted from one of your main disks.
    6. Reboot into your main system.
    7. Set up a scheduled job that triggers every time your system resumes (could use a systemd service with After=hibernate.target and WantedBy=hibernate.target) that does the following:
      1. Disables swap on the swap partition you set up (keeping the resume=uuid=xxxxx kernel parameter that points to it).
      2. Writes the .img file to that partition
    8. Use your system as you want, and power it off when done (do not suspend or hibernated again).

    The next time you boot, the kernel will load the saved hibernation state from the partition specified in the resume= parameter, as if it had just been hibernated instead of halted.

    Now for the downsides:

    • It’s very dangerous to resume a system’s memory to one state with storage in a different state (the official kernel docs for this have a giant red warning banner saying “If you touch anything on disk between suspend and resume… …kiss your data goodbye.” https://docs.kernel.org/power/swsusp.html ).
    • Resuming from hibernation isn’t really that much faster than cold booting a lean system, if speed is your primary goal.
    • The scheduled write job will hit you with a bunch of heavy io every time you boot/resume, probably negating any speed benefits of the whole thing anyway.

    Anyway, now that we know it’s possible, if you really can’t suspend/resume in a non-wacky way I recommend instead just booting normally and trying to make the boot process as fast as possible. A good guide here: https://wiki.archlinux.org/title/Improving_performance/Boot_process

    If booting quickly to a static state is the goal, alpine diskless mode might be a good option: https://wiki.alpinelinux.org/wiki/Diskless_Mode



  • mlfhAtoDIY@slrpnk.netDIY eBike Mid-Drive
    link
    fedilink
    English
    arrow-up
    3
    ·
    6 days ago

    Nothing too fancy! Mostly just designing a lot of thickness and buttressing into the part, and then slicing with thick walls, dense triangle infill, and an orientation that puts the layer lines perpendicular to the highest stresses.


  • mlfhAtoDIY@slrpnk.netDIY eBike Mid-Drive
    link
    fedilink
    English
    arrow-up
    5
    ·
    7 days ago

    I built a friction drive for my bike with a load-bearing PLA motor mount (cheap crappy PLA, too), since I don’t have the equipment or ventilation for much else. With a bit of overengineering, it’s been doing great for almost a year now, despite all the heat and force thrown at it.





  • mlfhAtoAsk Lemmy@lemmy.worldWhat can Lemmy instance owners see about you?
    link
    fedilink
    English
    arrow-up
    9
    arrow-down
    1
    ·
    18 days ago

    You’re interacting with a server managed by someone else - everything that flows through it is ultimately under their control, and you’re trusting them with it. They could log everything, or nothing. Even if storing passwords hashed is the default, an admin can replace any part of the code they want, so they could grab and store raw passwords if they really wanted to, or take over your account and impersonate you, or any number of other unlikely but possible things.

    So use a unique password, and only provide data (your real source ip, your saved posts, views, votes, etc) that you trust the admins of your server with.


  • 35-50mph is motorcycle territory, and you should get a motorcycle helmet (Snell-rated are the most safe, DOT-rated are less safe, anything unrated is trash). Helmets are the one piece of gear I take seriously, so here’s my spiel:

    For a motorcycle helmet to work properly, you really need it to fit properly, and the only way to tell is to put it on and test it out. If it’s too loose, too tight, slightly wrong shape for your head, etc, that could negate most of the protection the helmet offers.

    I urge you to make that trip to a shop that sells helmets and get a proper fit. Or at least order several models and sizes from the links others have posted and return anything that doesn’t fit perfectly.

    I had a very dainty motorcycle crash in the rain once at no more than 10mph, and still ended up with a concussion because my helmet wasn’t the right fit. Made me realize how easily I could have died if I’d had a different crash, since I’d been relying on a helmet that was never going to protect me properly in the first place.


  • This is a week-old repo with a 163,000-line initial commit, and the test repo that init was dumped in from is filled with hundreds of claude/codex co-author commits. Regardless of whether it’s to hide the ai co-authoring, it’s shady to obscure a repo’s initial work like that.

    I could be wrong, of course, but this smells like yet another overambitious ai-slop project that’ll get abandoned in a month.



  • I’ve been lucky to have them overwinter, and I see larvae throughout the year. Haven’t had to bring new ones in since the first couple of releases, but I’d imagine that might have a lot to do with the climate here.

    I haven’t tried predatory mites yet but I’m planning to soon, since my new nemesis is thrips, and the ladybugs can’t control those. Tough spot though, since I assume the ladybugs will eat the predatory mites…


  • I struggled with spider mites every season for a few years, until I built up a latent population of ladybugs, initally bought at my local nursery. My balcony garden (between 40 and 100 plants depending on the season) has been big enough to support this, not sure if this will be applicable to yours but I’ll share what worked for me.

    The key for me was not using any pesticides and letting the population of mites and aphids swell so there was plenty for the ladybugs to eat - it’s all about getting them to lay eggs, because it’s the ladybug larvae that stick around (can’t fly yet!) and do the most eating, and ladybugs lay eggs where they think there will be enough food for their babies to eat. You want to start a multi-generational war on those mites.

    Water the garden heavily at sunset and mist all the foliage so the ladybugs have plenty to drink as well as eat. Make sure it’s dark so they are less likely to fly away. Release them all over the garden, let them eat and lay eggs and begin the war, and keep an eye out for the larvae after a week or so. Don’t use pesticides, and hopefully the cycle continues on and on and keeps all your soft-bodied pests in check indefinitely.