summaryrefslogtreecommitdiff
path: root/gnu/build
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/build')
-rw-r--r--gnu/build/linux-boot.scm2
-rw-r--r--gnu/build/shepherd.scm10
-rw-r--r--gnu/build/vm.scm6
3 files changed, 9 insertions, 9 deletions
diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm
index a1ff4dd1ea..2547f1e0af 100644
--- a/gnu/build/linux-boot.scm
+++ b/gnu/build/linux-boot.scm
@@ -21,7 +21,6 @@
#:use-module (rnrs io ports)
#:use-module (system repl error-handling)
#:autoload (system repl repl) (start-repl)
- #:autoload (system base compile) (compile-file)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
#:use-module (ice-9 match)
@@ -270,6 +269,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)
diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm
index 8fc74bc482..c955e3c83f 100644
--- a/gnu/build/shepherd.scm
+++ b/gnu/build/shepherd.scm
@@ -60,11 +60,13 @@
(type "tmpfs")
(check? #f)))
- (define passwd
+ (define accounts
;; This is for processes in the default user namespace but living in a
;; different mount namespace, so that they can lookup users.
- (file-system-mapping
- (source "/etc/passwd") (target source)))
+ (list (file-system-mapping
+ (source "/etc/passwd") (target source))
+ (file-system-mapping
+ (source "/etc/group") (target source))))
(define nscd-socket
(file-system-mapping
@@ -78,7 +80,7 @@
%network-file-mappings))
,@(if (and (memq 'mnt namespaces)
(not (memq 'user namespaces)))
- (list passwd)
+ accounts
'())
,%store-mapping))) ;XXX: coarse-grain
(map file-system-mapping->bind-mount
diff --git a/gnu/build/vm.scm b/gnu/build/vm.scm
index 7537f81509..20ee12709b 100644
--- a/gnu/build/vm.scm
+++ b/gnu/build/vm.scm
@@ -378,11 +378,8 @@ SYSTEM-DIRECTORY is the name of the directory of the 'system' derivation."
GRUB configuration and OS-DRV as the stuff in it."
(let ((grub-mkrescue (string-append grub "/bin/grub-mkrescue"))
(target-store (string-append "/tmp/root" (%store-directory))))
- (mkdir-p "/tmp/root/var/run")
- (mkdir-p "/tmp/root/run")
- (mkdir-p "/tmp/root/mnt")
+ (populate-root-file-system os-drv "/tmp/root")
- (mkdir-p target-store)
(mount (%store-directory) target-store "" MS_BIND)
(when register-closures?
@@ -399,6 +396,7 @@ GRUB configuration and OS-DRV as the stuff in it."
`(,grub-mkrescue "-o" ,target
,(string-append "boot/grub/grub.cfg=" config-file)
,(string-append "gnu/store=" os-drv "/..")
+ "etc=/tmp/root/etc"
"var=/tmp/root/var"
"run=/tmp/root/run"
;; /mnt is used as part of the installation