Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

units: introduce systemd-hibernate-clear.service that clears stale HibernateLocation EFI variable #32043

Merged
merged 7 commits into from
Apr 3, 2024

Commits on Apr 3, 2024

  1. hibernate-util: make clear_efi_hibernate_location_and_warn return 1 if

    actually cleared the variable
    YHNdnzj committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    fbc8882 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    667b0c4 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9fa0f58 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    89c727e View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8f8e481 View commit details
    Browse the repository at this point in the history
  6. units: introduce systemd-hibernate-clear.service that clears

    stale HibernateLocation EFI variable
    
    Currently, if the HibernateLocation EFI variable exists,
    but we failed to resume from it, the boot carries on
    without clearing the stale variable. Therefore, the subsequent
    boots would still be waiting for the device timeout,
    unless the variable is purged manually.
    
    There's no point to keep trying to resume after a successful
    switch-root, because the hibernation image state
    would have been invalidated by then. OTOH, we don't
    want to clear the variable prematurely either,
    i.e. in initrd, since if the resume device is the same
    as root one, the boot won't succeed and the user might
    be able to try resuming again. So, let's introduce a
    unit that only runs after switch-root and clears the var.
    
    Fixes systemd#32021
    YHNdnzj committed Apr 3, 2024
    Configuration menu
    Copy the full SHA
    dfad86b View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    5f0cd57 View commit details
    Browse the repository at this point in the history