summaryrefslogtreecommitdiffstats
path: root/roles/bootstrap/tasks/install-ubuntu.yml
diff options
context:
space:
mode:
authorAhmed Abdelhalim <[email protected]>2025-09-21 19:35:12 +0200
committerAhmed Abdelhalim <[email protected]>2025-09-21 19:35:12 +0200
commitfd1b383b1b93ae556387fb5a846eb6e6f1ac3404 (patch)
treed512927ec8744626671cbda96ff788b62f853b1a /roles/bootstrap/tasks/install-ubuntu.yml
parenta82425b10738c9119075c2347e258d5048530f1d (diff)
Replace systemd with rEFInd
The systemd regression bug introduced in 258 version doesn't seem to be fixed or about to get fixed any time soon Ref: https://github.com/systemd/systemd/issues/36174 This replaces the systemd-boot with a simpler rEFInd approach
Diffstat (limited to 'roles/bootstrap/tasks/install-ubuntu.yml')
-rw-r--r--roles/bootstrap/tasks/install-ubuntu.yml27
1 files changed, 15 insertions, 12 deletions
diff --git a/roles/bootstrap/tasks/install-ubuntu.yml b/roles/bootstrap/tasks/install-ubuntu.yml
index 407da3c..c5b57ce 100644
--- a/roles/bootstrap/tasks/install-ubuntu.yml
+++ b/roles/bootstrap/tasks/install-ubuntu.yml
@@ -44,17 +44,20 @@
- "apt-get update"
- "apt-get install -y {{ bootstrap_distro.packages | join(' ') }}"
-- name: "Clean up old Linux Boot Manager entries"
- ansible.builtin.shell:
- cmd: |
- for entry in $(efibootmgr | grep "Linux Boot Manager" | cut -d'*' -f1 | tr -d 'Boot'); do
- efibootmgr -b $entry -B
- done
- changed_when: false
- failed_when: false
-
-# NOTE: bootctl is not run in chroot to workaround https://github.com/systemd/systemd/issues/36174
-- name: "Run bootctl"
+- name: "Ensure rEFInd bootloader installed"
+ ansible.builtin.command:
+ cmd: "arch-chroot {{ mnt_root_path }} apt-get install -y refind"
+ changed_when: true
+
+- name: "Install rEFInd"
ansible.builtin.command:
- cmd: "bootctl install --esp-path={{ mnt_boot_path }}"
+ cmd: "arch-chroot {{ mnt_root_path }} refind-install"
changed_when: true
+
+- name: "Configure rEFInd"
+ ansible.builtin.copy:
+ dest: "{{ mnt_root_path }}/boot/refind_linux.conf"
+ mode: "0644"
+ content: |
+ "Boot with defaults" "root=PARTLABEL={{ partition_root.name }} rw"
+ "Boot to terminal" "root=PARTLABEL={{ partition_root.name }} rw systemd.unit=multi-user.target"