Restoring the older OS in case the Upgrade fails
Hi again everyone,
You tried upgrading to Windows 8 or Windows Server 2012, but something bad happened midway. You didn’t take a backup when you started. Can you go back?
Sure you can. Starting with Windows Vista, we actually save all files from the previous version of Windows in a folder called Windows.old on the root of the C drive. Assuming that something went wrong the installation and your machine is in no boot condition, the first thing you should do is to boot into the Windows 8/Server 2012 media and check the state of the partitions on the disk, and ensure that the Windows.old folder exists. If you have this folder, you can always roll back the system to the earlier configuration. All you need to do is move the contents of this folder to the root, and replace the boot files in the system reserved partition. The steps below should work if the earlier operating system was Windows 7, Server 2008/2008R2 or Vista.
Step 1: Boot into the Windows 8/Server 2012 media and determine if the Windows.old folder exists.
Insert the media and reboot the machine. Once the setup starts, choose the keyboard and language and click next. Once you get to the “Install Now” page, click on the Repair your computer option on the lower left screen.
In the next screen, choose the “Troubleshoot” option and then click use the Shift+F10 key combination to launch the command prompt. You can also use the Shift+F10 key combination to open the Command prompt.
At the Command prompt use Diskpart, and list the volumes using “list volume” command. Note the drive letter and sizes of the volumes.
Ensure that the boot and system volumes are assigned drive letters.
If the partition does not have a drive letter, you need the select the volume using “sel volume #” (where # represents the volume number) and then assign a drive letter using “assign letter=X”. Then exit from Diskpart, by typing “exit”
Launch Notepad.exe from the command prompt, and use the File > Open dialog box. Change the file types to show all files. You can use this to browse the drives and ensure that your files are intact in the old installation.
In my case, the 100MB(C drive) System Reserved Partition is where I need to move my boot files for the earlier installation. The 49GB partition (D drive) contains the Windows.old folder, along with any files from my new installation. The drive letter you see here may be different from the actual drive letter for the volume.
Step 2: Moving the Windows 8/Server 2012 folders.
From the command prompt, we will create a folder called Windows.New and move the files from the failed installation to this folder. Since my original C drive appears as D drive in the recovery command prompt, I would need to go to D: to make my changes. If you have a different drive letter, for your boot volume, use that drive letter for the commands below.
Type the following commands at the command prompt and press Enter after each command:
move /y “Program Files” D:\Windows.New
move /y “Program Files (x86)” D:\Windows.New
move /y Users D:\Windows.New
move /y Windows D:\Windows.New
move /y *.* D:\Windows.New
We will leave the other folders to be overwritten, as the new installation is no longer important to us. Also note that Program Files (x86) is only present on 64-bit machines. You can use the same File > Open Dialog box in notepad to do the Copy, however this does not show you any progress indicators, notepad will appear hung while the copy is in progress in the background. You would have to continuously refresh the view to find out when the copy has completed and notepad becomes responsive again. Also, hidden files are not visible in this view.
Step 3: Move the visible contents of the Windows.old folder to the root of the drive, and xcopy all the others including system files and hidden files.
move /y D:\Windows.old\Windows D:\
move /y D:\Windows.old \Users D:\
move /y “D:\Windows.old\Program Files” D:\
move /y “D:\Windows.old\Program Files (x86)” D:\
xcopy /S /R /H /Y D:\Windows.old D:\
Step 4: Restore the System Reserved Partition and boot sector for the previous Windows installation.
You can copy the bootable files from the given image using bcdboot. The C drive is the system-reserved partition. If Diskpart output in step 1 showed a different drive letter for the system-reserved partition, use that drive letter. To write the boot sector for the partition, you can use a tool called BootSect.exe that comes with the Recovery Command prompt. (This tool is available in the Boot folder on the DVD)
bcdboot D:\Windows /s C:
bootsect /nt60 C:
Close the Command prompt and click the Back Arrow next to the Advanced Options Heading. Then click Turn Off your PC. After the Machine is turned off, power it on again and you should see the machine booting back to the earlier version of Windows. Make sure you copy any other files from the Windows.New folder before deleting this permanently.
Windows Core team @ Microsoft