Jump to content

Image Process Start to Finish


Recommended Posts

There are lots of post here about options and methods etc, I was hoping I might get a bit of feedback about the process I'm trying to use.

Objective is to have an image that can be used on maybe 10 different models of Lenovo laptops, with drivers for each type.

Process: Install Win 7 64bit Enterprise

Boot into audit mode

Install drivers for machine i'm building it on (this saves a few steps in adding these drivers later)

Install applications, updates, Office, ff, tb, a few others

Sysprep machine /oobe /generalize /shutdown /unattend:unattend.xml

Capture into a .wim file

Mount .wim and add any drivers I need for other models using dsim.

Apply the .wim file to machines as needed.

Issues: After booting into audit mode and installing office, plus making some secpol.msc changes and windows updates, when the machine rebooted it got to a screen that said something to the effect that windows installation failed and to please try it again.

I'm also not really sure what others are doing with the 100meg Win 7 service partition in regards to capturing it with image x and applying it back.

Any help on the process or why I might be getting this error appreciated.

Link to comment
Share on other sites


So far, our installs of Pro and Home Premium do not create the System partition. I am now working on Ultimate, which does. In this case, I captured only the OS partition. I will test redeploying it in a little bit, so I'm not even sure if what I have done will work or not.

Here ya go dude!

1. Install your OS.

2. install your programs etc, make sure to reboot afterwards

3. open up c:\windows\system32\sysprep\sysprep.exe

4. Choose OOBE and check Generalize and shutdown. Then make it go!

Now at this point, I'm going to use imagex instructions. I also will use example of saving to network share. So you may end up capturing to a USB drive or so, but the following is just an example!

5. Boot into your PE

6. We capture the OS partition, PE will see a C and D drive. D drive should be where your OS is (thats how it appeared to me). So run this:

imagex /capture /compress fast d: z:\install.wim "Windows 7 Pro OOBE"

That's basically it for capture, let's pretend now we can deploy to another (or same) computer. So say you already booted the client PC into the PE.

7. Run this diskpart script: ie diskpart.exe /s diskpart.txt

sel disk 0
clean
create part pri size=500
sel part 1
active
format fs=ntfs label="System" quick
create part pri
sel part 2
format fs=ntfs label="OS" quick
assign letter=c
exit

8. Now we can put the image on the computer and run the other steps

imagex /apply z:\install.wim 1 c:
c:\windows\system32\bcdboot.exe c:\windows

Now reboot that guy and you should be set.

You can see in this instructions, at the time of capture, I ignore the System partition, and at the time of deploy, I only create the partition but don't actually do anything with it.

Link to comment
Share on other sites

I should have been a bit clearer with my questions I think.

The first thing I was wondering when installing the OS, do you go ahead and create a user acct and use that acct to setup the machine, or do you boot only into audit boot and do everything from here.

Driver wise it seems like a lot of people run sysprep /generalize /audit /shutdown /unattend:unattend.xml then capture the image from here. After applying it back to a machine in the xml file it boots into audit mode loading all the drivers it needs for the particular machine by adding a driver path to the audit boot part. After that's done its scripted to reboot into the /oobe mode.

The other way seems to be running sysprep /oobe /generalize /shutdown /unattend:unattend.xml then capturing the image. At that point adding all your drivers to the .wim file. Then when you apply the wim it boots directly into the oobe and loads drivers that are included in the .wim rather then from a driver path.

I'm not really sure which way is the preferred method or if they are both fine.

In regards to the diskpart script, when you create the first partition diskpart auto assigns c: so it isn't really accepting it when you try to assign it to the 2nd partition. At least that's how it's working on the machine i'm looking at now. I also would have though the 2nd partition you are creating is the one that needs to be active? I'm testing a few things now, just created 1 partition made it active and I'm applying the wim to it.

The version I'm using is Enterprise which is essentially the ultimate edition with a vlk, and it does create the 100meg service partition. It seems reasonable that this would need to be reapplied for whatever reason MS set it up to begin with although I'm not terribly sure what that is. It does look like there aren't any actual files in the partition so maybe just creating it like you had in the example is all that needs done I suppose, I would just like to have a bit better feel for whats going on with it if I'm going to use this on client machines.

One final question, the pe cd i'm using is win32 and the wim is 64bit, so the bcdboot.exe program give errors about it not being the correct version. I tried the other one located in the really long folder c:\windows\winsxs\amd64_longpathhere\bcdboot.exe as well with the same result

Greatly appreciated your help.

Edited by tomatthe
Link to comment
Share on other sites

1. Your first install you should not create a user account. Sysprep may/can remove it on you.

2. Drivers should be added into the install.wim, not afterwards. Otherwise you run the risk of Sysprep removing some thing. For example (in my experience) a Sysprep /generalize removed all video drivers i had installed. However if you added the drivers ahead of time, they would not get removed.

3. Note my instructions are modified from what I actually use. I use WinRE so I just left that part out. As us OEMs go, we boot the computer in Audit mode, then reseal (OOBE and no generalize) before sending to the end-user. You may have to adjust your own methods at this point. In my business, we send PCs to end-users, not a corporate environment like some others. So note this when reading my posts.

4. all of the Diskpart commands I listed in the "code" was actually typed by me. It is only part of my diskpart script. If using diskpart like in my example, it does not assign a letter at all. I do not know why your way gets a letter.

Also about the 64 bit part. I was going to post about that but I didn't. See, my Windows 7 deployment platform is x64 not x86. You need x64 to deploy x64. I had to copy the x64 bcdboot file from an existing install and put it in my PE.

Since this topic is more PE related (from my standpoint), I recomend you check this out:

http://www.msfn.org/board/imagex-hta-win-p...64-t138048.html

Link to comment
Share on other sites

Much obliged, lots more to work toward today. Started with building a quick 64bit winpe and machine is booting after using the bcdboot 64bit version which is a positive. Think things are finally pulling together.

In regards to drivers I was looking at the option to have machines first come out of a sysprep /audit /generalize and use the driverpath option in audit boot to have a folder with the needed drivers for all the machines I need to support, and just have it scripted to sysprep /oobe /reboot sysprep once the drivers had been loaded up. I may need to add in more supported models down the road and this seems like the simplest way to be able to add to the driver store.

Again greatly appreciate the help.

Link to comment
Share on other sites

I'm not really clear on why things are working this way, but the 32bit pe cd I had built from Win Vista a while back was auto assigning C to the system partition when I was trying to create it, when using a 64bit pe cd built from the Win 7 WAIK it's working as you said it should.

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...