summaryrefslogtreecommitdiff
path: root/gnu/system/image.scm
Commit message (Collapse)AuthorAge
* image: Rename "raw" image-type to "efi-raw".Mathieu Othacehe2021-01-17
| | | | | | | | * gnu/system/image.scm (raw-image-type): Rename to "efi-raw-image-type". * guix/scripts/system.scm (%default-options): Adapt accordingly. * doc/guix.texi: Ditto. Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
* system: image: Fix root offset on rockchip platforms.Mathieu Othacehe2021-01-10
| | | | | | | | | | | Fixes: <https://issues.guix.gnu.org/45584>. * gnu/system/image.scm (arm32-disk-image, arm64-disk-image): Turn into procedures, taking the root partition offset as argument. * gnu/system/images/novena.scm (novena-image-type): Adapt accordingly. * gnu/system/images/pine64.scm (pine64-image-type): Ditto. * gnu/system/images/pinebook-pro.scm (pinebook-pro-image-type): Use a 9MiB offset for the root partition.
* image: Fix ISO image production.Mathieu Othacehe2020-12-04
| | | | | | | This is a follow-up of 41f27bf8702838f19b1dc5ffee8eec1d4315d4e6. * gnu/system/image.scm (operating-system-for-image): Force "volatile-root?" to true when producing ISO images.
* image: Remove conflicting user-provided EFI file system.Maxim Cournoyer2020-11-17
| | | | | | | | | | | 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".
* image: Offload "disk-image" derivations.Ludovic Courtès2020-11-08
| | | | | | | This is a followup to 99efa804bd6df5de4760ec5974ed2297f1746366. * gnu/system/image.scm (system-disk-image): Pass #:local-build? #f to 'computed-file'.
* image: Allow offloading of "partition.img" and "image.iso" builds.Ludovic Courtès2020-11-03
| | | | | | | | 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.
* system: image: Introduce arm32-raw image type.Mathieu Othacehe2020-11-02
| | | | | | * 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.
* image: Use 'raise' from (srfi srfi-34).Ludovic Courtès2020-10-14
| | | | | | * gnu/system/image.scm: Use (srfi srfi-34) for 'raise'. (lookup-image-type-by-name): Remove extra newline in 'formatted-message' string.
* images: Add pine64 support.Mathieu Othacehe2020-10-05
| | | | | | * 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.
* bootloader: Fix u-boot installation.Mathieu Othacehe2020-10-05
| | | | | | | | | | | | | This is a follow-up of f19cf27c2b9ff92e2c0fd931ef7fde39c376adaa. 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.
* system: image: Add qcow2 image type.Mathieu Othacehe2020-10-02
| | | | * gnu/system/image.scm (qcow2-image-type): New variable.
* system: image: Add image-type support.Mathieu Othacehe2020-09-30
| | | | | | | | | | | | | | | | | | | | | * 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>
* image: Add support for compressed-qcow2 format.Mathieu Othacehe2020-09-29
| | | | | | | | | * 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.
* system: image: Rename ISO9660 files.Mathieu Othacehe2020-09-19
| | | | | * gnu/system/image.scm (system-iso9660-image): Change the default file output name to "image.iso".
* Revert "system: image: Do not offload image files."Maxim Cournoyer2020-09-01
| | | | | This reverts commit 6a9581741e4ee81226aeb2f1c997df76670a6aab, which is obsoleted by the previous commit.
* guix: system: Add `--label' option.Julien Lepiller2020-08-31
| | | | | | | | | * 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.
* system: image: Do not offload image files.Maxim Cournoyer2020-08-26
| | | | | | | | | | 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.
* Remove "guile-zlib" extension when unused.Mathieu Othacehe2020-08-25
| | | | | | | | | | | | | | | | This is a follow-up of 755f365b02b42a5d1e8ef3000dadef069553a478. 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.
* linux-libre: Support module compression.Mathieu Othacehe2020-08-25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* system: image: Fix disk-image name.Mathieu Othacehe2020-06-26
| | | | | | | This is a follow-up of 5980ec8ada5ede54bde6558c7ab8bf492bc70f85. * gnu/system/image.scm (system-disk-image): When using the image name, convert it to string first.
* system: image: Use the image name as the disk-image derivation name.Mathieu Othacehe2020-06-26
| | | | | * gnu/system/image.scm (system-disk-image): Use the image name as disk-image derivation name, if defined. Otherwise use the generic "disk-image" name.
* image: hurd: Initialize root partition for the Hurd.Jan (janneke) Nieuwenhuizen2020-06-25
| | | | | | | | This is a follow-up to commit b904b59ce592c89dfb4675a8c06757afed6738a0. * gnu/system/image.scm (hurd-initialize-root-partition): Move to ... * gnu/system/images/hurd.scm (hurd-initialize-root-partition): ... here. (hurd-disk-image): Use it.
* system: image: Enable compression on ISO9660 images.Mathieu Othacehe2020-06-24
| | | | | | | ISO9660 image compression was temporarily disabled to speed-up tests of the new image API. Enable it again. * gnu/system/image.scm (iso9660-image)[compression]: Enable it.
* image: Move hurd image definition to a dedicated file.Mathieu Othacehe2020-06-24
| | | | | | | | | | | | This moves hurd-disk-image to a dedicated file. It also defines a default operating-system so that the image can be built standalone. * gnu/system/images/hurd.scm: New file, * gnu/local.mk (GNU_SYSTEM_MODULES): add it, * gnu/system/image.scm (root-offset, root-label): Export it, (hurd-disk-image): remove it as this is now defined in the new, Hurd dedicated file above, (find-image): adapt to avoid loop dependency.
* system: image: Remove fakeroot dependencies.Mathieu Othacehe2020-06-23
| | | | | | | | Since c29bb909d241e7215e574e93d9799e701cbc6ddb, fakeroot "sed" and "coreutils" dependencies are now explicit. * gnu/system/image.scm (system-disk-image): Remove "sed" and "coreutils" from inputs.
* system: image: Remove "image-root" when building raw disk-images.Mathieu Othacehe2020-06-22
| | | | | | | | | | | | | | | | | The "image-root" derivation output is used as a temporary directory that is passed to mke2fs and mkdosfs later on. By merging the creation of this directory and the production of partition images, we can get rid of the derivation. As mke2fs and mkdosfs are not able to override file permissions, call those commands with fakeroot. This way, all the image files will be owned by root, even if image generation is done in an unprivilegded context. * gnu/system/image.scm (system-disk-image): Merge "image-root" and "iso9660-image" derivations so that we spare an extra derivation. Also add "fakeroot" and its runtime dependencies to the inputs. * gnu/build/image.scm (make-ext-image, make-vfat-image): Make sure that mke2fs and mkdosfs are respectively called by fakeroot.
* system: image: Remove "image-root" derivation when building ISO.Mathieu Othacehe2020-06-22
| | | | | | | | | The "image-root" derivation output is used as a temporary directory that is passed to GNU Xorriso later on. By merging the creation of this directory and the production of an ISO image, we can get rid of the derivation. * gnu/system/image.scm (system-iso9660-image): Merge "image-root" and "iso9660-image" derivations so that we spare an extra derivation.
* system: image: Make sure target is set.Mathieu Othacehe2020-06-14
| | | | | * gnu/system/image.scm (system-image): Move "with-parameters" call so that it encapsulates "operating-system-bootcfg".
* system: image: Remove left-over.Mathieu Othacehe2020-06-14
| | | | | * gnu/system/image.scm: Remove a left-over since maybe-with-target procedure was removed.
* image: Remove 'maybe-with-target'.Mathieu Othacehe2020-06-13
| | | | | * gnu/system/image.scm (maybe-with-target): Remove, (system-image): adapt accordingly.
* image: Add 'target' support.Mathieu Othacehe2020-06-13
| | | | | | | | | * gnu/image.scm (<image>)[target]: New field, (image-target): new public method. * gnu/system/image.scm (hurd-disk-image): Set "i586-pc-gnu" as image 'target' field, (maybe-with-target): new procedure, (system-image): honor image 'target' field using the above procedure.
* image: Make 'find-image' non-monadic.Jan (janneke) Nieuwenhuizen2020-06-13
| | | | | | | | * gnu/system/image.scm (find-image): Make non-monadic. Add 'target' parameter. * gnu/tests/install.scm (run-install): Update caller, passing (%current-target-system). * guix/scripts/system.scm (perform-action): Likewise.
* system: image: Do not produce an HFS tree when building an ISO.Mathieu Othacehe2020-06-12
| | | | | | Use "mbr_only" mode to make sure that no HFS+ tree are generated. * gnu/system/image.scm (system-image): Set MKRESCUE_SED_MODE to "mbr_only".
* hurd-boot: Further cleanup of "rc".Jan (janneke) Nieuwenhuizen2020-06-08
| | | | | | | * gnu/packages/hurd.scm (hurd-rc-script): Move implementation to ... * gnu/build/hurd-boot.scm (boot-hurd-system): ...here, new file. * gnu/build/linux-boot.scm (make-hurd-device-nodes): Move there likewise. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
* image: Add Hurd support.Mathieu Othacehe2020-06-08
| | | | | | | * gnu/system/image.scm (hurd-disk-image): New exported variable, (root-offset, root-label): new variables, (esp-partition, root-partition): adapt accordingly, (find-image): add Hurd support.
* image: Do not use VM to create disk-images.Mathieu Othacehe2020-05-29
| | | | | | | | | | | | | | | | Now that installing Grub on raw disk-images is supported, we do not need to rely on (gnu system vm) module. * gnu/system/image.scm (make-system-image): Rename to ... (system-image): ... this, and remove the compatibility wrapper. (find-image): Turn to a monadic procedure. This will become useful when introducing Hurd support, to be able to detect the target system. * gnu/ci.scm (qemu-jobs): Use lower-object now that system-image returns a file-like object. * gnu/tests/install.scm (run-install): Ditto. * guix/scripts/system.scm (system-derivation-for-action): Add a 'base-image' argument, (perform-action): adapt accordingly.
* image: Add a post-MBR gap to the default image.Mathieu Othacehe2020-05-29
| | | | | | | | | | The generic 'efi-disk-image' needs to be bootable on systems without EFI. To do that, GRUB is installed in the post-MBR gap. Make sure that the first partition starts with an offset, to make this gap large enough for GRUB. * gnu/system/image.scm (root-offset, root-label): New variables, (esp-partition): use 'root-offset' as the partition offset, (root-partition): use 'root-label' as the partition label.
* system: image: Fix image-with-os.Mathieu Othacehe2020-05-29
| | | | | * gnu/system/image.scm (image-with-os): Do not reorder partitions, as we want them to be created according to definition order.
* image: Use grub-efi to install the EFI bootloader.Mathieu Othacehe2020-05-29
| | | | | | | * gnu/build/image.scm (initialize-efi-partition): Rename bootloader-package argument to grub-efi. * gnu/system/image.scm (system-disk-image): Adapt accordingly to pass grub-efi package.
* system: image: Correct genimage configuration file indentation.Mathieu Othacehe2020-05-29
| | | | | * gnu/system/image.scm (system-disk-image): Fix genimage configuration file indentation.
* image: Add bootloader installation support.Mathieu Othacehe2020-05-29
| | | | | | | * gnu/build/image.scm (initialize-root-partition): Add bootloader-package and bootloader-installer arguments. Run the bootloader-installer if defined. * gnu/system/image.scm (system-disk-image): Adapt the partition initializer call accordingly.
* bootloader: Add 'disk-image-installer'.Mathieu Othacehe2020-05-29
| | | | | | | | | | | | | * gnu/bootloader.scm (<bootloader>)[disk-image-installer]: New field, (bootloader-disk-image-installer): export it. * gnu/bootloader/grub.scm (install-grub-disk-image): New procedure ... (grub-bootloader): ... used as "disk-image-installer" here. (grub-efi-bootloader): set "disk-image-installer" to #f. * gnu/system/image.scm (root-partition?, find-root-partition): Move to "Helpers" section. (root-partition-index): New procedure. (system-disk-image): Honor disk-image-installer, and use it to install the bootloader directly on the disk-image, if supported.
* image: Add partition file-system options support.Mathieu Othacehe2020-05-26
| | | | | | | | * gnu/image.scm (<partition>)[file-system-options]: New field, (partition-file-system-options): new exported procedure. * gnu/system/image.scm (partition->gexp): Adapt accordingly. * gnu/build/image.scm (sexp->partition): Also adapt accordingly, (make-ext-image): and pass file-system options to mke2fs.
* image: Set offset default to zero.Mathieu Othacehe2020-05-26
| | | | | * gnu/image.scm (<partition>)[offset]: Set to zero by default. * gnu/system/image.scm (system-disk-image): Adapt accordingly.
* system: image: Fix disk-image cross-compilation.Mathieu Othacehe2020-05-26
| | | | | | * gnu/system/image.scm (system-disk-image): Use the native version of the helper packages (e2fsprogs, dosfstools, mtools, genimage, coreutils and findutils).
* image: Add partition offset support.Mathieu Othacehe2020-05-26
| | | | | | * gnu/image.scm (partition-offset): New procedure, (<partition>)[offset]: new field. * gnu/system/image.scm (system-disk-image): Apply the partition offset.
* image: Add a new API.Mathieu Othacehe2020-05-05
Raw disk-images and ISO9660 images are created in a Qemu virtual machine. This is quite fragile, very slow, and almost unusable without KVM. For all these reasons, add support for host image generation. This implies the use new image generation mechanisms. - Raw disk images: images of partitions are created using tools such as mke2fs and mkdosfs depending on the partition file-system type. The partition images are then assembled into a final image using genimage. - ISO9660 images: the ISO root directory is populated within the store. GNU xorriso is then called on that directory, in the exact same way as this is done in (gnu build vm) module. Those mechanisms are built upon the new (gnu image) module. * gnu/image.scm: New file. * gnu/system/image.scm: New file. * gnu/build/image: New file. * gnu/local.mk: Add them. * gnu/system/vm.scm (system-disk-image): Rename to system-disk-image-in-vm. * gnu/ci.scm (qemu-jobs): Adapt to new API. * gnu/tests/install.scm (run-install): Ditto. * guix/scripts/system.scm (system-derivation-for-action): Ditto.