Re: UEFI support for mini.iso?
Wouter Verhelst wrote:
> I add a line isohybrid -u "$iso"
This last isohybrid run replaces the partition which was crafted
by the fdisk run.
This is also the reason why fdisk does not succeed with the result of
isohybrid -u. Partition 2 cannot be created because ist already exists.
If the script would contain the ISO production run, then i would
propose xorrisofs options like -isohybrid-gpt-basdat and
-append_partition which would make runs isohybrid and fdisk unneeded.
But since there is only the partition maker to see, i propose to just
change partition number 2 to 3 in the fdisk run and to let it happen
after the isohybrid -u run.
I tested this with a result of isohybrid -u named mini-test.iso:
- Because isohybrid -u expanded partition 1 to the end of the image
file, i had to add once again bytes for the "Firmware Partition"
like the script does in line 37 by
cat "$firmware_volume_file" >> "$iso"
My command was
dd if=/dev/zero count=12288 >>mini-test.iso
This waste is not necessary if the isohybrid -u run happens before
the cat "$firmware_volume_file" >> "$iso" run.
- Then i ran /sbin/fdisk with nearly the same input as in the script
but with partition number 3 instead of 2:
# Make new partition #3
echo # use default start sector
# Pedantically, set partition type to 1: FAT 16
/sbin/fdisk -lu reports about the result:
Device Boot Start End Sectors Size Id Type
mini-test.iso1 * 0 63487 63488 31M 0 Empty
mini-test.iso2 240 1071 832 416K ef EFI (FAT-12/16/32)
mini-test.iso3 63488 75775 12288 6M 1 FAT12
This boots by
qemu-system-x86_64 -enable-kvm -m 512 -bios /usr/share/ovmf/OVMF.fd -hda mini-test.iso
Have a nice day :)