This is a simple guide on how to change GRUB background in Kali Linux (i.e. it’s actually Kali Linux GRUB splash image). Kali dev team did few things that seems almost too much work, so in this article I will explain one of two things about GRUB and somewhat make this post little unnecessarily long and boring cause I like to write! So here goes …
Finding GRUB settings
This is usually the first issue everyone faces, where do I look? There’s a many ways to find GRUB settings. Users might have their own opinion but I always found that update-grub
is the easiest way. If you run update-grub
in a VMWare/VirtualBox, you will see something like this:
root@kali:~# update-grub Generating grub configuration file ... Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-4.0.0-kali1-amd64 Found initrd image: /boot/initrd.img-4.0.0-kali1-amd64 No volume groups found done root@kali:~#
If you’re using a Dual Boot, Triple Boot then you will see GRUB goes in and finds other OS’es as well. However, the part we’re interested is the background image part, in my case this is what I see (you will see exactly the same thing):
Found background image: /usr/share/images/desktop-base/desktop-grub.png
GRUB splash image search order
In grub-2.02, it will search for the splash image in the following order for a Debian based system:
- GRUB_BACKGROUND line in
/etc/default/grub
- First image found in
/boot/grub/
( more images found, it will be taken alphanumerically ) - The image specified in
/usr/share/desktop-base/grub_background.sh
- The file listed in the WALLPAPER line in
/etc/grub.d/05_debian_theme
Now hang onto this info and we will soon revisit it.
Kali Linux GRUB splash image
As I use Kali Linux (cause I like to test things), I found that Kali is using a background image from here: /usr/share/images/desktop-base/desktop-grub.png
Just to be sure, let’s check that .png
file and it’s properties.
root@kali:~# root@kali:~# ls -l /usr/share/images/desktop-base/desktop-grub.png lrwxrwxrwx 1 root root 30 Oct 8 00:31 /usr/share/images/desktop-base/desktop-grub.png -> /etc/alternatives/desktop-grub root@kali:~#
What? It’s just a symbolic link to /etc/alternatives/desktop-grub
file? But /etc/alternatives/desktop-grub
is not an image file. Looks like I need to check that file and it’s properties as well.
root@kali:~# root@kali:~# ls -l /etc/alternatives/desktop-grub lrwxrwxrwx 1 root root 44 Oct 8 00:27 /etc/alternatives/desktop-grub -> /usr/share/images/desktop-base/kali-grub.png root@kali:~#
Alright, that’s confusing as! So /etc/alternatives/desktop-grub
is another symbolic link which points back to
/usr/share/images/desktop-base/kali-grub.png
which is in the same folder we started from. doh! That’s all I can say. But at least now we can just replace that file and get it over with.
Before we do that we need to check the properties of this file /usr/share/images/desktop-base/kali-grub.png
and ensure that we will download same type and dimension file.
root@kali:~# root@kali:~# file /usr/share/images/desktop-base/kali-grub.png /usr/share/images/desktop-base/kali-grub.png: PNG image data, 640 x 480, 8-bit/color RGB, non-interlaced root@kali:~#
So this file is DEFINITELY a PNG image data, 640 x 480 dimension.
GRUB background image properties
GRUB 2 can use PNG
, JPG
/JPEG
and TGA
images for the background. The image must meet the following specifications:
JPG
/JPEG
images must be8-bit
(256 color
)- Images should be non-indexed,
RGB
By default, if desktop-base
package is installed, images conforming to the above specification will be located in /usr/share/images/desktop-base/
directory. A quick Google search found similar files. Out of those, I picked one.
root@kali:~# root@kali:~# file Downloads/wallpaper-1.png Downloads/wallpaper-1.png: PNG image data, 640 x 480, 8-bit/color RGB, non-interlaced root@kali:~#
Option 1: replace the image
Now we simply need to replace this /usr/share/images/desktop-base/kali-grub.png
file with our new file. Note that this is the easiest way without mucking around grub-config
files. If you are familiar with GRUB, then go ahead and simpy modify GRUB default config and run update-grub
.
As usual, I will make a backup of the original file by renaming it to kali-grub.png.bkp
root@kali:~# root@kali:~# mv /usr/share/images/desktop-base/kali-grub.png /usr/share/images/desktop-base/kali-grub.png.bkp root@kali:~#
Now let’s copy our downloaded file and rename that to kali-grub.png.bkp
.
root@kali:~# root@kali:~# cp Downloads/wallpaper-1.png /usr/share/images/desktop-base/kali-grub.png root@kali:~#
And finally run update-grub
root@kali:~# update-grub Generating grub configuration file ... Found background image: /usr/share/images/desktop-base/desktop-grub.png Found linux image: /boot/vmlinuz-4.0.0-kali1-amd64 Found initrd image: /boot/initrd.img-4.0.0-kali1-amd64 No volume groups found done root@kali:~#
Next time you restart your Kali Linux, you will see your own image as the GRUB background. (GRUB splash image).
Following is what my new GRUB splash image looks like in Kali Linux now. What about you? Tried this method yet?
This was the easiest and safest way, if you muck it up the worst, you will see a Blue background in GRUB but will still be able to login and fix things later. Now if you’re confident, lets move to better ways (bit complex) of changing GRUB settings. Next steps are more fun and works with any Linux using GRUB bootloader.
Just in time.. Upgraded to sana yesterday, today was thinking of changing grub background, and now saw it in mail !
Great!! how to change fontsize?
Where can I get the image as of yours GRUB Background
12minets in google > world-map -> abstract…
http://www.wallconvert.com/converted/abstract-world-map-wallpapers-1920×1080-175289.html
and dont forgot
“Whait for MidNight rebooT and start doing evil plans for world domination”
;)