0

Coming from Grub 2.02, and upgrading to 2.04, adding it to our TFTP server for PXE booting; I built the new grub2 image as in:

 /tmp/rebuild_grub/bin/grub2-mkimage -c ./grub-embedded.cfg -p '(tftp)/blah' -o grubx64-with-embed.efi -O x86_64-efi efinet echo configfile net efinet tftp gzio part_gpt efi_gop efi_uga efifwsetup linux loadenv ls http gfxmenu chain png serial linux16 loopback udf sleep gfxterm png gfxterm_background minicmd terminal test

EDIT: as a reference, this is how it was configured for building:

./configure TARGET_LDFLAGS=-static --with-platform=efi --with-grubdir=grub2 --program-transform-name=s,grub,grub2, --disable-grub-mount --enable-grub-themes --enable-grub-mkfont --disable-werror --prefix=/tmp/rebuild_grub

The grub2 image works fine, but we always had a custom theme that shows broken fonts when using gfxterm in our grub.cfg:

terminal_output gfxterm
set gfxmode="800x600;640x480;auto"
set theme=theme.txt
...
set color_normal=white/black
set color_highlight=black/white
set menu_color_normal=white/black
set menu_color_highlight=black/white
set timeout=15
set default='Exit to EFI Shell'
set fallback='Exit to EFI Shell'
set pager=1

(here you would find our menuentry section)

When showing the menu we get this:

enter image description here

It does not seem to be font-related as we tried different themes, for example https://github.com/Generator/Grub2-themes and it shows the same behaviour.

For reference, this is what the directories look like:

[root@aimstest01 uefi]# tree
.
├── grub.cfg
├── themes
│   ├── archlogo.png
│   ├── icons
│   │   ├── arch.png
│   │   ├── debian.png
│   │   ├── fedora.png
│   │   ├── gentoo.png
│   │   ├── gnu-linux.png
│   │   ├── kubuntu.png
│   │   ├── linuxmint.png
│   │   ├── mageia.png
│   │   ├── mandriva.png
│   │   ├── opensuse.png
│   │   ├── sabayon.png
│   │   ├── ubuntu.png
│   │   └── windows.png
│   ├── menu_bkg_c.png
│   ├── menu_bkg_e.png
│   ├── menu_bkg_ne.png
│   ├── menu_bkg_n.png
│   ├── menu_bkg_nw.png
│   ├── menu_bkg_se.png
│   ├── menu_bkg_s.png
│   ├── menu_bkg_sw.png
│   ├── menu_bkg_w.png
│   ├── Sans-10.pf2
│   ├── Sans-12.pf2
│   ├── Sans-14.pf2
│   ├── sb_frame_c.png
│   ├── sb_frame_n.png
│   ├── sb_frame_s.png
│   ├── sb_thumb_c.png
│   ├── sb_thumb_n.png
│   ├── sb_thumb_s.png
│   ├── select_bkg_c.png
│   ├── select_bkg_e.png
│   ├── select_bkg_ne.png
│   ├── select_bkg_n.png
│   ├── select_bkg_nw.png
│   ├── select_bkg_se.png
│   ├── select_bkg_s.png
│   ├── select_bkg_sw.png
│   ├── select_bkg_w.png
│   ├── theme.txt
│   └── tick.png
└── x86_64-efi
    ├── command.lst
    ├── crypto.lst
    ├── fs.lst
    ├── progress.mod
    └── terminal.lst
djuarezg
  • 131
  • 1
  • 2
  • 8
  • That looks exactly like a missing font. I would start by checking the theme file. – Michael Hampton Oct 14 '20 at 16:28
  • @MichaelHampton that is exactly what I thought, so I downloaded and tested different themes, same behaviour. I even recreated the font files without any change in the appearance. – djuarezg Oct 16 '20 at 08:26

0 Answers0