From e6c46ec42ea6e986b1030a145cb391235b689735 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 17 Mar 2019 14:39:23 +0100 Subject: [PATCH] vm: 'expression->derivation-in-linux-vm' leads to a kernel panic upon failure. Partially fixes . Reported by Tobias Geerinckx-Rice . * gnu/system/vm.scm (expression->derivation-in-linux-vm)[loader]: Call 'exit' when USER-BUILDER exits with a non-zero code. --- gnu/system/vm.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index e561285964..b671c74ab8 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -187,8 +187,9 @@ made available under the /xchg CIFS share." ;; When USER-BUILDER succeeds, reboot (indicating a ;; success), otherwise die, which causes a kernel panic ;; ("Attempted to kill init!"). - #~(when (zero? (system* #$user-builder)) - (reboot)))) + #~(if (zero? (system* #$user-builder)) + (reboot) + (exit 1)))) (let ((initrd (or initrd (base-initrd file-systems