3 # Run xorriso to make a bootable ISO of bootimage.raw; a hybrid, nulti
12 echo "# Prepare ISO content tree"
14 if [ ! -d $ISOTREE ] ; then
16 touch $ISOTREE/catalog # Boot catalog
17 # Determine start and size of first parition
18 X=( $(sfdisk -l -ostart,sectors bootimage.raw | tail -n 2) )
19 dd if=bootimage.raw of=$P1 skip=${X[0]} count=${X[1]}
20 echo "# Set up the isolinux boot loader"
21 mkdir -p $ISOTREE/boot/syslinux/bios
22 cp kernel/usr/lib/syslinux/modules/bios/* $ISOTREE/boot/syslinux/bios
23 mv $ISOTREE/boot/syslinux/bios/ldlinux.c32 $ISOTREE/
24 cp kernel/usr/lib/ISOLINUX/isolinux.bin $ISOTREE/
25 mcopy -i $P1 ::/syslinux.cfg $ISOTREE/
26 mcopy -i $P1 ::/bootmenu.cfg $ISOTREE/
27 mcopy -i $P1 ::/splash.png $ISOTREE/
28 mcopy -i $P1 ::/vmlinuz $ISOTREE/
29 mcopy -i $P1 ::/initrd.gz $ISOTREE/
32 [ ! -r $ISO ] || rm $ISO
33 PREPID="'$(id -un), $(getent passwd $(id -un)|awk -F: '{print $5}')'"
39 -rockridge on -joliet on
41 -volset_id "$(date +"Tiniest %Y-%m-%d %H:%M:%S")"
42 -publisher "Ralph (rrq) Ronnquist"
43 -application_id "Hybrid Multi Mode Disk Image"
44 -system_id "Tiniest Linux"
45 #-copyright_file copyright.txt
46 #-abstract_file abstract.txt
47 #-biblio_file biblio.txt
48 -preparer_id "$PREPID"
49 #-application_use path
50 #-out_charset "UTF8" ??
53 -append_partition 2 0xef ${P1}
54 -boot_image next cat_path=/catalog
55 -boot_image any system_area=kernel/usr/lib/ISOLINUX/isohdppx.bin
56 -boot_image any bin_path=/isolinux.bin
57 -boot_image any boot_info_table=on
60 efi_path=--interval:appended_partition_2:all::/EFI/BOOT/bootx64.efi
64 xorriso "${XORRISO[@]}"