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?

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).

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.

sudo ln -s /dev/null /etc/pm/sleep.d/99Zgrub

PS: Another workaround is described here:
http://en.opensuse.org/SDB:Suspend_to_disk#Boot_another_OS_after_hibernate_.28workaround.29

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 .

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)

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…