Stage 6: server image with a console installer (0.4.0)

- server/ profile and build-iso.sh [desktop|server]; make iso-server,
  make qemu-server, run-qemu.sh --serial; login on tty and ttyS0
- das-server: SSH, chrony, NetworkManager/dhcpcd, Docker with Compose,
  nftables (closed except SSH, own table), fail2ban reading socklog,
  sshd without root passwords, Docker log rotation, tools
- das-server-install: dialog installer in Ukrainian and English, or
  unattended with --config; GPT + Btrfs subvolumes, GRUB for UEFI and BIOS,
  serial console, SSH key with optional keys-only logins
- das-install-common: mount-source and postinstall shared with Calamares
- dsv: runit service manager (list, enable, disable, start, stop,
  restart, status, logs) with bash completion, also on the desktop
- das-update split into a subpackage without GTK; the window and tray
  icon move to /usr/libexec/das/das-update-gui
- das-snapper-setup enables dbus, which snapper needs
- TODO: ISO size review with measured numbers and options

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
das
2026-10-19 21:28:26 +03:00
co-authored by Claude Opus 5.5
parent 5349a028c8
commit eba4516998
42 changed files with 1454 additions and 114 deletions
+17 -8
View File
@@ -1,16 +1,18 @@
#!/usr/bin/env bash
# Boots a Das OS ISO in QEMU (KVM when available).
#
# Usage: scripts/run-qemu.sh [--bios] [--disk] [path/to/image.iso]
# --bios boot with legacy BIOS instead of UEFI
# --disk attach out/qemu/disk.qcow2 (20 GB, created on first use) to test installing
# Without a path the newest ISO in out/iso is used.
# Usage: scripts/run-qemu.sh [--bios] [--disk] [--serial] [path/to/image.iso]
# --bios boot with legacy BIOS instead of UEFI
# --disk attach out/qemu/disk.qcow2 (20 GB, created on first use) to test installing
# --serial no window: the serial console in this terminal (server ISO), Ctrl-A X quits
# Without a path the newest desktop ISO in out/iso is used (server ISO with --serial).
set -euo pipefail
root=$(cd "$(dirname "$0")/.." && pwd)
state=$root/out/qemu
firmware=uefi
disk=false
serial=false
iso=""
die() {
@@ -22,8 +24,9 @@ for arg in "$@"; do
case $arg in
--bios) firmware=bios ;;
--disk) disk=true ;;
--serial) serial=true ;;
-h | --help)
sed -n '2,8s/^# \{0,1\}//p' "$0"
sed -n '2,9s/^# \{0,1\}//p' "$0"
exit 0
;;
-*) die "unknown option: $arg" ;;
@@ -32,17 +35,23 @@ for arg in "$@"; do
done
if [[ -z $iso ]]; then
iso=$(ls -t "$root"/out/iso/*.iso 2>/dev/null | head -n 1) || true
pattern="dasos-[0-9]*.iso"
[[ $serial == true ]] && pattern="dasos-server-*.iso"
iso=$(ls -t "$root"/out/iso/$pattern 2>/dev/null | head -n 1) || true
fi
[[ -n $iso && -f $iso ]] || die "no ISO found, run 'make iso' first"
args=(
-machine q35 -smp 4 -m 4096
-device virtio-vga -display gtk,zoom-to-fit=on
-device virtio-net-pci,netdev=net0 -netdev user,id=net0
-device qemu-xhci -device usb-tablet
-cdrom "$iso" -boot order=d
)
if [[ $serial == true ]]; then
# The guest's ttyS0 and the QEMU monitor share this terminal
args+=(-nographic -serial mon:stdio)
else
args+=(-device virtio-vga -display gtk,zoom-to-fit=on -device qemu-xhci -device usb-tablet)
fi
if [[ -w /dev/kvm ]]; then
args+=(-accel kvm -cpu host)