summary refs log tree commit diff
path: root/gnu/build/linux-boot.scm
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2017-11-29 11:31:56 +0100
committerLudovic Courtès <ludo@gnu.org>2017-11-29 16:44:53 +0100
commit748d4a84d13eb14ad0b434dbd94df43d51864048 (patch)
treeaa311b13610000e356ad6a648206c53637536e52 /gnu/build/linux-boot.scm
parenta6d06e86122bd1a711ff3ab1912fb78f261136d5 (diff)
downloadguix-748d4a84d13eb14ad0b434dbd94df43d51864048.tar.gz
linux-boot: Ensure /etc exists on the root file system.
Fixes a regression introduced in
c8289690365887ca1dd122645e479a89cf7cd969 whereby /etc would no longer be
created as a result of calling 'mark-as-not-killable'.

This would affect ISO images because 'make-iso9660-image' does not
create /etc by default.  In particular, the ISO installation image as
created by the "iso-image-installer" test would fail to boot while
creating the /root/etc/mtab symlink:
<https://hydra.gnu.org/build/2352514/nixlog/9/raw>.

* gnu/build/linux-boot.scm (mount-root-file-system): Make sure /root/etc
exists.
Diffstat (limited to 'gnu/build/linux-boot.scm')
-rw-r--r--gnu/build/linux-boot.scm1
1 files changed, 1 insertions, 0 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index a1ff4dd1ea..8ac99af66c 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -270,6 +270,7 @@ using the kernel build-in overlayfs."
   ;; Make sure /root/etc/mtab is a symlink to /proc/self/mounts.
   (false-if-exception
     (delete-file "/root/etc/mtab"))
+  (mkdir-p "/root/etc")
   (symlink "/proc/self/mounts" "/root/etc/mtab"))
 
 (define (switch-root root)