bluefin-icons/readme.md
2025-10-13 16:49:51 +03:00

2.2 KiB

Auto GRUB Class Setup for Bluefin

Introduction

GRUB themes display icons according to each entry's class. On some rpm-ostree systems, including Bluefin, new boot entries are created without a class, which means no icon is shown in the menu.

This setup fixes that by adding a dedicated Bluefin icon to your active GRUB theme and installing a helper script that ensures every BootLoaderSpec (BLS) entry includes grub_class bluefin. With this in place, GRUB automatically picks up the correct icon and your Bluefin deployments appear with their own distinctive symbol in the boot menu.

(Developed and tested on bluefin-dx:latest-42.20251012.1)

Acknowledgements

This setup borrows the icon for the Bluefin GRUB theme created by Raindrac and is inspired by and meant as a replacement for a previous solution by Tomasz Drozdz.

Installation

If you don't have a GRUB theme installed, check these out. I am currently using this one.

1. Find the icons folder of your currently used GRUB theme

sudo awk -F= '/set theme=/ {f=$2; sub(/\/[^/]*$/, "", f); print f "/icons"}' /boot/grub2/user.cfg

should print something like "/boot/grub2/themes/<theme>/icons

2. Copy bluefin icon to that folder

sudo cp bluefin.png /boot/grub2/themes/<theme>/icons/

3. Install helper script

sudo cp bls-add-bluefin.sh /usr/local/sbin/
sudo chmod 755 /usr/local/sbin/bls-add-bluefin.sh

4. Install rpm-ostree hook

sudo mkdir -p /etc/systemd/system/ostree-finalize-staged.service.d
sudo cp bluefin-icons.conf /etc/systemd/system/ostree-finalize-staged.service.d/
sudo systemctl daemon-reload

5. (Optional) Test helper script

sudo /usr/local/sbin/bls-add-bluefin.sh
grep -n '^grub_class' /boot/loader/entries/ostree*.conf

# Expected Result

/boot/loader/entries/ostree-1.conf
     2:	grub_class bluefin

/boot/loader/entries/ostree-2.conf
     2:	grub_class bluefin