hashipi

Raspberry Pi home lab with Nomad and OpenBao
git clone https://git.in0rdr.ch/hashipi.git
Log | Files | Refs | Pull requests |Archive | README

commit 7e0a4e523265a361800c3817c91bcb0380e5b3a6
parent 04c31f4db8aaef27478c32d6a009ac44b0e62454
Author: Andreas Gruhler <agruhl@gmx.ch>
Date:   Sat, 22 Nov 2025 11:15:58 +0100

feat(intel): eth0 ifname and 1 growroot partition

Diffstat:
Mconfig/preseed.cfg | 37++++++++++++++++++++++++++++++-------
Mhashi-pi.pkr.hcl | 2+-
2 files changed, 31 insertions(+), 8 deletions(-)

diff --git a/config/preseed.cfg b/config/preseed.cfg @@ -1,3 +1,5 @@ +# https://www.debian.org/releases/stable/example-preseed.txt + # Preseeding only locale sets language, country and locale. d-i debian-installer/locale string en_US @@ -6,7 +8,12 @@ d-i console-setup/ask_detect boolean false d-i keyboard-configuration/xkb-keymap select us # Set the network interface -d-i netcfg/choose_interface select enp0s2 +#d-i netcfg/choose_interface select auto +d-i netcfg/choose_interface select eth0 + +# https://unix.stackexchange.com/a/209522 +# https://sources.debian.org/src/netcfg/1.131/debian/netcfg-common.templates +netcfg/target_network_config select ifupdown ### Clock and time zone setup d-i clock-setup/utc boolean true @@ -45,7 +52,7 @@ apt-cdrom-setup apt-setup/cdrom/set-double boolean false popularity-contest popularity-contest/participate boolean false ### Partitioning -d-i partman-auto/method string lvm +d-i partman-auto/method string regular # This makes partman automatically partition without confirmation. d-i partman-partitioning/confirm_write_new_label boolean true @@ -56,16 +63,32 @@ d-i partman/confirm_nooverwrite boolean true # Choose atomic partitioning recipes (all files in one partition) d-i partman-auto/choose_recipe select atomic # Use max space available for the new LVM volume -d-i partman-auto-lvm/guided_size string max +#d-i partman-auto-lvm/guided_size string max # Confirmation to write the lvm partitions -d-i partman-lvm/confirm boolean true -d-i partman-lvm/confirm_nooverwrite boolean true +#d-i partman-lvm/confirm boolean true +#d-i partman-lvm/confirm_nooverwrite boolean true + +# For new users, personal Debian boxes, home systems, and other single-user +# setups, a single / partition (plus swap) is probably the easiest, simplest +# way to go. The recommended partition type is ext4. +# https://www.debian.org/releases/stable/amd64/apcs03.en.html +d-i partman-auto/expert_recipe string \ + root :: \ + 8000 8000 8000 ext4 \ + $primary{ } method{ format } format{ } \ + use_filesystem{ } filesystem{ ext4 } \ + mountpoint{ / } . + +# Continue w/o swap (don't go back) +d-i partman-basicfilesystems/no_swap boolean false # Create root account for bootstrap scripts d-i passwd/root-login boolean true # disable root password login d-i passwd/root-password-crypted password !disabled +#d-i passwd/root-password password r00t +#d-i passwd/root-password-again password r00t ### Account setup d-i passwd/make-user boolean true @@ -83,12 +106,12 @@ d-i user-setup/encrypt-home boolean false ### Package selection tasksel tasksel/first multiselect standard, ssh-server -d-i pkgsel/include string openssh-server build-essential sudo gnupg2 unzip +d-i pkgsel/include string cloud-initramfs-growroot openssh-server build-essential sudo gnupg2 unzip lxc d-i pkgsel/upgrade select full-upgrade # Allow ssh root login d-i preseed/late_command string \ - in-target sed -i 's/^.*PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config + in-target sed -i 's/^.*PermitRootLogin.*/PermitRootLogin yes/g' /etc/ssh/sshd_config # Configure sudoers and ssh pubkeys d-i preseed/late_command string \ diff --git a/hashi-pi.pkr.hcl b/hashi-pi.pkr.hcl @@ -175,7 +175,7 @@ source "cross" "hashipi" { source "qemu" "hashiintel" { accelerator = "kvm" - boot_command = ["<esc><wait>", "install <wait>", " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>", "debian-installer=en_US.UTF-8 <wait>", "auto <wait>", "locale=en_US.UTF-8 <wait>", "kbd-chooser/method=us <wait>", "keyboard-configuration/xkb-keymap=us <wait>", "netcfg/get_hostname={{ .Name }} <wait>", "netcfg/get_domain=libvirt <wait>", "fb=false <wait>", "debconf/frontend=noninteractive <wait>", "console-setup/ask_detect=false <wait>", "console-keymaps-at/keymap=us <wait>", "grub-installer/bootdev=/dev/sda <wait>", "pubkey=\"${var.authorized_keys}\" <wait>", "<enter><wait>"] + boot_command = ["<esc><wait>", "install <wait>", " preseed/url=http://{{ .HTTPIP }}:{{ .HTTPPort }}/preseed.cfg <wait>", "debian-installer=en_US.UTF-8 <wait>", "auto <wait>", "locale=en_US.UTF-8 <wait>", "kbd-chooser/method=us <wait>", "keyboard-configuration/xkb-keymap=us <wait>", "netcfg/get_hostname={{ .Name }} <wait>", "net.ifnames=0 <wait>", "fb=false <wait>", "debconf/frontend=noninteractive <wait>", "console-setup/ask_detect=false <wait>", "console-keymaps-at/keymap=us <wait>", "grub-installer/bootdev=/dev/sda <wait>", "pubkey=\"${var.authorized_keys}\" <wait>", "<enter><wait>"] boot_wait = "5s" disk_interface = "virtio" disk_size = "14000"