aboutsummaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2014-07-22 16:57:57 +0200
committerLudovic Courtès <ludo@gnu.org>2014-07-22 16:59:10 +0200
commita69576ea858863574252cbefbcef91db98773d60 (patch)
tree34d35034f906c84d98cc3bbfe6daee743cb5332f /gnu
parent7cb9666dd05ba4f039a151c5189a533139f26109 (diff)
downloadpatches-a69576ea858863574252cbefbcef91db98773d60.tar
patches-a69576ea858863574252cbefbcef91db98773d60.tar.gz
system: Add '%devtmpfs-file-system' for udev, and '%base-file-systems'.
Suggested by Adam Pribyl <pribyl@lowlevel.cz>. * gnu/services/base.scm (udev-service)[requirement]: Add 'file-system-/dev'. * gnu/system/file-systems.scm (%devtmpfs-file-system, %base-file-systems): New variables. * gnu/system/install.scm (installation-services)[file-systems]: Use %base-file-systems. * build-aux/hydra/demo-os.scm (file-systems): Likewise. * doc/guix.texi (System Installation): Show %BASE-FILE-SYSTEMS in the example. (Using the Configuration System): Likewise. (File Systems): Document %base-file-systems, %devtmpfs-file-system, %binary-format-file-system, and %fuse-control-file-system.
Diffstat (limited to 'gnu')
-rw-r--r--gnu/services/base.scm9
-rw-r--r--gnu/system/file-systems.scm18
-rw-r--r--gnu/system/install.scm5
3 files changed, 27 insertions, 5 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index ae12c8e93d..42e232c9ac 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -473,8 +473,13 @@ passed to @command{guix-daemon}."
(with-monad %store-monad
(return (service
(provision '(udev))
- (requirement '(root-file-system))
- (documentation "Populate the /dev directory.")
+
+ ;; Udev needs /dev to be a 'devtmpfs' mount so that new device
+ ;; nodes can be added: see
+ ;; <http://www.linuxfromscratch.org/lfs/view/development/chapter07/udev.html>.
+ (requirement '(root-file-system file-system-/dev))
+
+ (documentation "Populate the /dev directory, dynamically.")
(start #~(lambda ()
(define udevd
(string-append #$udev "/libexec/udev/udevd"))
diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm
index 7852a6ab26..0c2021d7b4 100644
--- a/gnu/system/file-systems.scm
+++ b/gnu/system/file-systems.scm
@@ -30,7 +30,10 @@
file-system-options
%fuse-control-file-system
- %binary-format-file-system))
+ %binary-format-file-system
+ %devtmpfs-file-system
+
+ %base-file-systems))
;;; Commentary:
;;;
@@ -72,4 +75,17 @@
(type "binfmt_misc")
(check? #f)))
+(define %devtmpfs-file-system
+ ;; /dev as a 'devtmpfs' file system, needed for udev.
+ (file-system
+ (device "none")
+ (mount-point "/dev")
+ (type "devtmpfs")
+ (check? #f)))
+
+(define %base-file-systems
+ ;; List of basic file systems to be mounted. Note that /proc and /sys are
+ ;; currently mounted by the initrd.
+ (list %devtmpfs-file-system))
+
;;; file-systems.scm ends here
diff --git a/gnu/system/install.scm b/gnu/system/install.scm
index 18fd587ead..d4a32609ba 100644
--- a/gnu/system/install.scm
+++ b/gnu/system/install.scm
@@ -117,10 +117,11 @@ Use Alt-F2 for documentation.
(file-systems
;; Note: the disk image build code overrides this root file system with
;; the appropriate one.
- (list (file-system
+ (cons (file-system
(mount-point "/")
(device "gnu-disk-image")
- (type "ext4"))))
+ (type "ext4"))
+ %base-file-systems))
(users (list (user-account
(name "guest")