GRUB not showing MX Linux icon

Hello,

I am ditching Win 10 on my machines, I have been using Manjaro on some laptops with dual boot Win10.

I’m keeping Manjaro and I’m trying a debian base distro MX Linux.
My intention is to have both systems on all my laptops.
I installed MXL and use Manjaro GRUB to boot
I updated GRUB on Manjaro and it detected MXL.
Apparently everything went ok as I can boot into the distro I want on GRUB.

The thing is I want the MXLinux Icon to show on GRUB entry as now it shows the generic penguin icon.

How do I do that?

Its a problem of the grub theme.
It both has a small number of icons … and uses incorrect terms for any number of entries.
(memtest and UEFI settings could both have icons but dont because of the names used)

You could place an icon in the folder I suppose.

That would be /usr/share/grub/themes/manjaro/icons
But you really shouldnt do that - instead copy the theme and add your icon to the new theme.
Also rename the theme folder.

Now the icon should be named the class that the grub theme will use.
(ex: /usr/share/grub/themes/JesusLinux/icons/mx-linux.png)
I dont know if mx has its own class or not. You can check by looking at /boot/grub/grub.cfg and look at the lines for mx.

For manjaro you can see its classes begin with manjaro so a manjaro icon will be presented.
(or gnu-linux, or gnu, or os, if present in the theme, in that order)

menuentry 'Manjaro Linux' --class manjaro --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f542c576-8a45-48cf-990e-e147c98fb305' {

If it uses a generic class you will want to add a class to the grub config somehow.

Like I have this in my bashrc so that I can have icons on the ‘advanced’ entries;

alias paint-grub="sed -i 's/'\''Advanced options for Manjaro Linux'\''/'\''Advanced options for Manjaro Linux'\'' --class submenu/g' /boot/grub/grub.cfg"
1 Like

Or use the MX grub to boot all your systems - which presumably does have a nice icon - but then Manjaro likely won’t have one :sunglasses:
else it’s going to be some work to get to see some icons for half a second on boot …

1 Like

I read that other distros GRUB have trouble booting Manjaro.
And I like the Manajro theme…

You can use a custom icon. However you need to create a custom entry and disable os-prober, or get it to ignore MX.

https://unix.stackexchange.com/questions/593562/how-to-add-icon-to-a-custom-grub-boots-script

EDIT:

Or you can edit grub.cfg every time you update…you could even make a pacman hook for it.

Why don’t you try to see whether that is true?

if it is true - it’s quite some work for an icon that you see for half a second every few days :nerd_face:


what @dmt just said seems a lot easier

an unconventional solution :+1:

I suppose one could just replace the generic icon with the MX one …
I could not reply to your post - the forum software was complaining and advising and educating me that no consecutive replies are allowed
the word ■■■■■■■■ was censored
I love pointless censorship so much - it really helps me to be a better person ^^

2 Likes

You have to find it first (I can’t) and it would apply to all distros that use that icon.

oh, that is rather easy - I already did
but I’ll still leave that exercise to him …
(around line 100 ff in my /boot/grub/grub.cfg - if I recall correctly )

@cscs mentioned the direction
search starts in /boot/grub/grub.cfg

1 Like

I skimmed it earlier, in one eye and out the other. :man_facepalming:

I know that saying (in german) - but there it only applies to the ears :upside_down_face:

Same over here, but ears don’t really apply to this, and I like mixing things up on occasion.

This is the MX linux entry on boot/grub/grub.cfg:

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'MX 23.3 Libretto (23.3) (on /dev/sda1)' --class mx --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-488403ff-6c51-46a3-b8f4-c1e685425dc9' {
	savedefault
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  488403ff-6c51-46a3-b8f4-c1e685425dc9
	else
	  search --no-floppy --fs-uuid --set=root 488403ff-6c51-46a3-b8f4-c1e685425dc9
	fi
	linux /boot/vmlinuz-6.1.0-23-amd64 root=/dev/sda1
	initrd /boot/initrd.img-6.1.0-23-amd64
}
submenu 'Advanced options for MX 23.3 Libretto (23.3) (on /dev/sda1)' $menuentry_id_option 'osprober-gnulinux-advanced-488403ff-6c51-46a3-b8f4-c1e685425dc9' {
	menuentry 'MX 23.3 Libretto (23.3) (on /dev/sda1)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/boot/vmlinuz-6.1.0-23-amd64--488403ff-6c51-46a3-b8f4-c1e685425dc9' {
		savedefault
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  488403ff-6c51-46a3-b8f4-c1e685425dc9
		else
		  search --no-floppy --fs-uuid --set=root 488403ff-6c51-46a3-b8f4-c1e685425dc9
		fi
		linux /boot/vmlinuz-6.1.0-23-amd64 root=/dev/sda1
		initrd /boot/initrd.img-6.1.0-23-amd64
	}

in the folder /usr/share/grub/themes/manjaro/icons/
the mx.linux.png is already there;

you can change the line to mx-linux or change the icon to mx

1 Like

Changing the icon name to mx has worked.
Thank you

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.