Thank you so much. I will try that :)
Regards,
Gary (Heyi Guo)
在 6/21/2017 12:47 AM, Laszlo Ersek 写道:
On 06/20/17 14:34, Heyi Guo wrote:
Is there any simple tool to parse ISO images (El Torito partition) and
identify whether it is EFI bootable?
$ dumpet --iso Fedora-Server-dvd-aarch64-25-20161015.n.0.iso
Validation Entry:
Header Indicator: 0x01 (Validation Entry)
PlatformId: 0xef (EFI) <---------- [1]
ID: ""
Checksum: 0x66aa
Key bytes: 0x55aa
Boot Catalog Default Entry:
Entry is bootable
Boot Media emulation type: no emulation <---------- [2]
Media load address: 0 (0x0000)
System type: 0 (0x00)
Load Sectors: 9208 (0x23f8)
Load LBA: 2456 (0x00000998)
The source for dumpet is at <https://github.com/rhboot/dumpet>.
I think EFI bootable image should contain a FAT volume so that EFI can
load bootxx.efi file from the file system.
For a large Wiki page on this, I can recommend:
<https://fedoraproject.org/wiki/User:Pjones/BootableCDsForBIOSAndUEFI>.
For a short summary, these are the commands you need, to format an
EFI-bootable (and EFI-only) CD-ROM:
(1) Create a non-partitioned FAT image in a file, with "mkdosfs -C", and
populate it with the "mtools" utilities.
For a heavier-weight (but also a lot more feature-ful) toolset, you
can also use libguestfs / guestfish.
(2) Generate the ISO image like this:
genisoimage -input-charset ASCII -J -rational-rock \
-efi-boot "$FAT_IMAGE_FILE" -no-emul-boot \
-o "$ISO_IMAGE" -- "$FAT_IMAGE_FILE"
So what you do is, create an ISO9660 filesystem with the FAT image
file copied into it as a normal file (simply to the root directory).
You can enable Joliet and/or RockRidge extensions if you want to,
but those aren't necessary. Then, you set the EFI boot image name
with "-efi-boot" [1], and also specify that the boot image is a "no
emulation" [2] image
<https://en.wikipedia.org/wiki/El_Torito_(CD-ROM_standard)#Boot_modes>.
Several tools like mount in Linux will show all files together
including EFI/BOOT directory,
That directory, displayed as part of the ISO9660 filesystem that was
written to the ISO image / CD-ROM, is entirely irrelevant when it comes
to UEFI-bootability. I doesn't even need to exist, and if it does, it's
likely there only for convenience reasons (so that people don't have to
run "dumpet" or similar tools to extract the FAT image first, and then
the EFI binaries second, if they want to investigate the EFI binaries).
For UEFI boot, only the ElTorito image matters.
so if an ISO image contains such files but not organizes the data in a
FAT sub-volume as EFI requires, I can't see any difference.
In order to extract the ElTorito image(s), use "dumpet --dumpdisks", and
then work on the extracted files with guestfish or mtools. For example:
$ MTOOLS_SKIP_CHECK=1 mdir -i extracted.iso.0 -/ ::
Thanks
Laszlo
_______________________________________________
edk2-devel mailing list
[email protected]
https://lists.01.org/mailman/listinfo/edk2-devel