linux-boot: Ensure /etc exists on the root file system.

Fixes a regression introduced in
c828969036 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.
This commit is contained in:
Ludovic Courtès 2017-11-29 11:31:56 +01:00
parent a6d06e8612
commit 748d4a84d1
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5
1 changed files with 1 additions and 0 deletions

View File

@ -270,6 +270,7 @@ using the kernel build-in overlayfs."
;; Make sure /root/etc/mtab is a symlink to /proc/self/mounts. ;; Make sure /root/etc/mtab is a symlink to /proc/self/mounts.
(false-if-exception (false-if-exception
(delete-file "/root/etc/mtab")) (delete-file "/root/etc/mtab"))
(mkdir-p "/root/etc")
(symlink "/proc/self/mounts" "/root/etc/mtab")) (symlink "/proc/self/mounts" "/root/etc/mtab"))
(define (switch-root root) (define (switch-root root)