From: Ralph Ronnquist Date: Sun, 11 Jun 2023 12:09:59 +0000 (+1000) Subject: added X-Git-Tag: good-1~8 X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=cd11df0a8aa418a29e8e5da4ee4e626dad2f315f;p=rrq%2Ftiniest.git added --- diff --git a/packiso.sh b/packiso.sh new file mode 100755 index 0000000..0111fa5 --- /dev/null +++ b/packiso.sh @@ -0,0 +1,60 @@ +#!/bin/bash +# +# Run xorriso to make a bootable ISO of bootimage.raw; a hybrid, nulti +# mode bootable ISO. + +set -e + +ISOTREE=isotree +ISO=tiniest.iso +P1=$ISOTREE/part1.raw + +echo "# Prepare ISO content tree" + +if [ ! -d $ISOTREE ] ; then + mkdir $ISOTREE + touch $ISOTREE/catalog # Boot catalog + # Determine start and size of first parition + X=( $(sfdisk -l -ostart,sectors bootimage.raw | tail -n 2) ) + dd if=bootimage.raw of=$P1 skip=${X[0]} count=${X[1]} + echo "# Add isolinux boot loader" + mcopy -i $P1 kernel/usr/lib/ISOLINUX/isolinux.bin ::/ + mcopy -i $P1 kernel/usr/lib/ISOLINUX/isohdppx.bin ::/ +fi + +[ ! -r $ISO ] || rm $ISO +PREPID="'$(id -un), $(getent passwd $(id -un)|awk -F: '{print $5}')'" + +XORRISO=( + -report_about ALL + --outdev $ISO + -map $ISOTREE / + -rockridge on -joliet on + -volid "TINIEST" + -volset_id "$(date +"Tiniest %Y-%m-%d %H:%M:%S")" + -publisher "Ralph (rrq) Ronnquist" + -application_id "Hybrid Multi Mode Disk Image" + -system_id "Tiniest Linux HMMDI" + #-copyright_file copyright.txt + #-abstract_file abstract.txt + #-biblio_file biblio.txt + -preparer_id "$PREPID" + #-application_use path + #-out_charset "UTF8" ?? + -uid 0 -gid 0 +) + +BOOT1=( + -boot_image any cat_path=/catalog + -append_partition 2 0xef ${P1} + -boot_image any + efi_path=--interval:appended_partition_2:all::/EFI/BOOT/bootx64.efi + #-boot_image isolinux system_area=kernel/usr/lib/ISOLINUX/isohdppx.bin + -boot_image and part_like_isohybrid=on + # -boot_image any +# bin_path=--interval:appended_partition_2:all::/isolinux.bin +) + +XORRISO=( "${XORRISO[@]}" "${BOOT1[@]}" ) +#for A in "${XORRISO[@]}" ; do echo "$A" ; done +xorriso "${XORRISO[@]}"