How to add icons to Antergos GRUB menu entries (MBR Legacy)

På Denne Side...

Antergos comes with its own grub theme, but it only shows the Antergos logo by default. The icons for other OSs are included (check /boot/grub/themes/Antergos-Default/icons/), but they need some tweaks to be shown in the menu.


Antergos GRUB Menu

First, it's a wise idea to make a backup of an important file that is going to be modified:
sudo cp /etc/grub.d/30_os-prober /etc/grub.d/backup-of-30_os-prober

Then open this file and modify it as follows (assuming you're using gedit as a text editor):
sudo gedit /etc/grub.d/30_os-prober

Find the line:
export TEXTDOMAINDIR="${datarootdir}/locale"

Add the line:
declare -l CLASS

Find the line:
BOOT="`echo ${OS} | cut -d ':' -f 4`"

Add the line:
CLASS=$LABEL

Find all occurences of:
--class gnu-linux

Replace with:
--class ${CLASS} --class gnu-linux

Now check that the icons names in folder /boot/grub/themes/Antergos-Default/icons/ match the "--class" name of each "menuentry". To do this, open the file grub.cfg, but do not modify it:
sudo gedit /boot/grub/grub.cfg

For example, if the entry for Ubuntu MATE has the class name "ubuntu1", then the icon for MATE, has to be named "ubuntu1.png".

Finish with a grub update:
sudo grub-mkconfig -o /boot/grub/grub.cfg


reboot and enjoy your new Antergos menu 🙂

 

Contributors:

(besøgte 4,582 gange, 1 besøg i dag)

Pin It on Pinterest

Share This