Jump to content

Boot WinPE EFI form GRUB2 CD/DVD


Recommended Posts

Hi,
 
I am trying to prepare a universal memory stick, which will be able to run Live Mac OS, Linux, WinPE and install each of these systems to disk, both in EFI or MBR, on any modern PC and Macintosh. To make this possible, I had to create a memory stick, with virtual ISO image in LUN0 of thumb (low-level memory stick modification, so it is reported as DVD drive and hard disk). This means that I have to prepare the ISO, which will be able to run any of these systems. Interestingly, I have no problem with Linux or Mac OS. Windows also runs in the MBR, but I'm not able to run it from the EFI. It seems that Windows EFI requires the ISO, which has only the UDF file system, but I need to generate the ISO using xorriso on Linux, which does not support the UDF.
 
Has anyone tried to make multiboot ISO (CD/DVD) with GRUB2 bootloader, which would allow to run WinPE with EFI? That's the last thing I need to work out, and I'm sitting on this problem from about a week :)
 
Regards,

 

Tom.
Link to comment
Share on other sites


 

... but I need to generate the ISO using xorriso on Linux, which does not support the UDF.

 

Well, WHY EXACTLY do you need that?

 

And BTW (though the dual LUN CD/HD like devices is a very nice approach :yes: at compatible hardware, i.e. sticks for which you have the "right" manufacturer tool and it actually works as expected) allow me to doubt that it is actually needed.

 

As a side note, it is considered not very polite :no: to bump an existing thread:

http://www.msfn.org/board/topic/172610-acronis-iso-boot-on-uefi-pc/?p=1095786

only to ask for attention on a new one.

 

jaclaz

Link to comment
Share on other sites


#jaclaz - thank you for your reply and sorry for bumping subject (I did not know that it is forbidden).

This story has a lot more details, but I decided that I will describe the whole process after I'll get stick to work in 100%. So at this moment, in response to your questions:
 

 

... but I need to generate the ISO using xorriso on Linux, which does not support the UDF.

 

Well, WHY EXACTLY do you need that?

 

Xorriso can generate an ISO image that contains MBR, AFP and GPT partition schemas. This is required for older Macs to see DVD as a bootable in disk chooser. My ISO has three El-Torito images :
- Grub2 MBR (produced by grub-MKIMAGE for PC i386)
- Macboot.img - image of a single HFS + partition containing grub2 x86_64 EFI, which was blessed by OSX, so that it appears as MacOS installer (in fact being multibootloader with grub2)
- Efiboot.img - which contains a single FAT12 partition with grub2 EFI x86_64 and ia32.
 

And BTW (though the dual LUN CD/HD like devices is a very nice approach  :yes: at compatible hardware, i.e. sticks for which you have the "right" manufacturer tool and it actually works as expected) allow me to doubt that it is actually needed.

 
Actually, It's needed only in one scenario - the installation of Windows on a Mac using Bootcamp. Unfortunately, Macintosh are nasty machines, and they do not allow you to install Windows from USB stick - only from the CD.
 
Probably you will ask - "why don't use virtual CD funcionality only to attach official Windows installer ISO, and use rest of the flash drive for other OS'es?" - The reason is the same as above - Macintosh are nasty. They do not see the HDD part of memory stick, if it contains the virtual CD.
 
The whole subject was explored by me for a year now and after much analysis I know that this is the only right way to prepare the stick. :)
Edited by kyvaith
Link to comment
Share on other sites

I will be interested to read the final details of exactly how you built such a stick, and also the details of all the way such a stick can be used.  And also if such a build could be made using a USB drive instead of a stick to allow storage of other data and apps.

 

Cheers and Regards

Link to comment
Share on other sites

I will be interested to read the final details of exactly how you built such a stick, and also the details of all the way such a stick can be used.  And also if such a build could be made using a USB drive instead of a stick to allow storage of other data and apps.

 

Cheers and Regards

As soon as you will find a USB bridge for a hard disk that allows two LUN's of which one (the first) being a CD/DVD like device :w00t:, I am sure that the info will be useful to port the method/approach on a USB hard disk ... :whistle:

 

Seriously, some (most) USB stick controllers have the possibility of exposing themselves to the BIOS/OS as a "combo" device with two LUN's (you remember good ol' SCSI? ;)), the second can only be a "hard disk like" device, the first one can usually be eithe a "hd like" device or a "CD/DVD like" device, see these:

http://www.msfn.org/board/topic/121199-formating-a-usb-stick-to-udf-or-cdfs/

http://www.msfn.org/board/topic/150653-booting-windows-on-multi-partition-usb-flash-drive/

http://www.msfn.org/board/topic/121502-install-xp-from-usb-the-easy-way-with-sandisk-cruzer/

 

 

jaclaz

Link to comment
Share on other sites

Well, it's not that obvious. There are external hard drives, which theoretically could do such a thing. Check out Zalman ZM-VE400 or ZM-VE300

It is rather obvious, but I wanted bphlpt to research on the matter, technically those Zalman (which has BTW gone on the verge of bankrupt in the meantime ;():

http://www.geek.com/chips/zalman-is-not-going-bankrupt-restructuring-under-way-1609996/

are much more sophisticated, dedicated solutions (those and some more listed here):

http://reboot.pro/topic/8944-boot-any-iso-image-or-boot-all-iso-images/

 

I read your current issue more as "forget about the use I will make later of this, how can I make a DVD or a DVD-like image that will be compatible with 1, 2, 3 etc. and booting on *any* machine including BIOS/UEFI?".

 

What I need to be able to try and help you is:

  1. how EXACTLY (by EXACTLY I mean which specific xorriso version you are using, on which specific os with which EXACT command lines) you are now creating the .iso
  2. hopefully a copy of the (empty, I don't need/want the actual files) pre-made .iso

 

Explanation:

  1. I have NO idea how xorriso works and it came out just when I thought that no tool on earth could have a more complex and worse documented set of command options than mkisofs, clearly proving me wrong :(
  2. I am NOT familiar with the whatever APM is and what actually an old Mac would *need*

So, the only chances (provided that xorriso cannot definitely create a UDF filesystem or actually *whatever* stupid UEFI Windows *needs*) are some ways (if any) to post-process the .iso modifying it.

 

BEFORE the above, can you try creating a "normal" (or at least "normal according to MS") BIOS/UEFI install cd/dvd using the OSCDIMG tool as detailed here and see if "as is" it works on your test systems?:

http://www.msfn.org/board/topic/172122-got-tips-on-how-to-make-a-bootable-cd-from-bootable-usb/

http://www.msfn.org/board/topic/172122-got-tips-on-how-to-make-a-bootable-cd-from-bootable-usb/?p=1080928

 

jaclaz

Link to comment
Share on other sites

#jaclaz - I'll answer your questions tomorrow.

 

#cdob - I've seen this information before, but didn't success with other than UDF filesystem. I've tried to uppercase folder too before, even tried to make all files and folders in the ISO uppercase, but it didn't work. Can you please try to make such ISO by yourself? I'm testing in Virtualbox, maybe this is the reason? Tomorrow I'll post successful (UDF) and unsuccessful ISO's too.

 

For clarity, only ISOs generated with ocdimg with swith "-u2" boot form EFI in VirtualBOX.

Edited by kyvaith
Link to comment
Share on other sites

Can you please try to make such ISO by yourself?

I did make a Win PE ISO myself before posting of course.

Quick and dirty, not recommended in general:

Given Windows 8.1 files.

The ISO boots up to input a product key: this indicates the file install.wim is found

mkisofs.exe -iso-level 3 -N -D -d -relaxed-filenames -allow-multidot -hide boot.catalog -no-emul-boot -b "boot/etfsboot.com" -eltorito-alt-boot -eltorito-platform efi -b efi/microsoft/boot/efisys.bin -no-emul-boot -o W8_x64_efi.iso D:/win8_1
At a mutli boot cd I would add rock ridge extension and uppercase required files and folders only.

Which grub2 Efiboot.img do you use?

Do you use a file from a linux distribution?

Did you recognice the 4 GB limiataion? Sort core boot files to front of media.

Link to comment
Share on other sites

make multiboot ISO (CD/DVD) with GRUB2 bootloader, which would allow to run WinPE with EFI?

Grub2 changes something, bootmgr.efi dosn't detect a CD boot drive anymore.

It's not a question about file system.

Link to comment
Share on other sites

Hi,

 

I'm sorry I did not say anything since the last post, but I thought I found a clue. Unfortunately, despite slight progress, I still can not achieve a expected result.

 

As promised, I've uploaded ISO files. Please test only EFI mode. The first image is a hybrid ISO generated using xorriso 1.3.8:

xorriso -as mkisofs -iso-level 4 -U -V "KyvaithService" -isohybrid-mbr boot/isohybrid.mbr -no-pad --boot-catalog-hide -b boot/grub/i386-pc/eltorito.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-hfsplus -isohybrid-apm-hfsplus -o ~/LUN0.iso ./
NO

 

The second image is modified original Windows 8.1 ISO using UltraISO. I added grub2-EFI and removed unnecessary files. There is no hybrid funcionality.

 

NO

 

What I've found:

 

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.

 

In my ISO, I'm using a modified version of GRUB 2.02b2 (I added a horizontal menu, the rest is unchanged). As suggested, I've checked grub2 earlier versions - the same effect on the 1.98, 1.99, 2.00, 2.01b1.

 

However, there is some progress - I am able to run Windows with EFI Shell. This method works on VMWare Player and a few native machines that I have at hand. After starting the ISO, GRUB2-EFI loads up automatically. On the keyboard, select the "c" and type:

chainloader /efi/boot/shellx64.efiboot
After loading the EFI Shell type:

FS2:\EFI\BOOT\WINDOWS.EFI
And Windows loads. This means that GRUB2 probably do not properly maps drives address. But I'm not sure. It does not work on VirtualBox, because the EFI Shell did not detect any file systems. I tried to load the EFI driver for ISO9660 from here but that did not help.

 

And the second ISO:  Windows starts up, but only for VirtualBox. The key here is the UDF partition, without it, Windows will not start. Unfortunately this does not work in VMWare Player and native machines due to the lack of FAT12 ELTorito image. Adding it in UltraISO makes Windows does not load again anywhere, despite the UDF partition.

 

Please help, I am terribly frustrated. I've confirmed that the pendrive actually works on any Macs and PCs I've tested, just missing the **** Windows EFI boot.

Edited by Tripredacus
removed links
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...