# 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 ::/
+ echo "# Set up the isolinux boot loader"
+ mkdir -p $ISOTREE/boot/syslinux/bios
+ cp kernel/usr/lib/syslinux/modules/bios/* $ISOTREE/boot/syslinux/bios
+ mv $ISOTREE/boot/syslinux/bios/ldlinux.c32 $ISOTREE/
+ cp kernel/usr/lib/ISOLINUX/isolinux.bin $ISOTREE/
+ mcopy -i $P1 ::/syslinux.cfg $ISOTREE/
+ mcopy -i $P1 ::/bootmenu.cfg $ISOTREE/
+ mcopy -i $P1 ::/splash.png $ISOTREE/
+ mcopy -i $P1 ::/vmlinuz $ISOTREE/
+ mcopy -i $P1 ::/initrd.gz $ISOTREE/
fi
[ ! -r $ISO ] || rm $ISO
-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"
+ -system_id "Tiniest Linux"
#-copyright_file copyright.txt
#-abstract_file abstract.txt
#-biblio_file biblio.txt
#-application_use path
#-out_charset "UTF8" ??
-uid 0 -gid 0
-)
-BOOT1=(
- -boot_image any cat_path=/catalog
-append_partition 2 0xef ${P1}
+ -boot_image next cat_path=/catalog
+ -boot_image any system_area=kernel/usr/lib/ISOLINUX/isohdppx.bin
+ -boot_image any bin_path=/isolinux.bin
+ -boot_image any boot_info_table=on
+ -boot_image any next
-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
+ -boot_image any next
)
-XORRISO=( "${XORRISO[@]}" "${BOOT1[@]}" )
-#for A in "${XORRISO[@]}" ; do echo "$A" ; done
xorriso "${XORRISO[@]}"
#
# QEMU setup for trial VM
-BOOT="-boot menu=on"
-[ -z "$EFI" ] || BOOT="-bios /usr/share/OVMF/OVMF_CODE.fd"
-
-[ -d disk.raw ] || dd if=/dev/zero of=disk.raw bs=1G count=0 seek=8
+if [ -z "$ISO" ] ; then
+ if [ -z "$EFI" ] ; then
+ BOOT="-boot menu=on"
+ DISK2="-drive index=1,id=boot,media=disk,format=raw,file=bootimage.raw"
+ else
+ BOOT="-bios /usr/share/OVMF/OVMF_CODE.fd"
+ DISK2="-drive index=1,id=boot,media=disk,format=raw,file=bootimage.raw"
+ fi
+else
+ if [ -z "$EFI" ] ; then
+ BOOT="-boot menu=on"
+ DISK2="-drive index=1,id=boot,media=cdrom,format=raw,file=tiniest.iso"
+ else
+ BOOT="-bios /usr/share/OVMF/OVMF_CODE.fd"
+ DISK2="-drive index=1,id=boot,media=disk,format=raw,file=tiniest.iso"
+ fi
+fi
+[ -d disk.raw ] || dd if=/dev/zero of=disk.raw bs=1G count=0 seek=8
ARGS=(
- -m 2G -M pc,accel=kvm -cpu host
+ -m 2G -M pc,accel=kvm -cpu host -vga qxl
-serial mon:stdio -echr 0x1c # Using ^\ as meta character
- -vga qxl
$BOOT
-drive index=0,id=disk,media=disk,format=raw,file=disk.raw
- -drive index=1,id=boot,media=disk,format=raw,file=bootimage.raw
+ $DISK2
)
exec qemu-system-x86_64 ${ARGS[@]}