Talk:Custom Initramfs/Hibernation

From Gentoo Wiki
Jump to:navigation Jump to:search
Before creating a discussion or leaving a comment, please read about using talk pages. To create a new discussion, click here. Comments on an existing discussion should be signed using ~~~~:
A comment [[User:Larry|Larry]] 13:52, 13 May 2024 (UTC)
: A reply [[User:Sally|Sally]] 19:40, 13 June 2024 (UTC)
:: Your reply ~~~~

Article status

Talk status
This discussion is still ongoing as of 2021-07-13.

Hi frostschutz, Did you make more progress on this? My laptop never hibernated 'cos of its AMDGPU driver; reading around, that might now be fixed, but in the meantime I've started using an initramfs, so your article would be useful, if it were complete...

My first question is to wonder why the initramfs is involved - at least for the swap partition case. I'd like to believe the kernel saw it was resuming, loaded memory from the resume partition, and away it goes - anything else seems madness... But as there seem to be initramfs hooks for resume in Arch, Debian, Systemd, etc. I presume it's not that simple, hence your article.

If the initramfs needs to support resume, at least for swap partition, I'd presume it should look to see if resume is possible, and if so, do it, as above, and should not get its fingers dirty with anything else at all (eg fsck, LVM, crypto (unless needed to read the swap partition)).

Not using a real swap partition for resume strikes me as really scary - the initramfs will need to do fs-related stuff to locate the hibernation data, which is dangerously close to transgressing the rules on touching filesystems. Goverp (talk) 08:36, 13 July 2021 (UTC)

Sorry for the incomplete article, I never got around to writing it properly, and nowadays I'm not using Gentoo at all anymore. Under /Examples someone contributed a resume from hibernate script, I haven't tried it but maybe it can give you some ideas. If you or anyone else wishes to take over the article, please feel free to do so. Frostschutz (talk) 09:05, 13 July 2021 (UTC)