Jump to content

Recommended Posts

Posted

You create a diff.vhd and use this for everything (mounting or booting via BCD).
If you make any changes to the base.vhd the diff will be invalid.


Posted (edited)

From what I've read and what you said, if I merge the diff to the base, the diff is no longer usable. I tested this with diskpart, but it did not delete the diff after the merge so I guess this needs to be done manually too. I would like to automate creating a diff, changing the BCD to boot that file  and merging the vhd later when needed. How would I change the BCD from the command line to use the diff ?

 

 

Edited by click-click
Posted (edited)

Yes, that would require to do all steps manually.

Update BCD with bcdedit.exe:

Get the %GUID% form

bcdedit -store S:\EFI\Microsoft\Boot\BCD

than update device and osdevice:

bcdedit -store S:\EFI\Microsoft\Boot\BCD -set %GUID% device vhd=[C:]\diff.vhd
bcdedit -store S:\EFI\Microsoft\Boot\BCD -set %GUID% osdevice vhd=[C:]\diff.vhd

 

Edited by JFX
Posted (edited)

I'm using MBR for my VHDs and I'm not sure where to get the %GUID% from. This is what I ended up with, but still missing GUID.

Is that the value that shows up in the mountvol cmd: \\?\Volume{32034eb7-3cd4-11ee-825d-806e6f6e6963}\    Q:\ or do i need to use something else like the OS GUID (Windows Boot Loader id)?

bcdedit -store Q:\Boot\BCD
bcdedit -store Q:\Boot\BCD -set ????? device vhd=[C:]\W0_ltsb_1607_Diff.vhdx
bcdedit -store Q:\Boot\BCD -set ????? osdevice vhd=[C:]\W0_ltsb_1607_Diff.vhdx

Edited by click-click
Posted (edited)

"bcdedit -store Q:\Boot\BCD" should print something like this:

Quote

Windows-Startladeprogramm
-------------------------
Bezeichner              {1445ab79-433b-4e96-82ee-3b86552f7a64}
device                  vhd=[E:]\Win10H2.vhd
path                    \Windows\system32\winload.efi
description             Windows 10 (VHD)


 

Edited by JFX
Posted (edited)

I get this and resumeobject seems to be the logical choice for the GUID to use, correct?

Also, is the 1st -store even needed to update the BCD or was this just to see  the current setting for the GUID?

c:\>bcdedit -store Q:\Boot\BCD
	Windows Boot Manager
--------------------
identifier              {bootmgr}
device                  partition=Q:
description             Windows Boot Manager
locale                  en-US
inherit                 {globalsettings}
default                 {default}
resumeobject            {538b59d5-41e7-11ee-a7ec-c85b76503892}
displayorder            {default}
toolsdisplayorder       {memdiag}
timeout                 30
	Windows Boot Loader
-------------------
identifier              {default}
device                  vhd=[Q:]\W0_ltsb_1607.vhdx
path                    \Windows\system32\winload.exe
description             Windows 10 Enterprise 2016 LTSB (VHDX)
locale                  en-US
inherit                 {bootloadersettings}
recoverysequence        {ee407104-4233-11ee-a481-fb52bd7f26e4}
recoveryenabled         Yes
allowedinmemorysettings 0x15000075
osdevice                vhd=[Q:]\W0_ltsb_1607.vhdx
systemroot              \Windows
resumeobject            {538b59d5-41e7-11ee-a7ec-c85b76503892}
nx                      OptIn
bootmenupolicy          Standard
Edited by click-click
Posted (edited)

No, but {default} is the correct one.

"bcdedit -v -store Q:\Boot\BCD" would show the correct GUID, but you can use symbols like {default} or {current}, too.

Edited by JFX
Posted (edited)

Sorry for being such a pain. The BCD I ended up with to boot the diff had an error.

There is an invalid object in the Boot Configuration Data store Error 0xC0000000f

 

c:\>bcdedit.exe -store Q:\boot\bcd

				
			Windows Boot Manager
		--------------------
		identifier              {bootmgr}
		device                  partition=Q:
		description             Windows Boot Manager
		locale                  en-US
		inherit                 {globalsettings}
		default                 {default}
		resumeobject            {538b59d5-41e7-11ee-a7ec-c85b76503892}
		displayorder            {default}
		toolsdisplayorder       {memdiag}
		timeout                 30				
			Windows Boot Loader
		-------------------
		identifier              {default}
		device                  vhd=[C:]\W0_ltsb_1607_Diff.vhdx
		path                    \Windows\system32\winload.exe
		description             Windows 10 Enterprise 2016 LTSB (VHDX)
		locale                  en-US
		inherit                 {bootloadersettings}
		recoverysequence        {ee407104-4233-11ee-a481-fb52bd7f26e4}
		recoveryenabled         Yes
		allowedinmemorysettings 0x15000075
		osdevice                vhd=[C:]\W0_ltsb_1607_Diff.vhdx
		systemroot              \Windows
		resumeobject            {538b59d5-41e7-11ee-a7ec-c85b76503892}
		nx                      OptIn
		bootmenupolicy          Standard 

c:\>

 

 

 

Bootice.jpg

Edited by click-click
Posted

Maybe, differencing VHDs are not the best choice for you :P

Have not seen that 0xC0000000f error. Could be a problem coming from Bootice edit.

Posted

Yes, it working for me, using it from time to time. But the grow rate is quite high.
Just booted a diff and shutdown after 3 minutes it grow  to 1.42 GB.

You could simplify this without editing BCD.
Just rename the VHD to let's say Base.vhd and create a diff with the old name.

Also make sure that parent and diff vhd are in the some folder.

Posted

that is 

On 9/9/2023 at 11:46 AM, JFX said:

Yes, it working for me, using it from time to time. But the grow rate is quite high.
Just booted a diff and shutdown after 3 minutes it grow  to 1.42 GB.

You could simplify this without editing BCD.
Just rename the VHD to let's say Base.vhd and create a diff with the old name.

Also make sure that parent and diff vhd are in the some folder.

that is exactly what I meant at the outset - is there any point in differencing at all? talking of less than 2gigs?

Posted

OK,  I wasn't aware that the growth rate would be that high. No sense in pursuing this further. I need to find a better way of getting a reasonable  file diff  of the  VHD.  A full backup of a big VHD each time doesn't seem to be  the way either. Any recommendations how to best backup VHDs or is everyone just using them as throw-away systems without doing backups for them?

 

 

 

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...