* gnu/build/vm.scm (define-module): Use module (guix build syscalls).
It fixes the following warnings during guix build :
gnu/build/vm.scm:233:3: warning: possibly unbound variable `mount'
gnu/build/vm.scm:238:3: warning: possibly unbound variable `umount'
gnu/build/vm.scm:268:8: warning: possibly unbound variable `mount'
gnu/build/vm.scm:276:8: warning: possibly unbound variable `umount'
gnu/build/vm.scm:315:4: warning: possibly unbound variable `mount'
gnu/build/vm.scm:323:4: warning: possibly unbound variable `umount'
This was not possible until the previous commit because we had to be sure
that Guile core implementation of 'mount' and 'umount' was used in
initrd context.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Fixes <http://bugs.gnu.org/22633>.
* gnu/build/vm.scm (load-in-linux-vm): Only pass "-enable-kvm" flag to qemu
if "/dev/kvm" is present.
* gnu/system/vm.scm (common-kvm-options): Same as above.
* gnu/build/vm.scm (<partition>): New record type.
(fold2): New procedure.
(initialize-partition-table): Remove #:bootable? and
'partition-size' parameters. Add 'partitions' parameter. Invoke 'parted'
with '--script'.
(initialize-root-partition): Remove.
(initialize-partition, root-partition-initializer): New procedures.
(initialize-hard-disk): Remove #:system-directory, #:disk-image-size,
#:file-system-type, #:file-system-label, #:closures, #:copy-closures?,
#:bootable?, and #:register-closures? parameters. Add #:partitions.
Rewrite to use 'initialize-partition' for each item of PARTITIONS.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add (guix records)
to #:modules default value.
(qemu-image): Adjust accordingly.
* gnu/build/vm.scm (initialize-root-partition, initialize-hard-disk): Use the
'umount' procedure instead of invoking the 'umount' command.
* gnu/system/vm.scm (qemu-image): Remove UTIL-LINUX from INPUTS.
This would not work when /boot is a separate partition, as reported by
Nikita Karetnikov <nikita@karetnikov.org> in <http://bugs.gnu.org/19220>.
This fixes a regression introduced in 39d1f82.
* gnu/build/install.scm (install-grub): Copy GRUB.CFG instead of
symlinking it, as was the case before 39d1f82.
* gnu/build/vm.scm (register-grub.cfg-root): Add 'grub.cfg' parameter.
Make it a permanent GC root instead of an indirect GC root.
(initialize-hard-disk): Adjust accordingly.
* guix/scripts/system.scm (install-grub*): Replace use of
'add-indirect-root' by the addition of a permanent GC root in
%GC-ROOTS-DIRECTORY.
Fixes <http://bugs.gnu.org/19160>.
* guix/scripts/system.scm (install-grub*): Make /boot/grub/grub.cfg an
indirect GC root.
* gnu/build/install.scm (install-grub): Make TARGET a symlink.
* gnu/build/vm.scm (register-grub.cfg-root): New procedure.
(initialize-hard-disk): Use it.
Reported by nebuli on #guix.
* gnu/build/vm.scm (initialize-partition-table): Add #:bootable?
parameter and honor it.
(initialize-hard-disk): Likewise.