Suggested by Petter <petter@mykolab.ch>
and Mark H Weaver <mhw@netris.org>.
Reported by Duncan Keall <duncan@duncankeall.com>.
Partly fixes <http://bugs.gnu.org/19190> by populating /dev/mapper
early enough.
* gnu/build/linux-boot.scm (mount-essential-file-systems): Mount /dev as
a devtmpfs.
(move-essential-file-systems): Add /dev.
(mount-root-file-system): Mount /rw-root/dev as a devtmpfs instead of
calling 'make-essential-device-nodes'.
(boot-system): Remove call to 'make-essential-device-nodes'.
* gnu/system/file-systems.scm (%devtmpfs-file-system): Remove.
* doc/guix.texi (File Systems): Adjust accordingly.
Reported Joshua Grant.
Patch suggested by Mark H Weaver.
* gnu/build/linux-boot.scm (mount-root-file-system): Use
'false-if-exception' instead of 'when (file-exists? ...)' to account
for dangling symlinks.
* gnu/build/linux-boot.scm (mount-root-file-system): Remove 'catch #t'
around body. This was unneeded and even inconvenient because this
procedure is called from within 'call-with-error-handling' already.
* gnu/build/linux-boot.scm (boot-system): Add #:pre-mount parameter and
honor it.
* gnu/system/linux-initrd.scm (base-initrd): Add #:mapped-devices
parameter. Add 'device-mapping-commands' variable, and use it to
build the #:pre-mount argument of 'boot-system'.
* gnu/system.scm (mapped-device-user,
operating-system-user-mapped-devices,
operating-system-boot-mapped-devices): New procedures.
(device-mapping-services): Use 'operating-system-user-mapped-devices'
instead of 'operating-system-mapped-devices'.
(operating-system-initrd-file): Call the initrd with #:mapped-devices.
* gnu/system/linux-initrd.scm (expression->initrd): Remove #:linux and
#:linux-modules parameters. Remove call to
'float-linux-module-directory'.
(base-initrd): Add call to 'float-linux-module-directory'. Use it in
#:linux-modules argument in the gexp. Remove #:linux and
#:linux-modules arguments to 'expression->initrd'.
* gnu/build/linux-initrd.scm (build-initrd): Remove
#:linux-module-directory parameter. Don't create 'modules'
sub-directory.
* gnu/build/linux-boot.scm (boot-system): Mentin that LINUX-MODULES is a
list of absolute file names. Don't prepend "/modules/" to
LINUX-MODULES.
* doc/guix.texi (Initial RAM Disk): Adjust accordingly.
* gnu/system/linux-initrd.scm (expression->initrd): Remove calls to
'imported-modules' and 'compiled-modules'. Use 'gexp->script' with
EXP. Add the result to TO-COPY. Make /init a symlink to that script,
and copy its closure into the "contents" directory. Add fake
/proc/self/exe symlink.
* gnu/build/linux-boot.scm (load-linux-module*): Add comment about mmap.
* gnu/system/vm.scm (system-qemu-image/shared-store-script): Add "-m
256". This turns out to be needed for initrds containing things like
e2fsck and several modules; with the default of 128 MiB, loading
libahci.ko may fail with -1.