How-to Guide: Custom Image and Font Color in Grub2

Write tutorials for Linux Mint here
More tutorials on https://github.com/orgs/linuxmint/discu ... /tutorials and (archive) on https://community.linuxmint.com/tutorial
Forum rules
Don't add support questions to tutorials; start your own topic in the appropriate sub-forum instead. Before you post read forum rules
Post Reply
User avatar
twodogs
Level 4
Level 4
Posts: 320
Joined: Sat Jun 09, 2007 9:18 pm

How-to Guide: Custom Image and Font Color in Grub2

Post by twodogs »

This tutorial will show you how to have a custom image in Grub2 with custom font colors. This is very easy to achieve and I will show you every step.
Warning: It's looks totally geeky. ;)

I am using Linux Mint 14 Nadia Cinnamon 64-bit on an Asus U56E laptop.

I like everything to match (wallpaper, lock screen, mdm, and Grub). During the boot process my screen shows one image!
This tutorial is for a Grub2 menu, with an image for the background and colored text.

Please excuse the images. I took them with my cell phone so I could get a quick picture of my Grub2.
This is my customized Grub2 screen.
Image

On to the tutorial...

1) The image used in this tutorial was found in a Linux distro I downloaded off of Distrowatch. Sorry I don't remember the distro name or the artist who created it. All I did was change the orange to green, added 'black viper' and cropped it to my screen resolution. I copied this image from
/home/username/Pictures/Wallpapers and put it in /usr/share/pixmaps so Grub can use it. Copy your image and do the same.

Code: Select all

gksu nemo /
2) I highly recommend 'Grub-Customizer.' It is very good, but it does have one fault though. I will explain later.
Get 'Grub-Customizer' from the repository with..

Code: Select all

sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
3) Start 'Grub-Customizer.'
a) Under the 'General Settings' tab, make sure 'show menu' is checked.
b) Adjust 'Timeout' to whatever you like (default is 10 but you may want 3 or 5)
c) Under the 'Appearance settings' tab, check 'custom resolution' and enter your resolution like this --> 1366x768x24 (this is my resolution).
d) Set the background image. Navigate to where you saved it and select it. You should see it in the preview window.
e) Now, this is where 'Grub-Customizer' has a fault. The 'menu colors' section is misleading. These are NOT the colors for the menu. These
are the colors of the Grub text (the title at the top and the extra commands text at the bottom). I chose light-green to go with
the 'theme' of my wallpaper. You can choose any color you want. So, under 'normal font color' I changed it to light-green and
'background' is transparent. Under 'highlight font color' it is light-gray and 'background' is transparent.
f) I did not adjust font.
g) You are done in 'Grub-Customizer.' Click 'Save' and exit.

4) Your Grub2 is almost done. If you reboot right now, you will notice that the actual menu is not color coded like you would think it
should be. I was shocked when I rebooted and it was ugly gray and not my geeky light-green color. So I did some exploring!
a) You have to manually edit a root file.

Code: Select all

sudo gedit /etc/grub.d/06_mint_theme
Enter your password and gedit will open this file for you.
b) On lines 8 and 9 you will see the color code for the menu that we want to customize.
I changed line 9 to read 'set menu_color_highlight=light-green/black'. You can choose any color you want.
Available colors to choose from..
Image
c) Update your Grub2

Code: Select all

sudo update-grub
d) Click 'Save' and exit.

5) Now is a good time to reboot and look at your handy-work. :)

PRO TIP:
When you reboot, click the down arrow on your keyboard to stop the timer. Study the Grub2 screen and see if you like everything.
If you don't, or you want to experiment by trying different colors, then hit 'c' on your keyboard. This will open the 'grub console'.
Type 'set' and hit enter. You will see the current grub settings. Suppose you don't like light-green in the menu and you want red instead.
All you do is type in 'set menu_color_highlight=red/black' and hit enter. Hit 'Esc' to immediately go back to the Grub2 screen to view your change.
You can keep going back and forth to change colors until you find the colors you like. Note: This is not permanent and your changes
will not stick (this is just a trick to save you time from rebooting alot until you find the right color). Remember which colors you
want and log back in to your desktop. To change the color of the actual menu text and highlight, go to step 4a above. Make sure
to save your change and then reboot. To change the Grub text (the title at the top and the extra commands text at the bottom)
go to step 3e and make the color change. Save and reboot.

Enjoy, and I hope you liked this tutorial! Any mistakes, typos etc. please let me know. Heck, post your Grub2 screen too!

My Grub2 screen with the 'set' command (read PRO TIP above).
Image

My login screen (MDM). Originally made by GraveyardPC and modified by me (I replaced the background image, changed some colors and modified the location of the login box to bottom center. Click here to get it. All you need to do really is replace bg.jpg with your image and put the 'custom_theme' folder in '/usr/share/mdm/themes'. Make sure you change to the new theme in the 'Login Window' tool under 'Menu>Preferences'.
Image

And my desktop!
Image

The wallpaper (without the 'black viper') is available in green and orange.
Last edited by twodogs on Fri Dec 14, 2012 10:03 am, edited 1 time in total.
User avatar
twodogs
Level 4
Level 4
Posts: 320
Joined: Sat Jun 09, 2007 9:18 pm

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by twodogs »

I found a mistake, and forgot a most important step (4c). Sorry.

I can't believe over 150 people have viewed this post and not one person has written a reply, posted a picture, or said 'kiss my butt.'
daaniyal

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by daaniyal »

I cant seem to change the font, everything else works flawlessly. Grub Customizer not good at changing the font or I am doing something wrong?

Thanks again for the guide.
User avatar
twodogs
Level 4
Level 4
Posts: 320
Joined: Sat Jun 09, 2007 9:18 pm

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by twodogs »

daaniyal wrote:I cant seem to change the font, everything else works flawlessly. Grub Customizer not good at changing the font or I am doing something wrong?

Thanks again for the guide.
Did you select a different font and verify in the box that was the font you want (including style and size)?
Most important part... Did you click the save button? I have forgotten to do this before myself. Double check!

Hope this helps!
Gandalf Olorin

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by Gandalf Olorin »

How do you start grub customizer? I can't find it anyware on my machine! :x
User avatar
twodogs
Level 4
Level 4
Posts: 320
Joined: Sat Jun 09, 2007 9:18 pm

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by twodogs »

Gandalf Olorin wrote:How do you start grub customizer? I can't find it anyware on my machine! :x
I am assuming you are using Cinnamon. Go to the 'Menu' button. Click it. Look under 'Preferences' and you should see Grub Customizer. Everything is in alphabetical order. :)
Gandalf Olorin

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by Gandalf Olorin »

twodogs wrote:
Gandalf Olorin wrote:How do you start grub customizer? I can't find it anyware on my machine! :x
I am assuming you are using Cinnamon. Go to the 'Menu' button. Click it. Look under 'Preferences' and you should see Grub Customizer. Everything is in alphabetical order. :)
Thanx Twodogs! :oops: I appreciate your time and patience. Yes I'm using Linux Mint 14 Nadia Cinnamon. It finally came up
after I rebooted my machine. :oops: Now I am trying to get a picture on the grub screen, no success. does the picture
have to be a jpeg,png or bmp? And where in the file tree do I put the picture file?
Thanx!
Ps Sorry for the run on sentances, I suffer from severe dyslexia.
User avatar
twodogs
Level 4
Level 4
Posts: 320
Joined: Sat Jun 09, 2007 9:18 pm

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by twodogs »

Gandalf Olorin wrote:
Thanx Twodogs! :oops: I appreciate your time and patience. Yes I'm using Linux Mint 14 Nadia Cinnamon. It finally came up
after I rebooted my machine. :oops: Now I am trying to get a picture on the grub screen, no success. does the picture
have to be a jpeg,png or bmp? And where in the file tree do I put the picture file?
Thanx!
Ps Sorry for the run on sentances, I suffer from severe dyslexia.
You don't have to reboot. Just 'restart' Cinnamon. To do that, click the little 'up arrow' icon to the left of the clock. It's under the 'Troubleshoot' menu.

The picture...
Hit 'alt + F2' and enter 'gksu nemo /' without the quotes. Hit enter and type in password.
I navigate to '/usr/share/pixmaps' and put my picture in a folder I created called simply 'bg.' The image can be png or jpg.

Pro tip - I take a screenshot of my desktop with nothing on it and the panel temporary on auto-hide. This gives me an image with the right resolution.

In Grub Customizer, select the image as your background. :)
Last edited by twodogs on Thu Jan 10, 2013 8:03 am, edited 1 time in total.
Gandalf Olorin

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by Gandalf Olorin »

Ok this is turned into a cluster-
Code: Select all
sudo gedit /etc/grub.d/06_mint_theme
All I get is a blank page. When I bring up customizer it shows the menu font and picture, but when i save and
reboot, the grub comes up in complete gibberish and no picture. sorry I'm at a total loss here :?
I've tried to follow your instructions to the letter but no luck.
Thanx anyway.
jsalpha2

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by jsalpha2 »

twodogs Thanks for the tutorial. I am running Mint 14 Xfce and for me 4) a was sudo gedit /etc/grub.d/14_mint_theme.
Grub Customizer let me put a wallpaper behind the menu and increase font size, but I was going nuts with the white fonts until I found your post.
User avatar
mhbell
Level 2
Level 2
Posts: 50
Joined: Wed Dec 07, 2011 6:29 pm
Location: Ogden Utah USA
Contact:

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by mhbell »

Has anyone got this to work correctly in Mint 15 with cinnamon? I managed to install it and increased the font size but have not been able to get the colors or the picture to display on boot up. I get just a plain Black background with white fonts. Any help appreciated.
Tia
Mel
:(
User avatar
twodogs
Level 4
Level 4
Posts: 320
Joined: Sat Jun 09, 2007 9:18 pm

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by twodogs »

mhbell wrote:Has anyone got this to work correctly in Mint 15 with cinnamon? I managed to install it and increased the font size but have not been able to get the colors or the picture to display on boot up. I get just a plain Black background with white fonts. Any help appreciated.
Tia
Mel
:(
Follow the tutorial very closely. Should work. ;)
User avatar
mhbell
Level 2
Level 2
Posts: 50
Joined: Wed Dec 07, 2011 6:29 pm
Location: Ogden Utah USA
Contact:

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by mhbell »

:(
Follow the tutorial very closely. Should work. ;)
I got the picture to work but now I get a white dashed line all around the menu choice's Other than that it is working great.
Mel
:)
MagicMint

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by MagicMint »

mhbell wrote:I got the picture to work but now I get a white dashed line all around the menu choice's Other than that it is working great.
That’s not the fault of grub-customizer but a general problem with fonts in grub. I ran into that problem when I was doing the same kind of customization manually. Most fonts won’t display the menu borders correctly, so you have to choose the right one: see [url=http://community.linuxmint.com/tutorial/view/1357]HOWTO Embellish the Boot Screen (grub2)[/url].
User avatar
mhbell
Level 2
Level 2
Posts: 50
Joined: Wed Dec 07, 2011 6:29 pm
Location: Ogden Utah USA
Contact:

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by mhbell »

Thank You Magic Mint
I will try changing fonts as per your tutorial. (Edit Update) I changed fonts and Picture as per your Tutorial. It worked great and the fonts and border are perfect Thanks again and thanks also to twodogs. Both tutorials are great and so is the Gui program.
Mel :)
User avatar
twodogs
Level 4
Level 4
Posts: 320
Joined: Sat Jun 09, 2007 9:18 pm

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by twodogs »

This is twodogs here. Just to let you know, this tutorial works on Linux Mint 17.1 XFCE! Rock on! out.
in-gold

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by in-gold »

How do I get rid of the box around the menu? It detracts from my photo.
MagicMint

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by MagicMint »

in-gold wrote:How do I get rid of the box around the menu? It detracts from my photo.
Unfortunately, there is no easy way to do so, unless you re-compile grub from an accordingly modified source :(
User avatar
TursonX
Level 3
Level 3
Posts: 116
Joined: Thu May 26, 2016 1:36 am

Re: How-to Guide: Custom Image and Font Color in Grub2

Post by TursonX »

Hi.
I have not grub-customizer.
I could change the menu font colors of GRUB, after knowing that '/boot/grub/grub.cfg' takes through 'sudo update-grub' the colors of any file named: 05_debian_theme , 06_mint_theme, and even from their saved original files .bak extension. Eg: 06_mint_theme.bak or 06_mint_theme.disable. Forcing the last one in order. These files located in '/etc/grub.d/'.

I wonder. How could '/boot/grub/grub.cfg' denies the colors from 06_mint_theme.bak?

I had to add the # character to these lines on 06_mint_theme.bak:
#set menu_color_normal=white/black
#set menu_color_highlight=white/light-gray

And after in Terminal sudo update-grub

Or better, If I don't want modify the backup file .bak there, then I can remove execute permissions (all user entities) for that file, thus:
sudo chmod -v a-x /etc/grub.d/06_mint_theme.bak
And after in Terminal sudo update-grub

Then so, grub.cfg can only take the modified colors from my custom: 06_mint_theme.
LM 18 Mate x64 » kernel 4.4.0-165-generic » MSI 760GM-P34 » video onboard Ati Radeon HD 3000 » AMD Athlon II X2 240 » 4GB RAM ddr3 hynix » HDD WD Sata II
Post Reply

Return to “Tutorials”