From e75a7ffa6c10188c831c1d29a5f0cf31ae975d40 Mon Sep 17 00:00:00 2001 From: Ralph Ronnquist Date: Wed, 7 Feb 2024 17:20:34 +1100 Subject: [PATCH] * Strip of any "-unsigned" on kernel version. * (bug fix) use start sector when copying the squashfs. --- minbase-strap.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/minbase-strap.sh b/minbase-strap.sh index 1da0179..16340d9 100755 --- a/minbase-strap.sh +++ b/minbase-strap.sh @@ -55,8 +55,10 @@ if $DEBSTRAP ; then sed 's/\s.*//' | sort -h ) ) echo "** Please select kernel **" select KERNEL in "${KERNELS[@]}" ; do [ -n "$KERNEL" ] && break ; done + VERSION=${KERNEL#linux-image-} + VERSION=${VERSION%-unsigned} chroot "$FS" apt-get install -y $KERNEL - chroot "$FS" depmod -a ${KERNEL#linux-image-} + chroot "$FS" depmod -a $VERSION chroot "$FS" apt-get install -y busybox-static debootstrap touch "$FS"/usr/bin{linuxrc,init} # block these @@ -191,7 +193,8 @@ umount $TMPIMG rm $TMPIMG mcopy -i "$IMG@@1048576" -s $TMP/* ::/ [ -z "$SUDO_USER" ] || chown $SUDO_USER: "$IMG" -dd if=FS.sqfs of=$IMG seek=${PART[3]} conv=notrunc status=none + +dd if=FS.sqfs of=$IMG seek=${PART[2]} conv=notrunc status=none #============================================================ # Final syslinux bios boot image mastering -- 2.39.2