Make preseed fully unattended with Hyprland desktop from sid
Overhaul preseed.cfg from a semi-interactive installer (prompting for LUKS passphrase and user credentials) to a fully unattended dev/test setup with hardcoded credentials. Enable networking and configure a Debian sid pin to pull Hyprland, UWSM, SDDM, and foot during late_command. Add serial console support in GRUB for headless debugging. Also update the FSD with the "match upstream Omarchy" design principle and bump the last-updated date. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
5d96685ce5
commit
91e1d32f1c
@ -7,7 +7,7 @@
|
||||
| Version | 1.0 |
|
||||
| Status | Draft |
|
||||
| Created | 2026-02-15 |
|
||||
| Updated | 2026-02-15 |
|
||||
| Updated | 2026-02-20 |
|
||||
|
||||
## 1. Purpose
|
||||
|
||||
@ -40,6 +40,9 @@ This should match Omarchy's architecture (see [Omarchy Analysis](Omarchy.md) for
|
||||
|
||||
## 4. Design principles
|
||||
|
||||
- **Match upstream Omarchy** — Yino should replicate Omarchy's architecture, component choices, and conventions as
|
||||
closely as possible, substituting only what is strictly necessary for Debian compatibility. When multiple approaches
|
||||
exist, prefer the one Omarchy uses. When in doubt, ask the owner before deviating.
|
||||
- Version control (git) must be used
|
||||
- Less is more, minimize dependencies, avoid pulling in extra dependencies, always talk through with owner first
|
||||
- Keep it simple, KISS principle applies
|
||||
|
||||
@ -1,22 +1,34 @@
|
||||
# Yino preseed configuration for Debian 13 (Trixie)
|
||||
# Performs an unattended install, prompting only for:
|
||||
# 1. LUKS encryption passphrase
|
||||
# 2. Full name, username, and password
|
||||
# Fully unattended install with hardcoded test credentials.
|
||||
# TODO: For production, remove hardcoded passwords and prompt interactively.
|
||||
|
||||
# Locale and keyboard
|
||||
d-i debian-installer/locale string en_US.UTF-8
|
||||
d-i keyboard-configuration/xkb-keymap select us
|
||||
|
||||
# Network — skip (offline DVD install)
|
||||
d-i netcfg/enable boolean false
|
||||
# Network — DHCP (needed to pull Hyprland from sid)
|
||||
d-i netcfg/enable boolean true
|
||||
d-i netcfg/choose_interface select auto
|
||||
d-i netcfg/get_hostname string yino
|
||||
d-i netcfg/get_domain string local
|
||||
d-i netcfg/hostname string yino
|
||||
|
||||
# Mirror — no network mirror
|
||||
d-i apt-setup/use_mirror boolean false
|
||||
# Mirror — Debian archive (needed for Hyprland from sid)
|
||||
d-i apt-setup/use_mirror boolean true
|
||||
d-i mirror/country string manual
|
||||
d-i mirror/http/hostname string deb.debian.org
|
||||
d-i mirror/http/directory string /debian
|
||||
d-i mirror/http/proxy string
|
||||
|
||||
# Clock
|
||||
d-i clock-setup/utc boolean true
|
||||
d-i time/zone string UTC
|
||||
|
||||
# LUKS encryption passphrase (hardcoded for dev/test)
|
||||
d-i partman-crypto/passphrase string yinoyino
|
||||
d-i partman-crypto/passphrase-again string yinoyino
|
||||
d-i partman-crypto/weak_passphrase boolean true
|
||||
|
||||
# Partitioning — encrypted LVM with btrfs root
|
||||
d-i partman-auto/method string crypto
|
||||
d-i partman-lvm/device_remove_lvm boolean true
|
||||
@ -32,6 +44,14 @@ d-i partman/choose_partition select finish
|
||||
d-i partman/confirm boolean true
|
||||
d-i partman/confirm_nooverwrite boolean true
|
||||
|
||||
# User account (hardcoded for dev/test)
|
||||
d-i passwd/root-login boolean false
|
||||
d-i passwd/user-fullname string Yino User
|
||||
d-i passwd/username string yino
|
||||
d-i passwd/user-password string yinoyino
|
||||
d-i passwd/user-password-again string yinoyino
|
||||
d-i user-setup/allow-password-weak boolean true
|
||||
|
||||
# Packages — minimal base + essentials
|
||||
tasksel tasksel/first multiselect standard
|
||||
d-i pkgsel/include string sudo btrfs-progs
|
||||
@ -57,13 +77,44 @@ d-i apt-setup/cdrom/set-first boolean false
|
||||
d-i apt-setup/cdrom/set-next boolean false
|
||||
d-i apt-setup/cdrom/set-failed boolean false
|
||||
|
||||
# Skip media integrity check (blocks unattended install)
|
||||
d-i cdrom-checker/start boolean false
|
||||
|
||||
# Finish
|
||||
d-i finish-install/reboot_in_progress note
|
||||
|
||||
# Post-install: enable auto-login on tty1 for the created user
|
||||
# Post-install: configure serial console, SDDM + UWSM + Hyprland desktop
|
||||
d-i preseed/late_command string \
|
||||
USER=$(grep ':x:1000:' /target/etc/passwd | cut -d: -f1); \
|
||||
mkdir -p /target/etc/systemd/system/getty@tty1.service.d; \
|
||||
echo '[Service]' > /target/etc/systemd/system/getty@tty1.service.d/autologin.conf; \
|
||||
echo 'ExecStart=' >> /target/etc/systemd/system/getty@tty1.service.d/autologin.conf; \
|
||||
echo "ExecStart=-/sbin/agetty --autologin $USER --noclear %I \$TERM" >> /target/etc/systemd/system/getty@tty1.service.d/autologin.conf
|
||||
LOG=/target/var/log/yino-late-command.log; \
|
||||
echo "=== Yino late_command start ===" > $LOG; \
|
||||
echo "USER=$USER" >> $LOG; \
|
||||
echo "--- GRUB serial console ---" >> $LOG; \
|
||||
sed -i 's/^GRUB_CMDLINE_LINUX_DEFAULT=.*/GRUB_CMDLINE_LINUX_DEFAULT="quiet"/' /target/etc/default/grub; \
|
||||
sed -i 's/^GRUB_CMDLINE_LINUX=.*/GRUB_CMDLINE_LINUX="console=ttyS0,115200n8 console=tty0"/' /target/etc/default/grub; \
|
||||
echo 'GRUB_TERMINAL="serial console"' >> /target/etc/default/grub; \
|
||||
echo 'GRUB_SERIAL_COMMAND="serial --speed=115200 --unit=0 --word=8 --parity=no --stop=1"' >> /target/etc/default/grub; \
|
||||
in-target update-grub >> $LOG 2>&1; \
|
||||
echo "--- DNS setup ---" >> $LOG; \
|
||||
echo "nameserver 1.1.1.1" > /target/etc/resolv.conf; \
|
||||
echo "--- sid repo ---" >> $LOG; \
|
||||
echo 'deb http://deb.debian.org/debian sid main contrib non-free-firmware' > /target/etc/apt/sources.list.d/sid.list; \
|
||||
printf 'Package: *\nPin: release a=unstable\nPin-Priority: 100\n' > /target/etc/apt/preferences.d/sid-low-priority; \
|
||||
echo "--- apt-get update ---" >> $LOG; \
|
||||
in-target apt-get update >> $LOG 2>&1 || echo "FAILED: apt-get update (exit $?)" >> $LOG; \
|
||||
echo "--- install sddm ---" >> $LOG; \
|
||||
in-target env DEBIAN_FRONTEND=noninteractive apt-get -y install sddm >> $LOG 2>&1 || echo "FAILED: install sddm (exit $?)" >> $LOG; \
|
||||
echo "--- install hyprland uwsm foot ---" >> $LOG; \
|
||||
in-target env DEBIAN_FRONTEND=noninteractive apt-get -y -t unstable install hyprland uwsm foot >> $LOG 2>&1 || echo "FAILED: install hyprland (exit $?)" >> $LOG; \
|
||||
echo "--- SDDM config ---" >> $LOG; \
|
||||
mkdir -p /target/etc/sddm.conf.d; \
|
||||
printf '[Autologin]\nUser=%s\nSession=hyprland-uwsm\n\n[Theme]\nCurrent=breeze\n' "$USER" > /target/etc/sddm.conf.d/autologin.conf; \
|
||||
in-target systemctl enable sddm >> $LOG 2>&1 || echo "FAILED: enable sddm" >> $LOG; \
|
||||
mkdir -p /target/usr/share/wayland-sessions; \
|
||||
printf '[Desktop Entry]\nName=Hyprland (UWSM)\nComment=Hyprland via Universal Wayland Session Manager\nExec=uwsm start hyprland.desktop\nType=Application\nDesktopNames=Hyprland\n' > /target/usr/share/wayland-sessions/hyprland-uwsm.desktop; \
|
||||
echo "--- Hyprland config ---" >> $LOG; \
|
||||
UHOME=/target/home/$USER; \
|
||||
mkdir -p $UHOME/.config/hyprland; \
|
||||
printf 'monitor = ,preferred,auto,1\n\nenv = WLR_NO_HARDWARE_CURSORS,1\nenv = WLR_RENDERER_ALLOW_SOFTWARE,1\n\nexec-once = foot --server\n\n$mainMod = SUPER\n\nbind = $mainMod, Return, exec, foot\nbind = $mainMod SHIFT, Q, killactive\nbind = $mainMod SHIFT, E, exit\n\nbind = $mainMod, 1, workspace, 1\nbind = $mainMod, 2, workspace, 2\nbind = $mainMod, 3, workspace, 3\nbind = $mainMod, 4, workspace, 4\nbind = $mainMod, 5, workspace, 5\n\nbind = $mainMod, left, movefocus, l\nbind = $mainMod, right, movefocus, r\nbind = $mainMod, up, movefocus, u\nbind = $mainMod, down, movefocus, d\n' > $UHOME/.config/hyprland/hyprland.conf; \
|
||||
chown -R 1000:1000 $UHOME/.config; \
|
||||
echo "=== Yino late_command done ===" >> $LOG
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user