Jump to content











Photo
* * * * * 1 votes

Hack Bootmgr to boot Windows in BIOS to GPT

bios gpt bootmgr winload

  • Please log in to reply
355 replies to this topic

#351 steve6375

steve6375

    Platinum Member

  • Developer
  • 6629 posts
  • Location:UK
  • Interests:computers, programming (masm,vb6,C,vbs), photography,TV,films,guitars
  •  
    United Kingdom

Posted 11 February 2017 - 03:09 PM

I tried booting from the C: partition 4 with umbr + reg fix and same issue - no hibernate.  :(

 

I have written up experiments so far http://www.rmprepusb...s/bios_gpt_boot

 

Would be nice to get Hibernate working!



#352 devdevadev

devdevadev

    Frequent Member

  • Advanced user
  • 406 posts
  •  
    India

Posted 11 August 2017 - 03:03 AM

AIO Boot now supports installing Grub2 on GPT disks including both HDD and USB. After installing Grub2, you can boot the GPT disk in Legacy BIOS modeWindows Boot Manager does not support booting into Legacy BIOS mode on GPT disks. AIO Boot uses wimboot, which consumes more RAM.

  1. Install AIO Boot to a partition on GPT disks.
  2. Grub2 requires a BIOS partition on GPT disks. We will create a small partition of 1 to 10MB. You do not need to format and do not need to mount the drive letter for this partition. For USB, you can use the MiniTool Partition Wizard to create a second partition. On Linux, this partition will be flagged as bios_grub. USB-multiple-partitions.jpg
  3. Run AIOCreator.exe, select Grub2 from Bootloaders. The tool will list the partitions that you created in step 2.
  4. Select the partition and click OK to install Grub2.

     

    install-grub2-on-gpt.jpg
  5. .Good luck!


#353 nightrain

nightrain
  • Members
  • 4 posts
  •  
    China

Posted A day ago

I tried booting from the C: partition 4 with umbr + reg fix and same issue - no hibernate.  :(

 

I have written up experiments so far http://www.rmprepusb...s/bios_gpt_boot

 

Would be nice to get Hibernate working!

I found a important registry value which controls BCD system store is vaild.

A dword named TreatAsSystem with value 1 in HKLM\BCD00000000\Description is very important.

After adding this value, bcdedit and all other BCD editors included built-in boot and failure recovery works.

But Hibernate is not working, wake PC with correct FirmwareBootDevice value will result in a clean boot, wake PC with unmodified FirmwareBootDevice value will result in a recovery screen(press enter is necessary to get a clean boot).

Now the only way to get hibernate working is vhd.(edit:maybe i should put boot files in a separate partition?)

 

UPDATE:

Hibernate is fully working after i put boot files in a separate partition with the modification of FirmwareBootDevice. No need to re set FirmwareBootDevice every wake up, only clean boot needs. Windows will not load BCD after wake up, you should load manually.

 

UPDATE2:
I found a interesting fact. while HKLM\BCD00000000\Description\KeyName was not BCD00000000 (usually bcdboot and bcdedit will set external BCD store's Description\KeyName to BCD00000001,BCD00000002..., and bcdedit will remove the TreatAsSystem value while the store is external store), you don't need to load BCD store manually after wake up while Description\KeyName is not BCD00000000.
Maybe windows will unload the bcd store with Description\KeyName=BCD00000000 while system goes into hibernate?

Edited by nightrain, A day ago.


#354 nightrain

nightrain
  • Members
  • 4 posts
  •  
    China

Posted A day ago

I found a important registry value which controls BCD system store is vaild.
A dword named TreatAsSystem with value 1 in HKLM\BCD00000000\Description is very important.
After adding this value, bcdedit and all other BCD editors included built-in boot and failure recovery works.
But Hibernate is not working, wake PC with correct FirmwareBootDevice value will result in a clean boot, wake PC with unmodified FirmwareBootDevice value will result in a recovery screen(press enter is necessary to get a clean boot).
Now the only way to get hibernate working is vhd.(edit:maybe i should put boot files in a separate partition?)

UPDATE:
Hibernate is fully working after i put boot files in a separate partition with the modification of FirmwareBootDevice. No need to re set FirmwareBootDevice every wake up, only clean boot needs. Windows will not load BCD after wake up, you should load manually.

UPDATE2:
I found a interesting fact. while HKLM\BCD00000000\Description\KeyName was not BCD00000000 (usually bcdboot and bcdedit will set external BCD store's Description\KeyName to BCD00000001,BCD00000002..., and bcdedit will remove the TreatAsSystem value while the store is external store), you don't need to load BCD store manually after wake up while Description\KeyName is not BCD00000000.
Maybe windows will unload the bcd store with Description\KeyName=BCD00000000 while system goes into hibernate?

UPDATE3:
KeyName=BCD00000000 is much safer than other value, if the bcd store in disk is different from in memory, system will not wake up and you need to use bcdedit (/store command) once to fix your BCD. In a nutshell, 3 registry values are important.
HKLM\BCD00000000\Description\KeyName=BCD00000000
HKLM\BCD00000000\Description\TreatAsSystem=(dword)0x1
HKLM\SYSTEM\CurrentControlSet\Control\FirmwareBootDevice=multi(0)disk(0)rdisk(0)partition(4)
(modify FirmwareBootDevice to yours)

Edited by nightrain, A day ago.


#355 IAmTheTrueMeaningOfCovfefe

IAmTheTrueMeaningOfCovfefe

    Silver Member

  • Advanced user
  • 559 posts
  • Location:In hiding
  • Interests:An investigation is underway to determine whether Trump has any ties to America.
  •  
    United States

Posted 6 hours ago

Would hibernation work with the AIO method that @devdevadev posted about? Or is it untested as of yet? Would it be possible to test it in a VM instead of doing a real/live installation? I've noticed that whenever I install Windows to a VM hibernation doesn't seem to be available. I think maybe it's because Windows detects it's booted from a VHD, perhaps some other image type (like VDI or VMDK, etc) would work better. Then again, booting from a VHD in real/live mode doesn't seem to allow hibernation either. This is one of the few reasons why I would rather not boot from an image file on a real, permanent install.



#356 nightrain

nightrain
  • Members
  • 4 posts
  •  
    China

Posted An hour ago

By the limitations of Microsoft VHD Controller driver, Windows do not support hibernate the system which stored to a vhd.

 

The only three ways to get hibernate working are:

 

1: Use the map command of GRUB4DOS, do not install Windows entirely to the VHD, install boot files to the VHD, when the VHD is attached, hibernate works.

If you use "VHD Attach" and make its service loaded before TrustedInstaller (by service dependencies), Windows Update works perfectly.

If you use "TotalMounter" to mount VHD and do not use Microsoft's driver. You can use every features in Windows included Metro Boot Selection Screen (but expect WinRE, WinRE need a custom WinRE.wim file to mount vhd, and modify winload.efi to winload.exe in BCD is necessary).

like this:

timeout 0

menu /bootmgr.vhd
  find --set-root /Windows/bootmgr.vhd
  map /Windows/bootmgr.vhd (hd0)
  map (hd0) (hd1)
  map --hook
  root (hd0,0)
  chainloader /bootmgr 

2: Use Firadisk driver, do not install Windows to a VHD, do not install Windows entirely to the VHD, install boot files to the VHD, everything works thanks to Firadisk driver(you still need a custom WinRE image), the only disadvantage of Firadisk driver is Firadisk driver has no digital signatures.

See my previous post below:

http://reboot.pro/to...ndpost&p=193161

 

3: Use superfloppy to get Windows booting, then load BCD hive and modify three registry keys to get BCD loaded properly:

To modify HKLM\BCD00000000\Description\*, you need to modify permission.

HKLM\BCD00000000\Description\KeyName=BCD00000000
HKLM\BCD00000000\Description\TreatAsSystem=(dword)0x1
HKLM\SYSTEM\CurrentControlSet\Control\FirmwareBootDevice=multi(x)disk(y)rdisk(z)partition(w)

You can not put boot files in system drive in this superfloppy way, otherwise you can not wake up. Ways 1&2 are OK in every situations.


Edited by nightrain, An hour ago.






Also tagged with one or more of these keywords: bios, gpt, bootmgr, winload

1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users