From 296be49e6918fedb22d1dab040ff9fdf3624c055 Mon Sep 17 00:00:00 2001 From: Ahmed Abdelhalim Date: Mon, 13 Jul 2026 14:38:01 +0200 Subject: Refactor template naming for bootstrap --- .../templates/archlinux/archlinux.conf.j2 | 13 ++++++++++++ .../templates/archlinux/refind-sync-kernel.j2 | 4 ++++ roles/bootstrap/templates/raspberry.cmdline.j2 | 1 - roles/bootstrap/templates/raspberry.config.j2 | 23 ---------------------- .../templates/raspberry/raspberry.cmdline.j2 | 1 + .../templates/raspberry/raspberry.config.j2 | 23 ++++++++++++++++++++++ roles/bootstrap/templates/refind.conf.j2 | 2 +- roles/bootstrap/templates/refind_arch.conf.j2 | 13 ------------ roles/bootstrap/templates/refind_ubuntu.conf.j2 | 13 ------------ .../templates/ubuntu/refind-sync-kernel.j2 | 4 ++++ roles/bootstrap/templates/ubuntu/ubuntu.conf.j2 | 13 ++++++++++++ 11 files changed, 59 insertions(+), 51 deletions(-) create mode 100644 roles/bootstrap/templates/archlinux/archlinux.conf.j2 create mode 100644 roles/bootstrap/templates/archlinux/refind-sync-kernel.j2 delete mode 100644 roles/bootstrap/templates/raspberry.cmdline.j2 delete mode 100644 roles/bootstrap/templates/raspberry.config.j2 create mode 100644 roles/bootstrap/templates/raspberry/raspberry.cmdline.j2 create mode 100644 roles/bootstrap/templates/raspberry/raspberry.config.j2 delete mode 100644 roles/bootstrap/templates/refind_arch.conf.j2 delete mode 100644 roles/bootstrap/templates/refind_ubuntu.conf.j2 create mode 100644 roles/bootstrap/templates/ubuntu/refind-sync-kernel.j2 create mode 100644 roles/bootstrap/templates/ubuntu/ubuntu.conf.j2 (limited to 'roles/bootstrap/templates') diff --git a/roles/bootstrap/templates/archlinux/archlinux.conf.j2 b/roles/bootstrap/templates/archlinux/archlinux.conf.j2 new file mode 100644 index 0000000..0551cb3 --- /dev/null +++ b/roles/bootstrap/templates/archlinux/archlinux.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/archlinux/refind-sync-kernel.j2 b/roles/bootstrap/templates/archlinux/refind-sync-kernel.j2 new file mode 100644 index 0000000..c53ed96 --- /dev/null +++ b/roles/bootstrap/templates/archlinux/refind-sync-kernel.j2 @@ -0,0 +1,4 @@ +#!/bin/sh +mkdir -p /boot/efi/EFI/arch +cp /boot/vmlinuz-linux /boot/efi/EFI/arch/ +cp /boot/initramfs-linux.img /boot/efi/EFI/arch/ diff --git a/roles/bootstrap/templates/raspberry.cmdline.j2 b/roles/bootstrap/templates/raspberry.cmdline.j2 deleted file mode 100644 index 23390c4..0000000 --- a/roles/bootstrap/templates/raspberry.cmdline.j2 +++ /dev/null @@ -1 +0,0 @@ -console=serial0,115200 console=tty1 root={{ partition_root.dev }} rootfstype={{ partition_root.fstype }} elevator=deadline fsck.repair=yes rootwait diff --git a/roles/bootstrap/templates/raspberry.config.j2 b/roles/bootstrap/templates/raspberry.config.j2 deleted file mode 100644 index 0faa3df..0000000 --- a/roles/bootstrap/templates/raspberry.config.j2 +++ /dev/null @@ -1,23 +0,0 @@ -dtparam=audio=on -camera_auto_detect=1 -display_auto_detect=1 -auto_initramfs=1 -dtoverlay=vc4-kms-v3d -max_framebuffers=2 -disable_fw_kms_setup=1 -arm_64bit=1 -disable_overscan=1 -arm_boost=1 - -[pi5] -kernel=kernel_2712.img -dtparam=pciex1 -dtparam=pciex1_gen=2 - -[cm4] -otg_mode=1 - -[cm5] -dtoverlay=dwc2,dr_mode=host - -[all] diff --git a/roles/bootstrap/templates/raspberry/raspberry.cmdline.j2 b/roles/bootstrap/templates/raspberry/raspberry.cmdline.j2 new file mode 100644 index 0000000..23390c4 --- /dev/null +++ b/roles/bootstrap/templates/raspberry/raspberry.cmdline.j2 @@ -0,0 +1 @@ +console=serial0,115200 console=tty1 root={{ partition_root.dev }} rootfstype={{ partition_root.fstype }} elevator=deadline fsck.repair=yes rootwait diff --git a/roles/bootstrap/templates/raspberry/raspberry.config.j2 b/roles/bootstrap/templates/raspberry/raspberry.config.j2 new file mode 100644 index 0000000..0faa3df --- /dev/null +++ b/roles/bootstrap/templates/raspberry/raspberry.config.j2 @@ -0,0 +1,23 @@ +dtparam=audio=on +camera_auto_detect=1 +display_auto_detect=1 +auto_initramfs=1 +dtoverlay=vc4-kms-v3d +max_framebuffers=2 +disable_fw_kms_setup=1 +arm_64bit=1 +disable_overscan=1 +arm_boost=1 + +[pi5] +kernel=kernel_2712.img +dtparam=pciex1 +dtparam=pciex1_gen=2 + +[cm4] +otg_mode=1 + +[cm5] +dtoverlay=dwc2,dr_mode=host + +[all] diff --git a/roles/bootstrap/templates/refind.conf.j2 b/roles/bootstrap/templates/refind.conf.j2 index 3b15a3d..c12ea1c 100644 --- a/roles/bootstrap/templates/refind.conf.j2 +++ b/roles/bootstrap/templates/refind.conf.j2 @@ -7,4 +7,4 @@ hideui hints spoof_osx_version 12.7 {% endif %} include ubuntu.conf -include arch.conf +include archlinux.conf diff --git a/roles/bootstrap/templates/refind_arch.conf.j2 b/roles/bootstrap/templates/refind_arch.conf.j2 deleted file mode 100644 index 0551cb3..0000000 --- a/roles/bootstrap/templates/refind_arch.conf.j2 +++ /dev/null @@ -1,13 +0,0 @@ -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_ubuntu.conf.j2 b/roles/bootstrap/templates/refind_ubuntu.conf.j2 deleted file mode 100644 index 20d5586..0000000 --- a/roles/bootstrap/templates/refind_ubuntu.conf.j2 +++ /dev/null @@ -1,13 +0,0 @@ -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 %}" -} diff --git a/roles/bootstrap/templates/ubuntu/refind-sync-kernel.j2 b/roles/bootstrap/templates/ubuntu/refind-sync-kernel.j2 new file mode 100644 index 0000000..3b72d4e --- /dev/null +++ b/roles/bootstrap/templates/ubuntu/refind-sync-kernel.j2 @@ -0,0 +1,4 @@ +#!/bin/sh +mkdir -p /boot/efi/EFI/ubuntu +cp /boot/vmlinuz /boot/efi/EFI/ubuntu/ +cp /boot/initrd.img /boot/efi/EFI/ubuntu/ diff --git a/roles/bootstrap/templates/ubuntu/ubuntu.conf.j2 b/roles/bootstrap/templates/ubuntu/ubuntu.conf.j2 new file mode 100644 index 0000000..20d5586 --- /dev/null +++ b/roles/bootstrap/templates/ubuntu/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