Back to Engineering Blog
Engineering Field Notes 3 min read

Why Our Custom rEFInd Icons Showed Striped Placeholders

A manual rEFInd entry's icon path is resolved from the root of the volume it boots, not from the rEFInd folder. Reading the 0.14.2 source explained the striped placeholder, and showed which of our theories the source did not support.

Jason NevillBy , Houston, TX
#rEFInd#UEFI#Source Reading#Debugging

Key Architectural Takeaways

  • A manual stanza's icon path is opened relative to the volume root of the entry's volume, not relative to the rEFInd folder.
  • A failed explicit icon installs a placeholder that blocks the automatic icon fallback for that entry.
  • State plainly which parts of a theory the source supports and which it does not; a plausible mechanism is not a confirmed one.

The challenge

After the triple-boot build, the rEFInd menu showed our custom icons for some entries and a black-and-yellow striped placeholder for others. Hiding certain auto-detected entries seemed to change which icons loaded, and an earlier explanation blamed the hide list. We went to the source to find out.

What we compared

We analysed the official 0.14.2 source archive and confirmed that the five relevant files match the release tag byte for byte, then confirmed the binary we had on disk matched the official release by SHA-256. The copied configuration and a level-4 log came from earlier runs, so this was an analysis of historical copies, not a fresh read of the live boot partition. We said so in the write-up.

Root cause for the placeholder

The manual-entry code path works like this:

  1. A stanza starts with the current volume set to rEFInd's own volume.
  2. A volume token changes the current volume, and tokens are processed in order, so an icon line placed before volume uses the wrong volume.
  3. The icon handler opens the file relative to that volume's root directory. It does not try the rEFInd folder and does not prepend the configured icons directory.
  4. If the open fails, it installs the striped placeholder image at once.
  5. Later icon inference only runs when the entry has no image yet. The placeholder counts as an image, so the automatic fallback never repairs it.

So a stanza written as icon shadow-ios-icons/os_windows11.png asks for the file at the root of the volume, not under EFI/refind/. The same mistake appears in the older config's matched-icons/ paths. The log shows the three manual icon filenames being attempted with no matching "Done loading file" line.

The banner works with a short relative path because it is loaded through a different function that does use the rEFInd folder. That is why an apparently equivalent path "worked" for the banner and failed for the icons.

What the source did not support

We had a second theory: that having entries in the hide list corrupted manual icon loading. We traced the manual icon path and found no exclusion-list check anywhere in it. The hide list affects which automatic loader candidates are scanned, not the explicit icon read. The source does not support the corruption claim, and we did not have a matched pair of logs (working versus failing state) to prove one either way. It stays a hypothesis.

One more finding was boot-relevant: the manual volume token does not accept FAT filesystem UUIDs. It accepts names, labels or GPT partition GUIDs. A reported fix that relied on a FAT UUID could not be credited to that syntax.

Verification

Every source line number in the write-up refers to the tagged release. No boot partition writes, boot changes or reboots were performed during the investigation.

Takeaway

When a symptom has two plausible stories, read the code path for each. One of ours was confirmed in source, one was not, and writing that difference down kept us from "fixing" the machine for the wrong reason.

Follow the build on LinkedIn or by RSS.

All Articles

Follow the build

Questions about the build, or spotted something we got wrong? Find us on LinkedIn and GitHub.