Jump to content

Windows Images and DISM


Recommended Posts

I saw this article about applying a windows image: http://technet.microsoft.com/en-us/library/hh825089.aspx

 

I assume I can do that on my personal machine.  I just need a way to create the images.

 

Then I read this article: http://technet.microsoft.com/en-us/library/hh825041.aspx

 

It says I need to prepare a reference pc.  Does that just mean installing windows with the traditional cd or usb key based install and then doing a sysprep /generalize on it followed by booting into winpe and using dism to create an image?  Is there some kind of tutorial that goes thru this from start to finish?  My PC would be both the target and reference PC.  I just wanna have a backup image that I can use for easy PC reformats in the future.

Link to comment
Share on other sites


It says I need to prepare a reference pc.  Does that just mean installing windows with the traditional cd or usb key based install and then doing a sysprep /generalize on it followed by booting into winpe and using dism to create an image?

Yes.

Is there some kind of tutorial that goes thru this from start to finish?

The articles you reference seem to me well detailed, but seemingly your scope is different.

The idea of those is to:

  1. create a "reference" machine
  2. install to it Windows
  3. add apps/settings/whatever
  4. generalize the image
  5. deploy the image to a number of other PC's
  6. finish the configuration on the single machines

Imagine that you are in the IT of a company and you get 20 laptops for the company's salesforce, instead of installing (or only configuring) and configuring 20 times, you setup a "reference" PC and then replicate it 20 times.

In your case:

My PC would be both the target and reference PC.  I just wanna have a backup image that I can use for easy PC reformats in the future.

It would IMHO make more sense (since the source and target are the same) to simply have (once the PC is configured) a "bare-metal recovery" capable image (i.e. it makes little sense to generalize the setup, since the scope is to "restore" and not to "deploy").

 

See (just to get familiar with the slight differences in the terms used) this thread:

http://www.msfn.org/board/topic/157634-hard-disk-cloningimaging-from-inside-windows/

 

Then DISM is as good as anything else to do this, see:

http://www.msfn.org/board/topic/153742-dism-improvements-in-windows-8/

 

All you have to do is:

  1. Setup your PC the way you like it
  2. Capture an image of it and store it somewhere
  3. In case of need boot to the PE, re-apply the image, if needed after having (say on a new disk or if the old disk partitioning was corrupted) create the partition(s) and run BCDBOOT to recreate the \boot\BCD. 

See:

http://wiki.beyondlogic.org/index.php/Imaging_of_Windows_Based_Computers_using_DISM

 

Please understand how this won't be anyway an "exact" copy of the original, and some programs (as an example those that use volume data or disk signature to verify/authenticate) might need to be re-activated.

In your case I would prefer a "real" image of the disk (though .wim technology has some advantages, like a high compression and usually it is pretty fastish), or additionally and besides the .wim image, backup/store the relevant data.

 

jaclaz 

Link to comment
Share on other sites

What is the operating system? Those articles are aimed at specific types of OS, such as OEM System Builder Kit or Enterprise.

Are they? :unsure:

In any case the procedure is the same.

 

jaclaz

Link to comment
Share on other sites

I'm using 8.1 Pro.

 

I did find out from this article http://technet.microsoft.com/en-us/library/dn293447.aspx that the push-button reset feature will recognize .esd files as well.  So I ended up shrinking my windows partition in order to make room for a recover partition at the very end.  Then made a 6gig recovery partition:

shrink minimum=6000create partition primaryformat quick fs=ntfs label="Recovery image"assign letter="R"set id="de94bba4-06d1-4d40-a16a-bfd50179d6ac"

I then copied the install.esd from my installation media to the recovery partition.  At first I tried:

reagentc /setosimage /path R: /index 1

But it complained saying you can't have the recovery image at the root of a volume.  So I created a folder called RecoveryImage and moved the esd file there.  Then I did:

reagentc /setosimage /path R:\RecoveryImage /index 1

Which seemed to work.  So now hopefully my push-button PC Reset feature will do the trick.

Link to comment
Share on other sites

What is the operating system? Those articles are aimed at specific types of OS, such as OEM System Builder Kit or Enterprise.

Are they? :unsure:

In any case the procedure is the same.

 

jaclaz

It isn't exactly the same. I ran into a problem attempting to implement those procedures initially (and also from the //BUILD/ material) and found errors.

Anyways, I bring this up because if the OS on the PC is pre-installed by an OEM, the publicly documented procedures may not work exactly as described in those articles.

Link to comment
Share on other sites

It isn't exactly the same. I ran into a problem attempting to implement those procedures initially (and also from the //BUILD/ material) and found errors.

 

Anyways, I bring this up because if the OS on the PC is pre-installed by an OEM, the publicly documented procedures may not work exactly as described in those articles.

 

Well, no, no. :w00t::ph34r:

 

Meaning:

1) that those articles are seemingly "generic" and NOT specific to "OEM System Builder Kit" or "Enterprise"

2) I can see nothing "wrong" in what is described in http://technet.microsoft.com/en-us/library/hh825089.aspx or in http://technet.microsoft.com/en-us/library/hh825041.aspx BUT if you have found something "wrong" in them, please tell us WHAT EXACTLY it is.

 

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

First, the BCDBoot command in the examples should use the /s switch. The rest, I guess is out of scope for this topic. It was a long time ago, but it had to do with what GPT attributes to set on the recovery partition and when to set them.

Link to comment
Share on other sites

First, the BCDBoot command in the examples should use the /s switch. 

Why? :w00t:

 

The /s switch is an option.

http://technet.microsoft.com/en-us/library/dd744347(v=ws.10).aspx

http://msdn.microsoft.com/en-us/library/hh824874.aspx

 

AND it is even tagged as "not to be used in typical deployment scenarios"

/s <volume letter> Optional. Specifies the volume letter of the system partition. This option should not be used in typical deployment scenarios.

 

 

If the switch is missing, the BCDBOOT will use the "default" volume, i.e. the Active partition (please read as System partition) in a BIOS system or the EFI System partition on UEFI.

 

jaclaz

Link to comment
Share on other sites

The other "wrong" thing is that the example script has you set the osimage location to the root of a volume.  That clearly is not allowed if you see the error message you get when trying it.

 

Basically I just want to make sure my approach here is going to work or if it will blow up in my face when I try doing a PC Reset.

Link to comment
Share on other sites

The other "wrong" thing is that the example script has you set the osimage location to the root of a volume.  That clearly is not allowed if you see the error message you get when trying it.

 

Basically I just want to make sure my approach here is going to work or if it will blow up in my face when I try doing a PC Reset.

WHICH example script? :unsure:

 

The commands in the procedures given about Push-Button reset use a folder alright.

http://technet.microsoft.com/en-us/library/hh824917.aspx

 

 

5. Register the push-button reset recovery image:

 

W:\Windows\System32\Reagentc /Setosimage /Path R:\RecoveryImage /Target W:\Windows /Index 1

 

 

 

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

 

The other "wrong" thing is that the example script has you set the osimage location to the root of a volume.  That clearly is not allowed if you see the error message you get when trying it.

 

Basically I just want to make sure my approach here is going to work or if it will blow up in my face when I try doing a PC Reset.

WHICH example script? :unsure:

 

The commands in the procedures given about Push-Button reset use a folder alright.

http://technet.microsoft.com/en-us/library/hh824917.aspx

 

 

5. Register the push-button reset recovery image:

 

W:\Windows\System32\Reagentc /Setosimage /Path R:\RecoveryImage /Target W:\Windows /Index 1

 

 

 

jaclaz

 

 

Interesting... this article shows different: http://technet.microsoft.com/en-us/library/hh825089.aspx

rem === Copy the image to the recovery image partition =======================copy %1 R:\install.wimrem === Apply the image to the Windows partition =============================dism /Apply-Image /ImageFile:R:\install.wim /Index:1 /ApplyDir:W:\rem === Copy the Windows RE Tools to the Windows RE Tools partition ==========md T:\Recovery\WindowsREcopy W:\windows\system32\recovery\winre.wim T:\Recovery\WindowsRE\winre.wimrem === Copy boot files from the Windows partition to the System partition ===bcdboot W:\Windowsrem === In the System partition, set the location of the Windows partition ===W:\Windows\System32\reagentc /setosimage /path R: /target W:\Windows /index 1

Love how consistent Microsoft is with their documentation.

Link to comment
Share on other sites

Love how consistent Microsoft is with their documentation.

 

Sure :yes:, that is the reason why, since "they" provide so much confusing and contradicting information, "we" need to be VERY accurate.

 

Remember that they can play the secret 7 anytime  :w00t::ph34r::

http://homepage.ntlworld.com./jonathan.deboynepollard/Humour/microsoft-monopoly.html

 

jaclaz

Edited by jaclaz
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Recently Browsing   0 members

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