Repository navigation
Improve ESP auto-mount detection across Fedora layouts - #8
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d9bbb2bb85
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for candidate in "${ESP_MOUNT_CANDIDATES[@]}"; do | ||
| target="$(findmnt -n -o TARGET "$candidate" 2>/dev/null || true)" | ||
| [[ -n "$target" ]] && { echo "$target"; return 0; } |
There was a problem hiding this comment.
Validate candidate mount type before accepting it as ESP
The new find_mounted_esp_target() returns the first mounted candidate path without checking that it is actually an EFI System Partition. On systems with a separate ext4 /boot and an unmounted ESP (e.g. /boot/efi not mounted), this now returns /boot as the ESP, so ensure_esp_mounted exits early and later efibootmgr registration targets the /boot partition instead of the FAT ESP. That can produce unusable boot entries and place UKIs on a partition firmware cannot read.
Useful? React with 👍 / 👎.
Motivation
/boot/efior/efi, leading to a hard failure during setup.EFIdirectory.Description
ESP_MOUNT_CANDIDATEScontaining/boot/efi,/efi,/boot,/boot/EFI, and/espand iterate these when attempting fstab-based mounts.find_mounted_esp_target()which first checks the candidate mount points and then falls back to scanningfindmntfor FAT/VFAT mounts that contain anEFIdirectory./boot/efi//efilookups inensure_esp_mounted()and the generateduki-build.shtemplate with the new detection and candidate-iteration logic, and attempt mounting the detected ESP device across all candidates.README.mdto document the expanded ESP handling.Testing
bash -n uki-setup.shto verify there are no syntax errors; the check succeeded.bash tests/test_uki_setup.sh, which verifies generation of theuki-build.shhelper and kernel-install plugin and it completed successfully.Codex Task