[systemd-devel] systemd hibernator generator does not function on default Fedora install

Michael Biebl mbiebl at gmail.com
Thu Apr 21 14:12:42 UTC 2016


2016-04-21 16:06 GMT+02:00 Michael Biebl <mbiebl at gmail.com>:
> Hi Lennart
>
> 2016-04-21 12:11 GMT+02:00 Lennart Poettering <lennart at poettering.net>:
>> On Thu, 21.04.16 02:50, Michael Biebl (mbiebl at gmail.com) wrote:
>>
>>> 2016-04-21 0:56 GMT+02:00 Michael Biebl <mbiebl at gmail.com>:
>>> On second thought, maybe not such a good idea as this would break
>>> hibernate on alternate initramfs generators, like initramfs-tools,
>>> which don't require resume= to be set on the kernel command line.
>>
>> So, what does initramfs-tools do instead? Does it actively search for
>> a hibernation partition? And how long does it look for one? Or does it
>> write the resume partition into the initrd image?
>
> Our installer creates a file
> /etc/initramfs-tools/conf.d/resume which contains the name of the swap
> partition that was created during system installation.
> This file is embedded in the initramfs and used to resume the system
> from hibernate.
> http://anonscm.debian.org/cgit/kernel/initramfs-tools.git/tree/hooks/resume#n19
>
> Such a file looks like
> $ cat /etc/initramfs-tools/conf.d/resume
> RESUME=UUID=c0d2bc19-898f-4306-a734-85e547e249f0
>
> But it also does some autodetection, if RESUME is not set.
> http://anonscm.debian.org/cgit/kernel/initramfs-tools.git/tree/hooks/resume#n42

I have to add, this hook only runs when the initrd is updated, i.e.
from within the running system.

The resulting initrd does not do any autodetection. It relies on
either resume= being specified via the kernel command line or the
aforementioned conf.d/resume file.

Michael





-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?


More information about the systemd-devel mailing list