From 135c13cada4fb155c36ef5559393b895b1a23720 Mon Sep 17 00:00:00 2001 From: oxmc7769 Date: Tue, 10 Mar 2026 06:30:47 -0700 Subject: [PATCH] new base? --- README.md | 20 ++--- build.sh | 6 +- configs/build_amd64 | 11 ++- configs/build_arm64 | 2 +- configs/build_rpi | 2 +- docs/config.md | 6 +- docs/docker-build.md | 2 +- docs/get-started.md | 8 +- docs/stage-anatomy.md | 4 +- docs/troubleshooting.md | 4 +- exports/iso/04-finalise/01-run.sh | 10 +-- exports/squashfs/00-allow-rerun/00-run.sh | 7 ++ exports/squashfs/00-finalise/01-run.sh | 19 ---- exports/squashfs/01-set-sources/01-run.sh | 10 +++ exports/squashfs/03-network/01-run.sh | 3 + exports/squashfs/03-network/files/resolv.conf | 1 + exports/squashfs/04-finalise/01-run.sh | 86 +++++++++++++++++++ exports/squashfs/05-export/01-run.sh | 72 ++++++++++++++++ .../squashfs/05-install-calamares/01-run.sh | 7 ++ exports/squashfs/06-export-livefs/01-run.sh | 23 +++++ stage0/00-configure-apt/00-run.sh | 4 +- ...-chillcraftos-prefs => apt-vesperos-prefs} | 0 stage0/00-configure-apt/files/oxmc.sources | 2 +- .../00-configure-apt/files/raspbian.sources | 2 +- stage2/04-cloud-init/README.txt | 2 +- stage2/04-cloud-init/files/meta-data | 2 +- stage2/04-cloud-init/files/meta-data-amd64 | 2 +- 27 files changed, 257 insertions(+), 60 deletions(-) create mode 100755 exports/squashfs/00-allow-rerun/00-run.sh delete mode 100755 exports/squashfs/00-finalise/01-run.sh create mode 100755 exports/squashfs/01-set-sources/01-run.sh create mode 100755 exports/squashfs/03-network/01-run.sh create mode 100644 exports/squashfs/03-network/files/resolv.conf create mode 100755 exports/squashfs/04-finalise/01-run.sh create mode 100755 exports/squashfs/05-export/01-run.sh create mode 100755 exports/squashfs/05-install-calamares/01-run.sh create mode 100755 exports/squashfs/06-export-livefs/01-run.sh rename stage0/00-configure-apt/files/{apt-chillcraftos-prefs => apt-vesperos-prefs} (100%) diff --git a/README.md b/README.md index 13f6180..366c237 100644 --- a/README.md +++ b/README.md @@ -1,18 +1,14 @@ -# ChillcraftOS Build System +# VesperOS Build System -ChillcraftOS is a custom Raspberry Pi OS built using a system based on `pi-gen`. This build system is specifically designed to create **ChillcraftOS** images, not general Raspberry Pi OS images. - -**Important Notes:** -- The 32-bit versions of ChillcraftOS are based on Raspbian. -- The 64-bit versions of ChillcraftOS are based on Debian. +VesperOS is a custom Debian-based OS built using a system based on `pi-gen`. ## Dependencies -The ChillcraftOS Build System relies on `pi-gen` and is compatible with Debian-based operating systems released after 2017. We recommend using the latest OS versions for better security. +The VesperOS Build System relies on `pi-gen` and is compatible with Debian-based operating systems released after 2017. We recommend using the latest OS versions for better security. For other Linux distributions, you can use the Docker-based build method provided below. -To install the required dependencies for building ChillcraftOS, run the following command: +To install the required dependencies for building VesperOS, run the following command: ```bash apt install coreutils quilt parted qemu-user-static debootstrap zerofree zip \ @@ -22,16 +18,16 @@ gpg pigz xxd arch-test bmap-tools kmod squashfs-tools xorriso mtools The `depends` file in the repository lists all the necessary tools, formatted as `[:]`. -## Getting Started with Building ChillcraftOS +## Getting Started with Building VesperOS -To start building ChillcraftOS, clone the ChillcraftOS Build System repository: +To start building VesperOS, clone the os-builder repository: ```bash -git clone https://git.oxmc.me/Chillcraft/ChillcraftOS.git +git clone https://git.oxmc.me/VesperOS/os-builder.git ``` For a shallow clone containing only the latest revision, you can add `--depth 1`. **However, avoid using this on your development machine**. Make sure the repository is cloned to a directory **without spaces**, as spaces in the base path may cause `pi-gen` to fail. -Once cloned, you're ready to configure and start building ChillcraftOS. \ No newline at end of file +Once cloned, you're ready to configure and start building VesperOS. \ No newline at end of file diff --git a/build.sh b/build.sh index ebde029..9ef2b29 100755 --- a/build.sh +++ b/build.sh @@ -230,7 +230,7 @@ export PI_GEN_RELEASE=${PI_GEN_RELEASE:-Raspberry Pi reference} export ARCH="${ARCH:-arm64}" export PLATFORM="${PLATFORM:-}" export RELEASE=${RELEASE:-trixie} -export IMG_NAME="${IMG_NAME:-chillcraftos-$RELEASE-$ARCH}" +export IMG_NAME="${IMG_NAME:-vesperos-$RELEASE-$ARCH}" export USE_QEMU="${USE_QEMU:-0}" export IMG_DATE="${IMG_DATE:-"$(date +%Y-%m-%d)"}" @@ -245,7 +245,7 @@ export DEPLOY_COMPRESSION=${DEPLOY_COMPRESSION:-xz} export COMPRESSION_LEVEL=${COMPRESSION_LEVEL:-6} export LOG_FILE="${WORK_DIR}/build.log" -export TARGET_HOSTNAME=${TARGET_HOSTNAME:-chillcraftos} +export TARGET_HOSTNAME=${TARGET_HOSTNAME:-vesperos} export WPA_COUNTRY export ENABLE_SSH="${ENABLE_SSH:-0}" export PUBKEY_ONLY_SSH="${PUBKEY_ONLY_SSH:-0}" @@ -282,6 +282,8 @@ export QUILT_NO_DIFF_TIMESTAMPS=1 export QUILT_REFRESH_ARGS="-p ab" export ENABLE_CLOUD_INIT=${ENABLE_CLOUD_INIT:-1} +export LIVEINSTALL=${LIVEINSTALL:-0} +export LIVEBOOT=${LIVEBOOT:-0} # shellcheck source=scripts/common source "${SCRIPT_DIR}/common" diff --git a/configs/build_amd64 b/configs/build_amd64 index 3e44ca2..6126360 100644 --- a/configs/build_amd64 +++ b/configs/build_amd64 @@ -1,2 +1,11 @@ -# This builds ChillcraftOS for amd64 +# This builds VesperOS for amd64 ARCH=amd64 + +# Set LIVEINSTALL=1 to also produce a livefs.squashfs with Calamares installed +# for use with gen-installmedia. Outputs deploy/livefs.{squashfs,vmlinuz,initrd.img} +# alongside the clean deploy/rootfs.{squashfs,vmlinuz,initrd.img} +LIVEINSTALL=1 + +# Set LIVEBOOT=1 to install live-boot packages and regenerate the initrd with +# squashfs/overlay support — required for booting rootfs.squashfs from an ISO via live-boot. +LIVEBOOT=1 diff --git a/configs/build_arm64 b/configs/build_arm64 index bc6d086..21dba59 100644 --- a/configs/build_arm64 +++ b/configs/build_arm64 @@ -1,2 +1,2 @@ -# This builds ChillcraftOS for arm64 +# This builds VesperOS for arm64 ARCH=arm64 diff --git a/configs/build_rpi b/configs/build_rpi index c1efd16..4ffc3da 100644 --- a/configs/build_rpi +++ b/configs/build_rpi @@ -1,4 +1,4 @@ # Raspberry Pi OS only targets arm64 since the rpi4. -# So ChillcraftOs will also only target arm64 for the rpi4 and up. +# So VesperOs will also only target arm64 for the rpi4 and up. ARCH=arm64 PLATFORM=rpi diff --git a/docs/config.md b/docs/config.md index ef529f1..c22b86a 100644 --- a/docs/config.md +++ b/docs/config.md @@ -10,7 +10,7 @@ sudo ./build.sh -c build_amd64 ### Core -* `IMG_NAME` (Default: `chillcraftos-$RELEASE-$ARCH`) +* `IMG_NAME` (Default: `vesperos-$RELEASE-$ARCH`) Base name for output files. @@ -93,7 +93,7 @@ sudo ./build.sh -c build_amd64 ### amd64 live ISO ```bash -IMG_NAME='chillcraftos' +IMG_NAME='vesperos' RELEASE='trixie' ARCH='amd64' LOCALE_DEFAULT='en_US.UTF-8' @@ -106,7 +106,7 @@ ENABLE_SSH=1 ### Raspberry Pi (arm64) ```bash -IMG_NAME='chillcraftos' +IMG_NAME='vesperos' RELEASE='trixie' ARCH='arm64' LOCALE_DEFAULT='en_US.UTF-8' diff --git a/docs/docker-build.md b/docs/docker-build.md index bc05dbf..9789e3e 100644 --- a/docs/docker-build.md +++ b/docs/docker-build.md @@ -24,7 +24,7 @@ CONTINUE=1 ./build-docker.sh ## Inspecting the Container After a Failure ```bash -sudo docker run -it --privileged --volumes-from=pigen_work chillcraftos-build /bin/bash +sudo docker run -it --privileged --volumes-from=pigen_work vesperos-build /bin/bash ``` ## Preserving the Container Between Runs diff --git a/docs/get-started.md b/docs/get-started.md index adeec9b..84e9023 100644 --- a/docs/get-started.md +++ b/docs/get-started.md @@ -1,6 +1,6 @@ # Getting Started -ChillcraftOS is a Debian Trixie-based OS for Raspberry Pi (arm64/armhf) and amd64, built using a modified pi-gen pipeline. +VesperOS is a Debian Trixie-based OS for Raspberry Pi (arm64/armhf) and amd64, built using a modified pi-gen pipeline. ## Supported Architectures @@ -27,8 +27,8 @@ The `depends` file in the repo root lists all required tools in `[: "${ISO_TEMP_DIR}/live/filesystem.size" mkdir -p "${ISO_TEMP_DIR}/.disk" -echo "ChillcraftOS Trixie - $(date +%Y-%m-%d)" > "${ISO_TEMP_DIR}/.disk/info" +echo "VesperOS Trixie - $(date +%Y-%m-%d)" > "${ISO_TEMP_DIR}/.disk/info" # Step 6: Build the ISO with grub-mkrescue (handles BIOS + UEFI automatically) grub-mkrescue \ --output="${ISO_FILE}" \ "${ISO_TEMP_DIR}" \ -- \ - -volid "ChillcraftOS" + -volid "VesperOS" rm -rf "${ISO_TEMP_DIR}" diff --git a/exports/squashfs/00-allow-rerun/00-run.sh b/exports/squashfs/00-allow-rerun/00-run.sh new file mode 100755 index 0000000..2ad5f67 --- /dev/null +++ b/exports/squashfs/00-allow-rerun/00-run.sh @@ -0,0 +1,7 @@ +#!/bin/bash -e + +if [[ "${ARCH}" == "arm64" || "${ARCH}" == "armhf" ]]; then + if [ -e "${ROOTFS_DIR}/etc/ld.so.preload" ]; then + mv "${ROOTFS_DIR}/etc/ld.so.preload" "${ROOTFS_DIR}/etc/ld.so.preload.disabled" + fi +fi diff --git a/exports/squashfs/00-finalise/01-run.sh b/exports/squashfs/00-finalise/01-run.sh deleted file mode 100755 index edfd72b..0000000 --- a/exports/squashfs/00-finalise/01-run.sh +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash -e - -SQUASHFS_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.squashfs" -FINAL_SQUASHFS_FILE="${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs" - -mksquashfs "${ROOTFS_DIR}" "${SQUASHFS_FILE}" \ - -comp xz \ - -noappend \ - -e boot/efi \ - -e proc \ - -e sys \ - -e dev \ - -e tmp \ - -e run - -mkdir -p "${DEPLOY_DIR}" -rm -f "${FINAL_SQUASHFS_FILE}" -cp "${SQUASHFS_FILE}" "${FINAL_SQUASHFS_FILE}" -echo "Squashfs created at ${FINAL_SQUASHFS_FILE}" diff --git a/exports/squashfs/01-set-sources/01-run.sh b/exports/squashfs/01-set-sources/01-run.sh new file mode 100755 index 0000000..d93efdf --- /dev/null +++ b/exports/squashfs/01-set-sources/01-run.sh @@ -0,0 +1,10 @@ +#!/bin/bash -e + +rm -f "${ROOTFS_DIR}/etc/apt/apt.conf.d/51cache" +rm -f "${ROOTFS_DIR}/etc/apt/sources.list.d/00-temp.list" +find "${ROOTFS_DIR}/var/lib/apt/lists/" -type f -delete +on_chroot << EOF +apt-get update +apt-get -y dist-upgrade --auto-remove --purge +apt-get clean +EOF diff --git a/exports/squashfs/03-network/01-run.sh b/exports/squashfs/03-network/01-run.sh new file mode 100755 index 0000000..4150732 --- /dev/null +++ b/exports/squashfs/03-network/01-run.sh @@ -0,0 +1,3 @@ +#!/bin/bash -e + +install -m 644 files/resolv.conf "${ROOTFS_DIR}/etc/" diff --git a/exports/squashfs/03-network/files/resolv.conf b/exports/squashfs/03-network/files/resolv.conf new file mode 100644 index 0000000..cae093a --- /dev/null +++ b/exports/squashfs/03-network/files/resolv.conf @@ -0,0 +1 @@ +nameserver 8.8.8.8 diff --git a/exports/squashfs/04-finalise/01-run.sh b/exports/squashfs/04-finalise/01-run.sh new file mode 100755 index 0000000..c47ed53 --- /dev/null +++ b/exports/squashfs/04-finalise/01-run.sh @@ -0,0 +1,86 @@ +#!/bin/bash -e + +if [ "${LIVEBOOT}" != "1" ]; then + echo "squashfs-export: LIVEBOOT not set — skipping live boot setup" +else + if [ "${ARCH}" != "amd64" ]; then + echo "squashfs-export: skipping live boot setup for non-amd64 arch (${ARCH})" + exit 0 + else + on_chroot << EOF +apt-get install -y \ + live-boot \ + live-boot-initramfs-tools \ + live-config \ + live-config-systemd +EOF + + # Rewrite fstab for the live environment. + # live-boot manages root via overlayfs — build-time disk entries cause fsck failures at boot. + cat > "${ROOTFS_DIR}/etc/fstab" << 'FSTABEOF' +# Live system fstab — root is managed by live-boot via overlayfs, not this file. +tmpfs /tmp tmpfs defaults,nosuid,nodev 0 0 +FSTABEOF + + # Remove first-boot trigger so GDM uses autologin in the live session. + rm -f "${ROOTFS_DIR}/var/lib/gdm/run-initial-setup" + + # Configure initramfs for live boot — squashfs and overlay are required + if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf" ]; then + sed -i 's/^MODULES=.*/MODULES=most/' "${ROOTFS_DIR}/etc/initramfs-tools/initramfs.conf" + fi + + for mod in squashfs overlay; do + grep -qx "${mod}" "${ROOTFS_DIR}/etc/initramfs-tools/modules" 2>/dev/null || \ + echo "${mod}" >> "${ROOTFS_DIR}/etc/initramfs-tools/modules" + done + fi +fi + +# Ensure update-initramfs actually runs — it silently exits if update_initramfs=no/disabled, +# which may have been set during the build to suppress apt-hook rebuilds. +# This mirrors what exports/iso/04-finalise does before calling update-initramfs. +if [ -f "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" ]; then + sed -i 's/^update_initramfs=.*/update_initramfs=yes/' "${ROOTFS_DIR}/etc/initramfs-tools/update-initramfs.conf" +fi + +on_chroot <<- EOF + update-initramfs -k all -c + if hash hardlink 2>/dev/null; then + hardlink -t /usr/share/doc + fi + if [ -f /usr/lib/systemd/system/apt-listchanges.service ]; then + python3 -m apt_listchanges.populate_database --profile apt + systemctl disable apt-listchanges.timer + fi + install -m 755 -o systemd-timesync -g systemd-timesync -d /var/lib/systemd/timesync + install -m 644 -o systemd-timesync -g systemd-timesync /dev/null /var/lib/systemd/timesync/clock +EOF + +rm -f "${ROOTFS_DIR}/usr/bin/qemu-arm-static" + +if [ "${USE_QEMU}" != "1" ]; then + if [ -e "${ROOTFS_DIR}/etc/ld.so.preload.disabled" ]; then + mv "${ROOTFS_DIR}/etc/ld.so.preload.disabled" "${ROOTFS_DIR}/etc/ld.so.preload" + fi +fi + +rm -f "${ROOTFS_DIR}/etc/network/interfaces.dpkg-old" +rm -f "${ROOTFS_DIR}/etc/apt/sources.list~" +rm -f "${ROOTFS_DIR}/etc/apt/trusted.gpg~" +rm -f "${ROOTFS_DIR}/etc/passwd-" +rm -f "${ROOTFS_DIR}/etc/group-" +rm -f "${ROOTFS_DIR}/etc/shadow-" +rm -f "${ROOTFS_DIR}/etc/gshadow-" +rm -f "${ROOTFS_DIR}/etc/subuid-" +rm -f "${ROOTFS_DIR}/etc/subgid-" +rm -f "${ROOTFS_DIR}"/var/cache/debconf/*-old +rm -f "${ROOTFS_DIR}"/var/lib/dpkg/*-old +rm -f "${ROOTFS_DIR}"/usr/share/icons/*/icon-theme.cache +rm -f "${ROOTFS_DIR}/var/lib/dbus/machine-id" + +echo "uninitialized" > "${ROOTFS_DIR}/etc/machine-id" + +ln -nsf /proc/mounts "${ROOTFS_DIR}/etc/mtab" + +find "${ROOTFS_DIR}/var/log/" -type f -exec cp /dev/null {} \; diff --git a/exports/squashfs/05-export/01-run.sh b/exports/squashfs/05-export/01-run.sh new file mode 100755 index 0000000..4a4fa6c --- /dev/null +++ b/exports/squashfs/05-export/01-run.sh @@ -0,0 +1,72 @@ +#!/bin/bash -e + +SQUASHFS_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.squashfs" + +unmount "${ROOTFS_DIR}" + +mksquashfs "${ROOTFS_DIR}" "${SQUASHFS_FILE}" \ + -comp xz \ + -noappend \ + -e boot/efi + +# Locate kernel and initrd inside the rootfs +VMLINUZ=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "vmlinuz-*" | sort | tail -1) +INITRD=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "initrd.img-*" | sort | tail -1) + +VMLINUZ_FILE="" +INITRD_FILE="" + +if [ -n "${VMLINUZ}" ]; then + VMLINUZ_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.vmlinuz" + cp "${VMLINUZ}" "${VMLINUZ_FILE}" +fi + +if [ -n "${INITRD}" ]; then + INITRD_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.initrd" + cp "${INITRD}" "${INITRD_FILE}" +fi + +mkdir -p "${DEPLOY_DIR}" +rm -f "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}."* + +case "${DEPLOY_COMPRESSION}" in +zip) + pushd "${STAGE_WORK_DIR}" > /dev/null + ZIP_MEMBERS="$(basename "${SQUASHFS_FILE}")" + [ -n "${VMLINUZ_FILE}" ] && ZIP_MEMBERS="${ZIP_MEMBERS} $(basename "${VMLINUZ_FILE}")" + [ -n "${INITRD_FILE}" ] && ZIP_MEMBERS="${ZIP_MEMBERS} $(basename "${INITRD_FILE}")" + # shellcheck disable=SC2086 + zip -"${COMPRESSION_LEVEL}" \ + "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.zip" \ + ${ZIP_MEMBERS} + popd > /dev/null + echo "Archive created at ${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.zip" + ;; +gz) + pigz --force -"${COMPRESSION_LEVEL}" "${SQUASHFS_FILE}" --stdout > \ + "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs.gz" + [ -n "${VMLINUZ_FILE}" ] && cp "${VMLINUZ_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.vmlinuz" + [ -n "${INITRD_FILE}" ] && cp "${INITRD_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.initrd" + echo "Squashfs exported at ${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs.gz" + ;; +xz) + xz --compress --force --threads 0 --memlimit-compress=50% -"${COMPRESSION_LEVEL}" \ + --stdout "${SQUASHFS_FILE}" > "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs.xz" + [ -n "${VMLINUZ_FILE}" ] && cp "${VMLINUZ_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.vmlinuz" + [ -n "${INITRD_FILE}" ] && cp "${INITRD_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.initrd" + echo "Squashfs exported at ${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs.xz" + ;; +none | *) + cp "${SQUASHFS_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs" + [ -n "${VMLINUZ_FILE}" ] && cp "${VMLINUZ_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.vmlinuz" + [ -n "${INITRD_FILE}" ] && cp "${INITRD_FILE}" "${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.initrd" + echo "Squashfs exported at ${DEPLOY_DIR}/${ARCHIVE_FILENAME}${IMG_SUFFIX}.squashfs" + ;; +esac + +# Copy fixed-name artifacts for gen-installmedia compatibility +# rootfs.squashfs is always uncompressed regardless of DEPLOY_COMPRESSION +cp "${SQUASHFS_FILE}" "${DEPLOY_DIR}/rootfs.squashfs" +[ -n "${VMLINUZ}" ] && cp "${VMLINUZ}" "${DEPLOY_DIR}/rootfs.vmlinuz" +[ -n "${INITRD}" ] && cp "${INITRD}" "${DEPLOY_DIR}/rootfs.initrd.img" +echo "gen-installmedia artifacts written to ${DEPLOY_DIR}/rootfs.{squashfs,vmlinuz,initrd.img}" diff --git a/exports/squashfs/05-install-calamares/01-run.sh b/exports/squashfs/05-install-calamares/01-run.sh new file mode 100755 index 0000000..0353799 --- /dev/null +++ b/exports/squashfs/05-install-calamares/01-run.sh @@ -0,0 +1,7 @@ +#!/bin/bash -e + +[ "${LIVEINSTALL}" != "1" ] && exit 0 + +on_chroot << EOF +apt-get install -y calamares calamares-settings-debian +EOF diff --git a/exports/squashfs/06-export-livefs/01-run.sh b/exports/squashfs/06-export-livefs/01-run.sh new file mode 100755 index 0000000..68a938e --- /dev/null +++ b/exports/squashfs/06-export-livefs/01-run.sh @@ -0,0 +1,23 @@ +#!/bin/bash -e + +[ "${LIVEINSTALL}" != "1" ] && exit 0 + +LIVEFS_FILE="${STAGE_WORK_DIR}/${IMG_FILENAME}${IMG_SUFFIX}.livefs.squashfs" + +unmount "${ROOTFS_DIR}" + +mksquashfs "${ROOTFS_DIR}" "${LIVEFS_FILE}" \ + -comp xz \ + -noappend \ + -e boot/efi + +mkdir -p "${DEPLOY_DIR}" + +VMLINUZ=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "vmlinuz-*" | sort | tail -1) +INITRD=$(find "${ROOTFS_DIR}/boot" -maxdepth 1 -name "initrd.img-*" | sort | tail -1) + +cp "${LIVEFS_FILE}" "${DEPLOY_DIR}/livefs.squashfs" +[ -n "${VMLINUZ}" ] && cp "${VMLINUZ}" "${DEPLOY_DIR}/livefs.vmlinuz" +[ -n "${INITRD}" ] && cp "${INITRD}" "${DEPLOY_DIR}/livefs.initrd.img" + +echo "gen-installmedia livefs artifacts written to ${DEPLOY_DIR}/livefs.{squashfs,vmlinuz,initrd.img}" diff --git a/stage0/00-configure-apt/00-run.sh b/stage0/00-configure-apt/00-run.sh index d57c7c1..aac9525 100755 --- a/stage0/00-configure-apt/00-run.sh +++ b/stage0/00-configure-apt/00-run.sh @@ -39,8 +39,8 @@ else fi # Configure apt preferences -install -m 644 files/apt-chillcraftos-prefs "${ROOTFS_DIR}/etc/apt/preferences.d/" -sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/preferences.d/apt-chillcraftos-prefs" +install -m 644 files/apt-vesperos-prefs "${ROOTFS_DIR}/etc/apt/preferences.d/" +sed -i "s/RELEASE/${RELEASE}/g" "${ROOTFS_DIR}/etc/apt/preferences.d/apt-vesperos-prefs" # Add additional architectures if needed, update and upgrade and cache policy on_chroot <<- \EOF diff --git a/stage0/00-configure-apt/files/apt-chillcraftos-prefs b/stage0/00-configure-apt/files/apt-vesperos-prefs similarity index 100% rename from stage0/00-configure-apt/files/apt-chillcraftos-prefs rename to stage0/00-configure-apt/files/apt-vesperos-prefs diff --git a/stage0/00-configure-apt/files/oxmc.sources b/stage0/00-configure-apt/files/oxmc.sources index 4db157b..3fbc32a 100644 --- a/stage0/00-configure-apt/files/oxmc.sources +++ b/stage0/00-configure-apt/files/oxmc.sources @@ -1,5 +1,5 @@ Types: deb -URIs: https://apt.oxmc.me/chillcraftos +URIs: https://apt.oxmc.me/vesperos Suites: RELEASE Components: main Signed-By: /usr/share/keyrings/oxmc.gpg \ No newline at end of file diff --git a/stage0/00-configure-apt/files/raspbian.sources b/stage0/00-configure-apt/files/raspbian.sources index a5fff54..ee8e40a 100644 --- a/stage0/00-configure-apt/files/raspbian.sources +++ b/stage0/00-configure-apt/files/raspbian.sources @@ -3,6 +3,6 @@ URIs: http://raspbian.raspberrypi.com/raspbian/ Architectures: armhf Suites: RELEASE Components: main contrib non-free rpi -#Signed-By: /usr/share/keyrings/raspbian-archive-keyring.pgp +Signed-By: /usr/share/keyrings/raspbian-archive-keyring.pgp # TODO: Remove Trusted once Raspbian reissues their key with SHA256+ (SHA1 rejected by sqv since 2026-02-01) Trusted: yes \ No newline at end of file diff --git a/stage2/04-cloud-init/README.txt b/stage2/04-cloud-init/README.txt index 0450e04..06b8228 100644 --- a/stage2/04-cloud-init/README.txt +++ b/stage2/04-cloud-init/README.txt @@ -9,7 +9,7 @@ standard NoCloud datasource seed directory for non-RPi systems. - files/user-data Example user-data configuration -- files/meta-data-amd64 Cloud-init instance config (instance_id: chillcraftos-image) +- files/meta-data-amd64 Cloud-init instance config (instance_id: vesperos-image) The NoCloud datasource is used so cloud-init picks up config from the local seed directory on first boot without requiring a network metadata service. diff --git a/stage2/04-cloud-init/files/meta-data b/stage2/04-cloud-init/files/meta-data index c6722cc..cfdf0a3 100644 --- a/stage2/04-cloud-init/files/meta-data +++ b/stage2/04-cloud-init/files/meta-data @@ -15,4 +15,4 @@ dsmode: local # Warning: changing this will cause cloud-init to assume it is running on a # "new" instance, and to go through first time setup again (the value is # compared to a cached copy). -instance_id: chillcraftos-rpi-image \ No newline at end of file +instance_id: vesperos-rpi-image \ No newline at end of file diff --git a/stage2/04-cloud-init/files/meta-data-amd64 b/stage2/04-cloud-init/files/meta-data-amd64 index 5febb4b..7d33d8d 100644 --- a/stage2/04-cloud-init/files/meta-data-amd64 +++ b/stage2/04-cloud-init/files/meta-data-amd64 @@ -15,4 +15,4 @@ dsmode: local # Warning: changing this will cause cloud-init to assume it is running on a # "new" instance, and to go through first time setup again (the value is # compared to a cached copy). -instance_id: chillcraftos-image \ No newline at end of file +instance_id: vesperos-image \ No newline at end of file