From 1305f78d05f4e0027162c1b7e783fc127a49fb8e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 19 Dec 2024 16:24:49 +0100 Subject: reconfigure: Support loading the system for kexec reboot. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This allows rebooting straight into the new system with ‘reboot -k’. * guix/scripts/system/reconfigure.scm (kexec-loading-program) (load-system-for-kexec): New procedures. * gnu/tests/reconfigure.scm (run-kexec-test): New procedure. (%test-upgrade-kexec): New variable. * guix/scripts/system.scm (perform-action): Add #:load-for-kexec?. Call ‘load-system-for-kexec’. (show-help, %options): Add ‘--no-kexec’. (%default-options): Add ‘load-for-kexec?’. (process-action): Honor it and pass it to ‘perform-action’. * gnu/machine/ssh.scm (deploy-managed-host): Add call to ‘load-system-for-kexec’. * doc/guix.texi (Invoking guix system): Document it. Change-Id: I86d11f1c348e4359bc9e73c86e5aebff60fe875c --- gnu/machine/ssh.scm | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'gnu/machine') diff --git a/gnu/machine/ssh.scm b/gnu/machine/ssh.scm index 3e10d984e72..bc4289ef7de 100644 --- a/gnu/machine/ssh.scm +++ b/gnu/machine/ssh.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Jakob L. Kreuze -;;; Copyright © 2020-2023 Ludovic Courtès +;;; Copyright © 2020-2024 Ludovic Courtès ;;; Copyright © 2024 Ricardo ;;; ;;; This file is part of GNU Guix. @@ -552,6 +552,13 @@ an error occurred while upgrading services on '~a':~%~{~s ~}~%") (inferior-exception-arguments c))) os) + (load-system-for-kexec (eval/error-handling c + (warning (G_ "\ +failed to load system of '~a' for kexec reboot:~%~{~s~^ ~}~%") + host + (inferior-exception-arguments + c))) + os) (install-bootloader (eval/error-handling c (raise (formatted-message (G_ "\ -- cgit v1.3