Solved CMD line BCDEDIT to point to winre.wim and Disk letter assignment

OK so here are the three BCD files from the three partitions on my working HP4530s
they are:
1, 300MB System...the Active partition
2, C:\ The working installed Win 7 partition
3, HP_Recovery partition.

1, 300MB System
Code:
Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=S:
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
extendedinput           Yes
default                 {default}
resumeobject            {c0e849d0-6e89-11e3-aa17-c4df00072efd}
displayorder            {default}
toolsdisplayorder       {memdiag}
timeout                 30
customactions           0x1000085000001
                        0x5400000f
custom:5400000f         {c0e849d4-6e89-11e3-aa17-c4df00072efd}

Windows Boot Loader
-------------------
identifier              {default}
device                  partition=C:
path                    \windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {c0e849d4-6e89-11e3-aa17-c4df00072efd}
recoveryenabled         Yes
osdevice                partition=C:
systemroot              \windows
resumeobject            {c0e849d0-6e89-11e3-aa17-c4df00072efd}
nx                      OptIn

Windows Boot Loader
-------------------
identifier              {c0e849d4-6e89-11e3-aa17-c4df00072efd}
device                  ramdisk=[D:]\Recovery\WindowsRE\Winre.wim,{c0e849d5-6e89-11e3-aa17-c4df00072efd}
path                    \windows\system32\winload.exe
description             Windows Recovery Environment
inherit                 {bootloadersettings}
osdevice                ramdisk=[D:]\Recovery\WindowsRE\Winre.wim,{c0e849d5-6e89-11e3-aa17-c4df00072efd}
systemroot              \windows
nx                      OptIn
winpe                   Yes

Resume from Hibernate
---------------------
identifier              {c0e849d0-6e89-11e3-aa17-c4df00072efd}
device                  partition=C:
path                    \windows\system32\winresume.exe
description             Windows Resume Application
locale                  en-US
inherit                 {resumeloadersettings}
filedevice              partition=C:
filepath                \hiberfil.sys
debugoptionenabled      No

Windows Memory Tester
---------------------
identifier              {memdiag}
device                  partition=S:
path                    \boot\memtest.exe
description             Windows Memory Diagnostic
locale                  en-US
inherit                 {globalsettings}
badmemoryaccess         Yes

EMS Settings
------------
identifier              {emssettings}
bootems                 Yes

Debugger Settings
-----------------
identifier              {dbgsettings}
debugtype               Serial
debugport               1
baudrate                115200

RAM Defects
-----------
identifier              {badmemory}

Global Settings
---------------
identifier              {globalsettings}
inherit                 {dbgsettings}
                        {emssettings}
                        {badmemory}

Boot Loader Settings
--------------------
identifier              {bootloadersettings}
inherit                 {globalsettings}
                        {hypervisorsettings}

Hypervisor Settings
-------------------
identifier              {hypervisorsettings}
hypervisordebugtype     Serial
hypervisordebugport     1
hypervisorbaudrate      115200

Resume Loader Settings
----------------------
identifier              {resumeloadersettings}
inherit                 {globalsettings}

Device options
--------------
identifier              {c0e849d5-6e89-11e3-aa17-c4df00072efd}
description             Ramdisk Options
ramdisksdidevice        partition=D:
ramdisksdipath          \Recovery\WindowsRE\boot.sdi


C:\ The working installed Win 7 partition
Code:
Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  locate=unknown
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {default}
resumeobject            {b5c086a9-359d-11e0-ae5e-82634f96898b}
displayorder            {default}
toolsdisplayorder       {memdiag}
timeout                 30

Windows Boot Loader
-------------------
identifier              {default}
device                  partition=C:
path                    \windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {bootloadersettings}
truncatememory          0x100000000
recoveryenabled         No
osdevice                partition=C:
systemroot              \windows
resumeobject            {b5c086a9-359d-11e0-ae5e-82634f96898b}
nx                      OptIn

Resume from Hibernate
---------------------
identifier              {b5c086a9-359d-11e0-ae5e-82634f96898b}
device                  ramdisk=[C:]\sources\boot.wim,{ramdiskoptions}
path                    \windows\system32\boot\winresume.exe
description             Windows Resume Application
locale                  en-US
inherit                 {resumeloadersettings}
filedevice              locate=\hiberfil.sys
filepath                \hiberfil.sys
debugoptionenabled      No

Windows Memory Tester
---------------------
identifier              {memdiag}
device                  locate=\boot\memtest.exe
path                    \boot\memtest.exe
description             Windows Memory Diagnostic
locale                  en-US
inherit                 {globalsettings}
badmemoryaccess         Yes

EMS Settings
------------
identifier              {emssettings}
bootems                 Yes

Debugger Settings
-----------------
identifier              {dbgsettings}
debugtype               Serial
debugport               1
baudrate                115200

RAM Defects
-----------
identifier              {badmemory}

Global Settings
---------------
identifier              {globalsettings}
inherit                 {dbgsettings}
                        {emssettings}
                        {badmemory}

Boot Loader Settings
--------------------
identifier              {bootloadersettings}
inherit                 {globalsettings}
                        {hypervisorsettings}

Hypervisor Settings
-------------------
identifier              {hypervisorsettings}
hypervisordebugtype     Serial
hypervisordebugport     1
hypervisorbaudrate      115200

Resume Loader Settings
----------------------
identifier              {resumeloadersettings}
inherit                 {globalsettings}

Setup Ramdisk Options
---------------------
identifier              {ramdiskoptions}
description             Ramdisk options
ramdisksdidevice        partition=C:
ramdisksdipath          \boot\boot.sdi





3, HP_Recovery partition.
Code:
Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  boot
path                    \bootmgr
description             Windows Boot Manager
locale                  en-US
default                 {default}
displayorder            {default}
timeout                 30

Windows Boot Loader
-------------------
identifier              {0eb4ed8e-6b6c-11e3-9ddc-ed4268a7d29e}

Windows Boot Loader
-------------------
identifier              {default}
device                  ramdisk=[D:]\Recovery\WindowsRE\winre.wim,{ramdiskoptions}
path                    \windows\system32\boot\winload.exe
description             HP Recovery Environment
osdevice                ramdisk=[D:]\Recovery\WindowsRE\winre.wim,{ramdiskoptions}
systemroot              \windows
nx                      OptIn
detecthal               Yes
winpe                   Yes

Windows Memory Tester
---------------------
identifier              {memdiag}
device                  unknown
path                    \boot\memtest.exe
description             Windows Memory Diagnostic
locale                  en-US

Device options
--------------
identifier              {0eb4ed8f-6b6c-11e3-9ddc-ed4268a7d29e}
ramdisksdidevice        unknown
ramdisksdipath          \Recovery\WindowsRE\boot.sdi

Setup Ramdisk Options
---------------------
identifier              {ramdiskoptions}
description             Ramdisk Options
ramdisksdidevice        partition=D:
ramdisksdipath          \boot\boot.sdi
 

My Computer My Computer

At a glance

Many: XP, 7, Home & Pro, Slax, FreeNAS, OS-X ...core i58Gb
Computer type
Laptop
Computer Manufacturer/Model Number
HP 4530's Toshiba Sat Pro MacPro, MacBook Pro
OS
Many: XP, 7, Home & Pro, Slax, FreeNAS, OS-X 10.9 10.6.8
CPU
core i5
Memory
8Gb
Hard Drives
Crucial SSD
Various
Let's focus on the 300MB system bcd. that's the one that's really active now.
Code:
Windows Boot Loader
-------------------
identifier              {default}
device                  partition=C:
path                    \windows\system32\winload.exe
description             Windows 7
locale                  en-US
inherit                 {bootloadersettings}
[COLOR=royalblue][B]recoverysequence        [COLOR=darkorange]{c0e849d4-6e89-11e3-aa17-c4df00072efd}[/COLOR][/B][/COLOR]
[COLOR=royalblue][B]recoveryenabled         Yes[/B][/COLOR]
osdevice                partition=C:
systemroot              \windows
resumeobject            {c0e849d0-6e89-11e3-aa17-c4df00072efd}
nx                      OptIn
 
Windows Boot Loader
-------------------
[COLOR=blue][B]identifier              [COLOR=darkorange]{c0e849d4-6e89-11e3-aa17-c4df00072efd}[/COLOR][/B][/COLOR]
[COLOR=blue][B]device                  ramdisk=[D:]\Recovery\WindowsRE\Winre.wim,[COLOR=plum]{c0e849d5-6e89-11e3-aa17-c4df00072efd}[/COLOR][/B][/COLOR]
[COLOR=blue][B]path                    \windows\system32\winload.exe[/B][/COLOR]
[COLOR=blue][B]description             Windows Recovery Environment[/B][/COLOR]
[COLOR=blue][B]inherit                 {bootloadersettings}[/B][/COLOR]
[COLOR=blue][B]osdevice                ramdisk=[D:]\Recovery\WindowsRE\Winre.wim,[COLOR=plum]{c0e849d5-6e89-11e3-aa17-c4df00072efd}[/COLOR][/B][/COLOR]
[COLOR=blue][B]systemroot              \windows[/B][/COLOR]
[COLOR=blue][B]nx                      OptIn[/B][/COLOR]
[COLOR=blue][B]winpe                   Yes[/B][/COLOR]
 
 
Device options
--------------
[COLOR=blue][B]identifier              [COLOR=plum]{c0e849d5-6e89-11e3-aa17-c4df00072efd}[/COLOR][/B][/COLOR]
[COLOR=blue][B]description             Ramdisk Options[/B][/COLOR]
[COLOR=blue][B]ramdisksdidevice        partition=D:[/B][/COLOR]
[COLOR=blue][B]ramdisksdipath          \Recovery\WindowsRE\boot.sdi[/B][/COLOR]

You see clearly:
-The creation of the ramdisk in the last section. That identifier is refererenced in the WIM boot option.

-{c0e849d4-6e89-11e3-aa17-c4df00072efd} is defined as recoverysequence. That identifier is a "windows boot loader".

What setting is not clear or not changeable for you?
 

My Computer My Computer

At a glance

Microsoft Windows 7 Home Premium 64-bits 7601...Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz4,00 GBATI Mobility Radeon HD 5400 Series
Computer type
Laptop
Computer Manufacturer/Model Number
ACER ASPIRE 5742G
OS
Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz
Motherboard
Acer Aspire 5742G
Memory
4,00 GB
Graphics Card(s)
ATI Mobility Radeon HD 5400 Series
Sound Card
(1) AMD High Definition Audio Device (2) Realtek High Defi
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
WDC WD5000BEVT-22ZAT0
OK, so here is he scenario that I faced..and i could see facing in future since we now no longer get the system disks with new machines, and it seems that from the HP machines HP now supply, they either do not allow creating of a second set of recovery disks or as in the case of the HP4530..they do not even install the Create Recovery Disk program,

So I had a machine that I wanted to do a fresh instal on to , from the HP_Recovery partition.

I created the wim file of the HP_Recovery partition and restored it to the NEW HDD.

So with ONLY the HP_Recovery partition on the new target HDD, I needed to get it to boot to that partition.
The only way i found was to install a trial version of Win7, boot to that, use EasyBCD to edit the bcd file and then re boot.

I was hoping that using BCDEDIT from the CMD line to create a BCD file that pointed to the HP_Recovery partition was going to be a simpler, easier and shorter process than doing a Win 7 instal, just to run EasyBCD...but now I don't know if it is or not..maybe it is not even within my capabilities..I am pushing the envelope as it is

I just need time now to digest the last posts from yourself and SW2, find myself a new HDD to play with, try again and get back to you. I just do not want to feel I am taking up any more of your time and asking me to spoon feed me any more.

Thanks..I'll take a few days now to mull things over and try a few more times.

many thanks

hope you both have a good PC free New Year celebration

Regards
 

My Computer My Computer

At a glance

Many: XP, 7, Home & Pro, Slax, FreeNAS, OS-X ...core i58Gb
Computer type
Laptop
Computer Manufacturer/Model Number
HP 4530's Toshiba Sat Pro MacPro, MacBook Pro
OS
Many: XP, 7, Home & Pro, Slax, FreeNAS, OS-X 10.9 10.6.8
CPU
core i5
Memory
8Gb
Hard Drives
Crucial SSD
Various
Mark the HP_RECOVERY partition ACTIVE and boot... Now it boots the HP recovery environment and you can "go back to factory defaults".
 

My Computer My Computer

At a glance

Microsoft Windows 7 Home Premium 64-bits 7601...Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz4,00 GBATI Mobility Radeon HD 5400 Series
Computer type
Laptop
Computer Manufacturer/Model Number
ACER ASPIRE 5742G
OS
Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz
Motherboard
Acer Aspire 5742G
Memory
4,00 GB
Graphics Card(s)
ATI Mobility Radeon HD 5400 Series
Sound Card
(1) AMD High Definition Audio Device (2) Realtek High Defi
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
WDC WD5000BEVT-22ZAT0
No , afraid not.

that is what I first tried when I started this epic ...I have been on this since mid November in one way or another

I read that here:
Need help with HP recovery partition on new hard drive - Systems

but that does not work

If it had it would not be Windows ..just too easy.

Wonder if the reason that it does not work..( making the HP_Recovery partition active) is that the BCD file in that partition is damaged or just plain wrong ?
 

My Computer My Computer

At a glance

Many: XP, 7, Home & Pro, Slax, FreeNAS, OS-X ...core i58Gb
Computer type
Laptop
Computer Manufacturer/Model Number
HP 4530's Toshiba Sat Pro MacPro, MacBook Pro
OS
Many: XP, 7, Home & Pro, Slax, FreeNAS, OS-X 10.9 10.6.8
CPU
core i5
Memory
8Gb
Hard Drives
Crucial SSD
Various
Been thinking about this booting from the HP_recovery partition.

Now before I cloned the partitions with ImageX, I had tried CloneZilla, Acronis and at least one other.

Now one of those tools did leave even the Original HDD Win7 partition (c:\) un bootable...so there is a fair chance that that is why my HP_Recovery partition did not boot as it should.

I think we will leave this as it is..I can't see my self getting my head around creating BCD files from the command line ..and there seems to be easier, albeit much longer ways, (instal win7 to use GUI tools)

I have wasted enough of your time as it is.. After a month of it, I am getting pretty sick of the sight of it too.

Thanks for the help guys, and once again

HAPPY NEW Year

Neil
 

My Computer My Computer

At a glance

Many: XP, 7, Home & Pro, Slax, FreeNAS, OS-X ...core i58Gb
Computer type
Laptop
Computer Manufacturer/Model Number
HP 4530's Toshiba Sat Pro MacPro, MacBook Pro
OS
Many: XP, 7, Home & Pro, Slax, FreeNAS, OS-X 10.9 10.6.8
CPU
core i5
Memory
8Gb
Hard Drives
Crucial SSD
Various
A few posts before I see:
3, HP_Recovery partition.
And the relevant part of the contents:

device ramdisk=[D:]\Recovery\WindowsRE\winre.wim,{ramdiskoptions}
osdevice ramdisk=[D:]\Recovery\WindowsRE\winre.wim,{ramdiskoptions}

That's part of file d:\boot\bcd. Actually the part above is referring to the WIM file on D. Very important:

[D:] is not actually in file d:\boot\bcd!!! In that file is something like 1298af97bc-0011002200. First part is the disk signature (uniquely identifing the disk). Second part is the start sector of that partition. Win7 translates that to D (defined in its registry). But in HP recovery environment it's called C (most likely).

You cloned. hmmmm you most like changed the disksignature. 2 disks mounted on system cannot have the same disksignature! Maybe you changed the start sector of that partition as well. In both cases the recovery partition isn't 1298af97bc-0011002200 (see first line of previous paragraph).

solution:
Code:
diskpart
list  vol
exit
Now you know the drive letter (look at size and label of volume). Assume it's D. Then to view the current content:
Code:
bcdedit/store  [B][COLOR=red]D:[/COLOR][/B]\boot\bcd  /enum all

the 2 lines don't display [D:] but somethink like "unknown". So fix it.

Code:
bcdedit/store  [B][COLOR=red]D:[/COLOR][/B]\boot\bcd  /set {default} device  ramdisk=[[B][COLOR=red]D:[/COLOR][/B]]\Recovery\WindowsRE\winre.wim,{ramdiskoptions}
bcdedit/store  [B][COLOR=red]D:[/COLOR][/B]\boot\bcd  /set {default} osdevice  ramdisk=[[B][COLOR=red]D:[/COLOR][/B]]\Recovery\WindowsRE\winre.wim,{ramdiskoptions}

There's another part that's faulty:
Setup Ramdisk Options
---------------------
identifier {ramdiskoptions}
description Ramdisk Options
ramdisksdidevice partition=D:
ramdisksdipath \boot\boot.sdi

So do:

Code:
bcdedit/store  [B][COLOR=red]D:[/COLOR][/B]\boot\bcd  /set {ramdiskoptions}  partition=[B][COLOR=red]D:[/COLOR][/B]

So after cloning.... just run the 3 lines of code. Change D: with actual drive lettter.
 

My Computer My Computer

At a glance

Microsoft Windows 7 Home Premium 64-bits 7601...Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz4,00 GBATI Mobility Radeon HD 5400 Series
Computer type
Laptop
Computer Manufacturer/Model Number
ACER ASPIRE 5742G
OS
Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz
Motherboard
Acer Aspire 5742G
Memory
4,00 GB
Graphics Card(s)
ATI Mobility Radeon HD 5400 Series
Sound Card
(1) AMD High Definition Audio Device (2) Realtek High Defi
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
WDC WD5000BEVT-22ZAT0
Been thinking about this booting from the HP_recovery partition.

Now before I cloned the partitions with ImageX, I had tried CloneZilla, Acronis and at least one other.

Now one of those tools did leave even the Original HDD Win7 partition (c:\) un bootable...so there is a fair chance that that is why my HP_Recovery partition did not boot as it should.

I think we will leave this as it is..I can't see my self getting my head around creating BCD files from the command line ..and there seems to be easier, albeit much longer ways, (instal win7 to use GUI tools)

I have wasted enough of your time as it is.. After a month of it, I am getting pretty sick of the sight of it too.

Thanks for the help guys, and once again

HAPPY NEW Year

Neil
Backup/restore with macrium reflect! It modifies the active BCD file automatically. Also in registry! Maybe it's smart enough to modify the file d:\boot\bcd as well (?)

Maybe also if cloning (?)
 

My Computer My Computer

At a glance

Microsoft Windows 7 Home Premium 64-bits 7601...Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz4,00 GBATI Mobility Radeon HD 5400 Series
Computer type
Laptop
Computer Manufacturer/Model Number
ACER ASPIRE 5742G
OS
Microsoft Windows 7 Home Premium 64-bits 7601 Multiprocessor Free Service Pack 1
CPU
Intel(R) Core(TM) i3 CPU M 370 @ 2.40GHz
Motherboard
Acer Aspire 5742G
Memory
4,00 GB
Graphics Card(s)
ATI Mobility Radeon HD 5400 Series
Sound Card
(1) AMD High Definition Audio Device (2) Realtek High Defi
Screen Resolution
1366 x 768 x 32 bits (4294967296 colors) @ 60 Hz
Hard Drives
WDC WD5000BEVT-22ZAT0
Now you know the drive letter (look at size and label of volume).


This was one of the possible issues I was having..Diskpart and Windows often seem to assign different drive letters..I am sure I read that here somewhere, and it did seem to hold true.

This machine that I am working on mainly runs OS-X via a tonymacx86 install 'trick' app but I wanted the ability to go back to Win7..but also wanted to use the original 650gb HDD..hence the original cloning
.

I'lll lok at those issues you mention again.

I did find that now, after the HP_Recovry has been run, it has fixed the relevant BCD file enough to run HP_Recovery by setting that partition as active...as it should have done in the first place.

I need to read up on what exactly Win 7 needs to correctly boot and then filter out the extra stuff in the BCD that is not relevant (hibernate entries etc.)

Does seem 'odd' that EasyBCD does not display the full BCD file even in 'Expert' mode..in the same way that /enum all does.








This is my first foray back in to Windows since 2004..that was the last time I bought a new Win machine. That was when Xp was new ish and I did not want to transition from Win2k.. My first machines were Ckikey..just done a Google search..Orynx ? Oryx...can't even find a reference to it on Google ..Used to learn computin gat school ...early 80's on a Blue and black box...Research Machines. ZX Spectrum..Then when things got serious, an Amstrad PCW 8512, that i upgraded to a massive 1MB RAM with an Isenstein solder it in your slef memory upgrade board..even fitted a ?? BLack Diamond ?? 20MB HDD..so i could boot it without inserting and removing the weird shaped non standard rectangular 'hard case' Amstrad 'floppies'.

Just building a YUMI USB boot stick with as many OS' tools as as I can cram on...but only can find a 4GB stick...and Sunday..have to wait till tomorrow now to get a bigger stick..Only 8GB I have has my Hacintosh install and boot media on..and not going to screw with that
 

My Computer My Computer

At a glance

Many: XP, 7, Home & Pro, Slax, FreeNAS, OS-X ...core i58Gb
Computer type
Laptop
Computer Manufacturer/Model Number
HP 4530's Toshiba Sat Pro MacPro, MacBook Pro
OS
Many: XP, 7, Home & Pro, Slax, FreeNAS, OS-X 10.9 10.6.8
CPU
core i5
Memory
8Gb
Hard Drives
Crucial SSD
Various
Neil, stop winding this guy up.
 

My Computers My Computers

  • At a glance

    Windows 10 Pro 64 bit, macOS Big Sur 11.6core i7-3220s32 GBIntegrated (Intel HD 4000)
    Computer type
    PC/Desktop
    Computer Manufacturer/Model Number
    Custom build
    OS
    Windows 10 Pro 64 bit, macOS Big Sur 11.6
    CPU
    core i7-3220s
    Motherboard
    GA-z77-ds3h
    Memory
    32 GB
    Graphics Card(s)
    Integrated (Intel HD 4000)
    Hard Drives
    Too many to count :)
    Antivirus
    Windows Defender
    Browser
    Chrome
  • Computer type
    PC/Desktop
Back
Top