From: Ralph Ronnquist Date: Thu, 8 Feb 2024 12:09:33 +0000 (+1100) Subject: Prepare automatically FS.sqfs unless it existsa already. X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=55bcf3feab11042eaf786e5e1234c315b75aabc9;p=rrq%2Frescue-boot.git Prepare automatically FS.sqfs unless it existsa already. --- diff --git a/minbase-strap-mkimg.sh b/minbase-strap-mkimg.sh index 8d77f5a..1e72b9a 100644 --- a/minbase-strap-mkimg.sh +++ b/minbase-strap-mkimg.sh @@ -9,6 +9,9 @@ rm -f "$IMG" # First partition sectors (round up to a Mb number DUM1=$(( ( $(du -sB1 $TMP | sed 's/\s.*//') / 1048576 + 2 ) )) + +# Second partition is a squashfs packing of $FS +[ -r FS.sqfs ] || ( cd $FS && mksquashfs * ../FS.sqfs ) DUM2=$(( $(stat -c %s FS.sqfs) / 1048576 + 2 )) # Estimate the required disk image size in Mib @@ -24,7 +27,6 @@ label: dos - - 0x83 EOF PART=( $(fdisk -l -ostart,sectors $IMG | tail -n 2) ) -echo "${PART[*]}" # First sector is 2048 by default, which is byte address 1048576 TMPIMG=$(mktemp XXXX)