diff --git a/guix/build/linux-initrd.scm b/guix/build/linux-initrd.scm index c1a0247aff..627c55f865 100644 --- a/guix/build/linux-initrd.scm +++ b/guix/build/linux-initrd.scm @@ -439,9 +439,12 @@ UNIONFS." ;; We want read-write /dev nodes. (make-essential-device-nodes #:root "/rw-root") - ;; Make /root a union of the tmpfs and the actual root. + ;; Make /root a union of the tmpfs and the actual root. Use + ;; 'max_files' to set a high RLIMIT_NOFILE for the unionfs process + ;; itself. Failing to do that, we quickly run out of file + ;; descriptors; see . (unless (zero? (system* unionfs "-o" - "cow,allow_other,use_ino,suid,dev" + "cow,allow_other,use_ino,suid,dev,max_files=65536" "/rw-root=RW:/real-root=RO" "/root")) (error "unionfs failed"))