how to change menuentries in grub.cfg for custom kernels?

I am testing custom kernels from liquorix and xanmod. I give the packages customized names with my initials appended:

linux-lqx-mbo 5.7.12_1-17
linux-xanmod-lts-mbo 5.4.55-1

In the grub menu both kernels show up as:

menuentry 'Manjaro Linux (Kernel: mbo)' ...

while Manjaro kernels are showing with version number:

menuentry 'Manjaro Linux (Kernel: 5.7.11-1-MANJARO x64)'...

How can I customize the grub menu entry to show kernel version + lqx or xanmod suffix?

The /etc/grub.d/10_linux script controls that. It basically checks for a .kver file in /boot/ and then sets the $version with that contend. This is Manjaro specific.

Check out the /etc/grub.d/10_linux for more information. It is not the easiest script to read. But I think it starts with the the /boot/vmlinuz-* files to create the contends of $version(line 179 starts with the list and goes form there.).

Thank you. That works. The "kver" mechanism is the solution for me. I had to figure out the naming convention for these files. Interesting!

For my kernel image /boot/vmlinuz-linux-xanmod-mbo
the kver file has to be named /boot/linux-linux-xanmod-mbo.kver

1 Like

This topic was automatically closed after 180 days. New replies are no longer allowed.

Forum kindly sponsored by