From: Ralph Ronnquist Date: Wed, 7 Feb 2024 06:20:34 +0000 (+1100) Subject: * Strip of any "-unsigned" on kernel version. X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=e75a7ffa6c10188c831c1d29a5f0cf31ae975d40;p=rrq%2Frescue-boot.git * Strip of any "-unsigned" on kernel version. * (bug fix) use start sector when copying the squashfs. --- 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