Repository navigation
Clean up stale hibernation resume drop-ins and keep setup retryable - #20000
Conversation
Extracted from #8199 and #13584 on top of #19969. Co-authored-by: JustNak <[email protected]> Co-authored-by: Daniel Moore <[email protected]>
[Medium impact] The PR appears safe to merge. SummaryCleans up leftover hibernation files and keeps failed setup attempts retryable.
The previous factory-reset finding is fixed. No new actionable issues were found in the changes since that review. Reviews (4) · Last reviewed commit: "Keep resume.conf removal in factory rese..." · Reviewed by Greptile |
|
Codex High reviewed Opus 5.5 High found two additional failure paths, which I confirmed on the worker: an offset lookup failure makes The setup changes overlap #11477, which also handles already-configured machines with a recreated swapfile. That older PR keeps precedence for the overlapping work, though it needs updating to retain current UUID-based resume devices. I handed this PR’s half-removed cleanup, deletion-failure guards and pending-marker retry improvements to its queue item. This is waiting on the maintainer to decide how to combine the changes and handle lookup failures in unattended setup callers. |
Reconcile the current swapfile offset with the stable resume device in one atomic write. Keep the persistent rebuild marker until every kernel image builds, including after interrupted setup or removal, rather than restoring stale parameters. Preserve custom drop-ins and nonfatal lookup failures in factory reset's first-time setup call. Carry the partial-removal cleanup and checked deletions from omacom#20000 into this older fix so a missing resume hook cannot hide a leftover drop-in or pending rebuild. Keep the existing UUID, ARM opt-in and root-owned installation behavior. Co-Authored-By: David Heinemeier Hansson <[email protected]> Co-Authored-By: Codex High <[email protected]> Co-Authored-By: Opus 5.5 High <[email protected]> Co-Authored-By: muse-wonder via pi (thinking high) <[email protected]>
…artial setups Co-authored-by: JustNak <[email protected]> Co-authored-by: Daniel Moore <[email protected]>
…stale offset Co-authored-by: JustNak <[email protected]> Co-authored-by: Daniel Moore <[email protected]>
…macom#20000) * Clean up stale hibernation resume drop-ins and keep setup retryable Extracted from omacom#8199 and omacom#13584 on top of omacom#19969. Co-authored-by: JustNak <[email protected]> Co-authored-by: Daniel Moore <[email protected]> * Keep hibernation removal retryable when only rebuild marker remains * Guard empty resume device, keep failed lookups non-fatal, and clean partial setups Co-authored-by: JustNak <[email protected]> Co-authored-by: Daniel Moore <[email protected]> * Keep resume.conf removal in factory reset so failed lookup leaves no stale offset Co-authored-by: JustNak <[email protected]> Co-authored-by: Daniel Moore <[email protected]> --------- Co-authored-by: JustNak <[email protected]> Co-authored-by: Daniel Moore <[email protected]>
Extracted from #8199 by @JustNak and #13584 by @STRd6 on top of #19969.
/etc/limine-entry-tool.d/resume.conf, pending rebuild marker, swapfile, or swapfile/etc/fstabentry as configured inbin/omarchy-hibernation-removeso half-removed or partially set-up machines can be cleaned up cleanly, abort beforelimine-mkinitcpioif deleting the hook or drop-in fails, and skiplimine-mkinitcpiowhen no boot config files were present./etc/limine-entry-tool.d/resume.confduring freshbin/omarchy-hibernation-setupruns so a stale drop-in cannot pin hibernation to a deleted swapfile's offset, and updatebin/omarchy-system-factory-resetaccordingly.resume.confbeforeomarchy_resume.confinbin/omarchy-hibernation-setupand warn non-fatally (writing neither file) when either the resume device or swapfile offset lookup returns empty, keeping unattended callers (--force --no-rebuild) working and setup retryable.test/shell.d/hibernation-setup-test.shto cover stale drop-in rewrites, failed device/offset lookups, partial-setup removal, half-removed cleanup, and aborted deletion.Note: overlaps #11477 for already-configured swapfile offset reconciliation.
Verified by Codex and Claude
Fixes #10037