Wednesday, April 1, 2015

Windows Server: How to Repair the Boot Files in Windows Server 2008 or 2008 R2 if the Server Won't Boot

here are a number of possible causes for the failure of a server to boot into Windows. This article deals with a problem in the boot files and demonstrates how to repair them.

Solution
IMPORTANT: Drive Letters Change in WinRE
When booting to the Windows Recovery Environment (WinRE), the drive letters are assigned on a first-come, first-serve basis. For example, the C: drive in Windows will often have a different letter in WinRE. The DiskPart utility can be used to keep track of the drives and what is stored on them.
Restoring Boot Files
Note: If there is no System Reserved partition. It is okay to select the drive containing the Windows folder .
· First Partition: 100 MB System Reserved (No drive letter)
· Second Partition: 60 GB (C:) OS
· Third Partition: 1.5 TB (D:) Data
· DVD Drive: E:
Note: The DVD drive's letter changes from E: to F: in WinRE.
1. Boot to the Windows Server DVD.
2. Open the command prompt.
a. Server 2008 R2
i. If no driver is needed, press Shift-F10 to open the command prompt.
ii. Continue with step 3.
b. Server 2008 (or 2008 R2 if a driver is required)
i. Click Next at the first screen.
ii. Click Repair your computer.
iii. If no driver is needed, click Next and proceed to step vii below.
iv. If a driver is needed, click Load Drivers.
v. Insert the media containing the needed driver.
Note: The media can be a CD, DVD, or USB storage device
vi. Navigate to the folder containing the driver, select it, and click Open.
vii. Click Command Prompt.
3. The command prompt appears.
Set the partition as active
4. Type DiskPart at the command prompt.
5. Type List vol at the DiskPart prompt.
6. Write down the drive letter of the DVD drive. In this example, it is F.
7. Write down the drive letter of the system reserved drive. In this example, it is C.
8. Type Select vol 1 (assuming volume 1 is the System Reserved volume, as it is here).
9. Type active. This sets the selected volume as active.
10. Type exit to return to the command line.
Copy Boot Manager
IMPORTANT: Replace the following example drive letters with the actual drive letters obtained in steps 5 and 6 above.
11. Type Copy f:\BootMgr c:\ at the command prompt. One of two things will happen:
a. If the file Bootmgr already exists on C:, type N to avoid overwriting it.
b. If the file Bootmgr doesn't already exist on C:, it will be copied.
BootRec /FixMBR
12. Type Bootrec /Fixmbr at the command prompt.
BootRec /Fixboot
13. Type Bootrec /Fixboot at the command prompt.
Bootrec /rebuildBCD
14. Type Bootrec /rebuildBCD at the command prompt.
a. If no OS is found, the following appears:
This means that one of the following is true:
* The boot configuration database (BCD) already exists.
* The OS is not there.
* The OS is damaged beyond the ability of BootRec to recognize it.
b. If BootRec /RebuildBCD succeeds, it will list any installations of Windows that it found. Press Y to accept and add them to the BCD.
The server is now configured to boot from the proper partition. Close the command prompt and reboot the system into normal mode.

No comments:

Post a Comment