Re: UEFI support for mini.iso?
On Fri, Feb 12, 2016 at 09:21:31AM +0100, Thomas Schmitt wrote:
> Wouter Verhelst wrote:
> > http://anonscm.debian.org/cgit/d-i/debian-installer.git/tree/build/util/geniso_hybrid_plus_firmware_partition
> > 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.
Right, that explains -- thank you.
> 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.
Right. Since it seems like a bit much of a waste, I've done the latter.
> - 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 n
> echo p
> echo 3
> echo # use default start sector
> # Pedantically, set partition type to 1: FAT 16
> echo t
> echo 3
> echo 1
> # Done!
> echo w
> /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
As well as the three other cases.
It is easy to love a country that is famous for chocolate and beer
-- Barack Obama, speaking in Brussels, Belgium, 2014-03-26