|
10 years ago 11 |
…$ sudo apt-get install grub2-splashimages ttf-unifontThe splash images will be installed in /usr/share/images/grub where you will have to choose your preferred one from, and install it manually as explained below.
grub> vbeinfoFrom the list of available resolutions, write down the greatest one for a color depth of 24 or 32 bits (True Color), depending on your display. Once done, press escape ("Esc") and let the computer boot up.
…$ sudo cp -i ~/my_background.tga /boot/grub/linuxmint.tgaYou must also register the value of its resolution into:
…$ sudo gedit /etc/default/grubwhere the GFXMODE line must match your screen resolution (with the initial # comment sign removed):
GRUB_GFXMODE=…Therein, you must also change or add in the GRUB_FONT line to look like (see next section):
GRUB_FONT=/boot/grub/fonts/unifont.pf2
…$ sudo grub-mkfont --bold -s 16 -o /boot/grub/fonts/unifont.pf2 \ /usr/share/fonts/truetype/unifont/unifont.ttfFinally, you must tell grub about all these changes made:
…$ sudo update-grubIf everything went well, i.e. when update-grub did mention linuxmint.tga and did not complain about anything else, you can reboot again to see the result — and you’re done.
This proved, along with the comments, to be a valuable guide to adding a lovely splash of color to my GRUB2 on Mint 17.3. Thank you.
Along this journey I discovered one tip about JPeG files. When you are preparing the file (to the exact screen dimensions), ensure that as you save/export, that you avoid: 'Optimized' and 'Progressive'. These prevent the image from being displayed by GRUB, you will get a black screen.
I spent a number of hours trying to add an image to grub2 using this tutorial and wasn't successful. I knew it was something simple, because after placing the image (as jpg) in /boot/grub/ and setting gfxmode in
/etc/default/grub and running update-grub the terminal was showing recognition the background image. After fooling around and trying a miriad of different things still couldn't solve the problem.
Finally decided to search for the ubuntu documentation for Grub2 (https://help.ubuntu.com/community/Grub2/Displays). Finally! My mistake was using a jpeg image file. So basically, the tutorial is good. If you just Export the image file to /boot/grub/ as png or tga your golden. So if you're using the terminal to do this you'd type: cp -i yourfile.png /boot/grub/grub_pix.png
then update-grub; restart and see the results.
The problem with using a jpeg file seems to be it has to be an 8 bit (256) rgb non-indexed file. Using the Gimp image editor I couldn't confirm this. Changing the image file to .png was the solution. I could see no difference in the image quality.
So the tutorial is good. Following jr. mints instructions worked great. Thanks! This was done in The Mint17.1 Cinammon Edition. So unless you can verify the jgeg file meets the requirements, I'd go with png.
I'd encourage anyone who's interested in installing a splashimage to get the ubuntu documentation; it helps you understand better what's going on.
I've used it to change grub's text and highlight colors too. Just follow the steps. The only thing I had to figure out was where the setting for the menu color and highlight etc. could be found. In Mint 17.1 Cinnamon edition; look in /etc/grub.d/06_mint_theme. You'll find them there.
I,m a Newbie to linux, so even with all the trials I'm having a ball. Learning to use the terminal has been fun.
Thanks again guys!
@jr_mint: Indeed, your solution would be easier if you stated it this way — without duplicating your own tutorial; a simple link would have been enough ;-) — :
’The (alphabetically) first image in /etc/default/grub would be taken as splash image (as long as GRUB_GFXMODE is appropriately defined), hence the copy operation, unless GRUB_BACKGROUND is set in /etc/default/grub.’
But the point is, we want to ‘embellish’ the boot screen :-), so the resolution of any image should MATCH that of the physical screen, and the readability of the text matters as well — hence all the detailed steps above.
Hi, if you simply want to ADD a background and change it at your will anytime without any hassle (only a command to copy the new image to the required grub directory) there is a more elegant way (and using the .jpg format instead of those huge .tga images):
01) Find your own grub PREFERED resolution, not the max resolution: reboot your machine and in the grub menu press 'c' and type:
vbeinfo
Your grub's PREFERED resolution will be the LAST ONE ON THE LIST. Press esc to continue your booting process.
02) Create somewhere a directory to store the image(s) you want to use and copy to that directory one or more images (in the .jpg format) that are either the exact same size or larger (grub will fit larger or smaller images to the resolution it is using but the detailing will not be as good as using an image with the same resolution as grub's).
03) Copy (and rename to "grub_pix.jpg") the image you want to use by opening a Terminal on the directory where the images are and type:
sudo cp -i [name of your image without brackets].jpg /boot/grub/grub_pix.jpg
04) To change grub's resolution to its PREFERED one you can from terminal open (with gedit or leafpad or other text editor) the grub's configuration file at /etc/default/grub. With gedit the command will be:
sudo gedit /etc/default/grub
05a) Add the following lines to the file and save it (for this example let's suppose a resolution of 800x600:
# Changed grub's resolution to grub's PREFERED resolution
GRUB_GFXMODE=800x600
05b) If you want to you can also change the time grub waits until it loads the default operating system by changing the value on the line
GRUB_TIMEOUT=10
to another value (in seconds), for example to wait 30 seconds:
GRUB_TIMEOUT=30
06) Update grub from terminal with the command:
sudo update-grub
07) Reboot to see the results.
08) When later you want to CHANGE THE PICTURE to another you simply open a terminal in the directory where your grup pictures are and issue the command:
sudo cp -i [name of the new picture without brackets].jpg /boot/grub/grub_pix.jpg
and type "y" to accept replacing the current grub_pix.jpg with the new one. This way you DO NOT NEED to constantly update your grub's configuration settings, only the picture.
Simple and easy...
PREFERED COMMENT FROM JR: "I don't use Linux because it is FREE, I am free because I use LINUX"
Gub customiser doesn't add "GRUB_BACKGROUND" option, witch you need to set background....
works GREAT!!
https://plus.google.com/111310545842863442992/posts/SLWAKpUR4cz
nice!
Excellent and it works great
Mel
Nice tutorial. Another option might be to use 'Grub Customizer' although following your tutorial is likely to be the better learning opportunity.
You've made a very clear, detailed and unambiguous tutorial here, MagicMint. Thank you.
I'll be enjoying a new background on GRUB for about one second every day now.
Never really understood the point of spending all that energy on the boot screen. It is visible for 1-3 seconds at boot...
Oh well :-) Your tutorial seem to describe the procedures in good detail. I will promote it.