* gnu/system.scm (<operating-system>)[initrd]: Default to
'qemu-initrd'.
(<file-system>): New record type.
(operating-system-root-file-system): New procedure.
(operating-system-derivation): Take the device name for GRUB from
'operating-system-root-file-system'. Pass the
'operating-system-initrd' procedure the list of boot file systems.
* gnu/system/linux-initrd.scm (file-system->spec): New procedure.
(qemu-initrd): Add 'file-systems' parameter, and remove #:mounts
parameter.
[file-system-type-predicate]: New procedure.
[linux-modules]: Use it.
Adjust #:mounts argument in 'boot-system' call.
(gnu-system-initrd): Remove.
* gnu/system/vm.scm (%linux-vm-file-systems): New variable.
(expression->derivation-in-linux-vm): Adjust call to 'qemu-initrd'.
(virtualized-operating-system): New procedure.
(system-qemu-image/shared-store-script)[initrd]: Remove. Use
'virtualized-operating-system'. Get the 'initrd' file from OS-DRV.
* guix/build/linux-initrd.scm (mount-qemu-smb-share, mount-qemu-9p):
Remove.
(MS_RDONLY, MS_BIND): New global variables.
(bind-mount): Remove local 'MS_BIND' definition.
(mount-root-file-system): New procedure, with code formerly in
'boot-system'.
(mount-file-system): New procedure.
(boot-system): Add #:root-fs-type parameter. Remove 'MS_RDONLY' local
variable. Use 'mount-root-file-system' and 'mount-file-system'.
* doc/guix.texi (Using the Configuration System): Add 'file-system'
declaration.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Make
/dev/fuse.
(boot-system): Add #:unionfs parameter. Invoke UNIONFS instead of
copying files over when VOLATILE-ROOT? is true.
* gnu/system/linux-initrd.scm (expression->initrd): Add #:inputs
parameter.
[files-to-copy]: New procedure.
[builder]: Add 'to-copy' parameter; honor it.
(qemu-initrd)[linux-modules]: Add 'fuse.ko' when VOLATILE-ROOT?.
Pass UNIONFS-FUSE/STATIC as #:inputs; change builder to pass #:unionfs
to 'boot-system'.
* gnu/system/linux-initrd.scm (qemu-initrd)[virtio-9p-modules]: New
variable.
[linux-modules]: Append VIRTIO-9P-MODULES when a 9p file system is in
MOUNTS.
* guix/build/linux-initrd.scm (mount-qemu-9p): New procedure.
(boot-system): Recognize '9p' in MOUNTS, and use 'mount-qemu-9p'.
* guix/build/linux-initrd.scm (make-essential-device-nodes): Rename
devices with major = 8 to /dev/sda*. Make /dev/vda* devices.
* gnu/system/vm.scm (qemu-image): Change '/dev/vda' to '/dev/sda'.
* gnu/system.scm (operating-system-derivation): Likewise.
* guix/build/linux-initrd.scm (boot-system): New procedure.
* gnu/system/linux-initrd.scm (qemu-initrd): Add keyword parameters
'guile-modules-in-chroot?' and 'mounts'. Change builder to simply
call 'boot-system'.
(gnu-system-initrd): Change to a simple call to 'qemu-initrd'.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Call
'qemu-initrd' with #:guile-modules-in-chroot?.
* gnu/packages/linux-initrd.scm (qemu-initrd): Add (guix build utils) to
#:modules, and use it. Copy .scm and .go files to /root.
* guix/build/linux-initrd.scm (bind-mount): New procedure.
* gnu/packages/linux-initrd.scm (qemu-initrd): Add #:modules argument.
Factorize and move some of the code to...
* guix/build/linux-initrd.scm: ... here. New file.
* Makefile.am (MODULES): Add it.