diff --git a/TODO b/TODO index fd2e9e8..1d5c768 100644 --- a/TODO +++ b/TODO @@ -6,4 +6,8 @@ * rebooting could * wipe everything, or * attempt to resurrect (import?) previous - +* include a cloud-image or two directly in the ISO + via a hook, have included a cloud-init image, and a container template + from: https://cloud-images.ubuntu.com/jammy/current/ + Other Options: + * https://cloud-images.ubuntu.com/minimal/releases/jammy/release/ diff --git a/live-build/config/hooks/normal/9888-dl-proxmox-template-images.hook.chroot b/live-build/config/hooks/normal/9888-dl-proxmox-template-images.hook.chroot new file mode 100755 index 0000000..395de8f --- /dev/null +++ b/live-build/config/hooks/normal/9888-dl-proxmox-template-images.hook.chroot @@ -0,0 +1,9 @@ +#!/bin/sh +set -e + +IMG_DL_DIR="/var/lib/vz/images/000" +TPL_DL_DIR="/var/lib/vz/template/cache" +mkdir -p "${IMG_DL_DIR}" +mkdir -p "${TPL_DL_DIR}" +curl --progress-bar --fail --retry 3 --output "${IMG_DL_DIR}/jammy-server-cloudimg-amd64-disk-kvm.qcow2" "https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64-disk-kvm.img" +curl --progress-bar --fail --retry 3 --remote-name --output-dir "${TPL_DL_DIR}" "http://download.proxmox.com/images/system/ubuntu-22.04-standard_22.04-1_amd64.tar.zst" diff --git a/live-build/config/hooks/normal/9999-write-vmbr0-iface.hook.chroot b/live-build/config/hooks/normal/9999-write-vmbr0-iface.hook.chroot index 232bc02..0750530 100755 --- a/live-build/config/hooks/normal/9999-write-vmbr0-iface.hook.chroot +++ b/live-build/config/hooks/normal/9999-write-vmbr0-iface.hook.chroot @@ -1,10 +1,25 @@ #!/bin/sh set -e -cat << EOIface > /etc/network/interfaces.d/vmbr0 +# For the default networking, Proxmox requires that a bridge device exits, and +# does NOT recognize configuration dropped into /etc/network/interfaces.d/ + +cat << EOIface0 > /etc/network/interfaces.d/vmbr0 auto vmbr0 +#iface vmbr0 inet6 auto iface vmbr0 inet dhcp bridge-ports enp2s0f0 bridge-stp off bridge-fd 0 -EOIface +EOIface0 + +cat << EOIface1 > /etc/network/interfaces.d/vmbr1 +auto vmbr1 +#iface vmbr1 inet6 auto +iface vmbr1 inet static + address 10.4.0.1 + netmask 255.255.0.0 + bridge-ports none + bridge-stp off + bridge-fd 0 +EOIface1 diff --git a/live-build/config/includes.chroot_after_packages/etc/dhcp/dhclient-enter-hooks.d/hostname b/live-build/config/includes.chroot_after_packages/etc/dhcp/dhclient-enter-hooks.d/hostname index 0a607ae..a0b0729 100755 --- a/live-build/config/includes.chroot_after_packages/etc/dhcp/dhclient-enter-hooks.d/hostname +++ b/live-build/config/includes.chroot_after_packages/etc/dhcp/dhclient-enter-hooks.d/hostname @@ -2,8 +2,13 @@ set -e if [ -n "${new_host_name}" ]; then + fullname="${new_host_name}" + if [ -n "${new_domain_name}" ]; then + fullname="${fullname}.${new_domain_name}" + fi cat << EOName > /etc/hostname -${new_host_name} +${fullname} EOName + unset fullname hostname -F /etc/hostname fi diff --git a/live-build/config/package-lists/ansible.list.chroot b/live-build/config/package-lists/ansible.list.chroot new file mode 100644 index 0000000..16f27b9 --- /dev/null +++ b/live-build/config/package-lists/ansible.list.chroot @@ -0,0 +1 @@ +python3-proxmoxer diff --git a/live-build/config/package-lists/nfs.list.chroot b/live-build/config/package-lists/nfs.list.chroot new file mode 100644 index 0000000..62dd216 --- /dev/null +++ b/live-build/config/package-lists/nfs.list.chroot @@ -0,0 +1 @@ +nfs-kernel-server diff --git a/live-build/config/package-lists/random.list.chroot b/live-build/config/package-lists/random.list.chroot new file mode 100644 index 0000000..986f98b --- /dev/null +++ b/live-build/config/package-lists/random.list.chroot @@ -0,0 +1,3 @@ +cmatrix +tree +tmux