* gnu/bootloader.scm (menu-entry->sexp, sexp->menu-entry): Swap order in
match subprocedures.
* gnu/build/file-systems.scm (ext2-superblock-uuid,
linux-swap-superblock-uuid, bcachefs-superblock-external-uuid,
btrfs-superblock-uuid, exfat-superblock-uuid, fat32-superblock-uuid,
fat16-superblock-uuid, iso9660-superblock-uuid, jfs-superblock-uuid,
f2fs-superblock-uuid, luks-header-uuid, ntfs-superblock-uuid,
xfs-superblock-uuid): Wrap bytevector in uuid record.
* gnu/build/image.scm (make-iso9660-image): Take uuid as string.
* gnu/installer/parted.scm (user-partition->file-system): Do not provide
uuid-type.
* gnu/system/image.scm (system-iso9660-image): Convert uuid to string.
* gnu/system/uuid.scm (dce-uuid->string, iso9660-uuid->string): Do not
export.
Change-Id: I35435de0d808e66e17fd9b54247a7a11a93ecd62
* doc/guix.texi (Manual Installation)[Proceeding with the Installation]:
Offload target reference.
(System Installation)[Building the Installation Image]: Don't reference
deleted variables.
(System Configuration)[Using the Configuration System]: Update example.
[operating-system Reference]<bootloader>: Can use multiple bootloaders.
[Proceeding with the installation]: Refer to Bootloader Configuration.
[Building the Installation Image]: Update example.
[Bootloader Configuration]<bootloader>: Update documentation for all
bootloaders, and add new ones. Document new fields efi-removable?,
32bit?, and keypair.
<bootloader-target>: New record.
<menu-entry>: Remove now-unsupported GRUB specifics in linux. Move
device documentation and add some for device-mount-point and
device-subvol. Fix typo in multiboot-arguments. Document chain-loader
for arbitrary bootloaders.
[Invoking guix system]<switch-generation>: Bootloaders are now
reinstalled.
<image> Other bootloaders may be used.
[Invoking guix deploy]: Update template.
Change-Id: I45ac9d5ad3cb491c693e9a4b2f0b44b527478ee7
* gnu/system/examples/asus-c201.tmpl (bootloader): Use new depthcharge
bootloader name scheme and update to new target system.
* gnu/system/examples/bare-bones.tmpl (bootloader),
gnu/system/examples/bare-hurd.tmpl (bootloader),
gnu/system/examples/beaglebone-black.tmpl (bootloader),
gnu/system/examples/desktop.tmpl (bootloader),
gnu/system/examples/lightweight-desktop.tmpl (bootloader),
gnu/system/examples/plasma.tmpl (bootloader): Use new target system.
* gnu/system/examples/docker-image.tmpl (bootloader): Delete.
* gnu/system/examples/vm-image.tmpl (bootloader): Use auto image target.
Change-Id: I3675f17ae9cd94cff99328762600fb4e491bc9f2
Less adding and more making it an actual bootloader rather than some
weirdly specified packages. The GRUB EFI bootloader can be recreated by
combining a Raspberry Pi bootloader with grub-efi.
* gnu/bootloader.scm (efi-bootloader-profile, efi-bootloader-chain):
Delete procedures.
* gnu/bootloader/u-boot.scm (rpi-config, install-rpi,
make-u-boot-rpi-bootloader): New procedures.
(u-boot-rpi-2-bootloader, u-boot-rpi-3-bootloader,
u-boot-rpi-4-bootloader, u-boot-rpi-bootloader): New variables.
* gnu/packages/bootloaders.scm (make-u-boot-bin-package): Delete
procedure.
(%u-boot-rpi-efi-description, %u-boot-rpi-efi-description-32-bit,
u-boot-rpi-2-efi, u-boot-rpi-3-32b-efi, u-boot-rpi-4-32b-efi,
u-boot-rpi-arm64-efi, u-boot-rpi-2-bin, u-boot-rpi-3_32b-bin,
u-boot-rpi-4_32b-bin, u-boot-rpi-arm64-bin, u-boot-rpi-2-efi-bin,
u-boot-rpi-3-32b-efi-bin, u-boot-rpi-4-32b-efi-bin,
u-boot-rpi-arm64-efi-bin): Delete variables.
* gnu/packages/raspberry-pi.scm (grub-efi-bootloader-chain-raspi-64):
Delete procedure.
* gnu/system/examples/raspberry-pi-64-nfs-root.tmpl (bootloader),
gnu/system/examples/raspberry-pi-64.tmpl (bootloader): Use new target
system.
Change-Id: I5139a0b00ec89189e8e7c84e06a7a3b7240259cd
Sorry this is a massive commit. It's kinda impossible to split it
without either completely breaking basic functionality or making a buggy
shim layer that's written just to be immediately removed.
But anyway, this is the real body of the bootloader subsystem update.
One of my favorite new things possible with this is easy generation of
disk images using arbitrary bootloaders, including ones that require one
or more data/install partitions, such as p-boot or depthcharge!
* gnu/build/image.scm (initialize-root-partition): Don't install
bootloader here.
(make-iso9660-image): Pull in grub.dir instead of a bootcfg.
* gnu/build/install.scm (install-boot-config): Delete procedure.
* gnu/machine/ssh.scm (deploy-managed-host, roll-back-managed-host): Use
new bootloader system.
(operating-system)[bootloader]: Use wrap-element sanitizer and support
multiple bootloaders.
(operating-system-bootcfg): Rename to...
(operating-system-bootmeta): ...this. Rewrite to return relevant
information instead of calling the config procedure directly.
(operating-system-boot-parameters): Support multiple bootloaders.
* gnu/system/boot.scm (read-boot-parameters): Support multiple
bootloaders.
* gnu/system/image.scm (root-partition-index): Delete procedure.
(system-disk-image, system-iso9960-image): Support new bootloader system.
(system-disk-image)[targets]: New subprocedure.
* guix/scripts/system.scm (install, install-bootloader-from-provenance,
perform-action): Support multiple bootloaders and work with new
bootloader system instead of bootcfgs.
(display-system-generation): Support multiple bootloaders.
* guix/scripts/system/reconfigure.scm (install-bootloader-program):
Rewrite to simply insert each bootloader's installer in the gexp
directly, instead of copying bootcfgs.
(install-bootloader): Work with new bootloader system. Just in case,
add install-bootloader.scm to the gc roots too.
Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739
Might as well, to help ease the transition.
* etc/teams.scm (bootloaders): New team.
(Lilah Tascheter): Create and add to above.
Change-Id: I63620f4e3151bb8e3d0bdf619fc70501af6397a0
* gnu/bootloader.scm (efi-arch, install-efi): New procedures.
(%efi-supported-systems, lazy-efibootmgr): New variables.
(bootloader-configuration)[efi-removable?, 32bit?]: New fields.
(match-bootloader-configuration, match-menu-entry): New macros.
* gnu/build/bootloader.scm (install-efi-loader): Delete procedure.
(install-efi): Rewrite to support installation of any efi bootloader.
* gnu/build/image.scm (initialize-efi32-partition): Deprecate.
(initialize-efi-partitition): Only create EFI directory.
* gnu/image.scm (partition)[target]: New field in order to support
dynamic provision of image partitions as bootloader targets.
* gnu/system/image.scm (root-partition, esp-partition): Use target
field.
* gnu/system/image.scm (esp32-partition, efi32-disk-partition,
efi32-raw-image-type): Deprecate.
* doc/guix.texi (Creating System Images)[image Reference]<partition
Reference>: Add target field.
[Instantiate an Image]: Update examples and update formatting.
<efi32-disk-image, efi32-raw-image-type>: Delete.
<pinebook-pro-image-type, rock64-image-type>: Reword slightly.
Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739
* gnu/bootloader.scm (menu-entry-device-subvol): Add and export field.
(normalize-file): Add procedure.
(device->sexp): Match device-subvol and include in S-expression.
(sexp->menu-entry): Try match device-subvol and include in menu-entry.
* gnu/system/boot.scm (boot-parameters->menu-entry): Add device-subvol
value to menu-entry.
Change-Id: I3654d160f7306bb45a78b82ea6b249ff4281f739
Looking up bootloaders by name is broken because (extlinux) bootloaders
share a name. Also, bootloader-configuration data is significant to
bootloader installation, so it shouldn't just use the default values.
Installation can rely on the provenance service instead, which should be
present for the vast majority of systems.
* gnu/bootloader.scm (%bootloaders): Delete variable.
(lookup-bootloader-by-name, bootloader-modules): Delete procedures.
* guix/scripts/system.scm (install-bootloader-from-os,
install-bootloader-from-provenance): Add procedures.
(reinstall-bootloader): Remove procedure.
(switch-to-system-generation, process-command): Use
install-bootloader-from-provenance.
Change-Id: I5713a43ad4f9f32a129d980db06d70de16b03f27
* gnu/system/boot.scm (<boot-alternative>): New record.
(boot-alternative->menu-entry): New procedure.
* gnu/machine/ssh.scm (machine->boot-alternatives): Return a
boot-alternative encapsulating previous return value.
(deploy-managed-host): Get menu-entries from boot-alternatives.
(roll-back-managed-host): Get parameters from boot-alternatives.
* guix/scripts/system.scm (generation->boot-parameters): Rename to...
(generation->boot-alternative): ...this. Return a boot-alternative
encapsulating previous return value.
(profile->boot-alternatives): Rename uses as above.
(reinstall-bootloader, perform-action): Get menu-entries from
boot-alternatives.
Change-Id: Iaef0b0a3fa9240ca8315a9699bcf4a7bfe908e33
* guix/scripts/system.scm
(profile->boot-alternatives)[system->boot-parameters]: Rename, process
system and epoch, and move to...
(generation->boot-parameters): ...here.
(reinstall-bootloader): Use procedure above.
Change-Id: If31eeb4cef4f5a107a0ee5ad3f117bf38629ac38
* gnu/machine/ssh.scm (roll-back-managed-host): Factor out a
subexpression into new variable parameters.
Change-Id: I8d70684142bea736042d6c9dc8276ea7bdb9c181
Both refer to data sets returned from the remote expression, and one of them
shadowed an element of itself.
* gnu/machine/ssh.scm (machine->boot-alternatives): Rename generations
to remote-results.
Change-Id: Ibd8a3036126d9da1215cfc191884c0f54df637df
Throughout the code base, the token 'boot-parameters' refers to collection of
data that is stored on disk for each system generation. It was confusing to
use it for a list of such records. This comment imposes an alternative name.
* gnu/machine/ssh.scm (machine-boot-parameters): Rename to
machine->boot-alternatives.
(machine->boot-alternatives, roll-back-managed-host): Use
boot-alternatives instead of boot-parameters as appropriate.
* guix/scripts/system.scm (profile-boot-parameters): Rename to
profile->boot-alternatives.
(reinstall-bootloader, perform-action): Use boot-alternatives instead
of boot-parameters as appropriate.
Change-Id: Iabb04dbb39f42f989692bede7304f20a69bef9fb
* guix/scripts/system.scm (profile-boot-parameters): Rename time to
epoch to fit new procedure name.
(epoch->date-string): Move to...
* gnu/system/boot.scm (epoch->date-string): ...here.
* gnu/machine/ssh.scm (machine-boot-parameters): Rename time to epoch.
(machine-boot-parameters)[boot-parameters]: Use epoch->date-string.
Change-Id: I6a5f793567221f81edd7b2d8d9f0f3e801d1b113
The extra menu entries are already being added in each bootloaders, as
applicable.
* guix/scripts/system.scm (reinstall-bootloader)[entries]: Don't
extraneously include bootloader-configuration-menu-entries here.
Change-Id: I8a600f2a5836ab4f7db5e27e25b0b8f432c3e1e0