restore windows 2008 R2 to a previous windows 2008 R2 installation on a GPT UEFI bios

Today I had an issue with Windows 2008 R2 fails to boot. After trying multiple times to boot from DVD media and try to repair windows using fixboot fixmbr and rebuildbcd
I took the decision to install a new fresh version of Windows 2008 R2
Later on i found out that the issue is due to FC adapter connected to extenal LUNS and those LUNS are locked by EMC Recoverpoint replication
This server is part of a replication Consistency Group in Recoverpoint
So here are the steps i took to resolve the issue:

1- Remove zoning from SAN Switches.

2- Boot Windows from installation media.
3- Select repair windows
4- boot into recovery console
5- rename existing windows
c:\ren windows windows.new
c:\ren “Program Files” “Program Files.new”
c:\ren “Program Files (x86)” “Program Files (x86).new”
c:\ren Users Users.new

6- move old installation
c:\move /y c:\windows.old\windows c:\
c:\move /y “c:\windows.old\Program Files” c:\
c:\move /y “c:\windows.old\Program Files (x86)” c:\
c:\move /y “c:\windows.old\Users” c:\

7- Assign letter to boot partition
diskpart
select vol 4 (in my case) the 100 MB disk
assign letter=R
exit

8- fix boot
cd /d R:\EFI\Microsoft\boot
ren BCD BCD.old
bootrec /fixmbr
bootrec /fixboot
bootrec /rebuildbcd
you will be asked to add the existing windows installation
Only add the c:\windows installation

9- reboot

Leave a comment