3 # Run xorriso to make a bootable ISO of bootimage.raw; a hybrid, nulti
10 P1=part1.raw # $ISOTREE/part1.raw
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]}
21 echo "# Set up the isolinux boot loader in $ISOTREE"
22 mkdir -p $ISOTREE/boot/isolinux/bios
23 cp kernel/usr/lib/syslinux/modules/bios/* $ISOTREE/boot/isolinux/bios
24 mv $ISOTREE/boot/isolinux/bios/ldlinux.c32 $ISOTREE/boot/isolinux
25 cp kernel/usr/lib/ISOLINUX/isolinux.bin $ISOTREE/boot/isolinux
26 cp syslinux-iso.cfg $ISOTREE/boot/isolinux/syslinux.cfg
27 mcopy -i $P1 ::/splash.png ::/vmlinuz $ISOTREE/
29 #mkdir -p $ISOTREE/EFI/BOOT
30 #cp kernel/usr/lib/SYSLINUX.EFI/efi64/syslinux.efi \
31 # $ISOTREE/EFI/BOOT/bootia64.efi
32 #cp $ISOTREE/boot/isolinux/*.* $ISOTREE/EFI/boot/
34 #mcopy -i $P1 ::/ldlinux.sys ::/ldlinux.c32 $ISOTREE/
35 #mcopy -i $P1 ::/initrd.gz $ISOTREE/
36 #cp devuan/initrd.gz $ISOTREE/
39 [ ! -r $ISO ] || rm $ISO
40 PREPID="'$(id -un), $(getent passwd $(id -un)|awk -F: '{print $5}')'"
46 -rockridge on -joliet on
48 -volset_id "$(date +"Tiniest %Y-%m-%d %H:%M:%S")"
49 -publisher "Ralph (rrq) Ronnquist"
50 -application_id "Hybrid Multi Mode Disk Image"
51 -system_id "Tiniest Linux"
52 #-copyright_file copyright.txt
53 #-abstract_file abstract.txt
54 #-biblio_file biblio.txt
55 -preparer_id "$PREPID"
56 #-application_use path
57 #-out_charset "UTF8" ??
60 # Mastering a cdrom legacy boot that uses the ISO tree only
61 -boot_image isolinux system_area=kernel/usr/lib/ISOLINUX/isohdpfx.bin
63 # Mastering a disk legacy boot reusing the cdrom legacy boot
64 -boot_image isolinux dir=/boot/isolinux
67 # Mastering a disk UEFI boot using the separate boot partition $P1
68 # Bootloader = /EFI/BOOT/bootx64.efi
69 -append_partition 2 0xef ${P1}
71 efi_path=--interval:appended_partition_2:all::/EFI/BOOT/bootx64.efi
73 # cdrom UEFI boot is missing
76 xorriso "${XORRISO[@]}"
77 #sfdisk -f --part-attrs tiniest.iso 2 LegacyBIOSBootable
78 sfdisk -A tiniest.iso 2