Results 1 to 7 of 7

Thread: hibernate then reboot?

  1. #1

    Default hibernate then reboot?

    For dual boot machines, is it possible to specify hibernate followed by reboot so that the next time OpenSUSE (13.1 for me) is booted, it will be restored from disk, but the alternate OS could be used in the meantime?

  2. #2

    Default Re: hibernate then reboot?

    Quote Originally Posted by Neophyte42 View Post
    For dual boot machines, is it possible to specify hibernate followed by reboot so that the next time OpenSUSE (13.1 for me) is booted, it will be restored from disk, but the alternate OS could be used in the meantime?
    Yes, by removing /etc/pm/sleep.d/99Zgrub, that's the script that configures grub/grub2 to boot the hibernated Linux directly instead of showing a boot menu.

    But this file will be recreated if there is an update to pm-utils.

    You could try to uninstall pm-utils completely if you want to, depending on your system (most likely) you won't have any problems.
    I think the grub(2) menu should then be shown as well, even on resume (i.e. I don't think systemd contains a replacement script for that yet).

  3. #3

    Default Re: hibernate then reboot?

    Using "ls -al" as a user account, my /etc/pm/sleep.d folder is empty. Is this a file that is created at hibernation?

  4. #4

    Default Re: hibernate then reboot?

    Quote Originally Posted by Neophyte42 View Post
    Using "ls -al" as a user account, my /etc/pm/sleep.d folder is empty. Is this a file that is created at hibernation?
    No. Sorry, I screwed that up.
    It is /usr/lib/pm-utils/sleep.d/99Zgrub.

    But maybe you can just disable that by creating a symlink to /dev/null with the same name in /etc/pm/sleep.d?
    This works with systemd's unit files at least.
    Code:
    sudo ln -s /dev/null /etc/pm/sleep.d/99Zgrub
    PS: Another workaround is described here:
    http://en.opensuse.org/SDB:Suspend_t...8workaround.29

  5. #5
    Join Date
    Feb 2009
    Location
    Spain
    Posts
    25,547

    Default Re: hibernate then reboot?

    On 2014-01-18 23:46, Neophyte42 wrote:
    >
    > For dual boot machines, is it possible to specify hibernate followed by
    > reboot so that the next time OpenSUSE (13.1 for me) is booted, it will
    > be restored from disk, but the alternate OS could be used in the
    > meantime?


    Yes... you have to hack a script. You have to avoid
    "/usr/lib/pm-utils/sleep.d/99Zgrub" runs.

    And of course, be aware that if you access any of the partitions that
    the hibernated system had mounted, you break them horribly.

    --
    Cheers / Saludos,

    Carlos E. R.
    (from 12.3 x86_64 "Dartmouth" at Telcontar)

  6. #6

    Default Re: hibernate then reboot?

    Quote Originally Posted by wolfi323 View Post
    But maybe you can just disable that by creating a symlink to /dev/null with the same name in /etc/pm/sleep.d?
    This works with systemd's unit files at least.
    Code:
    sudo ln -s /dev/null /etc/pm/sleep.d/99Zgrub
    I just tried that, and it does not work with pm-utils.

    So you either have to remove or edit /usr/lib/pm-utils/sleep.d/99Zgrub .

  7. #7

    Default Re: hibernate then reboot?

    Thank you, I found the script. I was able to read about a quarter of it. I'll do some homework and come back with further questions later. It might look like I'm necroing my own thread, because figuring this out has low priority, but I do want to wrestle with the script, not just be told change line x to such and such..

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •