9

I am trying to use grub-customizer to add a custom background image and use the Ubuntu Condensed font. The preview looks fine:

enter image description here

But when I actually boot up, I get a messed-up configuration. The text is messed-up, with "unknown character" symbols appearing for the box around the boot menu options (because apparently only the default grub font has these special characters?). However, the boot options are in the Ubuntu font. There is only a black screen as the background.

I'm trying to use a 1366x768 (same as my screen res) .png as the background image. This should be compatible, right? What can I do to get a background image working?

Sorry for the wait:

Boot screen closeup showing glitched Ubuntu font and unrecognized characters Entire screen

4
  • Still , a camera-made screenshot would help. Please try to provide one.
    – nanofarad
    Nov 29, 2012 at 1:18
  • OK. I will post a photo tomorrow. Nov 29, 2012 at 3:08
  • Sorry for the delay, I need to get a piece of additional hardware (camera is SDHC, laptop can only read SD). Will post tomorrow. Nov 30, 2012 at 12:18
  • Many modern fonts are missing the box-drawing characters. On Linux Mint DejaVuSansMono has them, but the vertical box drawing character is one pixel too short, leading to a broken vertical line. The only pre-installed font on Mint 20 which does it right is FreeMono.ttf Jun 19, 2021 at 3:31

3 Answers 3

3

Info about changing GRUB font to Ubuntu-Mono that I should have found earlier:

In this question, OP tried to change font without results. Problem appears to be a bug with ascending order glyphs as per this answer.

So basically I can't use anything from the Ubuntu Font Family for my GRUB font (sad but true) until the bug is fixed.

Info about background image:

If no option is specified in /etc/default/grub, GRUB will use the first found image in /boot/grub. The image must in RGB colorspace and, if a JPEG, 8-bit. GRUB will automatically detect the screen resolution, no configuration needed, and stretch/shrink the image if necessary (from thegeekstuff.com).

So to sum up, all that was needed was for me to just go with the default font (no way around it) and edit my image in GIMP to fit the parameters.

3
  • You can use any font you like, you just need to generate it in grub .pf2 format. See: linux.org/docs/man1/grub2-mkfont.html I can also write an answer if you have difficulties. Sep 1, 2018 at 17:51
  • @WinEunuuchs2Unix The system in question has long since perished, so I may not be able to accept a new answer, but I think it might be a useful thing to have up. I believe the original problem was an issue with grub-customizer, which has probably been fixed by now. Sep 2, 2018 at 6:27
  • 1
    WindowsEscapist I notice our screen names share a theme :) On that note I've posted an answer on grub themes. I've also upvoted your question and answer as compensation for putting in my two cents worth. Sep 2, 2018 at 16:46
2

Grub Themes

The problem may have been caused by a grub customizer bug. An alternative to grub customizer (a third party program) is to use grub-themes which comes standard on every Ubuntu installation:

Grub Boot


Make Grub fonts

Even if you are just using regular grub, if you want a different font you must use grub-mkfont program first. The same holds true for Grub Customizer used by OP and Grub Themes used in first section of this answer.

Here are the fonts I have made for grub to use:

$ ll /usr/share/grub/themes/Tuxkiller2/*.pf2
-rwxrwx--- 1 root root 176923 Jun  9 16:41 /usr/share/grub/themes/Tuxkiller2/dejavu_14.pf2*
-rwxrwx--- 1 root root  20041 Jun  9 16:41 /usr/share/grub/themes/Tuxkiller2/droidlogo_bold_17.pf2*
-rwxrwx--- 1 root root  23339 Jun  9 16:41 /usr/share/grub/themes/Tuxkiller2/droidlogo_bold_20.pf2*
-rwxrwx--- 1 root root  31498 Jun  9 16:41 /usr/share/grub/themes/Tuxkiller2/droidlogo_bold_26.pf2*
-rwxrwx--- 1 root root  15244 Jun  9 16:41 /usr/share/grub/themes/Tuxkiller2/droidlogo_regular_12.pf2*
-rwxrwx--- 1 root root  19148 Jun  9 16:41 /usr/share/grub/themes/Tuxkiller2/droidlogo_regular_17.pf2*
-rwxrwx--- 1 root root 113623 Jul 11 17:05 /usr/share/grub/themes/Tuxkiller2/ubuntu_bold_italic_36.pf2*
-rwxrwx--- 1 root root  45391 Jul 11 17:08 /usr/share/grub/themes/Tuxkiller2/ubuntu_light_20.pf2*
-rwxrwx--- 1 root root  41020 Jul 11 17:16 /usr/share/grub/themes/Tuxkiller2/ubuntu_regular_18.pf2*
-rwxrwx--- 1 root root  46423 Jul 11 17:16 /usr/share/grub/themes/Tuxkiller2/ubuntu_regular_20.pf2*
-rwxrwx--- 1 root root  68602 Jul 11 16:59 /usr/share/grub/themes/Tuxkiller2/ubuntu_regular_28.pf2*

To create a font use the grub-mkfont program like this guide outlines: Increase Font in GRUB for High DPI Screens:

sudo grub-mkfont --output=/boot/grub/fonts/DejaVuSansMono24.pf2 \
  --size=24 /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf

Then in your /etc/default/grub configuration file tell it to use the new .pf2 font file:

# More readable font on high dpi screen, generated with
# sudo grub-mkfont --output=/boot/grub/fonts/DejaVuSansMono24.pf2 \
#    --size=24 /usr/share/fonts/truetype/dejavu/DejaVuSansMono.ttf
GRUB_FONT=/boot/grub/fonts/DejaVuSansMono24.pf2

Finally run:

sudo update-grub

Reply to comment: Grub themes are built into grub so use:

$ apt policy grub2-common
grub2-common:
  Installed: 2.02~beta2-36ubuntu3.18
  Candidate: 2.02~beta2-36ubuntu3.18
  Version table:
 *** 2.02~beta2-36ubuntu3.18 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial-updates/main amd64 Packages
        100 /var/lib/dpkg/status
     2.02~beta2-36ubuntu3 500
        500 http://ca.archive.ubuntu.com/ubuntu xenial/main amd64 Packages
7
  • 1
    When I do apt policy grub-themes I get unable to locate package so I'm perplexed by the statement "comes standard in every Ubuntu installation"! If this tool was used to make that awesome grub screen, please tell me where to get it! Sep 2, 2018 at 18:17
  • @OrganicMarble Excellent comment I forgot I went through the same mind-bending exercise. I've added new section in the answer to reply to your comment. However I think I may have to post a tutorial on how to create a grub theme. Sep 2, 2018 at 18:23
  • @OrganicMarble I just changed apt policy from grub to grub2-common. First time and second time was wrong name. :( Sep 2, 2018 at 18:29
  • Thanks! I've googled grub themes and now understand this better. +1 for introducing this concept to me, if for no other reason. Sep 2, 2018 at 18:49
  • 1
    @WindowsEscapist You're welcome for the work. I agree leaving the accepted answer is best. My intention was to only share a little bit of what I learned this year about generating Grub Fonts. I haven't tried grub customizer yet but can certainly appreciate it's broad appeal after scratching my head over some grub scenarios such as hidden menus, timeouts, next reboot, get/save environment and even compiling the code for EFI 64-bit. If I may say thank you for your kind words and taking time to reflect. Sep 6, 2018 at 0:50
0

A very detailed information is available in the following page. Just follow the instructions.

http://members.iinet.net/~herman546/p20/GRUB2%20Splashimages.html

Hope it helps.

4
  • Just a quick question - the page was last current for Lucid Lynx. Does this impact anything? Dec 1, 2012 at 21:44
  • Please see the FAQ about adding bare links. Thank you for the help regardless - much appreciated. Dec 2, 2012 at 0:35
  • Link only answers are discouraged in Ask Ubuntu. The reason being that the link could become abandoned in the future. As it turns out the link here is not found. Please see my answer just posted as a comparison. Below the link I've included the essential parts of what it contains. This is insurance if one day the link is no longer supported by the author / organization. Sep 2, 2018 at 16:51
  • Also downvoting this until information from the link is incorporated. The relevant section of the page in question can be found on archive.org (although it doesn't directly answer the question). Sep 3, 2018 at 20:17

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .