Friday, July 29, 2011

No Repair Install in Windows Vista, Windows 7?

Is there a way to perform a repair installation on Windows Vista or Windows 7? In Windows XP, you could boot from the installation media, press enter to install, accept the license agreement, and press R to repair your installation (some would call this a dirty install or an upgrade install). This option does not appear to exist in Windows Vista and Windows 7. From what I've read, the reason the repair installation option doesn't exist is that Windows Vista and Windows 7 deploy from a Windows Image (install.wim), so now you don't really install Windows, you image Windows down to your computer.

Watching the Windows XP repair process, I notice it deletes files then recopies them. Could you in effect perform a repair install by copying certain files (like the registry files) to another directory, have the Windows install write over them, then copy them back or merge the difference? Has someone created a repair installation tool?

There are some repair tools that can be run in Windows Vista and Windows 7, but they don't appear to be analogous to the repair install. You can boot to the installation media, choose Repair My Computer, pull up a command prompt and type the following commands, but neither the Offline System File Checker nor Startup Repair have fixed the issues I have tried to fix:
sfc /scannow /offbootdir=d: /offwindir=d:\windows
x:\sources\recovery\startrep.exe

Thursday, July 7, 2011

Directory Services Restore from Physical to Hyper-V Virtual Windows Server 2003

I ran across a strange issue when trying to recover a Windows Server 2003 Active Directory system state backup from a physical server to a Hyper-V Virtual Server. I had to install the Hyper-V Integration Services, uninstall Hyper-V Integration Services before I restored, then reinstall Integration Services. I don't think this would occur in Windows Server 2008 or 2008 R2.

I did the following:
1) Backup the system state of a physical server using ntbackup (replaced by Windows Server Backup or wbadmin in Windows Server 2008 and above).
2) Install Windows Server 2003 with Service Pack 2 on the destination virtual machine.
3) Install Hyper-V Integration Services on the virtual machine.
4) Make sure the Virtual Machine is NOT on the production network (Internal/Private Virtual Network).
5) Click add role, choose Directory Services (Active Directory) as the first server using the same domain name being restored (also same computer name and static IP address).
6) Add other used roles (we had installed WINS).
7) Remove Integration Services .
8) Restart in Directory Services Recovery Mode (Press F8 between the boot screen and before the Windows boot screen and select DSRM).
9) Restore the system state using ntbackup
10) Restart into Safe Mode (to allow Windows to detect the hardware changes).
11) Insert the Windows Server 2003 install CD and repair Windows.
12) Reinstall Hyper-V Integration Services.

These steps reflect my own experiences. I'm just experimenting. Do not use or rely upon it. Instead, refer to Microsoft's documentation (knowledge base, MSDN, or TechNet artiles) and professionals for the correct policies and procedures. There are better ways to go from a physical server to a virtual server (like Microsoft System Center Virtual Machine Manager 2008 R2).