Boot another OS after hibernate in Leap

Hi everybody,

I want to boot another OS after hibernate, the same way I did in my Mageia,
I followed the steps showed in the following link:
https://en.opensuse.org/SDB:Suspend_to_disk#Boot_another_OS_after_hibernate_.28workaround.29
but it seems it doesn’t apply to the LEAP,

does anybody know what we should do about leap to do so?

thanks a lot

As far as I know, Mageia uses grub1 (legacy grub), while Leap uses grub2.

I think the next boot setting is saved in “/boot/grub2/grubenv”.

In Leap bootloader is configured directly from hibernate service. If you want to disable this configuration, copy /usr/lib/systemd/system/systemd-hibernate.service into /etc/systemd/system and edit it to remove lines

ExecStart=/usr/bin/systemd-sleep-grub pre
ExecStopPost=/usr/bin/systemd-sleep-grub post

Same for systemd-hybrid-sleep.service. These changes are persistent and retained on systemd update (but you may lose changes then, as usual need to compare newly installed file and your version).

Hi nrickert and thanks for your reply,
No, Mageia uses grub2 as well (since mageia 4),

unfortunately i cannot find the settings on “/boot/grub2/grubenv”

thanks amigo;)

Hi arvidjaar and thanks for your reply,

Coooool, It’s exactly what I asked for, :slight_smile:
I copied /usr/lib/systemd/system/systemd-hibernate.service into /etc/systemd/system and edited those lines and now it works like a charm :wink:
I just didn’t understand your last comment about doing the same for systemd-hybrid-sleep.service, Should i do the same for that, cuz it works just fine now?

thanks a lot dear amigo :slight_smile:

Hi,
How the same issue can be solved on Tumbleweed Snapshot20160525?
Mentioned approach doesn’t work :frowning:
There are not such lines in systemd-hibernate.service.