When the image type is "raw" or derived from it (such as "qcow2"), an ESP
partition and file system is already added by the image generator. If a
conflicting user-provided EFI file system is provided, it causes the boot to
fail, as happens for the lightweight-desktop.tmpl and desktop.tmpl templates
under gnu/system/examples.
* gnu/system/image.scm (operating-system-for-image): Remove file systems whose
mount point is "/boot/efi".
Fixes <https://bugs.gnu.org/44511>.
Reported by Maxim Cournoyer <maxim.cournoyer@gmail.com>.
* gnu/system/vm.scm (system-qemu-image): Add 'bootloader' field to OS.
* gnu/system/vm.scm (system-qemu-image)[file-systems-to-keep]: Check
whether SOURCE is a string before calling 'string-prefix?'. Remove
UUIDs and file system labels as well.
This builds are extremely I/O-intensive so they'd rather not run on the
head node of the build farm.
* gnu/system/image.scm (system-disk-image, system-iso9660-image): Pass
#:local-build? #f.
* gnu/system/image.scm (arm32-disk-image, arm32-image-type): New variables.
(arm64-disk-image): Inherit from arm32-disk-image.
(arm64-image-type): Change name to 'arm64-raw.
* gnu/system/images/pine64.scm: New file.
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* gnu/system/image.scm (arm64-disk-image, arm64-image-type): New variables.
This is a follow-up of f19cf27c2b. The
bootloader installation must be done on the final disk-image, hence using
"disk-image-installer" instead of "installer" callback.
* gnu/bootloader/u-boot.scm: Turn all installer callbacks into
disk-image-installer callbacks.
* gnu/build/bootloader.scm (write-file-on-device): Open the output file with
'no-truncate and 'no-create options.
* gnu/system/image.scm (with-imported-modules*): Add (gnu build bootloader)
module.
* gnu/system/linux-container.scm (%nscd-container-caches): New variable.
(containerized-operating-system): Instantiate nscd-service with smaller caches
and add it to the generated operating-system, replacing any nscd-service
specified by the caller.
* gnu/system/file-systems.scm: (%network-file-mappings): Remove "/var/run/nscd".
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* gnu/system/image.scm (image-with-os): New macro. Rename the old
"image-with-os" procedure to ...
(image-with-os*): ... this new procedure,
(system-image): adapt according,
(raw-image-type, iso-image-type, uncompressed-iso-image-type
%image-types): new variables,
(lookup-image-type-by-name): new procedure.
(find-image): remove it.
* gnu/system/images/hurd.scm (hurd-image-type): New variable,
use it to define ...
(hurd-disk-image): ... this variable, using "os->image" procedure.
* gnu/tests/install.scm (run-install): Rename
installation-disk-image-file-system-type parameter to installation-image-type,
use os->config instead of find-image to compute the image passed to system-image,
(%test-iso-image-installer) adapt accordingly,
(guided-installation-test): ditto.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* gnu/build/image.scm (convert-disk-image): New procedure.
(genimage): Remove target argument.
* gnu/system/image.scm (system-disk-image): Add support for 'compressed-qcow2
image format. Call "convert-disk-image" to apply image conversions on the
final image. Add "qemu-minimal" to the build inputs.
(system-image): Also add support for 'compressed-qcow2.
Move the cow-store procedure from the service declaration in (gnu system
install) to (gnu build install), so that it can be called from within a
different context than Shepherd.
* gnu/build/install.scm (mount-cow-store, unmount-cow-store): New procedures.
* gnu/system/install.scm (make-cow-store): Remove it,
(cow-store-service-type): adapt it accordingly.
* guix/scripts/system.scm (%options): Add `--label'.
(system-derivation-for-action): Take a #:label key to set volume ID.
(perform-action): Take a #:label key.
(%default-options): Add default label value.
(process-action): Pass label value from command-line to perform-action.
* gnu/system/image.scm (image-with-label): New procedure.
Image files can be very large (multiple gigabytes), and the process of
generating them is primarily I/O bound. As disk access is typically faster
than network access, it makes sense build them locally.
* gnu/system/image.scm (system-disk-image): Pass the #:local-build? #t
parameter to computed-file calls dealing with generating image files.
(system-iso9660-image): Likewise.
This is a follow-up of 755f365b02.
As (zlib) is autoloaded in (gnu build linux-modules), "guile-zlib" is needed
as an extension only when it is effectively used.
* gnu/installer.scm (installer-program): Remove "guile-zlib" from the extensions.
* gnu/machine/ssh.scm (machine-check-initrd-modules): Ditto.
* gnu/services.scm (activation-script): Ditto.
* gnu/services/base.scm (default-serial-port): Ditto,
(agetty-shepherd-service): ditto,
(udev-service-type): ditto.
* gnu/system/image.scm (gcrypt-sqlite3&co): Ditto.
* gnu/system/shadow.scm (account-shepherd-service): Ditto.
This commit adds support for GZIP compression for linux-libre kernel
modules. The initrd modules are kept uncompressed as the initrd is already
compressed as a whole.
The linux-libre kernel also supports XZ compression, but as Guix does not have
any available bindings for now, and the compression time is far more
significant, GZIP seems to be a better option.
* gnu/build/linux-modules.scm (modinfo-section-contents): Use
'call-with-gzip-input-port' to read from a module file using '.gz' extension,
(strip-extension): new procedure,
(dot-ko): adapt to support compression,
(ensure-dot-ko): ditto,
(file-name->module-name): ditto,
(find-module-file): ditto,
(load-linux-module*): ditto,
(module-name->file-name/guess): ditto,
(module-name-lookup): ditto,
(write-module-name-database): ditto,
(write-module-alias-database): ditto,
(write-module-device-database): ditto.
* gnu/installer.scm (installer-program): Add "guile-zlib" to the extensions.
* gnu/machine/ssh.scm (machine-check-initrd-modules): Ditto.
* gnu/services.scm (activation-script): Ditto.
* gnu/services/base.scm (default-serial-port): Ditto,
(agetty-shepherd-service): ditto,
(udev-service-type): ditto.
* gnu/system/image.scm (gcrypt-sqlite3&co): Ditto.
* gnu/system/linux-initrd.scm (flat-linux-module-directory): Add "guile-zlib"
to the extensions and make sure that the initrd only contains
uncompressed module files.
* gnu/system/shadow.scm (account-shepherd-service): Add "guile-zlib" to the
extensions.
* guix/profiles.scm (linux-module-database): Ditto.
Tools such as efibootmgr rely on the deprecated /sys/firmware/efi/vars API as
well as on the new /sys/firmware/efi/efivars API. The latter needs to be
mounted.
Reported by Keyhenge here:
https://lists.gnu.org/archive/html/bug-guix/2020-04/msg00274.html
Here is the efivarfs documentation:
https://www.kernel.org/doc/Documentation/filesystems/efivarfs.txt.
* gnu/system/file-systems.scm (%efivars-file-system): New exported variable,
(%base-file-systems): add it.
* gnu/system/install.scm (%efivars-file-system): Add it.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* gnu/system/file-systems.scm (<file-system>): Add a mount-may-fail? field.
(file-system->spec): adapt accordingly,
(spec->file-system): ditto.
* gnu/build/file-systems.scm (mount-file-system): If 'system-error is raised
and mount-may-fail? is true, ignore it. Otherwise, re-raise the exception.
Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
This allows users to specify network interface settings with 'guix system vm'
without having to create a new NIC. Fixes <https://bugs.gnu.org/42252>.
Reported by Christopher Lemmer Webber <cwebber@dustycloud.org>.
This reverts commit 5379392731.
This fixes <https://bugs.gnu.org/42151>.
* gnu/system/images/hurd.scm (hurd-initialize-root-partition): Use #:wal-mode #f
in call to ...
* gnu/build/image.scm (initialize-root-partition): ... this, add #:wal-mode?
parameter, pass it to ...
(register-closure): ... this, add #:wal-mode? parameter, pass it to ...
* guix/store/database.scm (with-database): ... this, add #:wal-mode?
parameter, pass it to ...
(call-with-database): ... this, add #:wal-mode? parameter; when
set to #f, do not set journal_model=WAL.