Fernando Reyes
2014-Feb-08 19:37 UTC
[syslinux] isohybrid --mac doesn't find the mac efi image
I posted this on the bugzilla page but I figured that on the mailing list it would get more attention. Please see http://bugzilla.syslinux.org/show_bug.cgi?id=49 for a description of my current issue. -- Thank you, Fernando Reyes GPG BDD75DD7 Mission Accomplish, Inc. http://missionaccomplish.com Email:design at missionaccomplish.com Tel: 7187100008 Cell: 3479275477
Thomas Schmitt
2014-Feb-08 22:09 UTC
[syslinux] isohybrid --mac doesn't find the mac efi image
Hi,> http://bugzilla.syslinux.org/show_bug.cgi?id=49The xorriso run shown there would nearly suffice to leave out the run of isohybrid --mac. One would just have to attribute -isohybrid-apm-hfsplus to -e boot/macboot.img. I re-arranged your options to emphasize which ones apply to particular boot images: xorriso -as mkisofs -J -R -l -V UEFI_TESTING \ -o ../image.iso \ -isohybrid-mbr /usr/share/syslinux/isohdpfx.bin \ -c isolinux/boot.cat \ -b isolinux/isolinux.bin \ -no-emul-boot -boot-load-size 4 -boot-info-table \ -eltorito-alt-boot \ -e boot/efiboot.img \ -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \ -eltorito-alt-boot \ -e boot/macboot.img \ -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \ ../cdmaster I am not sure whether it is appropriate to apply -isohybrid-apm-hfsplus to efiboot.img. But that's what the inventor of this setup describes in http://mjg59.dreamwidth.org/11285.html and what isohybrid.c does in initialise_apm(). -------------------------------------------------------------- As for the failed isohybrid run:> # isohybrid --uefi --mac image.iso > isohybrid: image.iso: unable to find mac efi imagehttp://git.kernel.org/cgit/boot/syslinux/syslinux.git/tree/utils/isohybrid.c?id=syslinux-6.03-pre1 Line 978 gets executed if read_efi_section() did not see an El Torito Section Header with platform id 0xef. It expects such a header after having already seen one, that was followed by a Section Entry which described efiboot.img. AFAIK, mjg creates Fedora-LiveCD.iso by help of an enhanced genisoimage, which knows option -e. Probably, isohybrid.c relies on the output of this program. To my interpretation of El Torito specs, there should not be one Section Header per Section Entry as long as the entries belong to the same platform id and id string. El Torito 1.0 states: "2.3 Section Header If the CD was created for a machine with a BIOS incorporating this specification, the Section Header precedes a group of entries from which the BIOS may boot the computer. The section header has an identification string. If the BIOS understands the ID, string it may choose to boot the system using one of these entries in place of the INITIAL/DEFAULT entry." (INITIAL/DEFAULT entry describes isolinux.bin, with platform id 0 = "80x86". Actually this means PC-BIOS.) So probably isohybrid.c should look in the Section Header at byte offset 2 for the 16-bit little-endian count of Section Entries. If it is 2, then it can directly call read_efi_catalogue(), to get the mac_lba. The code which causes xorriso to produce a section with two entries is in libisofs/eltorito.c, function catalog_open() It should suffice to replace the loop for (j = i + 1; j < cat->num_bootimages; j++) { ... } by j = i + 1; to get one entry per section. But before i implement an option for that, i'd like to see a better reason, than just isohybrid.c expecting it. (It also expects that 512 == 2048 and that C compilers by miracle know that a string constant is actually meant as UFT-16 characters.) I am open for learning that it is worth to be done. Have a nice day :) Thomas
Thomas Schmitt
2014-Feb-08 22:40 UTC
[syslinux] isohybrid --mac doesn't find the mac efi image
Hi, it comes to me that there is already an option which can be used to enforce a new Section Header before the entry which describes macboot.img. Option -eltorito-id can be used to set the Id String of the Section Header of the current boot image. efiboot.img is to be stored under the default Id String of 28 0-bytes. So a new Section Header will emerge, if macboot.img gets attributed a different Id String: ... -eltorito-alt-boot \ -e boot/macboot.img \ -eltorito-id "MAC" \ -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \ ... Have a nice day :) Thomas
Fernando Reyes
2014-Feb-09 02:41 UTC
[syslinux] isohybrid --mac doesn't find the mac efi image
On 02/08/14 17:40, Thomas Schmitt wrote:> -eltorito-id "MAC" \thanks a lot, that seems to allow isohybrid --mac to work \o/ for the curious this is the image before and after isohybrid as shown by gparted * output from xorriso xorriso 1.3.2 : RockRidge filesystem manipulator, libburnia project. Drive current: -outdev 'stdio:../image.iso' Media current: stdio file, overwriteable Media status : is blank Media summary: 0 sessions, 0 data blocks, 0 data, 16.5g free Added to ISO image: directory '/'='/chroot/livecd32/real-small' xorriso : UPDATE : 36 files added in 1 seconds xorriso : UPDATE : 36 files added in 1 seconds xorriso : NOTE : Copying to System Area: 432 bytes from file '/usr/share/syslinux/isohdpfx.bin' libisofs: NOTE : Aligned image size to cylinder size by 80 blocks xorriso : UPDATE : 40.00% done ISO image produced: 20480 sectors Written to medium : 20480 sectors at LBA 0 Writing to 'stdio:../image.iso' completed successfully. * output from gdisk -l image.iso showing both MBR and GPT layouts # gdisk -l ../image.iso GPT fdisk (gdisk) version 0.8.6 Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: present Found valid MBR and GPT. Which do you want to use? 1 - MBR 2 - GPT 3 - Create blank GPT Your answer: 2 Using GPT and creating fresh protective MBR. Warning! Main partition table overlaps the first partition by 64 blocks! You will need to delete this partition or resize it in another utility. Disk ../image.iso: 83968 sectors, 41.0 MiB Logical sector size: 512 bytes Disk identifier (GUID): 0C3C93F0-74AE-430E-B40C-7066F358BC7D Partition table holds up to 192 entries First usable sector is 64, last usable sector is 83918 Partitions will be aligned on 8-sector boundaries Total free space is 3 sectors (1.5 KiB) Number Start (sector) End (sector) Size Code Name 2 2232 42551 19.7 MiB 0700 ISOHybrid2 3 42552 52615 4.9 MiB 0700 ISOHybrid1 # gdisk -l ../image.iso GPT fdisk (gdisk) version 0.8.6 Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: present Found valid MBR and GPT. Which do you want to use? 1 - MBR 2 - GPT 3 - Create blank GPT Your answer: 1 Entering GPTPart::SetName(const UnicodeString...) Entering GPTPart::SetName(const UnicodeString...) Disk ../image.iso: 83968 sectors, 41.0 MiB Logical sector size: 512 bytes Disk identifier (GUID): F40ECEDC-A44C-49B1-AC22-CE710DD89E42 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 83934 Partitions will be aligned on 8-sector boundaries Total free space is 33517 sectors (16.4 MiB) Number Start (sector) End (sector) Size Code Name 2 42552 52615 4.9 MiB EF00 EFI System 3 2232 42551 19.7 MiB EF00 EFI System * xorriso -index image.iso -toc xorriso 1.3.2 : RockRidge filesystem manipulator, libburnia project. xorriso : NOTE : Loading ISO image tree from LBA 0 xorriso : UPDATE : 36 nodes read in 1 seconds xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded Drive current: -indev 'image.iso' Media current: stdio file, overwriteable Media status : is written , is appendable Boot record : El Torito , ISOLINUX isohybrid MBR pointing to boot image Media summary: 1 session, 20992 data blocks, 41.0m data, 16.2g free Volume id : 'UEFI_TESTING' Drive current: -indev 'image.iso' Drive type : vendor 'YOYODYNE' product 'WARP DRIVE' revision 'FX01' Media current: stdio file, overwriteable Media status : is written , is appendable Media blocks : 20992 readable , 8492956 writable , 8513948 overall Boot record : El Torito , ISOLINUX isohybrid MBR pointing to boot image Boot catalog : '/isolinux/boot.cat' Boot image : '/isolinux/isolinux.bin' , boot_info_table=on Boot image : '/boot/efiboot.img' , platform_id=0xEF Boot image : '/boot/macboot.img' , platform_id=0xEF TOC layout : Idx , sbsector , Size , Volume Id ISO session : 1 , 0 , 20992s , UEFI_TESTING Media summary: 1 session, 20992 data blocks, 41.0m data, 16.2g free Media nwa : 20992s * output after running isohybrid --uefi --mac # gdisk -l image.iso GPT fdisk (gdisk) version 0.8.6 Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: present Found valid MBR and GPT. Which do you want to use? 1 - MBR 2 - GPT 3 - Create blank GPT Your answer: 1 Entering GPTPart::SetName(const UnicodeString...) Disk image.iso: 86016 sectors, 42.0 MiB Logical sector size: 512 bytes Disk identifier (GUID): 6BE2F352-0635-4F67-9851-084496302983 Partition table holds up to 128 entries First usable sector is 34, last usable sector is 85982 Partitions will be aligned on 8-sector boundaries Total free space is 75885 sectors (37.1 MiB) Number Start (sector) End (sector) Size Code Name 2 42552 52615 4.9 MiB EF00 EFI System # gdisk -l image.iso GPT fdisk (gdisk) version 0.8.6 Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: present Found valid MBR and GPT. Which do you want to use? 1 - MBR 2 - GPT 3 - Create blank GPT Your answer: 2 Using GPT and creating fresh protective MBR. Warning! Main partition table overlaps the first partition by 48 blocks! You will need to delete this partition or resize it in another utility. Disk image.iso: 86016 sectors, 42.0 MiB Logical sector size: 512 bytes Disk identifier (GUID): C1D60C7A-AC2A-4620-ABE3-44D2C60020A0 Partition table holds up to 128 entries First usable sector is 48, last usable sector is 85982 Partitions will be aligned on 8-sector boundaries Total free space is 2014 sectors (1007.0 KiB) Number Start (sector) End (sector) Size Code Name 2 42552 52615 4.9 MiB 0700 ????????d????e???? 3 2232 42551 19.7 MiB AF00 ????????d????e???? ok, I don't know what that garble text is above. I hope this answers your questions. Thanks for the support. -- Thank you, Fernando Reyes GPG BDD75DD7 Mission Accomplish, Inc. http://missionaccomplish.com Email:design at missionaccomplish.com Tel: 7187100008 Cell: 3479275477
Thomas Schmitt
2014-Feb-10 12:41 UTC
[syslinux] isohybrid --mac doesn't find the mac efi image
Hi, email at missionaccomplish.com wrote:> We been trying to boot the image in vbox using efi emulation but it > complains about kernel not supporting handover.If it complains about a kernel then it should be past El Torito or GPT. The job of xorriso is to point BIOS and EFI to their boot images. Everything else is in the scope of the boot images resp. the operating system that shall finally come up.> P.S the latest fedora ISO seems to boot fine in vbox perhaps you > might want to look at their image. Enjoy the rest of your weekend.You could try to re-pack it by a xorriso command like yours. Use xorriso -indev ...imagefile...iso -toc to learn about the "Boot image" files and the "Volume id", which you will have to use in the xorriso run. E.g. with an old Fedora-LiveCD.iso this would be Drive current: -indev 'Fedora-LiveCD.iso' ... Volume id : 'Fedora-LiveCD' ... Boot record : El Torito , ISOLINUX isohybrid MBR pointing to boot image ... Boot image : '/isolinux/isolinux.bin' , boot_info_table=on Boot image : '/isolinux/efiboot.img' , platform_id=0xEF Boot image : '/isolinux/macboot.img' , platform_id=0xEF Extract the MBR file for -isohybrid-mbr by dd if=Fedora-LiveCD.iso bs=512 count=1 of=/tmp/extracted.mbr and use a path to it as parameter of -isohybrid-mbr. Use the mounted original ISO as input directory. E.g.: mount -o loop Fedora-LiveCD.iso /mnt/fedora_iso xorriso -as mkisofs -J -R -l -V 'Fedora-LiveCD' \ -o ../image.iso \ -isohybrid-mbr /tmp/extracted.mbr \ -c isolinux/boot.cat \ -b isolinux/isolinux.bin \ -no-emul-boot -boot-load-size 4 -boot-info-table \ -eltorito-alt-boot \ -e isolinux/efiboot.img \ -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \ -eltorito-alt-boot \ -e isolinux/macboot.img \ -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \ /mnt/fedora_iso If this works as good or bad as the original, then xorriso does its job as expectable. If the repacked image fails, tell me the URL of the original which you used. Have a nice day :) Thomas
Fernando Reyes
2014-Feb-10 23:09 UTC
[syslinux] isohybrid --mac doesn't find the mac efi image
On 02/10/14 07:41, Thomas Schmitt wrote:> Hi, > > email at missionaccomplish.com wrote: >> We been trying to boot the image in vbox using efi emulation but it >> complains about kernel not supporting handover. > If it complains about a kernel then it should be past El Torito > or GPT. The job of xorriso is to point BIOS and EFI to their > boot images. Everything else is in the scope of the boot images > resp. the operating system that shall finally come up. > > >> P.S the latest fedora ISO seems to boot fine in vbox perhaps you >> might want to look at their image. Enjoy the rest of your weekend. > You could try to re-pack it by a xorriso command like yours. > Use > > xorriso -indev ...imagefile...iso -toc > > to learn about the "Boot image" files and the "Volume id", > which you will have to use in the xorriso run. > E.g. with an old Fedora-LiveCD.iso this would be > > Drive current: -indev 'Fedora-LiveCD.iso' > ... > Volume id : 'Fedora-LiveCD' > ... > Boot record : El Torito , ISOLINUX isohybrid MBR pointing to boot image > ... > Boot image : '/isolinux/isolinux.bin' , boot_info_table=on > Boot image : '/isolinux/efiboot.img' , platform_id=0xEF > Boot image : '/isolinux/macboot.img' , platform_id=0xEF > > Extract the MBR file for -isohybrid-mbr by > > dd if=Fedora-LiveCD.iso bs=512 count=1 of=/tmp/extracted.mbr > > and use a path to it as parameter of -isohybrid-mbr. > Use the mounted original ISO as input directory. > E.g.: > > mount -o loop Fedora-LiveCD.iso /mnt/fedora_iso > > xorriso -as mkisofs -J -R -l -V 'Fedora-LiveCD' \ > -o ../image.iso \ > -isohybrid-mbr /tmp/extracted.mbr \ > -c isolinux/boot.cat \ > -b isolinux/isolinux.bin \ > -no-emul-boot -boot-load-size 4 -boot-info-table \ > -eltorito-alt-boot \ > -e isolinux/efiboot.img \ > -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \ > -eltorito-alt-boot \ > -e isolinux/macboot.img \ > -no-emul-boot -isohybrid-gpt-basdat -isohybrid-apm-hfsplus \ > /mnt/fedora_iso > > If this works as good or bad as the original, then xorriso does > its job as expectable. If the repacked image fails, tell me the > URL of the original which you used. > > > Have a nice day :) > > Thomas >Greetings Thomas, Hope you had a good weekend! here is the update on my UEFI venture. It seems that omitting the -isohybrid-mbr,-isohybrid-gpt-basdat & -isohybrid-apm-hfsplus from both efiboot.img and macboot.img and just allowing isohybrid set all that works well. I have created two images which include and exclude these parameters and below is the output data. Image created without the use of /usr/bin/isohybrid: # xorriso -indev .uefi-testing.iso -toc xorriso 1.3.2 : RockRidge filesystem manipulator, libburnia project. xorriso : NOTE : Loading ISO image tree from LBA 0 xorriso : UPDATE : 36 nodes read in 1 seconds xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded Drive current: -indev 'uefi-testing.iso' Media current: stdio file, overwriteable Media status : is written , is appendable Boot record : El Torito , ISOLINUX isohybrid MBR pointing to boot image Media summary: 1 session, 20992 data blocks, 41.0m data, 33.9g free Volume id : 'EUFI-TESTING' Drive current: -indev 'uefi-testing.iso' Drive type : vendor 'YOYODYNE' product 'WARP DRIVE' revision 'FX01' Media current: stdio file, overwriteable Media status : is written , is appendable Media blocks : 20992 readable , 17767882 writable , 17788874 overall Boot record : El Torito , ISOLINUX isohybrid MBR pointing to boot image Boot catalog : '/isolinux/boot.cat' Boot image : '/isolinux/isolinux.bin' , boot_info_table=on Boot image : '/boot/efiboot.img' , platform_id=0xEF Boot image : '/boot/macboot.img' , platform_id=0xEF TOC layout : Idx , sbsector , Size , Volume Id ISO session : 1 , 0 , 20992s , EUFI-TESTING Media summary: 1 session, 20992 data blocks, 41.0m data, 33.9g free Media nwa : 20992s # gdisk -l uefi-testing.iso GPT fdisk (gdisk) version 0.8.6 Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: present Found valid MBR and GPT. Which do you want to use? 1 - MBR 2 - GPT 3 - Create blank GPT Your answer: 1 Entering GPTPart::SetName(const UnicodeString...) Entering GPTPart::SetName(const UnicodeString...) Disk uefi-testing.iso: 83968 sectors, 41.0 MiB Logical sector size: 512 bytes Disk identifier (GUID): 11EA0059-DA17-4E30-8F64-5FD247730C9B Partition table holds up to 128 entries First usable sector is 34, last usable sector is 83934 Partitions will be aligned on 8-sector boundaries Total free space is 33517 sectors (16.4 MiB) Number Start (sector) End (sector) Size Code Name 2 42552 52615 4.9 MiB EF00 EFI System 3 2232 42551 19.7 MiB EF00 EFI System # gdisk -l uefi-testing.iso GPT fdisk (gdisk) version 0.8.6 Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: present Found valid MBR and GPT. Which do you want to use? 1 - MBR 2 - GPT 3 - Create blank GPT Your answer: 2 Using GPT and creating fresh protective MBR. Warning! Main partition table overlaps the first partition by 64 blocks! You will need to delete this partition or resize it in another utility. Disk uefi-testing.iso: 83968 sectors, 41.0 MiB Logical sector size: 512 bytes Disk identifier (GUID): 133588D1-CEF0-4861-8539-EC28C5D15E07 Partition table holds up to 192 entries First usable sector is 64, last usable sector is 83918 Partitions will be aligned on 8-sector boundaries Total free space is 3 sectors (1.5 KiB) Number Start (sector) End (sector) Size Code Name 2 2232 42551 19.7 MiB 0700 ISOHybrid2 3 42552 52615 4.9 MiB 0700 ISOHybrid1 A url to the first 64k of the image is located at http://77.110.8.68/64kb.img Now for the image that ommitted the -isohybrid-mbr,-isohybrid-gpt-basdat & -isohybrid-apm-hfsplus options and used /usr/bin/isohybrid to produce the hybrid image. # xorriso -indev uefi-testing.iso -toc xorriso 1.3.2 : RockRidge filesystem manipulator, libburnia project. xorriso : NOTE : Loading ISO image tree from LBA 0 xorriso : UPDATE : 36 nodes read in 1 seconds xorriso : NOTE : Detected El-Torito boot information which currently is set to be discarded Drive current: -indev 'uefi-testing.iso' Media current: stdio file, overwriteable Media status : is written , is appendable Boot record : El Torito , ISOLINUX isohybrid MBR pointing to boot image Media summary: 1 session, 20644 data blocks, 40.3m data, 33.9g free Volume id : 'EUFI-TESTING' Drive current: -indev 'uefi-testing.iso' Drive type : vendor 'YOYODYNE' product 'WARP DRIVE' revision 'FX01' Media current: stdio file, overwriteable Media status : is written , is appendable Media blocks : 20672 readable , 17767864 writable , 17788536 overall Boot record : El Torito , ISOLINUX isohybrid MBR pointing to boot image Boot catalog : '/isolinux/boot.cat' Boot image : '/isolinux/isolinux.bin' , boot_info_table=on Boot image : '/boot/efiboot.img' , platform_id=0xEF Boot image : '/boot/macboot.img' , platform_id=0xEF TOC layout : Idx , sbsector , Size , Volume Id ISO session : 1 , 0 , 20644s , EUFI-TESTING Media summary: 1 session, 20644 data blocks, 40.3m data, 33.9g free Media nwa : 20672s # gdisk -l uefi-testing.iso GPT fdisk (gdisk) version 0.8.6 Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: present Found valid MBR and GPT. Which do you want to use? 1 - MBR 2 - GPT 3 - Create blank GPT Your answer: 1 Entering GPTPart::SetName(const UnicodeString...) Disk uefi-testing.iso: 83968 sectors, 41.0 MiB Logical sector size: 512 bytes Disk identifier (GUID): 46D66056-FE29-436E-A134-526503F2692C Partition table holds up to 128 entries First usable sector is 34, last usable sector is 83934 Partitions will be aligned on 8-sector boundaries Total free space is 73837 sectors (36.1 MiB) Number Start (sector) End (sector) Size Code Name 2 42552 52615 4.9 MiB EF00 EFI System # gdisk -l uefi-testing.iso GPT fdisk (gdisk) version 0.8.6 Partition table scan: MBR: MBR only BSD: not present APM: not present GPT: present Found valid MBR and GPT. Which do you want to use? 1 - MBR 2 - GPT 3 - Create blank GPT Your answer: 2 Using GPT and creating fresh protective MBR. Warning! Main partition table overlaps the first partition by 48 blocks! You will need to delete this partition or resize it in another utility. Disk uefi-testing.iso: 83968 sectors, 41.0 MiB Logical sector size: 512 bytes Disk identifier (GUID): 409938D0-D109-42D3-8392-5D59B35D53A1 Partition table holds up to 128 entries First usable sector is 48, last usable sector is 83934 Partitions will be aligned on 8-sector boundaries Total free space is 1358 sectors (679.0 KiB) Number Start (sector) End (sector) Size Code Name 2 42552 52615 4.9 MiB 0700 ????????d????e???? 3 2232 42551 19.7 MiB AF00 ????????d????e???? Notice we don't have an APM table in both images and it's still complaining about the overlap from main partition. Here we go again with that 8bit salad which wasn't an issue with the previous image. The 64kb link to this image is at http://77.110.8.68/64kb-1.img So far both images will boot in EFI mode using vbox but I yet to test with usb booting or optical media. I will have some of those test results on my next email along with the hardware used to boot each image. F.Y.I mjg uses a modified mkisofs not genisoimage, this can be seen at https://git.fedorahosted.org/cgit/pungi.git/tree/src/pypungi/__init__.py#n1472 Anyways, I hope this data helps with getting to the bottom of things, I will be around if you need further data and if you want to test the actual images let me know. -- Thank you, Fernando Reyes GPG BDD75DD7 Mission Accomplish, Inc. http://missionaccomplish.com Email:design at missionaccomplish.com Tel: 7187100008 Cell: 3479275477