* gnu/system/vm.scm (system-qemu-image/shared-store-script): Add
#:options parameter and honor it.
(<virtual-machine>): New record type.
(virtual-machine): New macro.
(port-forwardings->qemu-options, virtual-machine-compiler): New
procedures.
* gnu/system/vm.scm (expression->derivation-in-linux-vm): Add
#:single-file-output? and pass it to 'load-in-linux-vm'.
(iso9660-image): Pass #:single-file-output? to
'expression->derivation-in-linux-vm'.
* gnu/build/vm.scm (load-in-linux-vm): Add #:single-file-output? and
honor it.
* gnu/system/locale.scm (single-locale-directory): Use 'computed-file'
instead of 'gexp->derivation'.
(locale-directory): Adjust accordingly and do the same.
* gnu/system.scm (operating-system-directory-base-entries): Adjust
accordingly.
* gnu/build/vm.scm (initialize-hard-disk): Use "GuixSD" as label.
* gnu/system/install.scm (installation-os): Use "GuixSD" as label.
* gnu/system/vm.scm (system-disk-image): Use "GuixSD" or "GUIXSD" as volume
label.
Co-authored-by: Ludovic Courtès <ludo@gnu.org>
* gnu/system/linux-initrd.scm (expression->initrd): Use 'program-file'
for 'init'.
(flat-linux-module-directory): Use 'computed-file' instead of
'gexp->derivation'.
(raw-initrd): Adjust accordingly.
* build-aux/hydra/gnu-system.scm (qemu-jobs): Add 'iso9660-image .
* gnu/build/vm.scm (make-iso9660-image): New variable. Export it.
* gnu/system/vm.scm (iso9660-image): New variable. Use make-iso9660-image.
(system-disk-image): Use iso9660-image.
* gnu/build/vm.scm (estimated-partition-size): New procedure.
* gnu/system/vm.scm (expression->derivation-in-linux-vm):
Change #:disk-image-size default to 'guess.
[builder]: When DISK-IMAGE-SIZE is 'guess, use
'estimated-partition-size' and compute and estimate of the image size.
(qemu-image): Likewise.
* guix/build/store-copy.scm (file-size, closure-size): New procedures.
* guix/scripts/system.scm (%default-options): Change 'image-size' to
'guess.
* doc/guix.texi (Building the Installation Image): Remove '--image-size'
flag from example.
(Invoking guix system): Document the image size estimate.
Fixes <https://bugs.gnu.org/27242>.
* gnu/system/mapped-devices.scm (open-luks-device): If
'find-partition-by-luks-uuid' fails, try again once per second, up to ten
times.
* doc/guix.texi (USB Stick Installation): Mention UEFI.
(Preparing for Installation): Add notes about EFI System Partition, and
mounting partitions before init.
(Proceeding with the Installation): Mention the GRUB-EFI package.
(Using the Configuration System): Lightweight desktop is now a UEFI system.
(GRUB Configuration): Expand on package field. Add indexes.
* gnu/system/examples/lightweight-desktop.tmpl: Adjust to native EFI configuration.
* gnu/system/examples/vm-image.tmpl: New file.
* Makefile.am (GUIXSD_VM_SYSTEMS, GUIXSD_VM_IMAGE_BASE,
GUIXSD_VM_IMAGE_SIZE): New variables.
(release): Add logic to build a VM image.
(EXAMPLES): Add 'gnu/system/examples/vm-image.tmpl'.
* doc/guix.texi (Running GuixSD in a VM, Installing GuixSD in a VM): Mention the
pre-built VM image.
* gnu/bootloader.scm: New file.
* gnu/bootloader/extlinux.scm: New file.
* gnu/bootloader/grub.scm: New file.
* gnu/local.mk: Build new files.
* gnu/system.scm: Adapt to new bootloader api.
* gnu/scripts/system.scm: Adapt to new bootloader api.
* gnu.scm: Remove (gnu system grub) and replace by (gnu bootloader) and (gnu
bootloader grub) modules.
* gnu/system/grub.scm: Moved content to gnu/bootloader/grub.scm.
* gnu/system/vm: Replace (gnu system grub) module by (gnu bootloader).
* gnu/tests.scm: Ditto.
* gnu/tests/nfs.scm: Ditto.
* gnu/system/grub.scm (<grub-configuration>): Add new fields
terminal-outputs, terminal-inputs, serial-unit, and serial-speed.
(grub-setup-io, setup-gfxterm): New procedures.
* doc/guix.texi (GRUB Configuration): Document the new fields.
* gnu/system/pam.scm (unix-pam-service): Add pam-entry for "pam_rootok.so" to
auth field when ALLOW-ROOT? is #T.
(base-pam-services): Allow root to run "su" without authentication.
* gnu/system/grub.scm (boot-parameters->menu-entry): New variable.
(grub-configuration-file): Use boot-parameters
instead of menu-entry where possible.
* guix/scripts/system.scm (profile-boot-parameters): Update docstring.
(reinstall-grub): Use profile-boot-parameters.
(perform-action): Use profile-boot-parameters.
This resulted in a couple of harmless warnings just before the menu is
displayed.
* gnu/system/grub.scm (eye-candy)[setup-gfxterm-body]: Move 'vbe' and
'vga' loading to the non-EFI branch.
Fixes a regression introduced in
7208995426 whereby (gnu system
file-systems) would pull in (gnu packages …) module, which in turn
breaks when importing things like (gnu build shepherd).
* gnu/system/file-systems.scm (file-system-type-predicate): Export.
(file-system-packages): Move to...
* gnu/system/linux-initrd.scm (file-system-packages): ... here. Add
docstring.
* gnu/services/base.scm: Use it.
* tests/file-systems.scm ("does not pull (gnu packages …)"): New test.
* gnu/system/linux-initrd.scm (base-initrd): Move helper-packages body to ...
* gnu/system/file-systems.scm (file-system-packages): ... here. New variable.
Also export it.
* gnu/system/linux-initrd.scm (raw-initrd): New exported variable.
(base-initrd): Use raw-initrd to build the initrd.
* doc/guix.texi (Initial RAM Disk): Document it.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
* gnu/system/vm.scm (virtualized-operating-system): Add full-boot?
option. Don't add a %store-mapping when full-boot? is passed. This leads
the grub-configuration-file procedure to look for the kernel and initrd in
/ instead of /gnu/store.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>