jaclaz Posted March 12, 2015 Share Posted March 12, 2015 First image contains two file systems - APM and GPT. They are used to register the two ELTorito images (FAT12 and HFS +) as native partitions. This allows to view and run files from ELTorito images from GRUB2. The image contains a standard ISO9660 partition, but does not include the UDF partition. With this ISO, VirtualBox, VMWare Player and native machine runs GRUB2-EFI as excepted. I can load Linux and Mac OS (requires some improvements, but there are clear). Unfortunately it does not load Windows. I tried to chainload bootx64.efi from the original M$ ELTorito image (cdboot.bin), using cdboot.efi file from the M$ ISO UDF filesystem, and from bootmgfw.efi extracted from boot.wim. I also tried to use iPXE wimmbot, which gives the same effect. I already lost you. (on the theory before the practice)I can understand (though I know nothing of it ) the APM (for the "old MACs"), but what is the *need* or *use* of the GPT? jaclaz Link to comment Share on other sites More sharing options...
kyvaith Posted March 12, 2015 Author Share Posted March 12, 2015 (edited) GPT partition scheme is required by the newer Mac's and PC PC is not able to address the file on the partition HFS+ or FAT12 partition located in APM schema. Two partition schemes are also a disadvantage. In EFI Shell, on the machine that supports both schemes, each ELTorito partition is doubled. Eg. In VMWare Player fs0 and fs3 is the same HFS +, and fs1 and fs2 are the same FAT12 partition. Edited March 12, 2015 by kyvaith Link to comment Share on other sites More sharing options...
jaclaz Posted March 12, 2015 Share Posted March 12, 2015 GPT partition scheme is required by the newer Mac's and PC This is where I am failing to follow you. Do you mean that a "modern Mac" or a "modern PC" does not boot a CD/DVD device "normally" as El-Torito no-emulation mode (+if needed "alt-boot" volumes in "plain" CDFS, i.e. without isohybridizing anything? The threads you initially referenced here and on reboot.pro were about such particular kind of CD's, that were not isohybridized, if I recall correctly. jaclaz Link to comment Share on other sites More sharing options...
kyvaith Posted March 12, 2015 Author Share Posted March 12, 2015 (edited) It is a bit of a twist.- In theory, all the PC, can run in the EFI mode, with ELTorito FAT12 image.- Some PC can run from /ISO9660/EFI/BOOT/BOOT***.EFI- Older Macs do not detect ELTorito FAT12, and GPT from CD / DVD, and they need a HFS + partition in the APM partition scheme.- Medium-old Macs (yes, sorry), do not detect ELTorito FAT12, and APM from CD/DVD, and they need a HFS + partition on GPT scheme.- New Macs can run both the ELTorito FAT12, and GPT from CD / DVD, but does not display duplicate items in the boot menu, with hybrid iso (yay!). APM is needed for native boot on older Macs, GPT is needed for native boot on few years old Macs, and for addressing boot files in GRUB2-EFI. ELTorito FAT12 is needed to start on most PCs, but I found out, that it's not used! It just need to be there, and if it's detected, PC jumps directly to /ISO9660/EFI/BOOT/BOOT***.EFI. From the very beginning, my ISO is a hybrid, but maybe I did not mention it before, because this is not the problem. I made a bunch of test images without hybridization. Windows behaves identically. Edited March 12, 2015 by kyvaith Link to comment Share on other sites More sharing options...
scdbackup Posted March 12, 2015 Share Posted March 12, 2015 Hi,i am the devolper of xorriso. Apologies for it beingcomplicated with booting. It's due to the topic http://bazaar.launchpad.net/~libburnia-team/libisofs/scdbackup/view/head:/doc/boot_sectors.txtbecause of the constraints of a mkisofs compatibleoptions emulation, and because i had to learn on thetopic while implementing. (I also read UDF specsand can recommend them for those who find man xorrisofstoo easy to read.)Some technical clarifications:The shown xorriso -as mkisofs run does not use a pure GRUB2boot environment but a mix of SYSLINUX and GRUB2, as laidout by http://mjg59.dreamwidth.org/11285.html . Pure GRUB2 would normally be produced by script grub-mkrescuewhich is quite fixely committed to use xorriso.There are three boot image files mentioned:- x86 binary program eltorito.bin (for BIOS)- FAT filesystem image efiboot.img- (probably HFS+) fileystem image macboot.imgThe various partition tables MBR, GPT, APM are pointersfor use on hard-disk-like devices. E.g. USB stick.With CD, DVD, or BD, the firmware is supposed to followthe El Torito pointers to one of the three boot images.It has to be stated that the mix of MBR and GPTpartitions is not compliant to UEFI specs, whichdemand either MBR pointing to the FAT image, or GPTpointing to it, but not both. The presence of APMis possible only by disguising useless x86 machinecode as APM block 0.I am not sure whether kyvaith needs to use xorriso.After all, mjg used genisoimage to produce theFedora LiveCD image. He augmented isohybrid.c out ofthe SYSLINUX package by --uefi and --mac for thispurpose.So my proposals to kyvaith:Follow http://www.syslinux.org/wiki/index.php/Isohybrid#UEFIand let genisoimage resp. original mkisofs produce UDF.Mention the Mac image by another -e, use isohybrid.c with--uefi and --mac. Get a recent SYSLINUX. Old isohybrid.cis quite buggy.If for any reason this is not viable, then create an ISO/UDFhybrid by any mkisofs clone without giving special bootoptions. Then use xorriso to add another ISO session to theimage and to set up the boot pointers.We could discuss this further at bug-xorriso@gnu.orgHave a nice day Thomas Link to comment Share on other sites More sharing options...
jaclaz Posted March 12, 2015 Share Posted March 12, 2015 Hi,i am the devolper of xorriso. Apologies for it beingcomplicated with booting. It's due to the topichttp://bazaar.launchpad.net/~libburnia-team/libisofs/scdbackup/view/head:/doc/boot_sectors.txtbecause of the constraints of a mkisofs compatibleoptions emulation, and because i had to learn on thetopic while implementing. (I also read UDF specsand can recommend them for those who find man xorrisofstoo easy to read.) Great to have you here Just for the record, for those that think that UDF specs are too easy , I would suggest the UEFI ones (all the 2200+ pages of it) jaclaz Link to comment Share on other sites More sharing options...
Tripredacus Posted March 12, 2015 Share Posted March 12, 2015 I think I have read about 10 pages of the UEFI 2.3.1 spec. Link to comment Share on other sites More sharing options...
scdbackup Posted March 12, 2015 Share Posted March 12, 2015 Hi,jaclaz wrote:> I would suggest the UEFI ones (all the 2200+ pages of it)Tripredacus wrote:> I think I have read about 10 pages of the UEFI 2.3.1 spec.For me only the 13 pages of chapter 5 "GUID Partition Table"and the half page of 12.3.2.1 "ISO-9660 and El Torito",please. I'm on diet.I have to stress that i have nearly no knowledge aboutboot loaders and sub-zero knowledge about booting ofMS-Windows. The boot data generated by xorriso mainlyaddress the stage before the first bootloader takesover, plus some heuristic patching of BIOS related bootcode according to prescriptions of SYSLINUX and GRUB2.But if the problem of kyvaith is really about thatkind of UDF, which is in reach of mkisofs, then therest of the goal should be achievable.BTW: I would be interested to see the UDF/ISO whichsucceeds with booting MS-Windows. (First my browser wastoo old for the storage site. Now the links are removed.)Maybe i can propose a different theory why it succeeds ...or maybe i can propose a xorriso run to beef it upto the mjg layout.BBTW: Is there a way to get notified by mail about newposts in this thread ?Have a nice day Thomas Link to comment Share on other sites More sharing options...
kyvaith Posted March 12, 2015 Author Share Posted March 12, 2015 (edited) #scdbackup - You can click the "follow topic" at the very top of the page on the right. I am very happy that you joined this thread. You may be right that basically I do not need to do a hybrid ISO, so lets forget about whole hybridizing thing. I did some tests. All tests on VirtualBox. On VMWare and native, still the only way for me to boo Windows is jump grom grub2-efi to EFI Shell, and then to bootmgfw.efi. OSCDIMG on Windows: OK, but boot directly to Windows%USERPROFILE%\Desktop\oscdimg.exe -lKyvaithService -m -o -u2 -udfver102 -bootdata:2#p0,e,b.\boot\etfsboot.com#pEF,e,b.\efi\microsoft\boot\efisys_noprompt.bin .\ %USERPROFILE%\LUN0.isoOK, but boot directly to Windows%USERPROFILE%\Desktop\oscdimg.exe -lKyvaithService -m -o -u2 -udfver102 -bootdata:2#p0,e,b.\boot\grub\i386-pc\eltorito.bin#pEF,e,b.\efi\microsoft\boot\efisys_noprompt.bin .\ %USERPROFILE%\LUN0.isoBROKEN, error while loading Windows from GRUB2%USERPROFILE%\Desktop\oscdimg.exe -lKyvaithService -m -o -u2 -udfver102 -bootdata:2#p0,e,b.\boot\grub\i386-pc\eltorito.bin#pEF,e,b.\boot\efiboot.img .\ %USERPROFILE%\LUN0.isoOK, Windows boot from GRUB2 menu (bootmgfw.efi)%USERPROFILE%\Desktop\oscdimg.exe -lKyvaithService -j1 -u1 -e -m -h .\ %USERPROFILE%\LUN0.isoBROKEN, error while loading Windows from GRUB2%USERPROFILE%\Desktop\oscdimg.exe -lKyvaithService -j1 -e -m -h .\ %USERPROFILE%\LUN0.isoBROKEN, error while loading Windows from GRUB2%USERPROFILE%\Desktop\oscdimg.exe -lKyvaithService -j1 -u1 -e -m -h -bootdata:2#p0,e,b.\boot\grub\i386-pc\eltorito.bin#pEF,e,b.\boot\efiboot.img .\ %USERPROFILE%\LUN0.isoBROKEN, error while loading Windows from GRUB2%USERPROFILE%\Desktop\oscdimg.exe -lKyvaithService -j1 -u1 -e -m -h -bootdata:2#p0,e,b.\boot\etfsboot.com#pEF,e,b.\boot\efiboot.img .\ %USERPROFILE%\LUN0.iso MKISOFS on Linux: OK, Windows boot from GRUB2 menu (bootmgfw.efi)mkisofs -iso-level 4 -U -udf -V "KyvaithService" -o ../LUN0.iso ./OK, Windows boot from GRUB2 menu (bootmgfw.efi)mkisofs -iso-level 4 -U -V "KyvaithService" -o ../LUN0.iso ./BROKENmkisofs -iso-level 4 -U -V "KyvaithService" -b boot/grub/i386-pc/eltorito.bin -no-emul-boot -boot-load-size 4 -boot-info-table -o ../LUN0.iso .OK, Windows boot from GRUB2 menu (bootmgfw.efi), but don't boot from legacymkisofs -iso-level 4 -U -V "KyvaithService" -b boot/grub/i386-pc/eltorito.bin -no-emul-boot -boot-load-size 4 -boot-info-table -no-boot -o ../LUN0.iso . Conclusions:In fact, Windows does not require the UDF file system to boot from EFI, although using the oscdimg without UDF switch, Windows wont start (??) Windows will not start if inside the FAT12 ELTorito, is another bootx64.efi than a copy of cdboot_noprompt.efi Windows starts up with grub2, if inside the ISO there is no any ELTorito images. I have no idea what's going on. ISO9660 grub2 driver may maps EFI path in wrong? But it also does not make sense. Edited March 12, 2015 by kyvaith Link to comment Share on other sites More sharing options...
jaclaz Posted March 12, 2015 Share Posted March 12, 2015 (edited) @kyvaithWith all due respect your post is confusing.Please edit/reformat your post, adding to EACH of the methods you tried a number like (example):Test #1:Command issued:%USERPROFILE%\Desktop\oscdimg.exe -lKyvaithService -m -o -u2 -udfver102 -bootdata:2#p0,e,b.\boot\etfsboot.com#pEF,e,b.\efi\microsoft\boot\efisys_noprompt.bin .\ %USERPROFILE%\LUN0.iso Other needed info: [1] As an example etfsboot.com is ....., efysis_noprompt.bin is, the contents of the root are ..... Result (BIOS platform): [2] OK, but boot directly to WindowsResult (UEFI platform): [2] OK, but boot directly to Windows So that maybe we can reference each of your nice tests properly. And the actual tests that you should have made with mkisofs are the ones along the lines of what cdob suggested, usually there are reasons for what he suggests . jaclaz [1] some of the command lines you posted or their result make NO SENSE unless it is detailed what the involved files are[2] here also you might be more explicit, and together with the info provided in [1] this "OK, Windows boot from GRUB2 menu (bootmgfw.efi), but don't boot from legacy" might become understandable (as is I cannot understand it ) Edited March 12, 2015 by jaclaz Link to comment Share on other sites More sharing options...
scdbackup Posted March 12, 2015 Share Posted March 12, 2015 Hi,i assume -bootdata:2#p0,e,b.\boot\etfsboot.com#pEF,e,b.\boot\efiboot.imgis some shortcut for the options -p, -e, -b as listed in thetechnet.microsoft.com manual of oscdimg.If so, then i can quite follow the conclusions 1 and 3.(Number 2 is out of my scope.)kyvaith wrote:> Conclusions:> 1. In fact, Windows does not require the UDF file system to boot from EFIThen we probably do not need mkisofs/genisoimage.(But you did not explicitely show a try of mkisofs -udf -b.)> 3. Windows starts up with grub2, if inside the ISO there is no> any El Torito images.http://www.uefi.org/sites/default/files/resources/2_4_Errata_B.pdf12.3.2 "Partition Discovery" describes precedence of GPT overEl Torito over "legacy" MBR. The examples produce neither GPTnor MBR.So maybe El Torito captures the device description and theMicrosoft boot loader compensates for this.Or maybe El Torito brings the boot process to the GRUB2in the ISO, which then fails for its own reasons.(See below, fallback GRUB2 theory.)> OK, Windows boot from GRUB2 menu (bootmgfw.efi), but don't boot from legacy> mkisofs ... -b ... -no-boot ...The -no-boot option is supposed to mark in the El Toritoboot catalog the entry of the -b image file as not beingusable. This might have the same effect to the firmwareas if the entry was not there.Whatever, the main question is how does the firmware findthe first GRUB2 file (bootx64.efi, i assume) inside the FATimage file /boot/efiboot.img of the ISO filesystem ?The two first successful mkisofs runs give no clue by El Toritoor partition tables.Do you perhaps fall back to the GRUB2 on some other device ?Have a nice day Thomas Link to comment Share on other sites More sharing options...
Tripredacus Posted March 12, 2015 Share Posted March 12, 2015 Not to add any confusion to the subject already... but the terms "Windows" is being used interchangeably with "WinPE" which is in the title. My question is what kind of difference is there when booting a WinPE or a real Windows in UEFI mode? Typically, Windows needs extra partitions and special GUIDs to boot properly, but WinPE does not, when booting from any sort of media. Of course, I may be wrong and maybe a regular Windows can boot in UEFI mode from a single partition, but in my testing this hasn't been the case. Link to comment Share on other sites More sharing options...
jaclaz Posted March 13, 2015 Share Posted March 13, 2015 (edited) @TripTo clarify, this topic is about booting from a CD/DVD like device (actually physically rendered by the particular feature of some USB sticks that offer two devices or LUN's, the first one or LUN0 emulating a CD/DVD - Read Only - device) *everything* (and the kitchen sink ) on *any* machine, but limited to: Live Mac OS, Linux, WinPE and install each of these systems to disk, both in EFI or MBR, on any modern PC and Macintosh This is NOT about booting and running a "full" Windows from a CD/DVD like device, the interchange till now has been between WinPE and Windows (Install/Setup) which is a WinPE to all effects, no hard disk like device or partition on it is involved or harmed in the making of this (yet), if not the APM partition seemingly needed for a given range of macs, but still a partition residing on the CD/DVD like device. jaclaz Edited March 13, 2015 by jaclaz Link to comment Share on other sites More sharing options...
kyvaith Posted March 13, 2015 Author Share Posted March 13, 2015 (edited) This, I think is out of my reach. It seems to me that there are two problems (these are just my guesses): 1. Lack of ISO9660 driver, in the VMWare Player EFI implementation and native machines.2. Incorrect ISO9660 driver addressing VirtualBox's EFI.3. It has nothing in common with GRUB2. Thesame situation is with Reffit, Reffind, Clover, ELILO etc. Ad. 1. In the VMWare Player, ISO9660 partition is reported as block device, not a file system. By this, EFI applications (if they do not have their own driver) can not read information from ISO9660 part of DVD. VMWare: Ad. 2. If inside ISO image, there is a FAT ELTorito image, EFI thought that the whole DVD consists only of this ELTorito image. By this, even if EFI has ISO9660 driver, Windows can not find a ISO9660 partition. If, EL Torito image is not there, driver addresses the ISO9660 file system and Windows runs. VirtualBox: I tried to manually load the drivers ISO9660 in VMWare Player, but despite a successful load, the EFI Shell can not detect the ISO9660 file system (probably because the address is already occupied by the image ELTorito). A few highlights:- Writing Windows, I mean Windows Preinstalation Enviroment.- Speaking Universal, I mean running on any x86_64 platform. - I'm not a develope. I'm trying to prepare this thumb just for fun, hoping someone will like this project.- My English is very poor, so not everyone can understand me, I'm sorry. In summary, the topic requires further analysis, but I do not know what I might do next. Edited March 13, 2015 by kyvaith Link to comment Share on other sites More sharing options...
scdbackup Posted March 13, 2015 Share Posted March 13, 2015 Hi,kyvaith wrote:> 1. Lack of ISO9660 driver, in the VMWare Player EFI implementation> and native machines.But EFI should not need to peek into ISO 9660.The El Torito catalog should point it to the FAT filesystem,where the program bootx64.efi should have or find enoughbrain to start up the GRUB2 system. So bootx64.efi needsan ISO 9660 driver, not EFI. Since it works for Linuxes,i assume that this driver is ok.> 3. It has nothing in common with GRUB2. Thesame situation is with > Reffit, Reffind, Clover, ELILO etc.So MS-Windows expects some preparations or messages,which \efi\microsoft\boot\efisys_noprompt.bin doesprovide, but the others do not.> In summary, the topic requires further analysis, but I do not> know what I might do next.Seems you need a way to run the programs in efisys_noprompt.binbetween GRUB2 and MS-Windows, or you need to find outwhat is the magic in those programs.Have a nice day Thomas Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now