This commit is contained in:
Bart Sjerps
2026-06-10 13:28:26 +02:00
parent e49e2d3909
commit 0a01479d24
8 changed files with 93 additions and 4 deletions
+1
View File
@@ -0,0 +1 @@
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCdE/iMpuqJUG6FC3hLqOD5uREa6v6xXR3HeMBg1NibGVYkr0WmfvsckVsStKYA0SF3PLFs+fWTTJ6iFTDJvcclzADKe0REekWWrR7kNJR5RHoDwo6/hzm22tyGMH5i5JnvRElDmlLgmeXChWtqLVo2IP1JZrGyT/GTl4ViSZjNfdgCHJNxzmBgHdp31Mv9I7/1vv3A7ucJ3BJpbIL4Ck6QidFz1fQUWIJrXtNsdqvO/9PcFl/v75etfQRNPQ3HLMbWiQu6hVcKpxuwj0qVaXA+WPQAn5GeBKIkRYMsjEVC2fUS1/IVp47kmnXsw0H3fgGXPmoAEsRKs9niVOwegvWj workstation
+5
View File
@@ -0,0 +1,5 @@
#!/bin/bash
dd if=/dev/zero of=/dev/sda bs=1M count=1000
poweroff
+16
View File
@@ -0,0 +1,16 @@
#!/bin/bash
#============================================================================
# Title : lab-firstboot
# Description : Open a postinstall session on tty8 and run post-install
# ---------------------------------------------------------------------------
# Prevent openvt "could not deallocate" issue by redirecting stdin and stderr
exec 1>/dev/null
exec 2>/dev/null
# Don't run if homelab is already installed
test -f /etc/postinstall && exit
openvt -c 8 -w -f -s /var/lib/misc/custom/post-install.sh
sleep 15
+19
View File
@@ -0,0 +1,19 @@
#!/bin/bash
#============================================================================
# Title : post-install
# Description :
# ---------------------------------------------------------------------------
rpm -q gpg-pubkey-350d275d-6279464b &>/dev/null || rpm --import /etc/pki/rpm-gpg/RPM-GPG-KEY-Rocky-9
dnf -y install epel-release bash-completion
test $(systemd-detect-virt) == "kvm" && dnf -y install qemu-guest-agent
systemctl is-active --quiet qemu-guest-agent || systemctl start qemu-guest-agent
dnf install -y dnf-automatic chrony langpacks-en glibc-langpack-nl screen wget tar bzip2 unzip lsof \
nscd nfs-utils tmpwatch autofs git nfs-utils net-tools sysstat bash-completion rsync vim atop htop iftop iotop pv dstat nmap
systemctl is-active --quiet autofs || systemctl enable --now autofs
touch /etc/postinstall
+14
View File
@@ -0,0 +1,14 @@
#!/bin/bash
#============================================================================
# Title : post-install
# Description : postinstall section for running by Anaconda kickstart
# ---------------------------------------------------------------------------
mkdir -p /root/.ssh
cp /var/lib/misc/custom/postinstall.service /etc/systemd/system
cp /var/lib/misc/custom/authorized_keys /root/.ssh
chmod 600 /root/.ssh/authorized_keys
systemctl enable postinstall
+11
View File
@@ -0,0 +1,11 @@
[Unit]
Description=Postinstaller at first boot
After=network.target
[Service]
Type=simple
ExecStart=/var/lib/misc/custom/firstboot.sh
TimeoutStartSec=0
[Install]
WantedBy=default.target
+4
View File
@@ -0,0 +1,4 @@
TZ=Europe/Amsterdam
REPO=http://kickstart.lan/iso/Rocky-9.4-x86_64-minimal/minimal/
ROOTPW='$6$1mQhye0V5LujdR4F$87zIHy3bMZgjt02xY/F59eWk58VXh5CDSL0t9AInj6QOjLmYF0TDVeGLJH/bIKaGqXrbVJAgDHYZ9uT1uTMRX.'