How to have a custom UEFI grub menu for a multiboot system

I have an UEFI system with a custom grub that currently boots Arch Linux, Windows 10 and openSUSE Tumbleweed.
There is a bug open because openSUSE (and every other Linux system) does not correctly add the 2nd part of the Arch Linux initrd line. So, if you have Arch and do not want to edit that line every time you boot into Arch, this is the answer.
It is totally maintenance free; it does not need any updating when a new kernel is installed, it just always works. The only time you would ever need to touch this file is if you added/removed an OS, or if a UUID changed.
I tried installing Debian Testing on this system about 4 times and each time it would change the swap UUID causing major problems with all of my other systems. Needless to say I dropped that quest.

You can use /etc/grub.d/40_custom for a start and then save the file as /etc/grub.d/06_custom because the point is to have this at the top until you get comfortable with it booting your systems.

Then you make /etc/grub.d/10_linux and** /etc/grub.d/30_os-prober** unexecutable so only the custom menu entries display.

There are just UUIDs and partitions that will need to be changed for this to work on your system.

You can leave 40_custom as is but, you will not get any display output when grub is updated.
I like to see a line displaying something when it update myself and here is how:

The reason it says not to change the exec tail line is because +3 starts execution at line 3, the first menuentry line.
Below in my custom grub you can see that there is an echo line and the +3 has been changed to +4 to start execution at the 4th line.

#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.

First here are my partitions on the SSD /dev/sdc:

cavsfan@opensuse:~> sudo blkid | grep sdc
/dev/sdc1: UUID="688D-126B" TYPE="vfat" PARTLABEL="EFI System Partition" PARTUUID="3c1b6d6f-8a24-43da-b595-8c304ceee48d"
/dev/sdc2: PARTLABEL="Microsoft reserved partition" PARTUUID="49992d5b-79cd-4934-a12f-11782bb345bd"
/dev/sdc3: UUID="C4968A52968A44C0" TYPE="ntfs" PARTLABEL="Windows_10" PARTUUID="345c85f4-bce7-4bc7-bbe0-db03eb319cad"
/dev/sdc4: UUID="701AE4631AE427B4" TYPE="ntfs" PARTUUID="1e337754-b45d-45a5-a971-b8cdcae8a002"
/dev/sdc5: UUID="be437b2b-9c95-4590-8d32-4da8e6c90318" TYPE="swap" PARTLABEL="Basic data partition" PARTUUID="3a259867-656d-41ed-9931-cf15a3bd0148"
/dev/sdc6: LABEL="ArchLinux" UUID="bbca28b2-503e-4dc8-9850-c54bd0492da8" TYPE="ext4" PARTLABEL="Arch_Linux" PARTUUID="5312b771-0835-4957-80a6-9a8a7107f24a"
/dev/sdc7: LABEL="opensuse" UUID="274e3321-d7af-4544-9afa-b1b3c118c325" TYPE="ext4" PARTUUID="25d7851a-f45f-4d60-955a-4a31706f8452"
/dev/sdc8: UUID="55bba398-68d4-48db-9b54-d98d27cdf3ba" TYPE="ext4" PARTLABEL="Spare" PARTUUID="c4e0fdc9-7eac-4661-a7c6-c5a00c9a46fc"
/dev/sdc10: LABEL="Media" UUID="840ac879-510a-4b8d-be01-9d3a5f37dbb2" TYPE="ext4" PARTLABEL="Media" PARTUUID="61e2e7f9-1a98-44f7-881e-ae85fceaf994"

Here is my /etc/grub.d/06_custom file:

#!/bin/sh
echo 1>&2 "Adding Arch Linux, Windows 10 and openSUSE Tumbleweed"
exec tail -n +4 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-bbca28b2-503e-4dc8-9850-c54bd0492da8' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod fat
    set root='hd2,gpt1'
    search --no-floppy --fs-uuid --set=root 688D-126B
    linux    /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw  quiet
    initrd    /intel-ucode.img /initramfs-linux.img
}
menuentry 'Arch Linux (fallback kernel)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-bbca28b2-503e-4dc8-9850-c54bd0492da8' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod fat
    set root='hd2,gpt1'
    search --no-floppy --fs-uuid --set=root 688D-126B
    linux    /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw  quiet
    initrd    /initramfs-linux-fallback.img
}
menuentry 'Windows 10' --class windows --class os $menuentry_id_option 'osprober-efi-688D-126B' {
    insmod part_gpt
    insmod fat
    set root='hd2,gpt1'
    search --no-floppy --fs-uuid --set=root 688D-126B
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
menuentry 'openSUSE Tumbleweed' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-274e3321-d7af-4544-9afa-b1b3c118c325' {
    insmod part_gpt
    insmod ext2
    set root='hd2,gpt7'
    search --no-floppy --fs-uuid --set=root 274e3321-d7af-4544-9afa-b1b3c118c325
    linux /boot/vmlinuz root=/dev/sdc7 splash=silent resume=/dev/disk/by-uuid/be437b2b-9c95-4590-8d32-4da8e6c90318 quiet
    initrd /boot/initrd
}

Then make it executable: sudo chmod +x /etc/grub.d/06_custom.

If you do not add the red swap UUID to the openSUSE entry you will not be able to wake from suspend. Been there…

Of course be sure and change the partitions on each entry as shown in color purple as well as the colored UUIDs.

I’ve been using this with nary a problem for some time now.

MBR partitioned drives are much more simple to customize but, here is an UEFI SSD customized.

This is the link to a Wiki that I maintain for Ubuntu to customize MBR partitioned drives - https://help.ubuntu.com/community/MaintenanceFreeCustomGrub2Screen

It’s always good to label your ext4 partitions with a name that is contiguous so that files can be copied across partitions.

On Arch Linux, I added a background but, on openSUSE I did not try to add a background, I just left the default background theme as I think it looks nice.

After you have added this and it’s executable, if you do not want the first menuentry to be your default just edit sudo nano /etc/default/grub and change GRUB_DEFAULT=n to whatever you want.

This will produce a list of which number to put there - numbering starts at zero:

sudo grep -e "menuentry " -e "submenu" /boot/grub2/grub.cfg | sed 's/^ 	]*//' | cut -d "{" -f1 | nl --starting-line-number=0

Be sure to update grub after you make any changes or you will lose those changes and wonder what happened during the next boot:

sudo grub2-mkconfig -o /boot/grub2/grub.cfg

I hope that I have presented this in a way that is easily understandable. If you have any questions let me know.

That misfeature is easily worked around by specifying no swap installing Debian, then after installation is complete adding swap to fstab manually. Something I never seem to remember to try is turning existing swap on before letting the Debian installer proceed, to see if the installation process will skip wanting to format it.

My custom.cfg files are somewhat simpler than yours, omitting obfiscatory options and human immemorable UUIDs, e.g.:

menuentry "memtest86 7.4 EFI" {
	search --no-floppy --label --set=root K25P01ESP
	chainloader /mt74x64.efi
}
menuentry "openSUSE TW defkernel" {
	search --no-floppy --set=root --hint-bios=hd0,gpt7 --label k25p07stw
	linux	/boot/vmlinuz root=LABEL=k25p07stw noresume
	initrd	/boot/initrd
}
menuentry "openSUSE 15.0 defkernel" {
	search --no-floppy --set=root --hint-efi=hd0,gpt8 --label k25p08s150
	linux	/boot/vmlinuz root=LABEL=k25p08s150 noresume
	initrd	/boot/initrd
}
menuentry "openSUSE 15.1 defkernel" {
	search --no-floppy --set=root --hint-efi=hd0,gpt9 --label k25p09s151
	linux	/boot/vmlinuz root=LABEL=k25p09s151 noresume
	initrd	/boot/initrd
}
menuentry "Debian 10 Buster defkernel" {
	search --no-floppy --set=root --hint-baremetal=ahci0,gpt10 --label k25p10deb10
	linux	/boot/vmlinuz root=LABEL=k25p10deb10 noresume
	initrd	/boot/initrd
}
menuentry "Debian 10 Fat Buster defkernel" {
	search --no-floppy --set=root --hint-baremetal=ahci0,gpt11 --label k25p11deb10fat
	linux	/boot/vmlinuz root=LABEL=k25p11deb10fat noresume
	initrd	/boot/initrd
}
menuentry "Tubuntu 18.04 defkernel" {
	search --no-floppy --set=root --hint-baremetal=ahci0,gpt12 --label k25p12Ubionic
	linux	/boot/vmlinuz root=LABEL=k25p12Ubionic noresume
	initrd	/boot/initrd
}

I don’t bother with the execute bits in /etc/grub.d/. 06_custom makes custom.cfg entries first, so the cruft grub2-mkconfig generates doesn’t really matter, while keeping it retains easy access to prior kernels.

All my MBR PCs boot from generic MBR code and openSUSE Gfxboot Grub 0.97-203.7 or older on a small primary partition with self-generated menu.lst, roughly similar to above custom.cfg, and penguin=100. :slight_smile:

This thread probably ought to be in Unreviewed How To and FAQ

That’s a great idea when installing Debian. If I do install Testing I will leave out swap while installing it. It is a rolling release too as testing is never finished, so I may try that and use your advice this time.

I know there is the way of using labels like you have done but, I just went for the simplest things that would boot on my system. Some people said they were able to just use /dev/sdx but, I never had any luck with that.
My method is simple if you don’t mind copying UUIDs. But, I guess there are a lot of options to customizing grub; it just has to boot. :slight_smile:

My old PC is 10 years old next April and still works but, very slow. That is where I learned how to customize MBR partitions. I have Arch Linux, openSUSE TW, about 3 Xubuntu installs on it but, I dare not touch it.
After I installed openSUSE TW, it would not boot and it appeared that Grub rescue was needed but, even that did not work. I tried several things and the last thing I did was booted with a Windows 10 recovery DVD in the drive, it booted up and my grub was mysteriously back on Arch Linux.
Since there is no logical explanation for that, I will leave it as is and boot into Windows 10 only.

My wife gets on it. Time for an upgrade of that one.

I like Grub 2 as everything is fairly uniform across platforms. This EFI SSD concept is new to me but, I am learning.

If an admin wants to move this thread to Unreviewed How To and FAQ that would be fine by me.

Thanks for the reply!

If this bug exists on all other linux distros, this is not a bug in those other distrosm, but one in Arch bug, since creating decent GRUB2 entries works for other installed distros. This is not the first time Arch can’t coexist properly with other linuces. If they want changes in upstream GRUB2, that’s where they have to be.

This is a bug in os-prober which cannot parse legitimate grub command. Do your home work before coming up with such statements.

All other distros I’ve tried Xubuntu, openSUSE Tumbleweed and pretty much everything else do not take into account there could be 2 img entries on the initrd line, which must be new on UEFI systems.

Here is the bug if you want to look it over but, that is pretty much what Michael Chang said.

https://bugzilla.opensuse.org/show_bug.cgi?id=1101942

At this time, there are only 3 users signed onto the bug. So I gather there are not many Arch Linux users that dual, multi-boot openSUSE.

I know I opened another bug in Ubuntu but, I cannot find it. It had only 2 users on it last time I looked. A friend and I that dual boot Arch and other stuff.

@mrmazda, I did install Debian daily and then turned it into testing so it’s rolling too. But, I could not prevent it from finding my swap file, so of course it “formatted” it and changed the UUID.
But, I edited the fstab on Arch and openSUSE before I booted into either of them. So, I won that battle. :slight_smile:

Finding and using aren’t identical twins. In the Debian partitioner, change the “found” swap partition to “not used” before exiting partitioner to prevent the collateral damage.

I attempted installation about 3 times and could not see any way to make it ignore the swap partition so, knowing that I only had 2 systems that used swap, I just went for it.
Actually I installed it twice and the 2nd time was much better than the first for some reason. The first time never gave me access to compiz, ccsm, etc. and I gotta have those bells, whistles and bling but, the 2nd time did. :slight_smile:

If I every install it again, which I doubt, I’ll look harder for what you are mentioning. For the life of me all I could see was use it or delete it and both would have left me with the same issue.

But, for now I’ve got 3 rolling releases. Oh and openSUSE still did the count down at reboot for the 1:30 because I did not change the swap UUID on the openSUSE linux line:

linux /boot/vmlinuz root=/dev/sdc7 splash=silent resume=/dev/disk/by-uuid/be437b2b-9c95-4590-8d32-4da8e6c90318 quiet

But, I remembered that last night and changed it this morning. It rebooted nicely after getting a dist upgrade.

cavsfan@opensuse:~> uname -r
4.18.8-1-default

I love how openSUSE is keeping up with Arch Linux on the latest kernels. Even Debian Testing has a 4.18 kernel. :smiley:
They both have excellent working Fusion-Icons too. +1

You can’t make it “ignore” it. Instead you make it not use it. From https://wiki.debian.org/LennyIllustratedInstall

Double click on swap partition (#5).
Double click on “Use as” and change to “do not use”, then double click on “Done setting up the partition”

The logic is identical if using text mode installation, only the colors and text sizes differ, and you use keyboard <Enter> and cursor keys instead of pointing device.

Ok, I get it. I see that I should have double clicked on swap but, just didn’t so, that’s my fault. The good news is I recovered after changing all the other places swap UUID was used.
The bad news is soon after that, my Debian install “messed up”. It’s hard to describe but, lots of things were just not displaying correctly so I deleted the partition. I’m tired of fighting with Debian based systems.

Ubuntu and Debian, etc. are supposed to be the easiest Linux distribution to work with but, on this UEFI machine that has not been true as a matter of fact, I’ve had more trouble with them than anything.
I installed Xubuntu 18.04 LTS about 5-6 times and each time, it became useless so I would install it again thinking I could make it work. But, now I have a new philosophy: if it does not have a working Fusion Icon, it’s not for me. :slight_smile:

Here is a picture of my current grub screen on Arch. The font colors at the top and bottom I cannot change but, for COLOR_NORMAL I have cyan and for COLOR_HIGHLIGHT I have red.
The cyan is the box and everything inside except the highlighted line.
Just 4 entries:
Imgur

The picture is not that good as I’m not a photographer. But, it shows what I have. :slight_smile:

When my grub is on openSUSE I just use the default theme but, one day I’ll give a background and font colors a shot.

I’ve been trying to change the theme to a backgound and font colors on openSUSE but, haven’t quit gotten there yet.

In /etc/default/grub I commented out the theme and added a background but, nothing changed. I still had a theme.

Took a look at /etc/grub.d/00_header and seen that is where the theme is coming from. So, I’ll have to do some more research…

I’ve never seen a file like 00_header on any other Linux system so far. But, nothing is impossible.

Lemme see…

Ok, I got a grub picture. It changed to the background on next boot. But, I was not able to get font colors, at least not yet.
I’ll edit the 1st post to include how I got this.

http://i.imgur.com/BNvMbI5l.jpg](https://imgur.com/BNvMbI5)

While I was in screen Grub2 screen, I entered “c” to get a command line and vbeinfo is supposed to list the acceptable video resolutions but, it just gave an error, so I entered videoinfo which listed the resolutions available in openSUSE.

The biggest picture I could use was 1280x1024x32 so I edited /etc/default/grub and entered the blue lines.
Entering the background and commenting out the theme line. Then the picture appeared with the custom entries.

# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
GRUB_GFXMODE=1280x1024x32


# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true


# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"


# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"
GRUB_BACKGROUND=/boot/grub2/opensuse-black-1280x1024.png
**#**GRUB_THEME=/boot/grub2/themes/openSUSE/theme.txt

It stretches the background to cover the whole screen. So, that will provide a custom background.

I installed Fedora 28, which indeed has a working Fusion-Icon (funny how one’s standards change). lol!
Fought with it for a few days; things were strange to say the least, e.g. installed Xfce and mousepad did not behave the way it should. For example you highlight text and it does not become highlighted and you cannot tell what you have until you paste what you copied.
Still trying to figure that out.

Anyway, it did not have a symbolic link to the 2 kernel parts like most systems do that gets updated when a new kernel gets installed. This permits a custom grub menu without having to mess with it.

I’m pretty sure that after a while the new OS creates the symbolic links. So, I didn’t want to wait and created symbolic links in /boot for the latest kernel. Then I changed the custom grub menuentry to something I hope that I will not need to touch again.
I had this (notice the blue hard coding it to the kernel):

menuentry 'Fedora 28 4.18.10-200.fc28.x86_64 (Workstation Edition) (on /dev/sdc8)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-4.18.10-200.fc28.x86_64-advanced-9084e0b8-b05b-41af-a4eb-902a0bebe70a' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd2,gpt8'
        search --no-floppy --fs-uuid --set=root 9084e0b8-b05b-41af-a4eb-902a0bebe70a
        linux /boot/vmlinuz-4.18.10-200.fc28.x86_64 root=UUID=9084e0b8-b05b-41af-a4eb-902a0bebe70a ro rd.driver.blacklist=nouveau resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee rhgb quiet
        initrd /boot/initramfs-4.18.10-200.fc28.x86_64.img
}

to this - symbolic links and UUID:

menuentry 'Fedora (Workstation)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-simple-9084e0b8-b05b-41af-a4eb-902a0bebe70a' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd2,gpt8'
        search --no-floppy --fs-uuid --set=root 9084e0b8-b05b-41af-a4eb-902a0bebe70a
        linux /boot/vmlinuz root=UUID=9084e0b8-b05b-41af-a4eb-902a0bebe70a ro rd.driver.blacklist=nouveau resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee rhgb quiet
        initrd /boot/initrd
}

Bam! It booted first time. I was amazed as I had never done this before. :slight_smile:

For some odd reason when it got that new kernel, grub dropped the “ro rd.driver.blacklist=nouveau resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee rhgb quiet” part.
The resume parameter is important as I do not like having it not wake from suspend. I’ve created scripts on many systems that get executed at boot to enable my USB ports so my USB mouse and keyboard can wake it up.

Otherwise I see the pc start back up but, the monitor just says “no signal” and goes back to sleep" and I have to hit the reset button.
I really like the “resume=UUID=” parameter as it wakes it from suspend without a problem.

So, this is what I now have all in alphabetical order, hopefully maintenance free:

#!/bin/sh
echo 1>&2 "Adding Arch Linux, Fedora 28 (Workstation), openSUSE Tumbleweed and Windows 10"
exec tail -n +4 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-bbca28b2-503e-4dc8-9850-c54bd0492da8' {
       load_video
       set gfxpayload=keep
       insmod gzio
       insmod part_gpt
       insmod fat
       set root='hd2,gpt1'
       search --no-floppy --fs-uuid --set=root 688D-126B
       linux    /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw  quiet
       initrd    /intel-ucode.img /initramfs-linux.img
}
menuentry 'Arch Linux (fallback kernel)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-bbca28b2-503e-4dc8-9850-c54bd0492da8' {
       load_video
       set gfxpayload=keep
       insmod gzio
       insmod part_gpt
       insmod fat
       set root='hd2,gpt1'
       search --no-floppy --fs-uuid --set=root 688D-126B
       linux    /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw  quiet
       initrd    /initramfs-linux-fallback.img
}
menuentry 'Fedora (Workstation)' --class fedora --class gnu-linux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-simple-9084e0b8-b05b-41af-a4eb-902a0bebe70a' {
        load_video
        set gfxpayload=keep
        insmod gzio
        insmod part_gpt
        insmod ext2
        set root='hd2,gpt8'
        search --no-floppy --fs-uuid --set=root 9084e0b8-b05b-41af-a4eb-902a0bebe70a
        linux /boot/vmlinuz root=UUID=9084e0b8-b05b-41af-a4eb-902a0bebe70a ro rd.driver.blacklist=nouveau resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee rhgb quiet
        initrd /boot/initrd
}
menuentry 'openSUSE Tumbleweed' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-274e3321-d7af-4544-9afa-b1b3c118c325' {
       insmod part_gpt
       insmod ext2
       set root='hd2,gpt7'
       search --no-floppy --fs-uuid --set=root 274e3321-d7af-4544-9afa-b1b3c118c325
       linux /boot/vmlinuz root=/dev/sdc7 splash=silent resume=/dev/disk/by-uuid/bbc771f8-ba61-4e50-aeca-d2754b112aee quiet
       initrd /boot/initrd
}
menuentry 'Windows 10' --class windows --class os $menuentry_id_option 'osprober-efi-688D-126B' {
        insmod part_gpt
        insmod fat
        set root='hd2,gpt1'
        search --no-floppy --fs-uuid --set=root 688D-126B
        chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

@mrmazda, I tried doing this like you are with labels and it failed miserably. A Grub guy I know uses config files for the entries and it works for him but, I have not gotten it to work for me.

Although, there is some work to initially get my version in place, it requires zero maintenance. I do want resume to work and have added the resume= line to Ubuntu 18.04 LTS.
It allows the system to wake from suspend. Other wise it just wakes up, displays “no signal” and requires the reset button to be pressed to reboot the machine. It’s that way by default.
There is one way I know of to wake Ubuntu after suspend without a kernel boot line and that is to have a script enable the USB ports.

But, the 2 kernel lines linux and initrd are symlinks that are always updated to point to the lastly installed kernel. So, that is constant and never needs changed.

Fedora is the only Linux system I have found that does not create those 2 symlinks. I created a script to do so after a new kernel is installed. It works magnificently.

I call the script symlink-kernel and here it is:

#!/bin/bash
#


# We're passed the kernel version being installed
KERNEL_VERSION="$1"


ln -s -f "initramfs-"$1".img" /boot/initrd.img


ln -s -f "vmlinuz-"$1 /boot/vmlinuz


echo "   SUCCESS: symlink initrd.img created for "initramfs-"$1".img"" >&2
echo "   SUCCESS: symlink vmlinuz created for "vmlinuz-"$1" >&2


exit 0

You make it executable sudo chmod +x symlink-kernel.

Then you install it on Fedora like this:

sudo install symlink-kernel /etc/kernel/postinst.d/symlink-kernel

So, as long as the UUIDs for the system partitions and the swap UUID are in this, it works to my satisfaction. No further maintenance required unless you remove or replace a system.

Here is my current 06_custom file and I do keep everything else executable too.

#!/bin/sh
echo 1>&2 "Adding Arch Linux, Fedora 28 (Workstation), openSUSE Tumbleweed, Xubuntu 18.04.1 LTS (18.04) and Windows 10"
exec tail -n +4 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Arch Linux' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-bbca28b2-503e-4dc8-9850-c54bd0492da8' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod fat
    set root='hd2,gpt1'
    search --no-floppy --fs-uuid --set=root 688D-126B
    linuxefi  /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw  quiet
    initrdefi /intel-ucode.img /initramfs-linux.img
}
menuentry 'Arch Linux (fallback kernel)' --class arch --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-linux-fallback-bbca28b2-503e-4dc8-9850-c54bd0492da8' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod fat
    set root='hd2,gpt1'
    search --no-floppy --fs-uuid --set=root 688D-126B
    linuxefi  /vmlinuz-linux root=UUID=bbca28b2-503e-4dc8-9850-c54bd0492da8 rw  quiet
    initrdefi /initramfs-linux-fallback.img
}
menuentry 'Fedora (29 (Twenty Nine)' {
    load_video
    set gfxpayload=keep
    insmod gzio
    insmod part_gpt
    insmod ext2
    set root='hd2,gpt8'
    search --no-floppy --fs-uuid --set=root 2327668d-fb7f-4e44-9462-cd72af7a2873
    linuxefi  /boot/vmlinuz root=UUID=2327668d-fb7f-4e44-9462-cd72af7a2873 ro resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee rhgb quiet nouveau.modeset=0
    initrdefi /boot/initrd.img
}
menuentry 'openSUSE Tumbleweed' --class opensuse --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-06d2aa5d-5c70-4916-9f8f-219f93668d52' {
    insmod part_gpt
    insmod ext2
    set root='hd2,gpt7'
    search --no-floppy --fs-uuid --set=root 06d2aa5d-5c70-4916-9f8f-219f93668d52
    linuxefi  /boot/vmlinuz root=/dev/sdc7 splash=silent resume=/dev/disk/by-uuid/bbc771f8-ba61-4e50-aeca-d2754b112aee quiet
    initrdefi /boot/initrd
}
menuentry 'Xbuntu 18.04' --class ubuntu --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-833501fb-4f83-4d51-9903-685d56cb6891' {
    set root='hd2,gpt9'
    search --no-floppy --fs-uuid --set=root 833501fb-4f83-4d51-9903-685d56cb6891
    linuxefi  /vmlinuz root=UUID=833501fb-4f83-4d51-9903-685d56cb6891 ro resume=UUID=bbc771f8-ba61-4e50-aeca-d2754b112aee quiet splash
    initrdefi /initrd.img
}
menuentry 'Windows 10' --class windows --class os $menuentry_id_option 'osprober-efi-688D-126B' {
    insmod part_gpt
    insmod fat
    set root='hd2,gpt1'
    search --no-floppy --fs-uuid --set=root 688D-126B
    chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}

Even with the obfuscatory options and human immemorable UUIDs included. Why? Because it works with them in there and zero future maintenance is required.

I stand corrected. There were no symlinks in openSUSE just like in Fedora, although I sure thought there were. So, the custom entry above this post would not work until I did this:

cd /boot/

sudo ln -s -f initrd-4.19.5-1-default initrd

sudo ln -s -f vmlinuz-4.19.5-1-default vmlinuz

Now I just need to find where a script can be placed so it runs when a kernel gets installed, manually creating the symlinks until then…

I’ve been using *SUSE for far more than a decade than I can remember. I’ve never seen a new kernel installation not produce symlinks vmlinuz and initrd for the newest kernel and initrd.

I converted all my systems to gpt/efi some time ago. Grub2 does pretty with all OSs installed on the machines:

openSUSE Tumbleweed
Erweiterte Optionen für openSUSE Tumbleweed
    openSUSE Tumbleweed, mit Linux 4.19.5-1-default
    openSUSE Tumbleweed, mit Linux 4.19.4-1-default

Fedora 29 (Workstation Edition) (auf /dev/nvme0n1p1)
Erweiterte Optionen für Fedora 29 (Workstation Edition) (auf /dev/nvme0n1p1)
   Fedora 29 (Workstation Edition) (auf /dev/nvme0n1p1)
   Fedora 29 (Workstation Edition) (auf /dev/nvme0n1p1)

openSUSE Tumbleweed (auf /dev/sda3)
Erweiterte Optionen für openSUSE Tumbleweed (auf /dev/sda3)
   openSUSE Tumbleweed (auf /dev/sda3)
   openSUSE Tumbleweed, mit Linux 4.14.5-1-default (auf /dev/sda3)
   openSUSE Tumbleweed, mit Linux 4.4.79-19-default (auf /dev/sda3)

Ubuntu 18.04.1 LTS (18.04) (auf /dev/sdb2)
Erweiterte Optionen für Ubuntu 18.04.1 LTS (18.04) (auf /dev/sdb2)
   Ubuntu (auf /dev/sdb2)
   Ubuntu, mit Linux 4.15.0-36-generic (auf /dev/sdb2)
   Ubuntu, mit Linux 4.15.0-36-generic (recovery mode) (auf /dev/sdb2)
   Ubuntu, mit Linux 4.15.0-29-generic (auf /dev/sdb2)
   Ubuntu, mit Linux 4.15.0-29-generic (recovery mode) (auf /dev/sdb2)

openSUSE Tumbleweed (auf /dev/sdb3)
Erweiterte Optionen für openSUSE Tumbleweed (auf /dev/sdb3)
   openSUSE Tumbleweed (auf /dev/sdb3)
   openSUSE Tumbleweed, with Linux 4.19.1-1-default (auf /dev/sdb3)
   openSUSE Tumbleweed, with Linux 4.18.15-1-default (auf /dev/sdb3)

No tweaks necessary. Am I missing something?

English please.

The above is output from:

grep menuentry /boot/grub2/grub.cfg |cut -d ' -f 2

Erweitert = Advanced