Virtualization, Cloud, Infrastructure and all that stuff in-between
My ramblings on the stuff that holds it all together
Problems Restoring a non-SysPrep Vista Image Using DiskPart & ImageX
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
WIPEDISK.TXT
select disk 0
clean
create partition primary
select partition 1
active
format fs=ntfs quick
assign letter=c
exit
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!
If you didn’t /generalize your install before taking capturing it in ImageX, all is not lost.
You can use a WinPE disk to fix up the boot loader without doing an OS repair. Just boot to the WinPE command prompt, and use these commands:
bcdedit /set {default} device partition=C:
bcdedit /set {default} osdevice partition=C:
bcdedit /set {bootmgr} device partition=C:
Note: “C:” might be something else if you’re booting from an odd place, or have more than one bootable partition. You get the idea, though.