Initial commit

This commit is contained in:
2026-07-02 15:56:21 +02:00
commit 4529a3c472
92 changed files with 13593 additions and 0 deletions
+41
View File
@@ -0,0 +1,41 @@
#!/usr/bin/env bash
# Runs INSIDE arch-chroot. systemd-boot + mkinitcpio with STATIC loader entries.
# mkinitcpio already built /boot/initramfs-linux*.img during pacstrap, and its
# pacman hooks rebuild them on every kernel update — nothing to regenerate here
# or later. The kernel cmdline lives in the loader entry's `options` line.
set -euo pipefail
bootctl install # ESP is mounted at /boot
ROOT_UUID="$(findmnt -no UUID /)"
# microcode image matching this CPU (both packages are installed)
case "$(grep -m1 -oE 'Intel|AMD' /proc/cpuinfo)" in
Intel) UCODE="initrd /intel-ucode.img" ;;
AMD) UCODE="initrd /amd-ucode.img" ;;
*) UCODE="" ;;
esac
mkdir -p /boot/loader/entries
cat > /boot/loader/loader.conf <<EOF
default arch.conf
timeout 3
console-mode keep
EOF
cat > /boot/loader/entries/arch.conf <<EOF
title Arch Linux
linux /vmlinuz-linux
$UCODE
initrd /initramfs-linux.img
options root=UUID=$ROOT_UUID rw
EOF
cat > /boot/loader/entries/arch-fallback.conf <<EOF
title Arch Linux (fallback initramfs)
linux /vmlinuz-linux
$UCODE
initrd /initramfs-linux-fallback.img
options root=UUID=$ROOT_UUID rw
EOF