GNU bug report logs -
#49475
[PATCH] linux-boot: Resume from hibernation after pre-boot.
Previous Next
Reported by: Jack Hill <jackhill <at> jackhill.us>
Date: Fri, 9 Jul 2021 02:50:02 UTC
Severity: normal
Tags: patch
Done: Tobias Geerinckx-Rice <me <at> tobias.gr>
Bug is archived. No further changes may be made.
To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 49475 in the body.
You can then email your comments to 49475 AT debbugs.gnu.org in the normal way.
Toggle the display of automated, internal messages from the tracker.
Report forwarded
to
guix-patches <at> gnu.org
:
bug#49475
; Package
guix-patches
.
(Fri, 09 Jul 2021 02:50:02 GMT)
Full text and
rfc822 format available.
Acknowledgement sent
to
Jack Hill <jackhill <at> jackhill.us>
:
New bug report received and forwarded. Copy sent to
guix-patches <at> gnu.org
.
(Fri, 09 Jul 2021 02:50:02 GMT)
Full text and
rfc822 format available.
Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):
* gnu/build/linux-boot.scm (boot-system): Call resume-if-hibernated
after pre-mount.
---
This change allows resuming from a swap device that needs device-mapper
to be set up first. In my case I tested swap on lvm on dm-crypt. I
believe this change to be safe since pre-mount shouldn't mount or
otherwise touch the filesystems. It it did, there would be data
corruption, so special care should be taken when reviewing.
gnu/build/linux-boot.scm | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 461df9ff46..778ee99690 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -563,15 +563,6 @@ upon error."
(load-linux-modules-from-directory linux-modules
linux-module-directory)
- (unless (or (member "hibernate=noresume" args)
- ;; Also handle the equivalent old-style argument.
- ;; See Documentation/admin-guide/kernel-parameters.txt.
- (member "noresume" args))
- ;; Try to resume immediately after loading (storage) modules
- ;; but before any on-disk file systems have been mounted.
- (false-if-exception ; failure is not fatal
- (resume-if-hibernated (find-long-option "resume" args))))
-
(when keymap-file
(let ((status (system* "loadkeys" keymap-file)))
(unless (zero? status)
@@ -606,6 +597,15 @@ upon error."
(unless (pre-mount)
(error "pre-mount actions failed")))
+ (unless (or (member "hibernate=noresume" args)
+ ;; Also handle the equivalent old-style argument.
+ ;; See Documentation/admin-guide/kernel-parameters.txt.
+ (member "noresume" args))
+ ;; Try to resume immediately after loading (storage) modules
+ ;; but before any on-disk file systems have been mounted.
+ (false-if-exception ; failure is not fatal
+ (resume-if-hibernated (find-long-option "resume" args))))
+
(setenv "EXT2FS_NO_MTAB_OK" "1")
(if root-device
--
2.32.0
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49475
; Package
guix-patches
.
(Fri, 09 Jul 2021 03:36:02 GMT)
Full text and
rfc822 format available.
Message #8 received at submit <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Jack Hill 写道:
> * gnu/build/linux-boot.scm (boot-system): Call
> resume-if-hibernated
> after pre-mount.
All right! \o/ Whilst I'm glad it didn't eat your data, it was
still just an off-the-cuff suggestion on IRC & I'd like to take
the weekend to think about the whole picture.
Kind regards,
T G-R
[signature.asc (application/pgp-signature, inline)]
Information forwarded
to
guix-patches <at> gnu.org
:
bug#49475
; Package
guix-patches
.
(Mon, 05 Sep 2022 12:53:02 GMT)
Full text and
rfc822 format available.
Message #11 received at 49475 <at> debbugs.gnu.org (full text, mbox):
Hi,
Josselin Poiret <dev <at> jpoiret.xyz> skribis:
> Yusuf Talha via Bug reports for GNU Guix <bug-guix <at> gnu.org> writes:
>
>> I haven't encountered this problem on any other distros. You probably realized that I encrypted my disk. Hibernation wasn't working while I was using Guix without encryption a few months ago either. So I don't think LUKS is the problem here.
>
>>From what I can tell, resuming from an encrypted partition isn't
> currently supported. This could potentially be done, though it's not my
> priority right now (and testing these kinds of features is dangerous,
> you could make a wrong move and incur heavy data loss).
I believe this is fixed by this:
https://issues.guix.gnu.org/49475
Jack, do I get it right?
The patch in question fell through the cracks, but it actually LGTM.
Thanks,
Ludo’.
Reply sent
to
Tobias Geerinckx-Rice <me <at> tobias.gr>
:
You have taken responsibility.
(Mon, 05 Sep 2022 13:12:03 GMT)
Full text and
rfc822 format available.
Notification sent
to
Jack Hill <jackhill <at> jackhill.us>
:
bug acknowledged by developer.
(Mon, 05 Sep 2022 13:12:03 GMT)
Full text and
rfc822 format available.
Message #16 received at 49475-done <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Jack, Yusuf, Ludo',
Yusuf: you could try pulling, reconfiguring, hibernating, and
resuming, if you're brave-ish.
Ludovic Courtès 写道:
> I believe this is fixed by this: […] The patch in question fell
> through the cracks
It should and it had, sorry.
I *dislike* the fact that this makes the resume path no longer
trivially obviously correct — because we now actually do something
potentially useful (and hence, dangerous) during it — but that's
unavoidable I suppose. It's certainly not the fault of this
patch.
Pushed as ec16f88522041dc285a35705ff9ee95672b78143, thanks Jack!
Kind regards,
T G-R
[signature.asc (application/pgp-signature, inline)]
bug archived.
Request was from
Debbugs Internal Request <help-debbugs <at> gnu.org>
to
internal_control <at> debbugs.gnu.org
.
(Tue, 04 Oct 2022 11:24:08 GMT)
Full text and
rfc822 format available.
This bug report was last modified 1 year and 176 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.