Page 1 of 1

[solved] Disable Hibernate

PostPosted: Mar 19th, '15, 19:18
by wanne
I have a swap partition which is used by different systems in different ways.
Also the bootloader contains no RESUME kernel-parameter the system tries to resume from the swap partition. This causes that the system doesn't boot when there is no swap partition at the moment.
Rebuilding the initrd while SWAP is removed helps. But at the moment I have to do this every time a new initrd is build. (=> Every Kernel update.)
So is it possible to stop Mageia 5 to try to resume from SWAP also there is a SWAP partition?

Re: Disable Hibernate

PostPosted: Mar 19th, '15, 22:56
by doktor5000
You probably want to remove the hook /etc/dracut.conf.d/51-mageia-resume.conf before rebuilding the initrd.

As the topic mentions disabling hibernate, do you only want to ensure that Mageia will not use the swap partition, or do you also want to disable hibernating?
Maybe you should also have a look at /etc/systemd/logind.conf and it's man page.

Re: Disable Hibernate

PostPosted: Mar 20th, '15, 01:12
by wanne
doktor5000 wrote:You probably want to remove the hook /etc/dracut.conf.d/51-mageia-resume.conf before rebuilding the initrd.
That seems to solve my problem. Can I just remove that file?

doktor5000 wrote:As the topic mentions disabling hibernate, do you only want to ensure that Mageia will not use the swap partition, or do you also want to disable hibernating?
I want to use the swap partition. (What is actually the case.) And I never use hibernate.
The Problem is, that the system tries to resume from the swap device. This fails if the partition isn't formated as swap. And then the system dosn't boot.

Re: Disable Hibernate

PostPosted: Mar 20th, '15, 22:14
by doktor5000
wanne wrote:
doktor5000 wrote:You probably want to remove the hook /etc/dracut.conf.d/51-mageia-resume.conf before rebuilding the initrd.
That seems to solve my problem. Can I just remove that file?

Yes. It is only intented to ensure that the system can resume when using more complex stuff like LVM, so that the initrd can bring up LVM first before it tries to read the resume device.
More details: https://bugs.mageia.org/show_bug.cgi?id=12305

wanne wrote:The Problem is, that the system tries to resume from the swap device. This fails if the partition isn't formated as swap. And then the system dosn't boot.

Well, from what I can tell it should not try to resume, but I'm not quite sure if mga5 doesn't already use systemd for that in the initrd ...

The other issue is that the system drops to an emergency shell when something from /etc/fstab cannot be mounted,
This is sadly the default behaviour of systemd for everything that should be mounted during boot and is not marked as "nofail"
See also errata for that: https://wiki.mageia.org/en/Mageia_4_Err ... rrect_UUID

And some more links:
viewtopic.php?f=7&t=7093
viewtopic.php?f=8&t=8987
http://www.mageialinux-online.org/wiki/ ... d-not-boot

Re: Disable Hibernate

PostPosted: Mar 21st, '15, 16:07
by wanne
doktor5000 wrote:The other issue is that the system drops to an emergency shell when something from /etc/fstab cannot be mounted,
This is sadly the default behaviour of systemd for everything that should be mounted during boot and is not marked as "nofail"

I know this. But since I have rewritten the SWAP entry I don't know if I have just forgotten to add the nofail option before I edited the fstab and misinterpreted some log messages.
May I test later what was the real problem. At the moment I'm just happy that everything is working fine.

So thank you for the detailed descriptions.

Re: Disable Hibernate

PostPosted: Mar 21st, '15, 21:44
by doktor5000
You're welcome :)
wanne wrote:I know this. But since I have rewritten the SWAP entry I don't know if I have just forgotten to add the nofail option before I edited the fstab and misinterpreted some log messages.

That might not be sufficient, as the UUID is integrated into the initrd, you'll see what I mean if you check the linked threads and especially http://www.mageialinux-online.org/wiki/ ... d-not-boot