From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id EMarKG6552AejAAAgWs5BA (envelope-from ) for ; Fri, 09 Jul 2021 04:50:22 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id aOxZJG6552DbCwAAB5/wlQ (envelope-from ) for ; Fri, 09 Jul 2021 02:50:22 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id CA526195A4 for ; Fri, 9 Jul 2021 04:50:21 +0200 (CEST) Received: from localhost ([::1]:48162 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m1gaq-0004aw-JW for larch@yhetil.org; Thu, 08 Jul 2021 22:50:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59190) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1gaY-0004ao-Sy for guix-patches@gnu.org; Thu, 08 Jul 2021 22:50:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46417) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m1gaY-0003YB-Lf for guix-patches@gnu.org; Thu, 08 Jul 2021 22:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m1gaY-0007EV-Ci for guix-patches@gnu.org; Thu, 08 Jul 2021 22:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49475] [PATCH] linux-boot: Resume from hibernation after pre-boot. Resent-From: Jack Hill Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 09 Jul 2021 02:50:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49475 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49475@debbugs.gnu.org Cc: Tobias Geerinckx-Rice X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162579895827745 (code B ref -1); Fri, 09 Jul 2021 02:50:02 +0000 Received: (at submit) by debbugs.gnu.org; 9 Jul 2021 02:49:18 +0000 Received: from localhost ([127.0.0.1]:57963 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1gZq-0007DR-2r for submit@debbugs.gnu.org; Thu, 08 Jul 2021 22:49:18 -0400 Received: from lists.gnu.org ([209.51.188.17]:35666) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m1gZm-0007DI-GO for submit@debbugs.gnu.org; Thu, 08 Jul 2021 22:49:17 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59124) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1gZm-0004a9-43 for guix-patches@gnu.org; Thu, 08 Jul 2021 22:49:14 -0400 Received: from minsky.hcoop.net ([104.248.1.95]:52226) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m1gZk-00039D-5q for guix-patches@gnu.org; Thu, 08 Jul 2021 22:49:13 -0400 Received: from libre-01.lib.duke.edu ([152.3.119.171] helo=guix-part-test.network) by minsky.hcoop.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1m1gZi-0008KE-A8; Thu, 08 Jul 2021 22:49:10 -0400 From: Jack Hill Date: Thu, 8 Jul 2021 22:48:53 -0400 Message-Id: <20210709024853.1170-1-jackhill@jackhill.us> X-Mailer: git-send-email 2.32.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=104.248.1.95; envelope-from=jackhill@jackhill.us; helo=minsky.hcoop.net X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1625799022; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post; bh=NPK0QTmrwkPJkXHcafcJ/tXqSN4Ae2mgPY2msenjtbo=; b=WTdGbAWga6UtW8yp6l0l33zbQCh1XmPKn/CPezV3KW47tSlNf1J0H85M9WAGc2j0OZZDQO vPNT/QcyC3NFhTVD6QMDtUv/gSEe+WAW710VJ3oIsyf82pXemYKSqR43gxiZcfzORIJF2M PjUf5n4LJSnII/3XY/hcJkCRXnY3j3w/dgiYB5DV6nJtuYFcKpGiav+Mhsoo9biDiKAFek dy4MZuRnimyNqr0922OuHqZFmfxWIIGa8U715QTvHZqlAqGWuDbLOFgCQJaI9BfdDcTiEx bxySUUbieJRH45dVrsTAQbAgBbrSNf1qBCeFlhldzDIOpoNOF+ZwmeqjKB40GQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1625799022; a=rsa-sha256; cv=none; b=BFw0CEloOUuoV/3Wnm4HR0ix1TtMZew5TSyIbTiBkGnR08eSyjeog5q8mYpK0MXdNCoAg8 g/9CLfDXI6J267T0tKNXWhqoJjKICA7CU7i8Hf7BGKrHsMZDtRd64oHyFnB2m0OcZVDej+ PEbhCpBaxXpSJ3Vkv7EraNCpXFGhTyFZz43YW5y1GB4gyQn9x6rHc9pYucPQUi8DbEkEnX 2ConJ9V7SefUJeVXdv2lKOxjzlzM37AURqdaqlcbufD9CXcaUpuHhQiaJf9kn8HCKUfNRj pg9ECAlh4YTsksiWgu5nDAF0RMtczyamY6nA9BgPWfZDuwmgDVZtA31Mxz9Sow== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: 2.59 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: CA526195A4 X-Spam-Score: 2.59 X-Migadu-Scanner: scn0.migadu.com X-TUID: ZcHRP8od4Hnd * 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