From 6ff686f46aaf7c2c21ac2e9acffc28238f8b9865 Mon Sep 17 00:00:00 2001 From: oxmc7769 Date: Thu, 5 Mar 2026 06:25:58 -0800 Subject: [PATCH] export squashfs instead of ISO for now --- build.sh | 6 +++++- export-iso/03-finalise/01-run.sh | 4 ++-- export-squashfs/00-finalise/01-run.sh | 19 +++++++++++++++++++ export-squashfs/prerun.sh | 6 ++++++ stage3/00-install-packages/01-packages-amd64 | 2 ++ stage3/{EXPORT_ISO => EXPORT_SQUASHFS} | 0 6 files changed, 34 insertions(+), 3 deletions(-) create mode 100644 export-squashfs/00-finalise/01-run.sh create mode 100644 export-squashfs/prerun.sh rename stage3/{EXPORT_ISO => EXPORT_SQUASHFS} (100%) diff --git a/build.sh b/build.sh index e82b351..46d773d 100755 --- a/build.sh +++ b/build.sh @@ -144,7 +144,7 @@ run_stage() { unmount "${WORK_DIR}/${STAGE}" if [ ! -f SKIP_IMAGES ]; then - if [ -f "${STAGE_DIR}/EXPORT_IMAGE" ] || [ -f "${STAGE_DIR}/EXPORT_ISO" ]; then + if [ -f "${STAGE_DIR}/EXPORT_IMAGE" ] || [ -f "${STAGE_DIR}/EXPORT_ISO" ] || [ -f "${STAGE_DIR}/EXPORT_SQUASHFS" ]; then EXPORT_DIRS="${EXPORT_DIRS} ${STAGE_DIR}" fi fi @@ -361,6 +361,10 @@ for EXPORT_DIR in ${EXPORT_DIRS}; do STAGE_DIR="${BASE_DIR}/export-image" run_stage fi + if [ -e "${EXPORT_DIR}/EXPORT_SQUASHFS" ]; then + STAGE_DIR="${BASE_DIR}/export-squashfs" + run_stage + fi if [ "${USE_QEMU}" != "1" ]; then if [ -e "${EXPORT_DIR}/EXPORT_NOOBS" ]; then # shellcheck source=/dev/null diff --git a/export-iso/03-finalise/01-run.sh b/export-iso/03-finalise/01-run.sh index e6265f0..27c6592 100755 --- a/export-iso/03-finalise/01-run.sh +++ b/export-iso/03-finalise/01-run.sh @@ -64,12 +64,12 @@ insmod all_video insmod gfxterm menuentry "ChillcraftOS Live" { - linux /boot/vmlinuz boot=live components quiet splash + linux /boot/vmlinuz boot=live components live-config.nocomponents quiet splash initrd /boot/initrd.img } menuentry "ChillcraftOS Live (safe mode)" { - linux /boot/vmlinuz boot=live components nomodeset + linux /boot/vmlinuz boot=live components live-config.nocomponents nomodeset initrd /boot/initrd.img } GRUBEOF diff --git a/export-squashfs/00-finalise/01-run.sh b/export-squashfs/00-finalise/01-run.sh new file mode 100644 index 0000000..edfd72b --- /dev/null +++ b/export-squashfs/00-finalise/01-run.sh @@ -0,0 +1,19 @@ +#!/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/export-squashfs/prerun.sh b/export-squashfs/prerun.sh new file mode 100644 index 0000000..15ec68b --- /dev/null +++ b/export-squashfs/prerun.sh @@ -0,0 +1,6 @@ +#!/bin/bash -e + +rm -rf "${ROOTFS_DIR}" +mkdir -p "${ROOTFS_DIR}" + +rsync -aHAXx --exclude /var/cache/apt/archives "${EXPORT_ROOTFS_DIR}/" "${ROOTFS_DIR}/" diff --git a/stage3/00-install-packages/01-packages-amd64 b/stage3/00-install-packages/01-packages-amd64 index 3902268..da5237b 100644 --- a/stage3/00-install-packages/01-packages-amd64 +++ b/stage3/00-install-packages/01-packages-amd64 @@ -3,3 +3,5 @@ grub-efi-amd64 grub-efi-amd64-bin live-boot live-boot-initramfs-tools +live-config +live-config-systemd diff --git a/stage3/EXPORT_ISO b/stage3/EXPORT_SQUASHFS similarity index 100% rename from stage3/EXPORT_ISO rename to stage3/EXPORT_SQUASHFS