Font load problem in jammy grub 2.06-2ubuntu14.1

Adam Vodopjan adam.vodopjan at gmail.com
Thu Jul 27 16:05:35 UTC 2023


As of now in jammy this piece in font.c does not work when there is no memdisk
containing the font file[1]:

  file = try_open_from_prefix ("(memdisk)", filename);
  if (!file)
    {
      const char *prefix = grub_env_get ("prefix");
      if (!prefix)
        {
          grub_error (GRUB_ERR_FILE_NOT_FOUND, N_("variable `%s' isn't set"),
                      "prefix");
          goto fail;
        }
      file = try_open_from_prefix (prefix, filename);
    }

Test:

  grub> loadfont unicode
  error: no server is specified.
  grub > lsfonts
  Loaded fonts:
  grub >

This bug was reported[2] upstream (in ubuntu context) by another person.

The source of the problem was patched upstream in e375394fb9. I see bookworm
and bullseye have the fix ported to 2.06 already:

https://git.launchpad.net/ubuntu/+source/grub2/tree/debian/patches/kern-file-Fix-error-handling-in-grub_file_open.patch?h=applied/debian/bullseye

Could the grub maintainers in ubuntu add the patch to the 2.06 branch as well?
It would be nice having it fixed in jammy.


[1] Like when installing grub as
      sudo grub-install --target x86_64-efi --no-uefi-secure-boot ..
      
[2] https://savannah.gnu.org/bugs/?63975




More information about the Ubuntu-devel-discuss mailing list