aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2023-10-22 02:00:00 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2023-11-19 01:00:00 +0100
commitd553249f7296b6e5807be75beb258dc82e86e928 (patch)
treeaf19f1677b2632afa4acbebed9894ab95d3efa34
parent66942d042e28e8d26cfdb70633c8e33280c0b049 (diff)
downloadguix-d553249f7296b6e5807be75beb258dc82e86e928.tar.gz
guix-d553249f7296b6e5807be75beb258dc82e86e928.zip
linux-boot: Don't create /root before it's used.
* gnu/build/linux-boot.scm (boot-system): Postpone the MKDIR of /root. Change-Id: I589316a5ddf41cada02173ed4dd5b7df09b795e8
-rw-r--r--gnu/build/linux-boot.scm8
1 files changed, 4 insertions, 4 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index 84726363c0..548e28a1c9 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -611,10 +611,6 @@ upon error."
the root file system...\n" root-delay)
(sleep root-delay)))
- ;; Prepare the real root file system under /root.
- (unless (file-exists? "/root")
- (mkdir "/root"))
-
(when (procedure? pre-mount)
;; Do whatever actions are needed before mounting the root file
;; system--e.g., installing device mappings. Error out when the
@@ -631,6 +627,10 @@ the root file system...\n" root-delay)
(false-if-exception ; failure is not fatal
(resume-if-hibernated (find-long-option "resume" args))))
+ ;; Prepare the real root file system under /root.
+ (unless (file-exists? "/root")
+ (mkdir "/root"))
+
(setenv "EXT2FS_NO_MTAB_OK" "1")
;; Mount the root file system.