From e28f01366979d2a2070238f42ff2ba445fc3536a Mon Sep 17 00:00:00 2001 From: Karl Date: Fri, 18 Jul 2025 16:30:17 +0100 Subject: [PATCH] new key and smaller image --- build_raspberry_pi.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/build_raspberry_pi.sh b/build_raspberry_pi.sh index 42a803c..a23f07a 100755 --- a/build_raspberry_pi.sh +++ b/build_raspberry_pi.sh @@ -16,11 +16,11 @@ sudo mkdir -p "${BUILD_DIR}" if [ ! -f raspios.img.xz ] then wget -O raspios.img.xz "https://downloads.raspberrypi.org/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz" - echo "f0743c51a4971b3afe231a4e23074233f15469d4b3453615f473a053141933a3 raspios.img.xz" | sha256sum --check --status + echo "58a3ec57402c86332e67789a6b8f149aeeb4e7bb0a16c9388a66ea6e07012e45 raspios.img.xz" | sha256sum --check --status if [ $? -ne 0 ] then echo "downloaded raspios does not match checksum"; - return -1; + exit 1; fi fi @@ -30,7 +30,7 @@ xz -kd raspios.img.xz # Repartition image export LIBGUESTFS_BACKEND_SETTINGS=force_tcg truncate -r raspios.img raspikiosk.img -truncate -s +2G raspikiosk.img +truncate -s +1.5G raspikiosk.img virt-resize --expand /dev/sda2 raspios.img raspikiosk.img rm -f raspios.img @@ -43,8 +43,8 @@ sudo mount /dev/loop0p2 "${BUILD_DIR}" sudo mount /dev/loop0p1 "${BUILD_DIR}/boot" # Copy the (raspberry pi-specific) skeleton files -sudo rsync -a "${SCRIPT_DIR}/raspberry_pi_skeleton/." "${BUILD_DIR}" -sudo rsync -a "${SCRIPT_DIR}/kiosk_skeleton/." "${BUILD_DIR}/kiosk_skeleton" +sudo rsync -a --no-owner --no-group "${SCRIPT_DIR}/raspberry_pi_skeleton/." "${BUILD_DIR}" +sudo rsync -a --no-owner --no-group "${SCRIPT_DIR}/kiosk_skeleton/." "${BUILD_DIR}/kiosk_skeleton" # Make fstab read-only sed -i 's/vfat defaults/vfat ro,defaults/g' "${BUILD_DIR}/etc/fstab"