commit 804a82d1d354de74ac510e5aa05b1b256a4c1372 Author: Ezekiel Date: Mon Feb 26 16:47:11 2024 +0000 Basic Image with functional Proxomx * _requires_ DHCP to provide a hostname that has a functional PTR * some TODOs included diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..2dd2e0c --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +*.gpg +*.iso +.build/ diff --git a/TODO b/TODO new file mode 100644 index 0000000..fd2e9e8 --- /dev/null +++ b/TODO @@ -0,0 +1,9 @@ +* vmbr0 might need to use another "bridge-ports" ifname? +* auto-create a proxmox admin user +* auto-create a proxmox API token +* auto-provision storage at boot + * how intelligent to be with storage? + * rebooting could + * wipe everything, or + * attempt to resurrect (import?) previous + diff --git a/bin/build-iso b/bin/build-iso new file mode 100755 index 0000000..b32ecd3 --- /dev/null +++ b/bin/build-iso @@ -0,0 +1,19 @@ +#!/bin/sh +set -e + +apt-get update +apt-get install live-build --yes + +mkdir -p build dist +cp -r live-build/* build/ +cd build + +lb config + +cp -r auto ../live-build +cp -r config ../live-build + +lb build + +ls -lah . +cp -v *.iso ../dist/ diff --git a/bin/build-iso-docker b/bin/build-iso-docker new file mode 100755 index 0000000..11e7c53 --- /dev/null +++ b/bin/build-iso-docker @@ -0,0 +1,14 @@ +#!/bin/sh +set -e + +IMAGE=debian:bookworm-slim +echo "${PWD}" + +docker volume create live-build-cache || true +#docker run --privileged --rm --workdir /app --env _DEBUG="${LB_DEBUG:-false}" \ +docker run --privileged --workdir /app --env _DEBUG="${LB_DEBUG:-false}" \ + --volume "live-build-cache:/app/build/cache" \ + --volume "${PWD}/bin:/app/bin" \ + --volume "${PWD}/dist:/app/dist" \ + --volume "${PWD}/live-build:/app/live-build" \ + "${IMAGE}" "bin/build-iso" diff --git a/live-build/auto/build b/live-build/auto/build new file mode 100755 index 0000000..8b7e24d --- /dev/null +++ b/live-build/auto/build @@ -0,0 +1,5 @@ +#!/bin/sh +set -e + +lb build noauto "${@}" 2>&1 | tee build.log + diff --git a/live-build/auto/clean b/live-build/auto/clean new file mode 100755 index 0000000..c47c6e9 --- /dev/null +++ b/live-build/auto/clean @@ -0,0 +1,9 @@ +#!/bin/sh +set -e + +lb clean noauto "${@}" + +rm -f config/binary config/bootstrap config/chroot config/common config/source +rm -f config/control + +rm -f build.log diff --git a/live-build/auto/config b/live-build/auto/config new file mode 100755 index 0000000..8410c87 --- /dev/null +++ b/live-build/auto/config @@ -0,0 +1,16 @@ +#!/bin/sh +# live-build configuration script +# see 'man lb config' +set -e + +lb config noauto \ + --clean \ + --ignore-system-defaults \ + --mode debian \ + --debian-installer "none" \ + --linux-packages "linux-image" \ + --archive-areas "main contrib non-free-firmware non-free" \ + --mirror-bootstrap "http://cdn.debian.net/debian/" \ + --mirror-chroot "http://cdn.debian.net/debian/" \ + --firmware-chroot "false" \ + "${@}" diff --git a/live-build/config/archives/proxmox-release-bookworm.key.chroot b/live-build/config/archives/proxmox-release-bookworm.key.chroot new file mode 100644 index 0000000..5262d41 --- /dev/null +++ b/live-build/config/archives/proxmox-release-bookworm.key.chroot @@ -0,0 +1,29 @@ +-----BEGIN PGP PUBLIC KEY BLOCK----- + +mQINBGODZZwBEADMA2dbTBXHRkvaOApNhPSRhyuhVfImTCGrUEFMMaUZ0vrEZRf7 +wpG7MTVlrQ2gOMshieGU1Oo+Kat5z0MN3g5Q+tck/OG43NQXkoXUkfsV3fiGZ34d +MyiNEYDJB3EcVnX+99OWYmhP2ZcY0rgkSxBFKYpwphclw0gTu7osFu8FB+xFykgi +qqT5PjJryLg8ltE/srt7XTLRusMvPHdrw3OUF6xDIu7YsCsZ2CQu/5BlbWmbhG6J +t3Du7la6t17RFa/jhdRuRPL37VXMLnvc4hQXxsyQgP13kkKXzSzNwgVKcJxzAz4Y +eADAjtQmrnYnwRQahfiob7snTqtxdgE1pPBvSZS/1MXdjGU2nYFcuaOjXJKy2f8n +tpjtXTkTiEDB36OF78K2E9OifrTuqliHylVrF5fPdNax993xcY/VA9DRaUp1WzQy +7Aa95v25vfmdzRlEnlEmGKmXA0XJhUs+dy0vy+9uWwES9z9pL056FcH7NKfST/nF +DwamTVWugKzhmADRSTIdiJ4hW9CfN7gFJxHsodmqUQ80EtJvjzzmtqXMNAv6Yu4o +0H/9dNXlBZP4O4yazRWmZ9hcETbaupaP1sPGKdbYPaeU+eGDZkbhjAnYQXlg3h87 +nRlQUbWw/oa2CqBA7Z4udpQoeaTfogcHHiZSBIozy/LC5QfPKk/gu3PYPQARAQAB +tDpQcm94bW94IEJvb2t3b3JtIFJlbGVhc2UgS2V5IDxwcm94bW94LXJlbGVhc2VA +cHJveG1veC5jb20+iQJUBBMBCgA+FiEE9OE2xnzc5Brm3m/IEUCvj2OeDDkFAmOD +ZZwCGwMFCRLMAwAFCwkIBwIGFQoJCAsCBBYCAwECHgECF4AACgkQEUCvj2OeDDm5 +9w/8CCIfeNtNkrs9Q6WFZEd4Ot+an3UxU00M3QO74LAeLPj8wbCRG1iN3j19sv0e +d6vSyLz9UX79HkiiAHta9GA15MmZa6uTrABBfF8xPpDUPadpPXSAQmaUhr3NgLIB +6jUVWEoBuHpxSwE3DEGgNwypTqgAr0f30mr+iCOd3DcwgkhfIPwWX6GBRWEn8QUj +U7M7jSm9ExtLGy+sBoXsFc4h8I2Q9Yrfe85oRZIHCRKsc1o8TuxvCB3YPntOSZJU +VjV+o8PzTTjWhCjuY+OMKyiiOgbfrtsRhB4PzQ6ZG8655Q+QjAy9+boN0OO/lzRb +/Jpup6zpOvOIWGouvZ77FtCquPzwBiOvxHm7wE2TTVTE48DJDdmzKNFaXf1DQMHA +THLEiU4iI6KoBw+MYPCKSauas77dw4Ftm6jQA+BjtulzBMLT4nq65oQ8lAB7ukBH +CYrI1qQIoGq0c3VuYcO36uW9kRI9InNSM6jymeZJ+SvrREvh+Izzwm1zf+oWtrw2 +cyFFF5pCtuaB3i2B1L0tPxi9NWEF7d3e43bkg10TK19Ea0UqgdnMdCHFvHDFz+BA +LuYbTFey1WjOXavOEVfWkC0fpyGjFiMNWUp6FGrxfnOiG25hln+eCWWiWzcTgVJ6 +7mqm2XbzSMa8Z+7u6L+BTa8P7OZmuPyCjzIJtE1E1CXH+/o= +=YZF1 +-----END PGP PUBLIC KEY BLOCK----- diff --git a/live-build/config/archives/proxmox-release-bookworm.list.chroot b/live-build/config/archives/proxmox-release-bookworm.list.chroot new file mode 100644 index 0000000..b5ad90c --- /dev/null +++ b/live-build/config/archives/proxmox-release-bookworm.list.chroot @@ -0,0 +1,2 @@ +# Proxmox VE No-Subscription +deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription diff --git a/live-build/config/binary b/live-build/config/binary new file mode 100644 index 0000000..b785aee --- /dev/null +++ b/live-build/config/binary @@ -0,0 +1,119 @@ +# config/binary - options for live-build(7), binary stage + +# Set image type +LB_IMAGE_TYPE="iso-hybrid" + +# Set image filesystem +LB_BINARY_FILESYSTEM="fat32" + +# Set apt/aptitude generic indices +LB_APT_INDICES="true" + +# Set boot parameters +LB_BOOTAPPEND_LIVE="boot=live components quiet splash" + +# Set boot parameters +LB_BOOTAPPEND_INSTALL="" + +# Set boot parameters +LB_BOOTAPPEND_LIVE_FAILSAFE="boot=live components memtest noapic noapm nodma nomce nolapic nosmp nosplash vga=788" + +# Set BIOS bootloader +LB_BOOTLOADER_BIOS="syslinux" + +# Set EFI bootloader +LB_BOOTLOADER_EFI="grub-efi" + +# Set bootloaders +LB_BOOTLOADERS="" + +# Set checksums +LB_CHECKSUMS="sha256" + +# Set compression +LB_COMPRESSION="none" + +# Support dm-verity on rootfs +LB_DM_VERITY="" + +# Support FEC on dm-verity rootfs +LB_DM_VERITY_FEC_ROOTS="" + +# Set sign script for roothash for dm-verity rootfs +LB_DM_VERITY_SIGN="" + +# Set zsync +LB_ZSYNC="true" + +# Control if we build binary images chrooted +# NEVER, *EVER*, *E*V*E*R* SET THIS OPTION to false. +LB_BUILD_WITH_CHROOT="true" + +# Set debian-installer +LB_DEBIAN_INSTALLER="none" + +# Set debian-installer suite +LB_DEBIAN_INSTALLER_DISTRIBUTION="bullseye" + +# Set debian-installer preseed filename/url +LB_DEBIAN_INSTALLER_PRESEEDFILE="" + +# Toggle use of GUI debian-installer +LB_DEBIAN_INSTALLER_GUI="true" + +# Set hdd label +LB_HDD_LABEL="DEBIAN_LIVE" + +# Set hdd filesystem size +LB_HDD_SIZE="auto" + +# Set start of partition for the hdd target for BIOSes that expect a specific boot partition start (e.g. "63s"). If empty, use optimal layout. +LB_HDD_PARTITION_START="" + +# Set iso author +LB_ISO_APPLICATION="Debian Live" + +# Set iso preparer +LB_ISO_PREPARER="live-build @LB_VERSION@; https://salsa.debian.org/live-team/live-build" + +# Set iso publisher +LB_ISO_PUBLISHER="Debian Live project; https://wiki.debian.org/DebianLive; debian-live@lists.debian.org" + +# Set iso volume (max 32 chars) +LB_ISO_VOLUME="Debian bullseye @ISOVOLUME_TS@" + +# Set jffs2 eraseblock size +LB_JFFS2_ERASEBLOCK="" + +# Set memtest +LB_MEMTEST="none" + +# Set loadlin +LB_LOADLIN="false" + +# Set win32-loader +LB_WIN32_LOADER="false" + +# Set net tarball +LB_NET_TARBALL="true" + +# Set onie +LB_ONIE="false" + +# Set onie additional kernel cmdline options +LB_ONIE_KERNEL_CMDLINE="" + +# Set inclusion of firmware packages in debian-installer +LB_FIRMWARE_BINARY="true" + +# Set inclusion of firmware packages in the live image +LB_FIRMWARE_CHROOT="false" + +# Set swap file path +LB_SWAP_FILE_PATH="" + +# Set swap file size +LB_SWAP_FILE_SIZE="512" + +# Enable/disable UEFI secure boot support +LB_UEFI_SECURE_BOOT="auto" diff --git a/live-build/config/bootstrap b/live-build/config/bootstrap new file mode 100644 index 0000000..d9dbf2e --- /dev/null +++ b/live-build/config/bootstrap @@ -0,0 +1,76 @@ +# config/bootstrap - options for live-build(7), bootstrap stage + +# Select architecture to use +LB_ARCHITECTURE="amd64" + +# Select distribution to use +LB_DISTRIBUTION="bullseye" + +# Select parent distribution to use +LB_PARENT_DISTRIBUTION="bookworm" + +# Select distribution to use in the chroot +LB_DISTRIBUTION_CHROOT="bullseye" + +# Select parent distribution to use in the chroot +LB_PARENT_DISTRIBUTION_CHROOT="bookworm" + +# Select distribution to use in the final image +LB_DISTRIBUTION_BINARY="bullseye" + +# Select parent distribution to use in the final image +LB_PARENT_DISTRIBUTION_BINARY="bookworm" + +# Select parent distribution for debian-installer to use +LB_PARENT_DEBIAN_INSTALLER_DISTRIBUTION="bookworm" + +# Select archive areas to use +LB_ARCHIVE_AREAS="main contrib non-free-firmware non-free" + +# Select parent archive areas to use +LB_PARENT_ARCHIVE_AREAS="main contrib non-free-firmware non-free" + +# Set parent mirror to bootstrap from +LB_PARENT_MIRROR_BOOTSTRAP="http://cdn.debian.net/debian/" + +# Set parent mirror to fetch packages from +LB_PARENT_MIRROR_CHROOT="http://cdn.debian.net/debian/" + +# Set security parent mirror to fetch packages from +LB_PARENT_MIRROR_CHROOT_SECURITY="http://security.debian.org/" + +# Set parent mirror which ends up in the image +LB_PARENT_MIRROR_BINARY="http://deb.debian.org/debian/" + +# Set security parent mirror which ends up in the image +LB_PARENT_MIRROR_BINARY_SECURITY="http://security.debian.org/" + +# Set debian-installer parent mirror +LB_PARENT_MIRROR_DEBIAN_INSTALLER="http://cdn.debian.net/debian/" + +# Set mirror to bootstrap from +LB_MIRROR_BOOTSTRAP="http://cdn.debian.net/debian/" + +# Set mirror to fetch packages from +LB_MIRROR_CHROOT="http://cdn.debian.net/debian/" + +# Set security mirror to fetch packages from +LB_MIRROR_CHROOT_SECURITY="http://security.debian.org/" + +# Set mirror which ends up in the image +LB_MIRROR_BINARY="http://deb.debian.org/debian/" + +# Set security mirror which ends up in the image +LB_MIRROR_BINARY_SECURITY="http://security.debian.org/" + +# Set debian-installer mirror +LB_MIRROR_DEBIAN_INSTALLER="http://cdn.debian.net/debian/" + +# Set architectures to use foreign bootstrap +LB_BOOTSTRAP_QEMU_ARCHITECTURE="" + +# Set packages to exclude during foreign bootstrap +LB_BOOTSTRAP_QEMU_EXCLUDE="" + +# Set static qemu binary for foreign bootstrap +LB_BOOTSTRAP_QEMU_STATIC="" diff --git a/live-build/config/chroot b/live-build/config/chroot new file mode 100644 index 0000000..dafa75d --- /dev/null +++ b/live-build/config/chroot @@ -0,0 +1,34 @@ +# config/chroot - options for live-build(7), chroot stage + +# Set chroot filesystem +LB_CHROOT_FILESYSTEM="squashfs" + +# Set chroot squashfs compression level +LB_CHROOT_SQUASHFS_COMPRESSION_LEVEL="" + +# Set chroot squashfs compression type +LB_CHROOT_SQUASHFS_COMPRESSION_TYPE="" + +# Set union filesystem +LB_UNION_FILESYSTEM="overlay" + +# Set interactive build +LB_INTERACTIVE="false" + +# Set keyring packages +LB_KEYRING_PACKAGES="debian-archive-keyring" + +# Set kernel flavour to use (with arch) +LB_LINUX_FLAVOURS_WITH_ARCH="amd64" + +# Set kernel packages to use +LB_LINUX_PACKAGES="linux-image" + +# Enable security updates +LB_SECURITY="true" + +# Enable updates updates +LB_UPDATES="true" + +# Enable backports updates +LB_BACKPORTS="false" diff --git a/live-build/config/common b/live-build/config/common new file mode 100644 index 0000000..8539531 --- /dev/null +++ b/live-build/config/common @@ -0,0 +1,102 @@ +# config/common - common options for live-build(7) + +# Version of live-build used to build config (config format version) +LB_CONFIGURATION_VERSION="20230502" + +# Set package manager +LB_APT="apt" + +# Set proxy for HTTP connections +LB_APT_HTTP_PROXY="" + +# Set apt/aptitude pipeline depth +LB_APT_PIPELINE="" + +# Set apt/aptitude recommends +LB_APT_RECOMMENDS="true" + +# Set apt/aptitude security +LB_APT_SECURE="true" + +# Set apt/aptitude source entries in sources.list +LB_APT_SOURCE_ARCHIVES="true" + +# Control cache +LB_CACHE="true" + +# Control if downloaded package indices should be cached +LB_CACHE_INDICES="false" + +# Control if downloaded packages files should be cached +LB_CACHE_PACKAGES="true" + +# Control if completed stages should be cached +LB_CACHE_STAGES="bootstrap" + +# Set debconf(1) frontend to use +LB_DEBCONF_FRONTEND="noninteractive" + +# Set debconf(1) priority to use +LB_DEBCONF_PRIORITY="critical" + +# Set initramfs hook +LB_INITRAMFS="live-boot" + +# Set initramfs compression +LB_INITRAMFS_COMPRESSION="gzip" + +# Set init system +LB_INITSYSTEM="systemd" + +# Set distribution mode +LB_MODE="debian" + +# Set system type +LB_SYSTEM="live" + +# Set base name of the image +LB_IMAGE_NAME="live-image" + +# Set options to use with apt +APT_OPTIONS="--yes -o Acquire::Retries=5" + +# Set options to use with aptitude +APTITUDE_OPTIONS="--assume-yes -o Acquire::Retries=5" + +# Set options to use with debootstrap +DEBOOTSTRAP_OPTIONS="" + +# Set script to use with debootstrap +DEBOOTSTRAP_SCRIPT="" + +# Set options to use with gzip +GZIP_OPTIONS="-6 --rsyncable" + +# Enable UTC timestamps +LB_UTC_TIME="false" + +# live-build options + +# Enable breakpoints +# If set here, overrides the command line option +#_BREAKPOINTS="false" + +# Enable debug +# If set here, overrides the command line option +#_DEBUG="false" + +# Enable color +# If set here, overrides the command line option +#_COLOR="auto" + +# Enable force +# If set here, overrides the command line option +#_FORCE="false" + +# Enable quiet +# If set here, overrides the command line option +#_QUIET="false" + +# Enable verbose +# If set here, overrides the command line option +#_VERBOSE="false" diff --git a/live-build/config/hooks/live/0010-disable-kexec-tools.hook.chroot b/live-build/config/hooks/live/0010-disable-kexec-tools.hook.chroot new file mode 120000 index 0000000..996f766 --- /dev/null +++ b/live-build/config/hooks/live/0010-disable-kexec-tools.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/live/0010-disable-kexec-tools.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot b/live-build/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot new file mode 120000 index 0000000..5ddf090 --- /dev/null +++ b/live-build/config/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/live/0050-disable-sysvinit-tmpfs.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/0030-remove-my-unshare-hack.hook.chroot b/live-build/config/hooks/normal/0030-remove-my-unshare-hack.hook.chroot new file mode 100755 index 0000000..7ae06c0 --- /dev/null +++ b/live-build/config/hooks/normal/0030-remove-my-unshare-hack.hook.chroot @@ -0,0 +1,6 @@ +#!/bin/sh +set -e + +if [ -d /usr/local/bin/unshare ]; then + rm -vf /usr/local/bin/unshare +fi diff --git a/live-build/config/hooks/normal/0060-not-proxmox-enterprise-please.hook.chroot b/live-build/config/hooks/normal/0060-not-proxmox-enterprise-please.hook.chroot new file mode 100755 index 0000000..9d6d446 --- /dev/null +++ b/live-build/config/hooks/normal/0060-not-proxmox-enterprise-please.hook.chroot @@ -0,0 +1,9 @@ +#!/bin/sh +set -e + +rm -vf /proxmox_install_mode +rm -vf /etc/apt/sources.list.d/pve-enterprise.list +cat << EOList >/etc/apt/sources.list.d/proxmox-ve.list +# Proxmox VE No-Subscription +deb http://download.proxmox.com/debian/pve bookworm pve-no-subscription +EOList diff --git a/live-build/config/hooks/normal/1000-create-mtab-symlink.hook.chroot b/live-build/config/hooks/normal/1000-create-mtab-symlink.hook.chroot new file mode 120000 index 0000000..55d1085 --- /dev/null +++ b/live-build/config/hooks/normal/1000-create-mtab-symlink.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/1000-create-mtab-symlink.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/1010-enable-cryptsetup.hook.chroot b/live-build/config/hooks/normal/1010-enable-cryptsetup.hook.chroot new file mode 120000 index 0000000..2d0ce43 --- /dev/null +++ b/live-build/config/hooks/normal/1010-enable-cryptsetup.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/1010-enable-cryptsetup.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/1020-create-locales-files.hook.chroot b/live-build/config/hooks/normal/1020-create-locales-files.hook.chroot new file mode 120000 index 0000000..f08fbf6 --- /dev/null +++ b/live-build/config/hooks/normal/1020-create-locales-files.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/1020-create-locales-files.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/5000-update-apt-file-cache.hook.chroot b/live-build/config/hooks/normal/5000-update-apt-file-cache.hook.chroot new file mode 120000 index 0000000..78ae30f --- /dev/null +++ b/live-build/config/hooks/normal/5000-update-apt-file-cache.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/5000-update-apt-file-cache.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/5010-update-apt-xapian-index.hook.chroot b/live-build/config/hooks/normal/5010-update-apt-xapian-index.hook.chroot new file mode 120000 index 0000000..29fc799 --- /dev/null +++ b/live-build/config/hooks/normal/5010-update-apt-xapian-index.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/5010-update-apt-xapian-index.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/5020-update-glx-alternative.hook.chroot b/live-build/config/hooks/normal/5020-update-glx-alternative.hook.chroot new file mode 120000 index 0000000..397d923 --- /dev/null +++ b/live-build/config/hooks/normal/5020-update-glx-alternative.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/5020-update-glx-alternative.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/5030-update-plocate-database.hook.chroot b/live-build/config/hooks/normal/5030-update-plocate-database.hook.chroot new file mode 120000 index 0000000..c8303b6 --- /dev/null +++ b/live-build/config/hooks/normal/5030-update-plocate-database.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/5030-update-plocate-database.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/5040-update-nvidia-alternative.hook.chroot b/live-build/config/hooks/normal/5040-update-nvidia-alternative.hook.chroot new file mode 120000 index 0000000..706bd9e --- /dev/null +++ b/live-build/config/hooks/normal/5040-update-nvidia-alternative.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/5040-update-nvidia-alternative.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/8000-remove-adjtime-configuration.hook.chroot b/live-build/config/hooks/normal/8000-remove-adjtime-configuration.hook.chroot new file mode 120000 index 0000000..e11d36f --- /dev/null +++ b/live-build/config/hooks/normal/8000-remove-adjtime-configuration.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/8000-remove-adjtime-configuration.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/8010-remove-backup-files.hook.chroot b/live-build/config/hooks/normal/8010-remove-backup-files.hook.chroot new file mode 120000 index 0000000..91eac7d --- /dev/null +++ b/live-build/config/hooks/normal/8010-remove-backup-files.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/8010-remove-backup-files.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/8020-remove-dbus-machine-id.hook.chroot b/live-build/config/hooks/normal/8020-remove-dbus-machine-id.hook.chroot new file mode 120000 index 0000000..348dd26 --- /dev/null +++ b/live-build/config/hooks/normal/8020-remove-dbus-machine-id.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/8020-remove-dbus-machine-id.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/8030-truncate-log-files.hook.chroot b/live-build/config/hooks/normal/8030-truncate-log-files.hook.chroot new file mode 120000 index 0000000..57a3dc1 --- /dev/null +++ b/live-build/config/hooks/normal/8030-truncate-log-files.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/8030-truncate-log-files.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/8040-remove-mdadm-configuration.hook.chroot b/live-build/config/hooks/normal/8040-remove-mdadm-configuration.hook.chroot new file mode 120000 index 0000000..0182be1 --- /dev/null +++ b/live-build/config/hooks/normal/8040-remove-mdadm-configuration.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/8040-remove-mdadm-configuration.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/8050-remove-openssh-server-host-keys.hook.chroot b/live-build/config/hooks/normal/8050-remove-openssh-server-host-keys.hook.chroot new file mode 120000 index 0000000..818772a --- /dev/null +++ b/live-build/config/hooks/normal/8050-remove-openssh-server-host-keys.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/8050-remove-openssh-server-host-keys.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/8060-remove-systemd-machine-id.hook.chroot b/live-build/config/hooks/normal/8060-remove-systemd-machine-id.hook.chroot new file mode 120000 index 0000000..a130d14 --- /dev/null +++ b/live-build/config/hooks/normal/8060-remove-systemd-machine-id.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/8060-remove-systemd-machine-id.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/8070-remove-temporary-files.hook.chroot b/live-build/config/hooks/normal/8070-remove-temporary-files.hook.chroot new file mode 120000 index 0000000..558c6f5 --- /dev/null +++ b/live-build/config/hooks/normal/8070-remove-temporary-files.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/8070-remove-temporary-files.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/8080-reproducible-glibc.hook.chroot b/live-build/config/hooks/normal/8080-reproducible-glibc.hook.chroot new file mode 120000 index 0000000..ddf3b9f --- /dev/null +++ b/live-build/config/hooks/normal/8080-reproducible-glibc.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/8080-reproducible-glibc.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/8090-remove-ssl-cert-snakeoil.hook.chroot b/live-build/config/hooks/normal/8090-remove-ssl-cert-snakeoil.hook.chroot new file mode 120000 index 0000000..ff98622 --- /dev/null +++ b/live-build/config/hooks/normal/8090-remove-ssl-cert-snakeoil.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/8090-remove-ssl-cert-snakeoil.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/8100-remove-udev-persistent-cd-rules.hook.chroot b/live-build/config/hooks/normal/8100-remove-udev-persistent-cd-rules.hook.chroot new file mode 120000 index 0000000..e761a72 --- /dev/null +++ b/live-build/config/hooks/normal/8100-remove-udev-persistent-cd-rules.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/8100-remove-udev-persistent-cd-rules.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/8110-remove-udev-persistent-net-rules.hook.chroot b/live-build/config/hooks/normal/8110-remove-udev-persistent-net-rules.hook.chroot new file mode 120000 index 0000000..d0ca0a5 --- /dev/null +++ b/live-build/config/hooks/normal/8110-remove-udev-persistent-net-rules.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/8110-remove-udev-persistent-net-rules.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/9000-remove-gnome-icon-cache.hook.chroot b/live-build/config/hooks/normal/9000-remove-gnome-icon-cache.hook.chroot new file mode 120000 index 0000000..d48e646 --- /dev/null +++ b/live-build/config/hooks/normal/9000-remove-gnome-icon-cache.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/9000-remove-gnome-icon-cache.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/9010-remove-python-pyc.hook.chroot b/live-build/config/hooks/normal/9010-remove-python-pyc.hook.chroot new file mode 120000 index 0000000..9c1f673 --- /dev/null +++ b/live-build/config/hooks/normal/9010-remove-python-pyc.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/9010-remove-python-pyc.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/9020-remove-man-cache.hook.chroot b/live-build/config/hooks/normal/9020-remove-man-cache.hook.chroot new file mode 120000 index 0000000..b0eff9b --- /dev/null +++ b/live-build/config/hooks/normal/9020-remove-man-cache.hook.chroot @@ -0,0 +1 @@ +/usr/share/live/build/hooks/normal/9020-remove-man-cache.hook.chroot \ No newline at end of file diff --git a/live-build/config/hooks/normal/9999-remove-hostname-file.hook.chroot b/live-build/config/hooks/normal/9999-remove-hostname-file.hook.chroot new file mode 100755 index 0000000..3b18386 --- /dev/null +++ b/live-build/config/hooks/normal/9999-remove-hostname-file.hook.chroot @@ -0,0 +1,4 @@ +#!/bin/sh +set -e + +rm -vf /etc/hostname diff --git a/live-build/config/hooks/normal/9999-remove-linux-image.hook.chroot b/live-build/config/hooks/normal/9999-remove-linux-image.hook.chroot new file mode 100755 index 0000000..12e84e0 --- /dev/null +++ b/live-build/config/hooks/normal/9999-remove-linux-image.hook.chroot @@ -0,0 +1,5 @@ +#!/bin/sh +set -e + +#apt-get purge --yes 'linux-image-*' +#update-grub 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 new file mode 100755 index 0000000..232bc02 --- /dev/null +++ b/live-build/config/hooks/normal/9999-write-vmbr0-iface.hook.chroot @@ -0,0 +1,10 @@ +#!/bin/sh +set -e + +cat << EOIface > /etc/network/interfaces.d/vmbr0 +auto vmbr0 +iface vmbr0 inet dhcp + bridge-ports enp2s0f0 + bridge-stp off + bridge-fd 0 +EOIface 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 new file mode 100755 index 0000000..0a607ae --- /dev/null +++ b/live-build/config/includes.chroot_after_packages/etc/dhcp/dhclient-enter-hooks.d/hostname @@ -0,0 +1,9 @@ +#!/bin/sh +set -e + +if [ -n "${new_host_name}" ]; then + cat << EOName > /etc/hostname +${new_host_name} +EOName + hostname -F /etc/hostname +fi diff --git a/live-build/config/includes.chroot_before_packages/etc/kernel/postinst.d/aa-patch-proxmox-boot b/live-build/config/includes.chroot_before_packages/etc/kernel/postinst.d/aa-patch-proxmox-boot new file mode 100755 index 0000000..19e8c5f --- /dev/null +++ b/live-build/config/includes.chroot_before_packages/etc/kernel/postinst.d/aa-patch-proxmox-boot @@ -0,0 +1,11 @@ +#!/bin/sh + +POSTINST_FILE="/etc/kernel/postinst.d/zz-proxmox-boot" +POSTRM_FILE="/etc/kernel/postrm.d/zz-proxmox-boot" + +if [ -f "${POSTINST_FILE}" ]; then + grep -q '\#reexec_in_mountns' "${POSTINST_FILE}" || patch --no-backup-if-mismatch --reject-file=- --forward "${POSTINST_FILE}" /usr/local/share/patches/zz-proxmox-postinst.patch +fi +if [ -f "${POSTRM_FILE}" ]; then + grep -q '\#reexec_in_mountns' "${POSTRM_FILE}" || patch --no-backup-if-mismatch --reject-file=- --forward "${POSTRM_FILE}" /usr/local/share/patches/zz-proxmox-postrm.patch +fi diff --git a/live-build/config/includes.chroot_before_packages/run/network/.gitignore b/live-build/config/includes.chroot_before_packages/run/network/.gitignore new file mode 100644 index 0000000..e69de29 diff --git a/live-build/config/includes.chroot_before_packages/usr/local/share/patches/zz-proxmox-postinst.patch b/live-build/config/includes.chroot_before_packages/usr/local/share/patches/zz-proxmox-postinst.patch new file mode 100644 index 0000000..3c04533 --- /dev/null +++ b/live-build/config/includes.chroot_before_packages/usr/local/share/patches/zz-proxmox-postinst.patch @@ -0,0 +1,11 @@ +--- zz-proxmox-boot 2023-11-28 12:55:18.000000000 +0000 ++++ zz-proxmox-bewt 2024-02-25 08:05:31.516618175 +0000 +@@ -252,7 +252,7 @@ + # Also run if we have no DEB_MAINT_PARAMS, in order to work with old + # kernel packages. + */postinst.d/*:|*/postinst.d/*:configure) +- reexec_in_mountns "$@" ++ #reexec_in_mountns "$@" + BOOT_KVERS="$(boot_kernel_list "$@")" + update_esps + disable_systemd_boot_hook diff --git a/live-build/config/includes.chroot_before_packages/usr/local/share/patches/zz-proxmox-postrm.patch b/live-build/config/includes.chroot_before_packages/usr/local/share/patches/zz-proxmox-postrm.patch new file mode 100644 index 0000000..327b637 --- /dev/null +++ b/live-build/config/includes.chroot_before_packages/usr/local/share/patches/zz-proxmox-postrm.patch @@ -0,0 +1,11 @@ +--- zz-proxmox-boot 2023-11-28 12:55:18.000000000 +0000 ++++ zz-proxmox-bewt 2024-02-25 19:27:20.591850288 +0000 +@@ -259,7 +259,7 @@ + check_grub_efi_package + ;; + */postrm.d/*:|*/postrm.d/*:remove) +- reexec_in_mountns "$@" ++ #reexec_in_mountns "$@" + # no newly installed kernel + BOOT_KVERS="$(boot_kernel_list)" + update_esps diff --git a/live-build/config/package-lists/live.list.chroot b/live-build/config/package-lists/live.list.chroot new file mode 100644 index 0000000..ab91c73 --- /dev/null +++ b/live-build/config/package-lists/live.list.chroot @@ -0,0 +1,4 @@ +live-boot +live-config +live-config-systemd +systemd-sysv diff --git a/live-build/config/package-lists/patch.list.chroot b/live-build/config/package-lists/patch.list.chroot new file mode 100644 index 0000000..9eb7b90 --- /dev/null +++ b/live-build/config/package-lists/patch.list.chroot @@ -0,0 +1 @@ +patch diff --git a/live-build/config/package-lists/proxmox-ve.list.chroot b/live-build/config/package-lists/proxmox-ve.list.chroot new file mode 100644 index 0000000..38377bd --- /dev/null +++ b/live-build/config/package-lists/proxmox-ve.list.chroot @@ -0,0 +1,3 @@ +open-iscsi +postfix +proxmox-ve diff --git a/live-build/config/source b/live-build/config/source new file mode 100644 index 0000000..f8c29a1 --- /dev/null +++ b/live-build/config/source @@ -0,0 +1,7 @@ +# config/source - options for live-build(7), source stage + +# Set source option +LB_SOURCE="false" + +# Set image type +LB_SOURCE_IMAGES="tar"