summaryrefslogtreecommitdiffstats
path: root/roles/bootstrap/tasks/install-ubuntu-mac.yml
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2026-06-30 17:42:32 +0200
committerAhmed Abdelhalim <[email protected]>2026-06-30 17:42:32 +0200
commitb9bfb43360e588e008e1f3279b99b2523665d422 (patch)
treec7a49a74c62426eada98dbc200f8358953cd3303 /roles/bootstrap/tasks/install-ubuntu-mac.yml
parentf77cd8a569c8e06c0d5e391a495e5d89d7375be6 (diff)
Fix booting nightmares on Mac (dualboot)
Co-authored-by: Claude.ai
Diffstat (limited to 'roles/bootstrap/tasks/install-ubuntu-mac.yml')
-rw-r--r--roles/bootstrap/tasks/install-ubuntu-mac.yml24
1 files changed, 24 insertions, 0 deletions
diff --git a/roles/bootstrap/tasks/install-ubuntu-mac.yml b/roles/bootstrap/tasks/install-ubuntu-mac.yml
index 23ead61..69b9a88 100644
--- a/roles/bootstrap/tasks/install-ubuntu-mac.yml
+++ b/roles/bootstrap/tasks/install-ubuntu-mac.yml
@@ -1,4 +1,28 @@
---
+- name: "Ensure EFI/refind directory exists for Mac NVRAM compatibility"
+ ansible.builtin.file:
+ path: "{{ mnt_boot_path }}/EFI/refind"
+ state: directory
+ mode: "0755"
+ # Mac NVRAM entries persist across disk wipes (stored in firmware) and point to EFI/refind/
+ # refind-install --usedefault only creates EFI/BOOT/ so we must create this explicitly
+ tags: ["molecule-notest"]
+
+- name: "Copy rEFInd binary to EFI/refind for Mac NVRAM entries"
+ ansible.builtin.copy:
+ src: "{{ mnt_boot_path }}/EFI/BOOT/bootx64.efi"
+ dest: "{{ mnt_boot_path }}/EFI/refind/refind_x64.efi"
+ remote_src: true
+ mode: "0644"
+ tags: ["molecule-notest"]
+
+- name: "Configure rEFInd base settings in EFI/refind for Mac NVRAM entries"
+ ansible.builtin.template:
+ src: "refind.conf.j2"
+ dest: "{{ mnt_boot_path }}/EFI/refind/refind.conf"
+ mode: "0644"
+ tags: ["molecule-notest"]
+
- name: "Install broadcom-sta-dkms in chroot"
ansible.builtin.command:
cmd: "arch-chroot {{ mnt_root_path }} apt-get install -y broadcom-sta-dkms"