My ramblings on the stuff that holds it all together
Category Archives: Vista
Windows team Blog post here says Vista SP1 has been released to manufacturing so not long to go now until it’s generally available.
I’ve been using Vista exclusively since it RTM’d and from Beta 2 before that. I got a new laptop with a core 2 Duo CPU and went up to 4Gb RAM from 2 and it made a world of difference – much faster and in the last year my Dell D620 has been rock solid.
The file-copy hotfix worked for me; and a recent video driver update (automatically offered via Windows Update..nice) fixed the annoying screen mix-up when I docked my laptop.
Does make you wonder if MS wanted/did bring forward the SP1 date because of all the “wait for SP1” brigade… M-m-m-m, marketing!
Not looked yet but I wonder how large SP1 will be, on the Vista desktops build I did recently I had to download c.300Mb of Windows (c.98Mb) & Office 2007 Updates (c.200Mb. good think I have a fast connection – you’ve got no chance on a PSTN dial up anymore!
Goal: keep a single .WIM file, Multiple instances of the same build in the .WIM file
Build001 non-sysprep’d version for maintenence with all latest patches and corp apps
Build002 sysprep but no domain for home workers/3rd party
Build003 sysprep + domain joining and scripted OOBE for corp machines
Build004…etc. tweaks to the sysprep – for different domains/customers or OOBE settings like language etc.
Build a bootable WinPE DVD with ImageX and the large .WIM file stored on it so no network connectivity required to install (at this stage) just a single DVD.
Reboot from Win PE to start Vista MiniSetup/OOBE
I hit a problem as when I restored build001 to my reference machine it wouldn’t boot and immediatley gave a 0xc000000e error
This was because my automated build DVD runs diskpart with a scripted set of commands (WIPEDISK.TXT) which includes the clean command
select disk 0
create partition primary
select partition 1
format fs=ntfs quick
This caused problems in this instance because The clean command erases the partition table ID.
If an image has not been-sysprep’d it still looks for the original partition table ID (which diskpart removed) hence the stop error at boot.
Sysprep’d images don’t have this problem as the “/generalize” switch resets this dependency on the partition table entries and mini-setup runs at 1st boot to fix it up.
So, if you need to do maintenance on a non-sysprep’d reference image then
- You need to restore it via imageX and your usual process (in my case a bootable PE DVD)
- It won’t be able to boot – it will give an 0xc000000e error
- Boot the reference machine from your original Vista install DVD and choose to repair
- This puts back the partition table ID and it will boot again
- Once it’s booted you can carry out any online maintenance, add extra software etc. to customise it
- Then sysprep /generalize /oobe /shutdown your reference machine
- Map a drive to your master .WIM file, or a USB disk etc.
- Append the changes to the master .wim file (remembering to use the /APPEND switch; if you just use /CAPTURE you will OVERWRITE your .wim file and be very sad.. Did it twice before I learnt to backup the .WIM file before hand!
- Then re-master your DVD – with the appropriate files – I just inject the .WIM file to the Windows PE DVD I made using PowerISO.
Rinse and repeat.
Thanks to this post http://forums.microsoft.com/TechNet/ShowPost.aspx?PostID=1099145&SiteID=17 and this post http://www.svrops.com/svrops/articles/winvistape2.htmI figured it out…eventually!
I need a DVD that automatically applies a .WIM image when WinPE boots – no prompts; just want to press F9 for the BIOS Boot menu and walk away until build is finished.
I built a WinPE 2.0 image the usual way, but I want to add files to it (easy with PowerISO) but I want it to do something when it starts up..
To do this I had to customise the BOOT.WIM file which you use to generate your WinPE ISO file, note you need to edit BOOT.WIM not the WinPE.WIM file.
I used the /MOUNTRW switch for imageX (more details here) to mount the BOOT.WIM file – if you look in it’s WINDOWS\SYSTEM32 directory there is a file called STARTNET.CMD – this is mostly the same as a batch file so you can put whatever commands you want in here, in my case I edited it as follows;
Once the changes are made you can save the changes back using the /UNMOUNT and /COMMIT switches – you’ll then need to rebuild the Windows PE .ISO using OSCDIMG.EXE.
You can then inject files into the .ISO file you’ve generated – you could put them in the BOOT.WIM as above but its quicker and easier to do this via PowerISO (or similar tool) if you are going to need to make changes, rather than recompiling the BOOT.WIM and .ISO files.
This is the BUILDPC.BAT batch file that STARTNET.CMD calls, it prepares the disk and deploys the image file to the local HDD.
diskpart /s d:\sources\wipedisk.txt
Echo applying image
imagex.exe /apply d:\sources\MasterImageFile.wim 1 C:
Echo Image Downloaded, rebooting.
Save the file and burn.. job done.
It’s a good idea to use a virtual machine to test the .ISO file out – and is cheaper than wasting lots of DVD/CD-R’s while you are fine-tuning!
I haven’t had to do this sort of thing for a while and it’s the first time I’ve done it with Vista so here is a list of things I found; mainly for my own memory but hopefully it helps you too.. I only had 24 hours to do this, 50+ new PC’s to deploy to and a lot of other work to do, so I didn’t take the 100% best-practice approach.. but it works.
I wanted to take advantage of the new WIM image format – this is a file based snapshot format that is the default for a new Vista install and allows you to keep several different instances of a Vista installation in the same media. but requires less overall space as it “single-instances” files – for example a traditional Ghost based approach would keep a whole copy of explorer.exe once for every clone; this method just keeps the file once and uses pointers.
My goal is to have the following stored within a single .WIM file; this gives a bit of flexibility as we will be using a variety of these builds – yes it might be a bit more sensible to use a server based software deployment tool like SMS for the apps but we need the ability to support a variety of configurations and off-line/remote use and build for this implementation.
|Build001||Base Vista OS and hardware drivers for the HP PCs we will be deploying to with latest windows updates|
|Build002||As above + Office 2007 Standard VL Version & latest updates|
|Build003||As above + Misc Apps (Acrobat, Flash, AV Etc.)|
|Build004||As Above but with an automated, domain joining Sysprep|
- Windows Automated Installation Kit (AIK) 1Gb! http://www.microsoft.com/downloads/details.aspx?familyid=C7D4BC6D-15F3-4284-9123-679830D629F2&displaylang=en
- Sidenote: I couldn’t get the AIK to install on my Vista laptop, the installer eventually timed out and didn’t install anything; instead i installed it on a Windows2003sp2 VM as that’s all I had handy at the time.
- Windows Vista DVD Physical media or .ISO download from your Microsoft licencing agreement site.
- A lot of Patience
- The following links
Tip: I found it much easier to try all this out using a virtual machine; rather than having to burn DVD’s just to get the config right – you can do this by mounting the .iso file within a disposable virtual machine and boot from the “virtual” CDROM/DVD.
This implementation is going to rely on the OEM licence’s supplied on PCs – but we need to use our own build rather than the rather stodgy one supplied by HP so we can’t script the product key/activation and the user will need to enter it within the 30-days grace period.
I spent a while hacking away with autounattend.xml files using System Image Manager without much luck – this site and this site were handy in figuring out how it worked and I managed a working file once I’d changed the disk partitioning bit from this script
Image Based Installation
Word of warning if you get an installation GUI when the machine boots then it’s ignored the autounattend.xml file but it doesn’t tell you why; there is a bug if you store it on a flash drive – fix here and I couldn’t make it work by storing the file in the root of the DVD and had to resort to a virtual floppy in my test build VM – more information here.
In the end I had to abandon the unattended setup because of time constraints, and it didn’t meet all of my needs anyway so I did a manual Vista install (without entering a product key) and then proceeded with the imaging process as I was hoping to get an application-inclusive “build”; with an unattended install I would have had to script all the application installations which would have probably taken too long.
Firstly you need to create a Windows PE bootable CD – info here and here quick version in step 4). just a word of warning, if you cut & paste the OSCDIMG.EXE command line from the site it won’t work and you’ll get an “Error 5 Access is denied.”
Weirdly this is because the “-” in the command line shown on the web page is the wrong ASCII symbol (assume thats an HTML/browser weirdness) but it will work fine if you type it in manually and you should see the following;
Now, once you’re happy with the reference image and have all the windows updates etc. installed you need to sysprep it to generate a new SID and make it “general”.
Run SYSPREP.EXE and choose OOBE and generalize, then shutdown the reference PC – if you have a sysprep.xml file now is the time to use it.
Now you can boot the Vista “reference” PC from the PE CD and capture the image.
you can keep the image on the same disk as the Vista installation, something you can’t do with Ghost etc.
this is done with the following command;
Imagex.exe /compress fast /capture C: C:\image-name.wim “build001” /verify
When its finished you can copy the resultant .wim file to a removable USB drive or network share (note: PE2.0 seems to support hot-swapping USB flash drives, which is handy – all my previous PEBuilder based CDs would only detect such devices at boot-time.
And you’re done, well you have a master image anyway.. next step would be to apply it to a machine.
Plenty of scope to automate the .WIM image deployment, I want to add it to a PE CD/DVD that the user can boot the machine from, then walk away and have it fully build a machine.