grub/efi boot: load unicode font for nice looking boot splash
authorMichael Prokop <mika@grml.org>
Sat, 18 Jul 2020 19:58:49 +0000 (21:58 +0200)
committerMichael Prokop <mika@grml.org>
Sat, 18 Jul 2020 20:00:07 +0000 (22:00 +0200)
The unicode fonts are necessary to get nice rounded corners and
alike in the boot splash, so try to use it by default.

This work was funded by Grml-Forensic.

templates/grub-shim_config

index fdfba5c..5515f2e 100644 (file)
@@ -45,6 +45,16 @@ else
   return "$ret_"
 fi
 
+if [ -r "${TFTPD_DATA_DIR_}"/grub/fonts/unicode.pf2 ] ; then
+  echo "${TFTPD_DATA_DIR_}/grub/fonts/unicode.pf2 exists already, nothing to do."
+elif [ -r /usr/share/grub/unicode.pf2 ] ; then
+  echo "Installing /usr/share/grub/unicode.pf2 for TFTP usage"
+  mkdir -p "${TFTPD_DATA_DIR_}"/grub/fonts/
+  cp /usr/share/grub/unicode.pf2 "${TFTPD_DATA_DIR_}"/grub/fonts/
+else
+  echo "WARN: No unicode.pf2 for usage with PXE boot found."
+fi
+
 echo "Setting up GRUB configuration for PXE/UEFI usage"
 mkdir -p "${TFTPD_DATA_DIR_}/grub/"
 cat > "${TFTPD_DATA_DIR_}/grub/grub.cfg" << EOT
@@ -58,6 +68,8 @@ set gfxmode=auto
 insmod gfxterm
 terminal_output gfxterm
 
+loadfont unicode
+
 set menu_color_normal=white/black
 set menu_color_highlight=black/yellow