Skip to content

Update rEFInd configuration#23

Merged
ericbsd merged 1 commit intomasterfrom
refind-efi-update
Mar 16, 2026
Merged

Update rEFInd configuration#23
ericbsd merged 1 commit intomasterfrom
refind-efi-update

Conversation

@ericbsd
Copy link
Copy Markdown

@ericbsd ericbsd commented Mar 16, 2026

  • Replace refind.conf with refind.conf sample
  • Remove fallback EFI boot partition logic

Summary by Sourcery

Update rEFInd EFI boot setup to use the sample configuration and drop fallback EFI boot partition handling.

Enhancements:

  • Use the packaged rEFInd sample configuration file when installing the EFI bootloader.
  • Remove legacy fallback EFI/BOOT partition installation logic for rEFInd.

- Replace refind.conf with refind.conf sample
- Remove fallback EFI boot partition logic
@ericbsd ericbsd requested review from a team as code owners March 16, 2026 21:49
@sourcery-ai
Copy link
Copy Markdown

sourcery-ai bot commented Mar 16, 2026

Reviewer's guide (collapsed on small PRs)

Reviewer's Guide

Adjusts rEFInd installation during EFI boot setup to use the sample configuration and removes logic for populating the generic EFI/BOOT fallback path.

Flow diagram for updated rEFInd EFI boot setup logic

flowchart TD
  A_start[setup_efi_boot] --> B_checkMedia
  B_checkMedia{refind on install media
  AND EFILOADER = refind?}

  B_checkMedia -- Yes --> C_mkdirRefind[mkdir -p FSMNT/boot/efi/EFI/refind]
  C_mkdirRefind --> D_copyRefindEfi[cp /usr/local/refind/refind_x64.efi
  to FSMNT/boot/efi/EFI/refind/BOOTX64.EFI]
  D_copyRefindEfi --> E_copySampleConf[cp /usr/local/refind/refind.conf-sample
  to FSMNT/boot/efi/EFI/refind/REFIND.CONF]
  E_copySampleConf --> F_copyIcons[cp -r /usr/local/refind/icons
  to FSMNT/boot/efi/EFI/refind/ICONS]
  F_copyIcons --> G_copyLoaderVendor[cp FSMNT/boot/loader.efi
  to FSMNT/boot/efi/EFI/LOWERCASE_SYSTEM/BOOTX64.EFI]

  B_checkMedia -- No --> H_copyLoaderOnly[cp FSMNT/boot/loader.efi
  to FSMNT/boot/efi/EFI/LOWERCASE_SYSTEM/BOOTX64.EFI]

  G_copyLoaderVendor --> I_unmount[umount FSMNT/boot/efi]
  H_copyLoaderOnly --> I_unmount

  %% Removed logic (no longer executed):
  %% - No copying of rEFInd or loader.efi into EFI/BOOT fallback path
Loading

File-Level Changes

Change Details Files
Use the rEFInd sample configuration file when installing rEFInd to the target EFI partition.
  • Update the copy command to install refind.conf-sample as REFIND.CONF into the target EFI refind directory.
  • Keep existing logic for copying the rEFInd EFI binary, icons, and system-specific BOOTX64.EFI unchanged.
backend/functions-unmount.sh
Remove fallback EFI/BOOT population logic for rEFInd and default to existing bootloader behavior elsewhere.
  • Delete conditional block that copied rEFInd binary, config, and icons into EFI/BOOT as a fallback.
  • Remove the alternative branch that copied loader.efi into EFI/BOOT/BOOTX64.EFI when rEFInd was not present, relying instead on other parts of setup_efi_boot for bootloader installation.
backend/functions-unmount.sh

Possibly linked issues

  • #Update @ghostbsd/pc-sysinstall to install rEFInd files and config correctly: PR changes which rEFInd config is installed and EFI paths, directly addressing correct files/config in the installer.

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link
Copy Markdown

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've found 1 issue

Prompt for AI Agents
Please address the comments from this code review:

## Individual Comments

### Comment 1
<location path="backend/functions-unmount.sh" line_range="393-400" />
<code_context>
       fi
     fi

-    # Now ensure the fallback location for the EFI boot partition exists, and make it if needed
-    if [ -d '/usr/local/refind' -a "$EFILOADER" = "refind" ] ; then
-      # We have refind on the install media, lets use that for dual-boot purposes
-      rc_halt "cp /usr/local/refind/refind.conf ${FSMNT}/boot/efi/EFI/BOOT/REFIND.CONF"
-      rc_halt "cp -r /usr/local/refind/icons ${FSMNT}/boot/efi/EFI/BOOT/ICONS"
-      rc_halt "cp /usr/local/refind/refind_x64.efi ${FSMNT}/boot/efi/EFI/BOOT/BOOTX64.EFI"
-    else
-      rc_halt "cp ${FSMNT}/boot/loader.efi ${FSMNT}/boot/efi/EFI/BOOT/BOOTX64.EFI"
-    fi
-
</code_context>
<issue_to_address>
**issue (bug_risk):** Re-evaluate removal of the EFI/BOOT fallback loader to avoid regressions on picky firmware

If nothing else now creates `${FSMNT}/boot/efi/EFI/BOOT/BOOTX64.EFI`, some firmware that only honors the generic fallback path (and not `EFI/<VENDOR>/BOOTX64.EFI`) may fail to boot. If this behavior has not been reproduced elsewhere, please keep a minimal step that ensures `EFI/BOOT/BOOTX64.EFI` exists and targets the intended loader to avoid regressions on such systems.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

@ericbsd ericbsd merged commit 57ddd19 into master Mar 16, 2026
2 checks passed
@ericbsd ericbsd deleted the refind-efi-update branch March 16, 2026 21:53
@github-project-automation github-project-automation bot moved this from In Review to Done in Development Tracker Mar 16, 2026
@ericbsd ericbsd self-assigned this Mar 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

Update @ghostbsd/pc-sysinstall to install rEFInd files and config correctly

2 participants