Jump to content











Photo
- - - - -

UEFI: BOOTMGR and Grub4DOS


  • Please log in to reply
10 replies to this topic

#1 Alexander Ceed

Alexander Ceed

    Frequent Member

  • Advanced user
  • 205 posts

Posted 28 April 2016 - 09:37 AM

I'm trying to make a USB partition work on MBR and UEFI. From what I've read on the forum, this will work If I use bootmgr and add a new entry for the grldr loader file. 

I formated the disk as FAT32, modified the partition boot code to BOOTMGR, added the BCD files using windows bcdboot command: BCDBOOT c:\WINDOWS /s H: /f ALL . Copied over grldr and grldr.mbr. Added the grub4dos entry in the BCD store of BCD and EFI folders. 

 

When I try to boot it it displays the error: Cannot load grldr because a file is missing. 

 

Thank you



#2 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 28 April 2016 - 10:38 AM

No. :(

 

Meaning that you are mixing things. :w00t:

 

MBR is a partitioning scheme or (as MS calls it a "style") as opposed to GPT.

BIOS is a type of firmware as opposed to EFI or UEFI.

 

Most EFI firmware offer an option called Compatibility Support Module that emulates the BIOS functions:
https://en.wikipedia..._Support_Module

 

You do not use "a" BOOTMGR, you use either the "normal" BOOTMGR (if using BIOS or EFI in CSM) or the EFI BOOTMGR (if using EFI/UEFI).

 

Grub4dos is STRICTLY "BIOS only" i.e. you either have a BIOS or have an CSM enabled in the EFI, in pure EFI grub4dos cannot run (as it needs BIOS support, either "real" or emulated through the CSM).

 

When using grub4dos with BIOS (or CSM) and you are using the "normal" BOOTMGR as primary bootmanager, the advised way is to leave the BCD alone and use instead a BOOT.INI, as in here:
http://reboot.pro/to...e-2#entry184060

 

 

:duff:

Wonko



#3 Alexander Ceed

Alexander Ceed

    Frequent Member

  • Advanced user
  • 205 posts

Posted 28 April 2016 - 01:15 PM

In other words, only windows setup images (8, 10) can boot in pure UEFI, correct? 

I've seen very few iso images that are capable of booting on UEFI. Only those images which are made for UEFI can actually boot in UEFI.

 

I tried on a computer with uefi (CSM disabled) to boot a windows 7 dvd disk and it didn't work. The same with acronis cd disk. Isn't there some way to make them work on UEFI without enabling CSM or legacy boot?



#4 wimb

wimb

    Gold Member

  • Developer
  • 2281 posts
  •  
    Netherlands

Posted 28 April 2016 - 02:29 PM

Grub4dos booting can only be used in BIOS-mode and is not available in UEFI-mode, as jaclaz aka Wonko the Sane described already. ;)

 

More Info is here

UEFI_MULTI.exe - http://reboot.pro/to...ve/#entry168079

http://www.msfn.org/...comment-1117324



#5 cdob

cdob

    Gold Member

  • Expert
  • 1315 posts

Posted 28 April 2016 - 03:58 PM

I tried on a computer with uefi (CSM disabled) to boot a windows 7 dvd disk and it didn't work.

A x64 windows 7 DVD supports UEFI.
A x64 UEFI requires a x64 OS. A x86 OS will fail.

Windows 8/10 supports UEFI secure boot.
Windos 7 dosn't supports UEFI secure boot. Disable secure boot at UEFI settings.
  • devdevadev likes this

#6 Alexander Ceed

Alexander Ceed

    Frequent Member

  • Advanced user
  • 205 posts

Posted 23 May 2016 - 04:13 PM

I'm back.

 

Here's what I'm trying to achieve with this:

 

BOOTMGR (FAT32)

    IF BIOS -> LOAD grldr

    IF UEFI -> LOAD Windows from USB (separate partition, same stick)

 

Please advise on the best way to achieve this.

 

I've created a file called BOOT.INI in the root of my drive, where grldr and menu.lst are located with the following content:

[boot loader]
Timeout=30
default=C:\grldr
[operating systems]
C:\grldr="grub4dos"

I copied bootmgr from my current installed windows 8 OS to the root of the drive.

And outputs the following error:

\Boot\BCD
0xc0000000f
The boot configuration data for your PC is missing or contains errors.

This happens with or without the \boot\bcd files. I tried with a blank set of BCD store and still outputs the same. It just ignores the boot.ini.



#7 Wonko the Sane

Wonko the Sane

    The Finder

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

Posted 23 May 2016 - 04:43 PM

Not really. :dubbio:

Meaning that AFAICR the way it works is that BOOTMGR reads the \boot\BCD file, and LATER it ADDS to them BOOT.INI entries (non arcpaths ones to be accurate).

 

So you must first put yourself in a condition where the \boot\BCD file is found and gives no error  and only later you add a BOOT.INI.

 

Also, if you are going to have a multipartition, the device needs to be seen as "fixed".

 

Why don't you simply try the:
http://reboot.pro/to...40-ufd-format/ 

before introducing changes/variations?

 

:duff:

Wonko



#8 cdob

cdob

    Gold Member

  • Expert
  • 1315 posts

Posted 23 May 2016 - 05:28 PM

BOOTMGR (FAT32)
    IF BIOS -> LOAD grldr
    IF UEFI -> LOAD Windows from USB (separate partition, same stick) just ignores the boot.ini.

Which separate partition do you like to create?
Do you use a removable stick?
Should windows read the sepearte partiton?
Which storage capacity matches the USB stick?

What about a 64gb removable stick with:
one big active NTFS partiton: partition boot code loads grldr, with files grldr, menu.lst and Windows files
and a small FAT32 partition: holds the directory \efi

Bootice can swap the accessible partition and maintain the bcd file.
Access the FAT32 partition, maintain the file \efi\microsoft\boot\bcd and swap back to the NTFS partition.

#9 Alexander Ceed

Alexander Ceed

    Frequent Member

  • Advanced user
  • 205 posts

Posted 23 May 2016 - 06:15 PM

I use a 256GB usb stick that is seen by windows as a fixed drive. On it, I have 3 partitions:

  • FAT32 Active partition on which I have grldr, menu.lst
  • NTFS partition that holds a complete windows OS
  • NTFS partition for holding portable applications and iso images for grub4dos use

What I want is to boot off the FAT32 partition, and if it detects UEFI/EFI chainload bootmgr off the second partition. Otherwise boot grldr.



#10 cdob

cdob

    Gold Member

  • Expert
  • 1315 posts

Posted 23 May 2016 - 06:26 PM

I use a 256GB usb stick that is seen by windows as a fixed drive. On it, I have 3 partitions:

  • FAT32 Active partition on which I have grldr, menu.lst
  • NTFS partition that holds a complete windows OS
  • NTFS partition for holding portable applications and iso images for grub4dos use
Yes, windows access all partitions at a fixed drive.
.
Copy \efi folder to the FAT32 partition.
 

What I want is to boot off the FAT32 partition, and if it detects UEFI/EFI chainload bootmgr off the second partition. Otherwise boot grldr.

This is not possible. UEFI dosn't work that way.
UEFI dosn't boot bootmgr. It searches a file \efi\boot\boot*.efi at a FAT32 partition.
Adjust <FAT32>\efi\microsoft\boot\bcd to your NTFS partiton that holds a complete windows OS.

Added:
Which complete windows OS do you use?
bcdboot.exe may create the \efi folder.

Edited by cdob, 23 May 2016 - 06:34 PM.


#11 Alexander Ceed

Alexander Ceed

    Frequent Member

  • Advanced user
  • 205 posts

Posted 23 May 2016 - 06:35 PM

Right but how do I chainload grldr from BCD (boot.ini not working for me, read above please)?

I use BOOTICE to edit BCD entries.

Very tired. It actually works fine. I just needed to add an entry in my empty BCD store in order for it to read boot.ini.

Thanks guys.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users