guix-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug#40955] [PATCH 3/5] build: bootloader: Add install-efi procedure.


From: Ludovic Courtès
Subject: [bug#40955] [PATCH 3/5] build: bootloader: Add install-efi procedure.
Date: Sat, 02 May 2020 14:16:13 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux)

Mathieu Othacehe <address@hidden> skribis:

> * gnu/build/bootloader.scm (install-efi-loader): New exported procedure. This
> is based on install-efi from (gnu build vm) module.

Please mention the two new procedures.

> * gnu/build/vm.scm (initialize-hard-disk): Adapt to use install-efi-loader.

[…]

> +(define (install-efi-loader grub-efi esp)
> +  ;; Create a tiny configuration file telling the embedded grub
> +  ;; where to load the real thing.

Could you turn that into a docstring mentioning GRUB-EFI and ESP?

> +  ;; XXX This is quite fragile, and can prevent the image from booting
> +  ;; when there's more than one volume with this label present.
> +  ;; Reproducible almost-UUIDs could reduce the risk (not eliminate it).
> +  (let ((grub-config "grub.cfg"))
> +    (call-with-output-file grub-config
> +        (lambda (port)
         ^
Indentation is off.  :-)

> +          (format port
> +                  "insmod part_msdos~@
> +               search --set=root --label Guix_image~@
> +               configfile /boot/grub/grub.cfg~%")
> +          (fsync port)))

You sure we need an ‘fsync’ call here?  Perhaps add a comment explaining
why.

Otherwise LGTM!

Ludo’.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]