Adding a boot Windows 7 or 10

2,207 views
Skip to first unread message

JimB

unread,
Sep 4, 2016, 7:45:34 PM9/4/16
to Visual BCD
I want to dual boot Windows 7 and10 (and can in a strange way).  I am using two disks both having Gpt.  Both systems are already installed on disk 0. Disk 0 has a Windows Boot Manager that boots only Windows 7.  Disk 1 has another Windows Boot Manager which boots Windows 10 but also has an entry for Windows 7 but it results in an immediate invalid winload.efi error.  Is there some way to add Windows 10 to the Windows Boot Manager on disk 0 (preferred solution) or correct the Windows 7 entry on Disk 1?  (Windows 10 is in partition 2, volume 1; Windows 7 is in partition 3, volume 2 according to the diskpart program.)

Thanks for any help on this.

Jim

boyans.net

unread,
Sep 8, 2016, 4:54:04 PM9/8/16
to Visual BCD
Hi Jim,

You can boot both Windows systems (7 and 10) only with Windows 10 boot manager.

(Windows 7 boot manager cannot boot Windows 10)

1. Boot from first disk (disk 0) - you could remove disk 1 temporarily.


a) Click "Automatic Repair" - read what it reports: does it see both systems?

EFI System partition(ESP) should be mapped to drive Z: and reported as "\Device\HarddiskVolumeN" where N is 1 or 2
Usually 2 if you have a Recovery partition at start of disk, or 1 if ESP is first partition.

b) You can rewrite Windows boot manager by using "Automatic Repair" and confirm operation with OK.
The same result can be achieved using bcdboot (just open an admin command prompt when "Dual-boot Repair" is running - ESP should be mapped to drive Z:

bcdedit P:\windows /s Z:
would refresh Windows boot manager to version 10 - drive P: is your Windows 10 partition (change letter P to reflect your mapping for Windows 10).

Now you can add a second boot loader for Windows 7 using Visual BCD Editor and change ApplicationPath - extension for winload.exe to winload.efi (this is the only difference between a BIOS and UEFI loader)

Using Visual BCD Editor you can also change "Description" element text for a loader (how it appears on boot menu).

Hope this helps,

Bo

JimB

unread,
Sep 8, 2016, 11:15:59 PM9/8/16
to Visual BCD
Thank you for the help.  But I still have a problem. Dual-boot Repair found both Win 7 and 10 on disk 0. But it thinks that Win 10 in in partition C and Win 7 is in partition D. However,both Win 10 and Win 7 think their partition is called "C".  Win 10 boots nicely.  However, trying to boot Win 7 results in a 0xC09000428 "The digital signature for this file couldn't be verified" error.  Since Win 7 booted nicely when previously, I think the problem is that when booting Win 7, it looks for D:\Windows\system32\winload.efi and tries to find it on the wrong partition.   I have tried changing "D" to "C" using both bcdedit and Visual BCD Editor but in both cases, the machine boots in Win 10 even when Win 7 has been selected.  So the question is there a way to fix the boot manager so the it tries to find the winload.efi file in the correct partition? 
BCD_Backup_08Sep2016

JimB

unread,
Sep 8, 2016, 11:26:03 PM9/8/16
to Visual BCD
The bcd backup is not readable.  Maybe these attachments are more useful.

Jim
Window 7 loader.png
Window 10 loader.png
Bootmanager.png

boyans.net

unread,
Sep 10, 2016, 1:53:39 AM9/10/16
to Visual BCD
Hi again,

Every OS when booted usually sees its own drive as C:. 
Other OS's are seen as D:, E:, F: ......

The error "The digital signature for this file couldn't be verified" is pretty bad. 
This means that the original Windows 7 "winload.efi" file has been changed!

You can try an offline repair of system files for Windows 7  

sfc /scannow /offbootdir=c:\ /offwindir=d:\windows

- "offbootdir" is the system reserved partition (usually about 100 MB in size) or the active partition on MBR disks

(on UEFI firmware and GPT style disks this is the EFI System partition used for booting)

- "offwindir" is the Windows directory on the drive you would like to fix.


In Windows 10:


1. Start "Dual-boot repair" tool - it will map EFI System partition to Z:


2. I suppose Windows 7 drive will be mapped to D: (can be also E:, F: ...) when booted to Windows 10 but check it with Explorer (File Manager)


so command in your case is:

sfc /scannow /offbootdir=Z:\ /offwindir=D:\windows


Also check (when in Windows 10) and using Visual BCD Editor that Windows 7 loader path maps to D:( the drive letter for Windows 7 when booted to Windows 10).


Cheers,


Bo

JimB

unread,
Oct 1, 2016, 2:13:00 PM10/1/16
to Visual BCD

I thought that I had posted a note awhile back but apparently didn't finish it.

 

Unfortunately your suggestion to use sfc didn't solve the problem (i.e. "The digital signature of the Windows 7 'winload.efi' couldn't be verified)".    I did some checking and "FC" says Windows\System32\winload.efi and the backup Windows\System32\Boot\winload.efi are identical.  That makes me wonder if error message doesn't completely describe the problem.

 

Unfortunately during some experimentation I made matters worse.  I used Visual BCD Editor.  After saving copy of the store that loaded Windows 10, I imported a previously exported store that used to load Windows 7.  Unfortunately I closed Visual BCD Editor while looking at it.  Now every time I try to boot, it tries to boot Windows 7 and gives the "winload.efi can't be verified" error so I can no longer boot at all.  Windows 7 is the only system available.

 

I have tried to use the Windows 10 Enterprise install disk to repair the computer without success.  I tried to use the repair's command prompt option.  (The default "disk" is now X.)  It allows me to see the C (windows 10) and D (windows 7) partitions.  I have tried several things all at the "X:\Sources prompt:"

 

bcdboot c:\windows /s x:

 

It gives the message "BFSVC Error: Failed to set element application device.  Status = [c000000bb]"

 

bcdedit

 

gives the message "The boot configuration data store could not be opened.  The requested system device cannot be found."

 

bcdedit /import c:\BCD_Backup_21Sep2016

 

where the file is the exported file that loaded Win 10.   It results in the error message "The store import operation has failed.  The requested system device cannot be found."

 

The command

 

sfc /scannow /offbootdir=X:\ /offwindir=D:\windows

 

results in "There is a system repair pending which requires reboot to complete.  Restart Windows and run sfc again."  But the same message appears after starting over with the install DVD.

 

I have also tried to reinstall both Win 7 and Win 10 without cleaning the disk.  In either case, when the question "Where do you want to install Windows?", no matter which partition is picked, it says "Windows can't be installed on drive 0 partition n (Show details)"  The details: "Windows cannot be installed to this disk.  The selected disk is of the GPT partition style." That is extremely strange as when the same DVRs were used to install the OS's, they both insisted on a GPT disk.

 

Are there any more suggestions that would allow me to salvage the existing Win 10 or Win 7 systems?  Or should I just clean the disk and then try to install the systems again?

 

Jim

boyans.net

unread,
Oct 2, 2016, 4:56:03 AM10/2/16
to Visual BCD
Hi Jim,

Let's assume your Windows 10 partition is OK.

Boot any installation DVD/USB for Windows 10 (should be same bit version as installed Windows 10 - assuming 64-bit)
Boot EFI way, NOT BIOS/compatible/emulation way!!!

1. Examine with diskpart that you have:
a) EFI System partition (about 100MB) 
b) MS Reserved partition (128MB)
c) take a note of drive letter for Windows 10 - let's assume it is F: (you should change accordingly to your mapping)
d) map EFI System partition by selecting it and using assign - lets's assume it is mapped to drive letter S:
exit diskpart

2. Use "chkdsk S:  /R" to examine EFI System for errors.
eventually "chkdsk F: /F" to check Windows 10 partition.

3. Go to drive S: (EFI System)

attrib -s -h \EFI\Microsoft\Boot\BCD
del \EFI\Microsoft\Boot\BCD

bcdboot F:\windows /s S: /f UEFI

This would create new BCD with only one boot entry for Windows 10 on disk.
(bcdboot checks also for all other necessary boot related files and eventually fixes them if needed)

Please post back if you can boot Windows 10 again.

Bo


JimB

unread,
Oct 3, 2016, 12:27:27 PM10/3/16
to Visual BCD
THANK YOU!!!   That worked.  In fact, I am using Win 10 now.  (As expected) I am still getting the bad signature error when trying to boot Win 7.  Is there any hope of restoring it?  I really don't have anything important on its partition except it an large number of updates to the system (which took some time to allow to happen).

Jim

boyans.net

unread,
Oct 7, 2016, 12:04:33 AM10/7/16
to Visual BCD
In Windows 10:

1. Download and install Dual-boot Repair tool for Windows 10
Run it - it will automatically map EFI system partition to Z:

2. Open administrative command prompt, run command:
         sfc /scannow /offbootdir=Z:\  /offwindir=D:\windows
Assuming Windows 7 is on D: drive (else change D: to your mapping)

Post back with outcome of sfc command.

JimB

unread,
Oct 7, 2016, 3:05:20 PM10/7/16
to Visual BCD
Unfortunately, the sfc command gives the message "There is a system repair pending which requires a reboot to complete.  Restart Windows and run sfc again."  But after rebooting, the same message appears.

Jim Brink

boyans.net

unread,
Oct 8, 2016, 4:55:56 AM10/8/16
to Visual BCD
Check if there is a pending.xml on Windows 7 drive and delete it.

del D:\windows\winsxs\pending.xml

also check registry key (and eventually delete if present) 
"HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion‌​\Component Based Servicing\RebootPending"

(you have to load "SOFTWARE" hive from Windows 7 D:\Windows\System32\config\software, delete, then unload it!!!)
Be careful with registry editor!!! Make backups before editing to be able to restore!!!

Then try again (booted to Win10)

sfc /scannow /offbootdir=Z:\  /offwindir=D:\windows 

with mapped EFI System partition to Z: and Windows 7 to D:

(Do not copy/replace/move manually system files as this usually leads to problems)
Reply all
Reply to author
Forward
0 new messages