Commit graph

55 commits

Author SHA1 Message Date
Josselin Poiret adce91a3ec
gnu: system: Add LUKS2 support for the root file system.
* gnu/bootloader/grub.scm (grub-configuration-file): Add 'insmod
luks2'.
* gnu/system/mapped-devices.scm (open-luks-device): Create
'/run/cryptsetup/' directory.

Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2021-12-01 17:51:37 +01:00
Maxim Cournoyer da4e409483
Migrate to the new 'targets' field of bootloader-configuration.
The old 'target' field is deprecated; adjust the sources to use the new
'targets' one instead.

* doc/guix-cookbook.texi<target>: Replace by 'targets'.
* gnu/bootloader/grub.scm: Likewise.
* gnu/installer/parted.scm: Likewise.
* gnu/machine/digital-ocean.scm: Likewise.
* gnu/system/examples/asus-c201.tmpl: Likewise
* gnu/system/examples/bare-bones.tmpl: Likewise
* gnu/system/examples/bare-hurd.tmpl: Likewise
* gnu/system/examples/beaglebone-black.tmpl: Likewise
* gnu/system/examples/desktop.tmpl: Likewise
* gnu/system/examples/docker-image.tmpl: Likewise
* gnu/system/examples/lightweight-desktop.tmpl: Likewise
* gnu/system/examples/vm-image.tmpl: Likewise
* gnu/system/examples/yggdrasil.tmpl: Likewise
* gnu/system/hurd.scm: Likewise
* gnu/system/images/hurd.scm: Likewise
* gnu/system/images/novena.scm: Likewise
* gnu/system/images/pine64.scm: Likewise
* gnu/system/images/pinebook-pro.scm: Likewise
* gnu/system/images/rock64.scm: Likewise
* gnu/system/install.scm: Likewise
* gnu/system/vm.scm: Likewise
* gnu/tests.scm: Likewise
* gnu/tests/ganeti.scm: Likewise
* gnu/tests/install.scm: Likewise
* gnu/tests/nfs.scm: Likewise
* gnu/tests/telephony.scm: Likewise
* tests/boot-parameters.scm: Likewise
* tests/system.scm: Likewise
2021-08-29 01:05:26 -04:00
Tobias Geerinckx-Rice 816a5ecdc8
bootloader: grub: Fix typo in docstring.
* gnu/bootloader/grub.scm (install-grub-efi-netboot): Fix typo.
2021-04-10 14:11:33 +02:00
Stefan b57056a9fd
gnu: grub: Use installed unicode font.
* gnu/bootloader/grub.scm (setup-gfxterm): Remove parameter font-file.
Refer to the installed font in /boot, not in the store.
(font-file): Delete obsolete function.
(install-grub): When populating a disk-image, install the unicode font, too.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2021-01-17 15:47:59 +01:00
Miguel Ángel Arruga Vivas f00e68ace0
system: Allow separated /boot and encrypted root.
* gnu/bootloader/grub.scm (grub-configuration-file): New parameter
store-crypto-devices.
[crypto-devices]: New helper function.
[builder]: Use crypto-devices.
* gnu/machine/ssh.scm (roll-back-managed-host): Use
boot-parameters-store-crypto-devices to provide its contents to the
bootloader configuration generation process.
* gnu/tests/install.scm (%encrypted-root-not-boot-os,
%encrypted-root-not-boot-os): New os declaration.
(%encrypted-root-not-boot-installation-script): New script, whose contents
were initially taken from %encrypted-root-installation-script.
(%test-encrypted-root-not-boot-os): New test.
* gnu/system.scm (define-module): Export
operating-system-bootoader-crypto-devices and
boot-parameters-store-crypto-devices.
(<boot-parameters>): Add field store-crypto-devices.
(read-boot-parameters): Parse store-crypto-devices field.
[uuid-sexp->uuid]: New helper function extracted from
device-sexp->device.
(operating-system-bootloader-crypto-devices): New function.
(operating-system-bootcfg): Use
operating-system-bootloader-crypto-devices to provide its contents to
the bootloader configuration generation process.
(operating-system-boot-parameters): Add store-crypto-devices to the
generated boot-parameters.
(operating-system-boot-parameters-file): Likewise to the file with
the serialized structure.
* guix/scripts/system.scm (reinstall-bootloader): Use
boot-parameters-store-crypto-devices to provide its contents to the
bootloader configuration generation process.
* tests/boot-parameters.scm (%default-store-crypto-devices): New
variable.
(%grub-boot-parameters, test-read-boot-parameters): Use
%default-store-crypto-devices.
(tests store-crypto-devices): New tests.
2020-12-21 18:41:11 +01:00
Ludovic Courtès 7a2897149d
Revert "gnu: grub: Fix unicode font loading when booting over TFTP."
This reverts commit 03fb57ff77, which
breaks most system tests.  Specifically, grub.cfg.drv fails to build:

  ERROR: In procedure canonicalize-path:
  In procedure canonicalize-path: No such file or directory
2020-12-15 17:32:09 +01:00
Stefan 03fb57ff77
gnu: grub: Fix unicode font loading when booting over TFTP.
* gnu/bootloader/grub.scm (eye-candy)(font-file): Fix unicode font loading
when booting over TFTP.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-12-14 23:33:22 +01:00
Maxim Cournoyer b0afa3c5f6
bootloader: grub: Skip install-grub-efi when producing a disk image.
Fixes <http://issues.guix.gnu.org/44353>.

Every bootloader should try their best to install themselves using only the
MOUNT-POINT and otherwise do nothing.  This requirement comes from the
necessity to call INSTALL-GRUB when installing the (non-EFI) GRUB bootloader,
which needs to populate the root file system with extra modules that cannot be
fit in the core.img file, limited in size to 491520 bytes (by the i386-pc
format required for legacy BIOS compatibility).

As introducing bootloader knowledge at the level of the image code is
undesirable, every bootloader should be adapted to support this fall-back for
their installation procedure (TODO).

* gnu/bootloader/grub.scm (install-grub-efi)[efi-dir]: Skip when the EFI-DIR
argument is set to #f.
2020-11-17 15:20:03 -05:00
Miguel Ángel Arruga Vivas f445bc6576
system: Generate grub locale directory for grub.cfg.
* gnu/bootloader/grub.scm (grub-locale-directory): New function.
(grub-configuration-file)[locale-config]: Use grub-locale-directory and
avoid the extra search when eye-candy have performed it.
2020-11-01 01:14:36 +01:00
Miguel Ángel Arruga Vivas 222a630e9e
system: Fix dependency for grub.cfg generation.
* gnu/bootloader/grub.scm (eye-candy)[font-file]: Use the bootloader
package provided with the configuration.
2020-10-30 22:34:03 +01:00
Miguel Ángel Arruga Vivas c69a1c27ee
system: Fix grub keymap with store in btrfs subvolume.
* gnu/bootloader/grub.scm (grub-configuration-file)
[keyboard-layout-config]: Use normalize-file.
2020-10-30 22:33:58 +01:00
Miguel Ángel Arruga Vivas cfe9c7eceb
system: Use locale information in grub.cfg.
* gnu/bootloader/grub.scm (define-module): Add new dependency.
(grub-configuration-file): Add locale keyword.
(grub-configuration-file)[locale-config]: New variable with generated
locale configuration when locale parameter has been provided.
[builder]: Add locale-config.
2020-10-18 15:33:05 +02:00
Stefan c85f316ae9
gnu: grub: Support for network boot via TFTP.
* gnu/bootloader/grub.scm (grub-efi-netboot-bootloader): New variable.
(install-grub-efi-netboot): New procedure.
(grub-root-search): Update comment.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-09-27 13:38:35 +02:00
Stefan 8c4f1aa85f
gnu: grub: Support loading files from TFTP if the root filesystem is NFS.
* gnu/bootloader/grub.scm (grub-root-search): Set the root to "(tftp)" if
the searched-for file is stored on NFS.
2020-09-14 14:25:04 +02:00
Stefan f70c2bd900
bootloader: Use "define" instead of "define*" for all records.
* gnu/bootloader/grub.scm (grub-minimal-bootloader): Use "define".
(grub-efi-bootloader): Use "define".
(grub-mkrescue-bootloader): Use "define".

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-09-07 00:19:54 +02:00
Stefan 3f2bd9df41
bootloader: Add comment about grub configuration files.
* gnu/bootloader/grub.scm: Add comment about grub configuration files.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2020-09-06 15:55:10 +02:00
Mathieu Othacehe 80352a2f68
bootloader: grub: Fix cross-compilation.
This is a follow-up of 536c53d347, that do not
use the native version of "font-file", breaking cross-compilation.

* gnu/bootloader/grub.scm (eye-candy): Use the native version of "font-file".
2020-06-09 18:49:36 +02:00
Stefan 536c53d347
gnu: grub: Support graphical gfxterm on all systems.
* gnu/bootloaders/grub.scm (eye-candy): Use gfxterm depending only on
(bootloader-configuration (terminal-outputs …)), which defaults to '(gfxterm).
This makes the system argument obsolete.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2020-06-09 17:18:21 +02:00
Jan (janneke) Nieuwenhuizen 1244491a0d
bootloader: grub: Add support for multiboot.
* gnu/bootloader/grub.scm (grub-configuration-file): Add support for
multiboot.
2020-06-08 13:51:18 +02:00
Maxim Cournoyer e7b86a0d88
bootloader: grub: Rename the btrfs-subvolume-file-name parameter.
Following discussion in <https://issues.guix.gnu.org/37305>, it seems more
appropriate to give the parameter a more generic name that better describes
what it does.

* gnu/bootloader/grub.scm (normalize-file): Rename the
BTRFS-SUBVOLUME-FILE-NAME parameter to STORE-DIRECTORY-PREFIX, and always
assume this argument to be a string.
(eye-candy): Likewise.  Default STORE-DIRECTORY-PREFIX to "".
(grub-configuration-file): Likewise.
* gnu/system.scm (operating-system-bootcfg): Adapt.
2020-05-29 21:48:59 -04:00
Mathieu Othacehe 7202895e5a
bootloader: grub: Use inheritance to define grub-minimal-bootloader.
* gnu/bootloader/grub.scm (grub-minimal-bootloader): Inherit from
grub-bootloader to avoid field redefinition.
2020-05-29 08:40:03 +02:00
Mathieu Othacehe 7e6a42f215
bootloader: grub: Do not run grub-install when creating a disk-image.
* gnu/bootloader/grub.scm (install-grub): When creating a disk-image,
grub-install will fail because it lacks root permissions. In that case, do not
run grub-install and only copy Grub modules to the /boot directory.
2020-05-29 08:40:00 +02:00
Mathieu Othacehe 7feefb3b82
bootloader: Add 'disk-image-installer'.
* 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.
2020-05-29 08:37:13 +02:00
Maxim Cournoyer b460ba7992
bootloader: grub: Allow booting from a Btrfs subvolume.
* gnu/bootloader/grub.scm (strip-mount-point): Remove procedure.
(normalize-file): Add procedure.
(grub-configuration-file): New BTRFS-SUBVOLUME-FILE-NAME parameter.  When
defined, prepend its value to the kernel and initrd file names, using the
NORMALIZE-FILE procedure.  Adjust the call to EYE-CANDY to pass the
BTRFS-SUBVOLUME-FILE-NAME argument.  Normalize the KEYMAP file as well.
(eye-candy): Add a BTRFS-SUBVOLUME-FILE-NAME parameter, and use it, along with
the NORMALIZE-FILE procedure, to normalize the FONT-FILE and IMAGE nested
variables.  Adjust doc.
* gnu/bootloader/depthcharge.scm (depthcharge-configuration-file): Adapt.
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Likewise.
* gnu/system/file-systems.scm (btrfs-subvolume?)
(btrfs-store-subvolume-file-name): New procedures.
* gnu/system.scm (operating-system-bootcfg): Specify the Btrfs
subvolume file name the store resides on to the
`operating-system-bootcfg' procedure, using the new
BTRFS-SUBVOLUME-FILE-NAME argument.
* doc/guix.texi (File Systems): Add a Btrfs subsection to document the use of
subvolumes.
* gnu/tests/install.scm (%btrfs-root-on-subvolume-os)
(%btrfs-root-on-subvolume-os-source)
(%btrfs-root-on-subvolume-installation-script)
(%test-btrfs-root-on-subvolume-os): New variables.
2020-05-20 08:30:35 -04:00
Stefan 9cdb10d52e
gnu: grub: Allow a PNG image and replace "aspect-ratio" with "resolution".
* gnu/bootloaders/grub.scm (<grub-image>): Remove this record and replace it
by ...
(<grub-theme>)[image]: ... this field with the default from %background-image,
(<grub-theme>)[resolution]: ... this field with the defaults from 'width' and
'height' of 'grub-background-image'.
(<grub-theme>)[images]: Remove this field.
(svg->png): Rename to ...
(image->png): ... and use 'copy-file' instead of 'svg->png', if the suffix of
the image file is not ".svg".
(grub-background-image): Remove the arguments 'width' and 'height'.
(grub-theme-image): Add function.
(grub-theme-resolution): Add function.
(grub-theme-gfxmode): Add function.
(grub-image): Remove function.
(grub-image?): Remove function.
(grub-image-aspect-ratio): Remove function.
(grub-image-file): Remove function.
(grub-theme-images): Remove function.
(%default-theme): Remove variable.
(%background-image): Remove variable.

Using image formats different to SVG was not possible.

For a <grub-image> to be chosen, the 'aspect-ratio' of it had to be 4/3, as the
resolution of any image was defaulting to 1024 x 768.

There was no code to determine the proper boot-resolution to make any use of a
list of images with different aspect-ratios.

It seems to be a better solution to only define a single image with any format,
and use a given resolution only for the conversion from a SVG file. This also
makes the use of a special <grub-image> record unnecessary.

Moving the default values from '%background-image' and '%default-theme' into
<grub-theme> makes a customisation easier without (inherit) and allows to remove
the undocumented variables %background-image' and '%default-theme'.

Signed-off-by: Mathieu Othacehe <othacehe@gnu.org>
2020-05-19 09:09:21 +02:00
Ludovic Courtès 8cf7dd24ab
bootloader: grub: Refer to the native 'grub-mklayout' and font file.
* gnu/bootloader/grub.scm (eye-candy): Refer to the native FONT-FILE.
(keyboard-layout-file): Refer to the native 'grub-mklayout'.
2020-05-16 00:34:40 +02:00
Marius Bakke 2778302399
Merge branch 'master' into core-updates
Conflicts:
	etc/news.scm
	gnu/local.mk
	gnu/packages/check.scm
	gnu/packages/cross-base.scm
	gnu/packages/gimp.scm
	gnu/packages/java.scm
	gnu/packages/mail.scm
	gnu/packages/sdl.scm
	gnu/packages/texinfo.scm
	gnu/packages/tls.scm
	gnu/packages/version-control.scm
2020-04-08 13:00:50 +02:00
Ludovic Courtès 2729cb406d
system: Allow for comma-separated keyboard layouts.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

* gnu/bootloader/grub.scm (keyboard-layout-file): Replace commas with
hyphens in the first argument to 'computed-file'.
* gnu/system/keyboard.scm (keyboard-layout->console-keymap): Likewise.
* doc/guix.texi (Keyboard Layout): Add example.
2020-04-06 00:14:13 +02:00
Jan Nieuwenhuizen 6a790fe349
gnu: bootloader: Add grub-minimal-bootloader.
* gnu/bootloader/grub.scm (grub-minimal-bootloader): New variable.
2020-03-29 15:31:18 +02:00
Maxim Cournoyer 6794653e1b
bootloader: grub: Refactor eye-candy a bit.
* gnu/bootloader/grub.scm (eye-candy)[setup-gfxterm-body]: Define the GFXMODE
binding using AND-LET* instead of chained AND=>.  Add a comment about
supporting graphical mode on other systems than x86.  Generate configuration
string using FORMAT rather than STRING-APPEND.
2020-03-17 23:09:14 -04:00
Maxim Cournoyer aaffde38b5
bootloader: grub: Use the all_video module in graphic mode.
* gnu/bootloader/grub.scm (eye-candy): Load the module 'all_video'
which automatically loads all the available and relevant video
modules.
2020-03-17 23:08:16 -04:00
Jan Nieuwenhuizen f52fe7c3f2
bootloader: grub: Add gfxmode (resolution) override.
* gnu/bootloader/grub.scm (<grub-theme>): Add `gfxmode' entry.
(eye-candy): Use it.
* doc/guix.texi (Bootloader Configuration): Document it.
2020-01-25 16:09:12 +01:00
Tobias Geerinckx-Rice 8e8d45e6ac
Revert "bootloader: grub: Add gfxmode (resolution) override."
This reverts commit a23091880d.
It causes ‘guix pull’ to fail: <https://paste.debian.net/plain/1125061>.
2020-01-07 23:31:44 +01:00
Jan Nieuwenhuizen a23091880d
bootloader: grub: Add gfxmode (resolution) override.
* gnu/bootloader/grub.scm (<grub-theme>): Add `gfxmode' entry.
(eye-candy): Use it.
* doc/guix.texi (Bootloader Configuration): Document it.
2020-01-07 21:26:28 +01:00
Ludovic Courtès 6a7c4636d4
Adjust module autoloads.
In Guile < 2.9.7, autoloading a module would give you access to all its
bindings.  In future versions, autoloading a module gives access only to
the listed bindings, as per #:select (see <https://bugs.gnu.org/38895>).

This commit adjusts autoloads to the new semantics, allowing Guix to be
built with Guile 2.9.7/2.9.8.

* guix/build/download.scm <top level>: Remove call to 'module-autoload!'.
(load-gnutls): New procedure.
(tls-wrap): Call it.
* guix/git.scm <top level>: Remove call to 'module-autoload!'.
(load-git-submodules): New procedure.
(update-submodules): Call it instead of 'resolve-interface'.
* gnu/bootloader/grub.scm: Replace #:autoload with #:use-module.
* gnu/packages.scm: Likewise.
* gnu/packages/ssh.scm: Likewise.
* gnu/packages/tex.scm: Likewise.
* gnu/services/cuirass.scm: Likewise.
* gnu/services/mcron.scm: Likewise.
* guix/lint.scm: Augment list of bindings in #:autoload.
* guix/scripts/build.scm: Likewise.
* guix/scripts/gc.scm: Likewise.
* guix/scripts/pack.scm: Likewise.
* guix/scripts/publish.scm: Likewise.
* guix/scripts/pull.scm: Likewise.
* guix/utils.scm: Remove unnecessary #:autoload clauses; replace one
of them with #:use-module.
2020-01-06 16:31:54 +01:00
Ludovic Courtès 9512ba6b09
bootloader: Mark "grub.cfg" and "extlinux.conf" as non-substitutable.
Suggested by <pkill9@runbox.com>.

* gnu/bootloader/grub.scm (grub-configuration-file): Pass #:options to
'computed-file'.
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Likewise.
2020-01-03 16:06:26 +01:00
Brice Waegeneire b0d09586b1
bootloader: grub: Add firmware setup entry.
* gnu/bootloader/grub.scm (grub-configuration-file): Add 'Firmware
setup' entry for EFI platform.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
2019-12-23 09:28:42 +01:00
Ludovic Courtès cae0725b80
bootloader: grub: Remove unneeded 'terminal_output'.
Fixes <https://bugs.gnu.org/35585>.
Reported by Florian Pelz <pelzflorian@pelzflorian.de>.

This statement was added in 8d058e7b1b but
turned out to be unnecessary.

* gnu/bootloader/grub.scm (grub-configuration-file): Remove
'terminal_output' statement.
2019-05-09 12:11:36 +02:00
Ludovic Courtès 8d058e7b1b
bootloader: Add a 'keyboard-layout' field.
* gnu/bootloader/grub.scm (keyboard-layout-file): New procedure.
(grub-configuration-file)[keyboard-layout-file]: New variable.
[builder]: Use it.
* gnu/bootloader.scm (<bootloader-configuration>)[keyboard-layout]: New
field.
* doc/guix.texi (Bootloader Configuration): Document it.

Co-authored-by: nee <nee-git@hidamari.blue>
2019-03-24 23:06:11 +01:00
Ludovic Courtès 21fcfe1ee9
bootloader: Use 'invoke/quiet' when running 'grub-install' and co.
This hides potentially confusing GRUB messages from the user, such as
"Installing for i386-pc platform."

* gnu/bootloader/extlinux.scm (install-extlinux): Use 'invoke/quiet'
instead of 'system*' and 'error'.
* gnu/bootloader/grub.scm (install-grub, install-grub-efi): Likewise.
* guix/scripts/system.scm (bootloader-installer-script): Guard against
'message-condition?' and handle them properly.
2019-03-16 18:15:13 +01:00
Ludovic Courtès 59e8044588
Remove traces of "GuixSD".
* gnu/bootloader/extlinux.scm (extlinux-configuration-file): Remove
mentions of "GuixSD".
* gnu/bootloader/grub.scm (install-grub-efi): Likewise.
* gnu/build/vm.scm (make-iso9660-image): Change default #:volume-id to
"Guix_image".
(initialize-hard-disk): Search for the "Guix_image" label.
* gnu/ci.scm (system-test-jobs, tarball-jobs): Remove "GuixSD".
* gnu/installer/newt/welcome.scm (run-welcome-page): Likewise.
* gnu/packages/audio.scm (supercollider)[description]: Likewise.
* gnu/packages/curl.scm (curl): Likewise.
* gnu/packages/emacs.scm (emacs): Likewise.
* gnu/packages/gnome.scm (network-manager): Likewise.
* gnu/packages/julia.scm (julia): Likewise.
* gnu/packages/linux.scm (alsa-plugins): Likewise.
(powertop, wireless-regdb): Likewise.
* gnu/packages/package-management.scm (guix): Likewise.
* gnu/packages/polkit.scm (polkit): Likewise.
* gnu/packages/tex.scm (texlive-bin): Likewise.
* gnu/services/base.scm (file-systems->fstab): Likewise.
* gnu/services/cups.scm (%cups-activation): Likewise.
* gnu/services/mail.scm (%dovecot-activation): Likewise.
* gnu/services/messaging.scm (prosody-configuration)[log]: Likewise.
* gnu/system/examples/vm-image.tmpl (vm-image-motd): Likewise.
* gnu/system/install.scm (installation-os)[file-systems]: Change root
file system label to "Guix_image".
* gnu/system/mapped-devices.scm (check-device-initrd-modules):
Remove "GuixSD".
* gnu/system/vm.scm (system-docker-image): Likewise.
(system-disk-image)[root-label]: Change to "Guix_image".
* gnu/tests/install.scm (run-install): Remove "GuixSD".
* guix/modules.scm (guix-module-name?): Likewise.
* nix/libstore/optimise-store.cc: Likewise.
2019-03-13 23:12:43 +01:00
Ludovic Courtès 46c296dcc4
bootloader: De-monadify configuration file generators.
* gnu/bootloader/extlinux.scm: Remove unneeded imports.
(extlinux-configuration-file): Use 'computed-file' instead of
'gexp->derivation'.
* gnu/bootloader/grub.scm (svg->png): Likewise.
(grub-background-image, eye-candy): Adjust accordingly, return
non-monadically.
(grub-configuration-file): Likewise, and use 'computed-file' instead of
'gexp->derivation'.
* gnu/bootloader/u-boot.scm: Remove unneeded imports.
* gnu/system.scm: Add 'lower-object' call.
2018-11-18 23:37:44 +01:00
Marius Bakke 683016907d
bootloader: grub-efi: Identify as "GuixSD" instead of "grub".
* gnu/bootloader/grub.scm (install-grub-efi): Pass "--bootloader-id" to grub-install.
2018-06-26 17:27:40 +02:00
Marius Bakke aa5a549c65
bootloader: grub-efi: Support EFI directories relative to MOUNT-POINT.
* gnu/bootloader/grub.scm (install-grub-efi): When MOUNT-POINT/EFI-DIR exists,
install there rather than EFI-DIR directly.
2018-06-26 17:27:40 +02:00
Ludovic Courtès 33d8a87104
bootloader: grub: Use 'with-extensions'.
* gnu/bootloader/grub.scm (svg->png): Use 'with-extensions'.  Remove
'add-to-load-path' calls.
* gnu/build/svg.scm: Use (rsvg) and (cairo) the normal way.  Remove
'module-autoload!' calls.
2018-06-01 15:21:28 +02:00
Ludovic Courtès 31a5d694a3
bootloader: grub: Simplify 'svg->png'.
* gnu/bootloader/grub.scm (svg->png): Remove now unneeded
  #:guile-for-build argument.
2018-06-01 15:21:28 +02:00
Ludovic Courtès a5acc17a3c
file-systems: Remove 'title' field and add <file-system-label>.
The 'title' field was easily overlooked and was an endless source of
confusion.  Now, the value of the 'device' field is self-contained.

* gnu/system/file-systems.scm (<file-system>): Change constructor name
to '%file-system'.
[title]: Remove.
(<file-system-label>): New record type with printer.
(report-deprecation, device-expression)
(process-file-system-declaration, file-system): New macros.
(file-system-title): New procedure.
(file-system->spec, spec->file-system): Adjust to handle
<file-system-label>.
* gnu/system.scm (bootable-kernel-arguments): Add case for
'file-system-label?'.
(read-boot-parameters): Likewise.
(mapped-device-user): Avoid 'file-system-title'.
(fs->boot-device): Remove.
(operating-system-boot-parameters): Use 'file-system-device' instead of
'fs->boot-device'.
(device->sexp): Add case for 'file-system-label?'.
* gnu/bootloader/grub.scm (grub-root-search): Add case for
'file-system-label?'.
* gnu/system/examples/bare-bones.tmpl,
gnu/system/examples/beaglebone-black.tmpl,
gnu/system/examples/lightweight-desktop.tmpl,
gnu/system/examples/vm-image.tmpl: Remove uses of 'title'.
* gnu/system/vm.scm (virtualized-operating-system): Remove uses of
'file-system-title'.
* guix/scripts/system.scm (check-file-system-availability): Likewise,
and adjust fix-it hint.
(check-initrd-modules)[file-system-/dev]: Likewise.
* gnu/build/file-systems.scm (canonicalize-device-spec): Remove 'title'
parameter.
[canonical-title]: Remove.
Match on SPEC's type rather than on CANONICAL-TITLE.
(mount-file-system): Adjust caller.
* gnu/build/linux-boot.scm (boot-system): Interpret ROOT here.
* gnu/services/base.scm (file-system->fstab-entry): Remove use of
'file-system-title'.
* doc/guix.texi (File Systems): Remove documentation of the 'title'
field.  Rewrite documentation of 'device' and document
'file-system-label'.
2018-05-28 13:24:11 +02:00
Ricardo Wurmus 46fc9a7e0d
gnu: Pass "--target=i386-pc" when installing GRUB for legacy BIOS.
* gnu/bootloader/grub.scm (install-grub): Add "--target=i386-pc" to the list
of arguments to "grub-install".

Fixes <https://debbugs.gnu.org/cgi/bugreport.cgi?bug=30311>.
2018-02-18 12:28:56 +01:00
Ludovic Courtès 9b336338cd
system: Introduce a disjoint UUID type.
Conceptually a UUID is just a bytevector.  However, there's software out
there such as GRUB that relies on the string representation of different
UUID types (e.g., the string representation of DCE UUIDs differs from
that of ISO-9660 UUIDs, even if they are actually bytevectors of the
same length).  This new <uuid> record type allows us to preserve
information about the type of UUID so we can eventually convert it to a
string using the right representation.

* gnu/system/uuid.scm (<uuid>): New record type.
(bytevector->uuid): New procedure.
(uuid): Return calls to 'make-uuid'.
(uuid->string): Rewrite using 'match-lambda*' to accept a single 'uuid?'
argument.
* gnu/bootloader/grub.scm (grub-root-search): Check for 'uuid?' instead
of 'bytevector?'.
* gnu/system.scm (bootable-kernel-arguments): Check whether ROOT-DEVICE
is 'uuid?'.
(read-boot-parameters): Use 'bytevector->uuid' when the
store device is a bytevector.
(read-boot-parameters-file): Check for 'uuid?' instead of 'bytevector?'.
(device->sexp): New procedure.
(operating-system-boot-parameters-file): Use it for 'root-device' and
'store'.
(operating-system-bootcfg): Remove conditional in definition of
'root-device'.
* gnu/system/file-systems.scm (file-system->spec): Check for 'uuid?' on
DEVICE and take its bytevector.
* gnu/system/mapped-devices.scm (open-luks-device): Likewise.
* gnu/system/vm.scm (iso9660-image): Call 'uuid-bytevector' for the
 #:volume-uuid argument.
2017-09-11 22:24:46 +02:00
Andy Wingo 2941b347b6
gnu: grub-efi-bootloader: Specialize grub-install invocation.
* gnu/bootloader/grub.scm (install-grub-efi): Fix grub-install invocation for
  EFI systems.
* gnu/system/examples/bare-bones.tmpl: Use the newer
"bootloader-configuration" syntax.
* gnu/system/examples/desktop.tmpl: Use bootloader-configuration sytax.  Also,
use the same label for the LUKS-mapped device and the root partition.  Remove
unneeded "title" field for the file-system based on LUKS; as noted in the
manual, the "title" field is ignored for mapped devices.
* gnu/system/examples/lightweight-desktop.tmpl: Use bootloader-configuration,
and use grub-efi-bootloader.
2017-08-20 11:16:42 +02:00