--- Begin Message ---
Subject: |
[PATCH] gnu: grub: Fix unicode font loading when booting over TFTP. |
Date: |
Sun, 13 Dec 2020 18:25:24 +0100 |
* gnu/bootloader/grub.scm (font-file): Using (canonicalize-path), as symlinks
from a bootloader profile do not work on a tftp server when network booting.
---
gnu/bootloader/grub.scm | 15 ++++++++++++---
1 file changed, 12 insertions(+), 3 deletions(-)
diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
index af7b7561ff..3177452dfb 100644
--- a/gnu/bootloader/grub.scm
+++ b/gnu/bootloader/grub.scm
@@ -191,9 +191,18 @@ fi~%"
(define font-file
(let* ((bootloader (bootloader-configuration-bootloader config))
(grub (bootloader-package bootloader)))
- (normalize-file (file-append grub "/share/grub/unicode.pf2")
- store-mount-point
- store-directory-prefix)))
+ ;; The bootloader-package may be a profile with only symlinks.
+ ;; If network booting, then a symlink to the font may not work on the
+ ;; server side. Therefore we canonicalize the file name of the font.
+ ;; TODO: The font gets installed by (install-grub-efi-netboot) and
+ ;; (install-grub-efi). The installed font could be referred to as
+ ;; "unicode". But it is currently unclear if (install-grub-disk-image)
+ ;; and (install-grub) both install the font as well.
+ ;; Actually this should be preferred.
+ #~(canonicalize-path
+ #+(normalize-file (file-append grub "/share/grub/unicode.pf2")
+ store-mount-point
+ store-directory-prefix))))
(define image
(normalize-file (grub-background-image config)
--
2.29.2
--- End Message ---
--- Begin Message ---
Subject: |
Re: [PATCH] gnu: grub: Fix unicode font loading when booting over TFTP. |
Date: |
Mon, 14 Dec 2020 23:35:10 +0100 |
Hi Stefan,
your patch file arrived mangled in my mailbox.
On Sun, 13 Dec 2020 18:25:24 +0100
Stefan <stefan-guix@vodafonemail.de> wrote:
>diff --git a/gnu/bootloader/grub.scm b/gnu/bootloader/grub.scm
>index af7b7561ff..3177452dfb 100644
>--- a/gnu/bootloader/grub.scm
>+++ b/gnu/bootloader/grub.scm
>@@ -191,9 +191,18 @@ fi~%"
> (define font-file
For example, the original source file had here two spaces before the "define".
But the Patch format needs one control character in front.
In this case (for the Context mark), the control character should also be a
space.
That means there should be three spaces there. But there are two spaces there.
It goes on similarly in the entire patch file.
I've fixed it up manually and pushed to guix master--but you might want
to look into why this happens in general before something important gets
mangled.
pgploI3kuXfNc.pgp
Description: OpenPGP digital signature
--- End Message ---