Jump to content











Photo
- - - - -

BIOS/UEFI Multi Boot USB Creation issue


  • Please log in to reply
8 replies to this topic

#1 shinomen

shinomen

    Newbie

  • Members
  • 11 posts
  •  
    United States

Posted 21 December 2015 - 04:08 PM

I am in the process of creating a new USB stick which can boot from the old BIOS/Legacy way as well as the Native UEFI way without using UEFI-CSM.

 

I have both legacy Bios boot and native UEFI boot working now from the one usb drive but I can't seem to create BCD boot menu entries for the legacy BCD under (UsbDrive):\boot\BCD or the UEFI BCD under (UsbDrive):\efi\microsoft\boot\BCD.  I've tried adding the entries using EasyBCD and Visual BCD but when I boot, it does not give me a boot menu and just boots to the boot.wim file automatically.

 

I'm trying to create two boot entries, one that will boot to the 32bit boot.wim file and one that will boot to the 64bit boot.wim.  This way if I need to install windows on a system that only supports 32bit UEFI boot, I can select the 32bit boot.wim to boot and install 32bit windows, and if I'm booing on a system that supports/only supports 64bit UEFI boot, I can select the 64bit boot.wim to boot and install 64bit windows.

 

Once the system boots from the appropriate boot.wim file it will allow me to install any windows os I have in the install.wim file which pertains to the system I am installing it on.  Because I will have multiple OS versions in the one install.wim file, I know that I will need to store that on an NTFS partition which is the same partition where both my legacy bios boot files and my UEFI files (bootia32.efi and bootx64.efi) reside.  

 

At first I did not think this would be possible since UEFI needs to boot from a FAT32 partition, however, Rufus has a feature called UEFI:NTFS which allows me to do what I want.  It creates a FAT32 partition on my USB drive which loads a driver to allow NTFS support under UEFI so that the UEFI can locate the appropriate EFI file to boot the computer.  To make this work for the legacy side of things, after I selected the UEFI:NTFS option in rufus, I changed the Parition Scheme to "MBR partition scheme for BIOS or UEFI".  

 

Once that was done, I copied the Boot and EFI folders along with the bootmgr and bootmgr.efi files from my 32 bit windows install sources to the USB drive.  Then I created a sources folder and copied the 32 bit boot.wim to that folder and obtained the bootx64.efi file from a 64bit windows source and placed is under (UsbDrive):\efi\boot\.  I also copied the boot.wim file from the 64bit windows source and placed it under the sources folder on the usb drive but named it boot64.wim.

 

Now at this point, I can boot a legacy system using the bios method and it will start the boot.wim and get me into the winpe environment, I can also boot Native UEFI 32bit which I tested on an Intel Compute Stick since that has been a bastard of a learning experience for me to get windows re-installed. (Which is one of the reasons I want this all in one stick to work)  The issue comes though that I cannot boot to native UEFI 64bit unless I rename the 32bit boot.wim to something else and rename the boot64.wim file to boot.wim.  At that point, I can then boot Legacy BIOS and native UEFI 64bit systems with the one usb stick.

 

Ultimately, I want to include some other utility program WIM files on the USB stick that I can boot either with BIOS or UEFI along with the windows installations and that's why I need a boot menu.  Again, however, I cannot figure out how to make that work, or if it's even possible.  I would assume so since I believe that the system is referencing the BCD files for available boot entries to display.  However, booting under UEFI and Legacy, does not give me boot options and instead boot directly to the boot.wim file under sources.

 

Any help someone can give me would be much appreciated.

 

Thanks.

 

 

 

 



#2 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13649 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 December 2015 - 04:41 PM

I am not sure to have understood exactly the issue.

 

Wouldn't something *like* this:

https://social.techn...pport?forum=mdt

 

solve the issue? (of course also adding an entry for the 32 bit boot.wim to the UEFI copy of the BCD)

 

BTW and possibly OT, is there any difference between a \boot\bcd and a \efi\microsoft\boot\bcd ?

I mean cannot one edit one BCD and then copy it to the other path? :unsure:

 

:duff:

Wonko



#3 shinomen

shinomen

    Newbie

  • Members
  • 11 posts
  •  
    United States

Posted 21 December 2015 - 05:41 PM

I am not sure to have understood exactly the issue.

 

Wouldn't something *like* this:

https://social.techn...pport?forum=mdt

 

solve the issue? (of course also adding an entry for the 32 bit boot.wim to the UEFI copy of the BCD)

 

BTW and possibly OT, is there any difference between a \boot\bcd and a \efi\microsoft\boot\bcd ?

I mean cannot one edit one BCD and then copy it to the other path? :unsure:

 

:duff:

Wonko

 

I think the user in the link you posted is going exactly the same thing I am trying to do, Thanks!   However, I followed the directions and tested it on the UEFI BCD and it did not work.  It still only boots to the default boot.wim without giving me a boot menu.  Here is my modified BCD which appears to me to be right.  

 

 

Windows Boot Manager

--------------------
identifier              {bootmgr}
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {default}
displayorder            {default}
                        {4d664a9f-a805-11e5-bee5-90b11c84121a}
toolsdisplayorder       {memdiag}
timeout                 30
 
Windows Boot Loader
-------------------
identifier              {default}
device                  ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
path                    \windows\system32\boot\winload.efi
description             32 Bit UEFI Windows Installs
locale                  en-US
inherit                 {bootloadersettings}
osdevice                ramdisk=[boot]\sources\boot.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
systemroot              \windows
bootmenupolicy          Standard
detecthal               Yes
winpe                   Yes
ems                     No
 
Windows Boot Loader
-------------------
identifier              {4d664a9f-a805-11e5-bee5-90b11c84121a}
device                  ramdisk=[boot]\sources\boot64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
path                    \windows\system32\boot\winload.efi
description             64 Bit UEFI Windows Installs
locale                  en-US
inherit                 {bootloadersettings}
osdevice                ramdisk=[boot]\sources\boot64.wim,{7619dcc8-fafe-11d9-b411-000476eba25f}
systemroot              \windows
bootmenupolicy          Standard
detecthal               Yes
winpe                   Yes
ems                     No

 

 

I suppose the difference though is that he was formatting the disk using FAT32 and I'm using NTFS.  Maybe there is an issue with displaying a boot menu using the UEFI:NTFS fashion that I am doing.  It would be nice if this worked so that I don't have to worry about file size limitations for my install.wim but I guess I could chop that up into smaller files like I saw in a tutorial.  However, if you have any other advice, I would appreciate your help.

Thanks.  :)



#4 wimb

wimb

    Gold Member

  • Developer
  • 2281 posts
  •  
    Netherlands

Posted 21 December 2015 - 05:46 PM

UEFI_MULTI.exe can make USB-drive bootable in BIOS and UEFI, where you get in both cases a BootManager BCD Boot Menu with selectable options.

 

For UEFI_MULTI the focus is in UEFI on the most common 64-bit case,

but with some manual work it may be possible to add the 32-bits UEFI booting (add file bootia32.efi to folder EFI\Boot ).

 

Info: http://reboot.pro/to...ve/#entry168079

 

To get in your case Boot Menu showing Boot Entries,

you can use Bootice to modify BCD in Professional mode and set BootMenuPolicy  Legacy

and add more than one working boot entry for each case of 64-bits and 32-bits (now there is only one entry).

 

Attached File  Bootice-2015-12-21_185927.png   34.38KB   2 downloads



#5 Wonko the Sane

Wonko the Sane

    The Finder

  • Advanced user
  • 13649 posts
  • Location:The Outside of the Asylum (gate is closed)
  •  
    Italy

Posted 21 December 2015 - 06:22 PM

I don't know. :unsure:

 

The procedure (and the result) seems correct, see also:

http://www.cluberti....oyment-usb-key/

 

It is possible that there are some limitations in the "UEFI boot time" NTFS driver Rufus has, but it doesn't sound "right".

 

I would see more probable (but really cannot say) that the UEFI mechanism (or *something* in the stupid OS loader) causes that.

 

But most probably we are overlooking something. :ph34r:

 

Can you try following this one (using BootICE as BCD editor )?

http://www.rmprepusb...ual-32-64bit-pe

 

The tutorial also "inverts" the renaming, renaming the 32 bit boot.wim to bootx86.wim and leaving the 64 bit one as boot.wim, it would seem "queer" to me that this is needed :w00t:, but it costs nothing to try this way.

 

Also as wimb said, do check the bootmenupolicy status, you did not say which PE version you are using, if Windows 8 or later is used as source this is needed I believe:

bcdedit /set {default} bootmenupolicy Legacy

see:

http://www.eightforu...indows-8-a.html

 

:duff:

Wonko



#6 shinomen

shinomen

    Newbie

  • Members
  • 11 posts
  •  
    United States

Posted 21 December 2015 - 07:36 PM

I finally made some progress but I need some more help.

 

The media I have been using to build this USB boot stick is Windows 10.  I started experimenting and found out that my boot entries were not working because of the bootmgr file located in the root of the drive.  Again this is from windows 10 media so I decided to try 8.1 and 8.0 but both did the same thing.  

 

Then I put the windows 7 bootmgr file in the root of the usb stick and viola!, it gave me a boot menu.  But this is confusing me now because I would assume that you would be able to do boot menus with windows 8 and 10 bootmgr even with just plain old BIOS booting, but alas it's not working.  Unfortunately, windows 7 media does not have bootmgr.efi so I cannot boot using UEFI with the windows 7 files.  So again, at this point I can boot with a boot menu under a BIOS boot and load the Windows 10 WinPE boot.wim file to install windows.

 

However, I really want to be as up to date a possible with this so I would like to get boot menus working with the Windows 10 boot manager.  It just occurred to me that Windows 8 and 10 do not allow you to tap F8 to bring up a boot menu.  Instead it was replaced with that graphic boot menu that appears if you fail to boot windows 3 times in a row. (at least that's my understanding)

 

So I suppose what I really need to be doing is researching how to add entries to the Windows 10 graphic interface menu/bootmanager.  Can someone point me in the right direction while I start searching the internet for this?

 

Thanks.



#7 shinomen

shinomen

    Newbie

  • Members
  • 11 posts
  •  
    United States

Posted 21 December 2015 - 07:36 PM

Duplicate post, my bad.


Edited by shinomen, 21 December 2015 - 07:36 PM.


#8 shinomen

shinomen

    Newbie

  • Members
  • 11 posts
  •  
    United States

Posted 21 December 2015 - 08:00 PM

Figured it out!!  Woot Woot!

 

You need to set the boomenupolicy to legacy in order for BCD menu entries to be displayed when using the windows 8 and above bootmgr, otherwise it looks like it will just boot the default entry or find the first boot.wim it can to load.

 

Here's the command

bcdedit /set {default} bootmenupolicy legacy

 

(taken from http://www.bleepingc...-in-windows-8/)

 

So for my instance, I had my bcd files located in /boot/bcd for BIOS and /efi/microsoft/boot/bcd for UEFI.  The command I typed was 

bcdedit /store g:\efi\microsoft\boot\bcd /set {default} bootmenupolicy legacy  <---UEFI BCD location

bcdedit /store g:\boot\bcd /set {default} bootmenupolicy legacy  <---BIOS BCD location

 

 

Also, you cannot just copy the BCD from \boot to \efi\microsoft\boot\ because the UEFI BCD entry calls on winload.efi whereas the BIOS BCD calls on winload.exe

 

On to the next thing!

Thanks everyone for your help.


Edited by shinomen, 21 December 2015 - 08:01 PM.


#9 alacran

alacran

    Frequent Member

  • Advanced user
  • 473 posts
  •  
    Mexico

Posted 21 December 2015 - 09:44 PM

Do it as wimb said use BootIce to edit both BCD (for bios and for UEFI), do not use grafical interface you must set BootMenuPolicy  Legacy (non grafical, only text, looks as Win7).

 

Also on BootIce BCD edit easy mode (easier way) you can do it, ticking "Dispaly boot menu" and "No integrity checks" to boot this on an UEFI PC you may need to disable secure boot first.  Additionally using the add button you may add other *.wim files to boot from, VHD files or ISO files, it adds an entry for grubfordos on your BCD for Bios only in order to boot from ISO's (you need to add grld, grldr.mbr and your menu.lst files to the root of your bootable partition).

 

Regards






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users