3 # Run xorriso to make a bootable ISO of bootimage.raw; a hybrid, multi
10 P1=part1.raw # $ISOTREE/part1.raw
12 echo "# Prepare ISO content tree unless it's already set up"
13 if [ ! -d $ISOTREE ] ; then
16 # Determine start and size of first parition
17 X=( $(sfdisk -l -ostart,sectors bootimage.raw | tail -n 2) )
18 dd if=bootimage.raw of=$P1 skip=${X[0]} count=${X[1]}
20 echo "# Set up the isolinux boot loader in $ISOTREE"
21 mkdir -p $ISOTREE/boot/isolinux/bios
22 cp kernel/usr/lib/syslinux/modules/bios/* $ISOTREE/boot/isolinux/bios
23 mv $ISOTREE/boot/isolinux/bios/ldlinux.c32 $ISOTREE/boot/isolinux
24 cp kernel/usr/lib/ISOLINUX/isolinux.bin $ISOTREE/boot/isolinux
25 cp syslinux-iso.cfg $ISOTREE/boot/isolinux/syslinux.cfg
26 mcopy -i $P1 ::/splash.png ::/vmlinuz $ISOTREE/
29 [ -r $ISO ] && rm $ISO
31 PREPID="'$(id -un), $(getent passwd $(id -un)|awk -F: '{print $5}')'"
37 -rockridge on -joliet on
39 -volset_id "$(date +"Tiniest %Y-%m-%d %H:%M:%S")"
40 -publisher "Ralph (rrq) Ronnquist"
41 -application_id "Hybrid Multi Mode Disk Image"
42 -system_id "Tiniest Linux"
43 #-copyright_file copyright.txt
44 #-abstract_file abstract.txt
45 #-biblio_file biblio.txt
46 -preparer_id "$PREPID"
47 #-application_use path
48 #-out_charset "UTF8" ??
51 # Mastering a cdrom legacy boot that uses the ISO tree only
52 -boot_image isolinux system_area=kernel/usr/lib/ISOLINUX/isohdpfx.bin
54 # Mastering a disk legacy boot reusing the cdrom legacy boot
55 -boot_image isolinux dir=/boot/isolinux
58 # Mastering a disk UEFI boot using the separate boot partition $P1
59 # Bootloader = /EFI/BOOT/bootx64.efi
60 -append_partition 2 0xef ${P1}
62 efi_path=--interval:appended_partition_2:all::/EFI/BOOT/bootx64.efi
64 # cdrom UEFI boot is missing
67 xorriso "${XORRISO[@]}"
68 #sfdisk -f --part-attrs tiniest.iso 2 LegacyBIOSBootable
69 sfdisk -A tiniest.iso 2