Latest version

This commit is contained in:
Sam Hardeman 2026-03-08 20:54:07 +01:00
parent e3a2efdb43
commit eb0aab1613
17 changed files with 815 additions and 328 deletions

20
mount-squash-image Executable file
View file

@ -0,0 +1,20 @@
#!/bin/bash
echo $@
DIR="$@"
DIR=$(readlink -f "$DIR")
DIR_SHORT=$(basename $DIR)
mkdir -p "$DIR"
OVERLAY_ROOT=$(readlink -f "${DIR}/..")/.squashfs/${DIR_SHORT}
OVERLAY_UPPER=${OVERLAY_ROOT}/upper
OVERLAY_LOWER=${OVERLAY_ROOT}/lower
OVERLAY_WORK=${OVERLAY_ROOT}/work
OVERLAY_TARG=$DIR
umount-squash-image $@ 1>/dev/null 2>/dev/null
sudo mount "${OVERLAY_ROOT}.img" "$OVERLAY_LOWER" -t squashfs -o loop
sudo mount -t overlay -o lowerdir="$OVERLAY_LOWER",upperdir="$OVERLAY_UPPER",workdir="$OVERLAY_WORK" none "$OVERLAY_TARG"
echo "SquashFS filesystem is mounted and ready,"