diff options
| author | Ahmed Abdelhalim <[email protected]> | 2026-05-08 10:38:55 +0200 |
|---|---|---|
| committer | Ahmed Abdelhalim <[email protected]> | 2026-05-08 10:38:55 +0200 |
| commit | 3b9bb369851adbcf4720eb4ed7e2eef1953ffcdf (patch) | |
| tree | 09e50579a1e63dcc9f3c56d4b681831e01a754cb /roles/bootstrap | |
| parent | 3c9441a3838ed8d4d2dc2642451177fb13091822 (diff) | |
Force rEFInd to use the /EFI/BOOT path across different distro versions
Diffstat (limited to 'roles/bootstrap')
| -rw-r--r-- | roles/bootstrap/tasks/install-archlinux.yml | 13 | ||||
| -rw-r--r-- | roles/bootstrap/tasks/install-ubuntu.yml | 13 |
2 files changed, 16 insertions, 10 deletions
diff --git a/roles/bootstrap/tasks/install-archlinux.yml b/roles/bootstrap/tasks/install-archlinux.yml index f32aebc..9a864c4 100644 --- a/roles/bootstrap/tasks/install-archlinux.yml +++ b/roles/bootstrap/tasks/install-archlinux.yml @@ -42,15 +42,18 @@ - name: "Install rEFInd to EFI partition" ansible.builtin.command: - cmd: "arch-chroot {{ mnt_root_path }} refind-install" + # NOTE: --usedefault installs to EFI/BOOT/ without NVRAM registration + # This ensures consistent install location across refind versions (0.13.x installs to EFI/refind/ + # via NVRAM, 0.14.x falls back to EFI/BOOT/ when NVRAM write fails in chroot) + cmd: "arch-chroot {{ mnt_root_path }} refind-install --usedefault {{ partition_boot.dev }}" changed_when: true - name: "Configure rEFInd base settings" ansible.builtin.template: src: "refind.conf.j2" - dest: "{{ mnt_boot_path }}/EFI/refind/refind.conf" + dest: "{{ mnt_boot_path }}/EFI/BOOT/refind.conf" mode: "0644" - # NOTE: this is skipped because the docker test doesn't have proper EFI/refind directory created + # NOTE: this is skipped because the docker test doesn't have proper EFI/BOOT directory created tags: ["molecule-notest"] - name: "Ensure arch EFI boot directory exists" @@ -72,9 +75,9 @@ - name: "Configure Arch Linux boot entries" ansible.builtin.template: src: "refind_arch.conf.j2" - dest: "{{ mnt_boot_path }}/EFI/refind/arch.conf" + dest: "{{ mnt_boot_path }}/EFI/BOOT/arch.conf" mode: "0644" - # NOTE: this is skipped because the docker test doesn't have proper EFI/refind directory created + # NOTE: this is skipped because the docker test doesn't have proper EFI/BOOT directory created tags: ["molecule-notest"] - name: "Install kernel sync script for EFI partition" diff --git a/roles/bootstrap/tasks/install-ubuntu.yml b/roles/bootstrap/tasks/install-ubuntu.yml index cb4add5..b3ed656 100644 --- a/roles/bootstrap/tasks/install-ubuntu.yml +++ b/roles/bootstrap/tasks/install-ubuntu.yml @@ -51,15 +51,18 @@ - name: "Install rEFInd to EFI partition" ansible.builtin.command: - cmd: "arch-chroot {{ mnt_root_path }} refind-install" + # NOTE: --usedefault installs to EFI/BOOT/ without NVRAM registration + # This ensures consistent install location across refind versions (0.13.x installs to EFI/refind/ + # via NVRAM, 0.14.x falls back to EFI/BOOT/ when NVRAM write fails in chroot) + cmd: "arch-chroot {{ mnt_root_path }} refind-install --usedefault {{ partition_boot.dev }}" changed_when: true - name: "Configure rEFInd base settings" ansible.builtin.template: src: "refind.conf.j2" - dest: "{{ mnt_boot_path }}/EFI/refind/refind.conf" + dest: "{{ mnt_boot_path }}/EFI/BOOT/refind.conf" mode: "0644" - # NOTE: this is skipped because the docker test doesn't have proper EFI/refind directory created + # NOTE: this is skipped because the docker test doesn't have proper EFI/BOOT directory created tags: ["molecule-notest"] - name: "Ensure ubuntu EFI boot directory exists" @@ -82,9 +85,9 @@ - name: "Configure Ubuntu boot entries" ansible.builtin.template: src: "refind_ubuntu.conf.j2" - dest: "{{ mnt_boot_path }}/EFI/refind/ubuntu.conf" + dest: "{{ mnt_boot_path }}/EFI/BOOT/ubuntu.conf" mode: "0644" - # NOTE: this is skipped because the docker test doesn't have proper EFI/refind directory created + # NOTE: this is skipped because the docker test doesn't have proper EFI/BOOT directory created tags: ["molecule-notest"] - name: "Ensure kernel post-install hook directory exists" |
