How to add an entry for Bazzite on GRUB managed by Ubuntu

I had an issue after I installed Bazzite through manual partitioning on a second storage, next to my main Ubuntu install.

On Ubuntu 24.04, os-prober didn't detect the Bazzite install so it wasn't possible to switch to it from GRUB.

Achieving this requires a little bit of work.

Identify the partition that contain the bootloader of Bazzite

Use lsblk -o name,size,label,type,fstype,uuid to find the UUID of Bazzite's bootloader. It should be the one with FSTYPE = vfat.

Example with Bazzite installed on a SATA SSD:

lsblk -o name,size,label,type,fstype,uuid
NAME          SIZE LABEL        TYPE FSTYPE UUID
sda         931,5G              disk        
├─sda1        600M BAZZITE-EFI  part vfat   4887-b985
├─sda2          1G bazzite-boot part ext4   7d674f16-d1ec-4b18-903b-2ed534fe5614
└─sda3        512G              part btrfs  6c33337f-e9cc-4207-9c84-4e6bd1704784

Here it is 4887-b985.

Add a custom entry to GRUB

Create a file like /etc/grub.d/36_custom_bazzite with this content (the part after --set=root must match with the UUID of your partition):

#!/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.

menuentry "Bazzite" {
    insmod chain
    insmod ntfs
    search --no-floppy --fs-uuid --set=root 4887-b985
    chainloader /EFI/fedora/grubx64.efi
}

Run sudo update-grub and reboot the system.

You can now switch from the default GRUB to the GRUB of Bazzite by choosing the “Bazzite” option. Once there, it will automatically select the second entry labeled ostree:1, this is normal, just wait and Bazzite will start automatically.

(thanks to telcoM on unix.SE for the help with the chainloader)

Bonus

If you run sudo grub-reboot "Bazzite", it will automatically select Bazzite the next time your reboot or start the computer.


(note: this post was previously published on Ask Ubuntu)