Hi, Nikolay Nikolov wrote: > Maybe I should try adapting my code, so that it finds the GRUB BIOS boot > partition and loads it? This would be a nice stunt for which we would have to find a use case. As stated yesterday, the GRUB El Torito image contains a core.img which serves the same purpose as a BIOS partition. > the main obstacle is > that I'm not familiar with GRUB's code and I don't know what GRUB's next > stage needs I myself only learn about GRUB at occasions like this here. There is a vivid community at grub-devel@xxxxxxx. If you have an interesting use case they might be willing to explain things. But on the other hand the BIOS stuff is old and Vladimir Serbinenko, who created it, is not very busy with GRUB any more. > Unfortunately, I'm not familiar with how El Torito works, Roughly: At 2048-byte-LBA 17 (decimal) there is the Boot Record, which points to the El Torito Boot Catalog. The catalog contains entries, which describe boot images. In case of Fedora Live there are three of them: One for BIOS, and two for EFI. The boot image for BIOS is a plain x86 program. The first EFI image is a FAT filesystem with boot programs /EFI/BOOT/BOOT*.EFI for the intended processor architectures (x86-32bit, x86-64bit, ARM-32bit, ... ). The second boot image for EFI (macboot.img) is actually a HFS+ filesystem image which should not be listed in the catalog. That's a hack by Matthew J. Garrett to let the rather dumb ISOLINUX program isohybrid.c find the HFS+ image and mark it by an Apple Partition Map. isohybrid.c does not understand ISO 9660 but it knows the El Torito boot catalog. Fedora does not use isohybrid.c any more, but rather lets libisofs under xorriso create the Apple Partition Map, if at all. Nevertheless, xorriso produces the same inappropriate catalog entry for EFI, which the firmware ignores in favor of the appropriate EFI boot image. (Who am i to change mjg's invention ?) My knowledge about boot lures for various processors and firmwares is compiled at https://dev.lovelyhq.com/libburnia/libisofs/raw/branch/master/doc/boot_sectors.txt Original specs: El Torito: http://web.archive.org/web/20010706014919/http://www.ibm.com/products/surepath/documents/standard/cdrom7.pdf UEFI: https://uefi.org/sites/default/files/resources/UEFI_Spec_2_8_final.pdf Legacy BIOS: Only rumors around. Start exploring at Wikipedia. Re-use your knowledge about BIOS booting from floppy/hard disk/USB flash drive. > This hybrid USB stick/DVD iso image has always seemed > like black magic to me :) It's just a matter of outmost cramming of boot lures which are barely compatible. (The unusual block size 2048 for Apple Partition Map gives room for GPT. Some noop-x86 code at the start of the MBR lets it look like the first block of an Apple Partition Map. It's just weird from the view of specs and BIOS tradition. But it works since 10 years.) > AFAIK, Windows only > provides an ISO download, that is suitable for burning on optical media and > then it boots, but it doesn't work, when you "dd" it to an USB flash drive. > I think you need to use special tool, to write it to a USB stick, You are supposed to create a FAT filesystem in a MBR partition of the USB stick with a traditional partition type like 0x0C. Then you copy all files from the ISO 9660 filesystem into that FAT filesystem. Et voila: An undocumented property of EFI implementations will find and start /EFI/BOOT/BOOT*.EFI to boot MS-Windows. (M$-Knowledge gained from Pete Batard, developer of program Rufus.) Interestingly, Fedora Live ISOs have a /EFI/BOOT/ tree in the ISO 9660 filesystem, probably to support this feature. I learned about it from Pete Batard's protests when Ubuntu began to produce ISOs which omitted this copy of the EFI System Partition FAT content. > And what's worse, > they now require the rarer and more expensive DVD+R DL discs, since their > install image exceeds 4.7 GB :) Consider to invest in a Blu-ray burner. Single layer BD-R and BD-RE are much more reliable than DVD+R DL and meanwhile at least BD-R are cheaper than DVD+R DL. BD-RE cost about the same as DVD+RW with more than 5 times the storage capacity. Still cheaper than 16 GB USB sticks. Have a nice day :) Thomas _______________________________________________ devel mailing list -- devel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to devel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/devel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam on the list, report it: https://pagure.io/fedora-infrastructure