From 691d9a21678a44cb73dfcb295a50e17a013546d4 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Thu, 23 Apr 2026 00:43:45 +0200 Subject: Refactor bootstrap with mac support --- roles/bootstrap/templates/refind.conf.j2 | 5 +++++ roles/bootstrap/templates/refind_arch.conf.j2 | 13 +++++++++++++ roles/bootstrap/templates/refind_linux.conf.j2 | 2 -- roles/bootstrap/templates/refind_ubuntu.conf.j2 | 13 +++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) create mode 100644 roles/bootstrap/templates/refind_arch.conf.j2 delete mode 100644 roles/bootstrap/templates/refind_linux.conf.j2 create mode 100644 roles/bootstrap/templates/refind_ubuntu.conf.j2 (limited to 'roles/bootstrap/templates') diff --git a/roles/bootstrap/templates/refind.conf.j2 b/roles/bootstrap/templates/refind.conf.j2 index 995ae1e..3b15a3d 100644 --- a/roles/bootstrap/templates/refind.conf.j2 +++ b/roles/bootstrap/templates/refind.conf.j2 @@ -1,5 +1,10 @@ timeout 5 textonly true +scan_all_linux_kernels false +dont_scan_files vmlinuz,vmlinuz-linux,initrd.img,initramfs-linux.img +hideui hints {% if bootstrap_mac %} spoof_osx_version 12.7 {% endif %} +include ubuntu.conf +include arch.conf diff --git a/roles/bootstrap/templates/refind_arch.conf.j2 b/roles/bootstrap/templates/refind_arch.conf.j2 new file mode 100644 index 0000000..0551cb3 --- /dev/null +++ b/roles/bootstrap/templates/refind_arch.conf.j2 @@ -0,0 +1,13 @@ +menuentry "Arch Linux" { + volume "boot" + loader \EFI\arch\vmlinuz-linux + initrd \EFI\arch\initramfs-linux.img + options "root=PARTLABEL={{ partition_root.name }} rw console=tty1{% if bootstrap_mac %} {{ bootstrap_mac_boot_args }}{% endif %}" +} + +menuentry "Arch Linux (terminal)" { + volume "boot" + loader \EFI\arch\vmlinuz-linux + initrd \EFI\arch\initramfs-linux.img + options "root=PARTLABEL={{ partition_root.name }} rw console=tty1 systemd.unit=multi-user.target{% if bootstrap_mac %} {{ bootstrap_mac_boot_args }}{% endif %}" +} diff --git a/roles/bootstrap/templates/refind_linux.conf.j2 b/roles/bootstrap/templates/refind_linux.conf.j2 deleted file mode 100644 index 9b5868b..0000000 --- a/roles/bootstrap/templates/refind_linux.conf.j2 +++ /dev/null @@ -1,2 +0,0 @@ -"{{ ansible_facts['distribution'] }}" "root=PARTLABEL={{ partition_root.name }} rw console=tty1{% if bootstrap_mac %} {{ bootstrap_mac_boot_args }}{% endif %}" -"{{ ansible_facts['distribution'] }} (terminal)" "root=PARTLABEL={{ partition_root.name }} rw console=tty1 systemd.unit=multi-user.target{% if bootstrap_mac %} {{ bootstrap_mac_boot_args }}{% endif %}" diff --git a/roles/bootstrap/templates/refind_ubuntu.conf.j2 b/roles/bootstrap/templates/refind_ubuntu.conf.j2 new file mode 100644 index 0000000..20d5586 --- /dev/null +++ b/roles/bootstrap/templates/refind_ubuntu.conf.j2 @@ -0,0 +1,13 @@ +menuentry "Ubuntu" { + volume "boot" + loader \EFI\ubuntu\vmlinuz + initrd \EFI\ubuntu\initrd.img + options "root=PARTLABEL={{ partition_root.name }} rw console=tty1{% if bootstrap_mac %} {{ bootstrap_mac_boot_args }}{% endif %}" +} + +menuentry "Ubuntu (terminal)" { + volume "boot" + loader \EFI\ubuntu\vmlinuz + initrd \EFI\ubuntu\initrd.img + options "root=PARTLABEL={{ partition_root.name }} rw console=tty1 systemd.unit=multi-user.target{% if bootstrap_mac %} {{ bootstrap_mac_boot_args }}{% endif %}" +} -- cgit v1.2.3