Skip to content

Auto-mount ESP during preflight and UKI build flows - #7

Merged
GlitchSlayed merged 1 commit into
mainfrom
codex/fix-esp-mount-issue-on-fedora
Mar 8, 2026
Merged

GlitchSlayed merged 1 commit into
mainfrom
codex/fix-esp-mount-issue-on-fedora

Conversation

@GlitchSlayed

Copy link
Copy Markdown
Owner

Motivation

  • Avoid hard-failing when the EFI System Partition (ESP) is present but not mounted so the setup can proceed or self-fix common user setups.
  • Ensure the generated /usr/local/sbin/uki-build.sh can also recover when run later (e.g., from kernel-install hooks) if the ESP is not mounted.
  • Make documentation reflect the improved behavior so users know the script will attempt to mount the ESP automatically.

Description

  • Added find_esp_device (detect ESP partition via lsblk GUID/FSTYPE) and ensure_esp_mounted helpers to uki-setup.sh to try mounting /boot/efi or /efi using fstab first and falling back to mounting the detected ESP device with -t vfat.
  • Replaced the old preflight hard-fail with ensure_esp_mounted || die ... so the script attempts automatic mounting before aborting.
  • Injected the same find_esp_device / ensure_esp_mounted logic into the generated uki-build.sh template and enforced it before building a UKI so rebuilds also auto-mount the ESP when possible.
  • Updated README.md Requirements and Troubleshooting to document the auto-mount behavior and the fallback for manual mounting.

Testing

  • Ran shell syntax checks with bash -n uki-setup.sh tests/test_uki_setup.sh which completed successfully.
  • Executed the project validation script bash tests/test_uki_setup.sh which passed and confirmed generated templates are populated as expected.
  • Attempted shellcheck uki-setup.sh but shellcheck was not available in the environment (not a failure of the change).

Codex Task

@GlitchSlayed
GlitchSlayed merged commit 741fc32 into main Mar 8, 2026
0 of 2 checks passed
@GlitchSlayed GlitchSlayed mentioned this pull request Mar 15, 2026
@GlitchSlayed
GlitchSlayed deleted the codex/fix-esp-mount-issue-on-fedora branch March 19, 2026 02:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant