You may need to repair Windows Server 2008 r2 using command prompt due to many reasons, such as corrupted MBR, partition table, boot sectors, boot manager, boot configuration data, etc. Then, you may wonder how to repair it and get your system back to life.
You can first do some basic repairs like startup repair, boot directory repair, and windows directory repair. Then, if the problem is related to boot files, you can use bootrec exe in Windows Server 2008 r2.
However, sometimes, when the error is too serious to recover from basic repair. For example, you cannot boot because of system failures. You can create a recovery disk and go to the recovery environment for repair instead of within Windows.
In this article, I will show you how to repair Windows Server 2008 R2 step by step with different command prompts. Please stay for a while and check the detailed steps in the following.
1. Insert the installation disc that comes along with your computer. Then, restart your computer to BIOS and set it as the first boot option, save changes and reboot.
2. After the installation files loading, choose your preferences (language, time, and keyboard) and then click “Next”.
3. Click “Repair your computer” at the lower-left corner.
4. Then, select the default operating system, here maybe Windows Server 2008 R2.
5. In the System Recovery Options windows, choose “Command Prompt”.
Please note that the drive letter in the recovery mode may be a little different, as it follows the first-come, first-served principle. Thus, before repairing your server 2008 R2, you need to find where Windows is installed in case you need it.
Type diskpart and then list volume in the command prompt window, you will see all the volumes available on the disk and find your system drive.
Then, in the command prompt windows, go to X:\sources\recovery> startrep.exe. Just wait until the process completes, it will resolve the registry file issues.
Also you can type chkdsk C: /f /r to fix errors the disk and then locate bad sectors and recover readable information. If you are asked to run this command at the next startup, type y and then restart your computer.
Or you can use sfc /scannow to repair boot files issue. Type sfc /scannow /offbootdir=c:\ /offwindir=c:\windows and hit Enter to run it.
If the sfc /scannow is not working, you can still use DISM command line. Type as: DISM /image:D:\ /cleanup-image /revertpendingactions. (D: is the drive letter of your system drive. )
In addition, you still can use bootrec exe in the server 2008 R2, it's used to repair corrupted mbr, boot sector, and bcd files. Type as follow and hit Enter to execute in order.
As above mentioned, if the error is so serious that basic repair cannot work, you can run Windows Server 2008 R2 system restore with command line. To do this, you need to create a system image backup first.
To restore a system image created at at 13:29 pm in 07/09/2017 and saved on the E drive. You can type the following command in the command prompt window and hit Enter.
wbadmin start systemstaterecovery –version:07/09/2017-13:29 –backuptarget:E:
This works in most cases, but you have to know that the system image backup created by wbadmin is limited to the current computer. If you want to restore the system image to another computer, it will not work. Don't worry about it, you can ask a reliable server backup software - Qiling Disk Master Server for help.
Except for the above ways, you can still use a reliable server backup software - Qiling Disk Master Server, which allows you to create a system image backup in Windows Server 2008, 2008 R2, 2012, 2012 R2, 2016, 2019, 2022, and Windows 7, 8, 8.1, 10, 11, etc., then restore system to your computer. The best part is you can restore system to new computer with dissimilar hardware.
If you cannot boot a PC, you can still create a bootable media with this software and use it to boot your computer into recovery mode. Then, in the main interface of Qiling Disk Master Server, click Tools and open the command line.
Then, navigate to Qiling Disk Master installation directory, type as: cd [installation path of Qiling Disk Master], and press Enter. For example: cd C:\Program Files\Qiling Disk Master.
The drive letters might change under Windows PE environment.
Next, run the following command to Proceed: DiskMasterUI /r /t [backup type] /s "[backup location path]" /d [destination location].
1️⃣ For example: To restore the system backup saved in D:\system backup to disk 2, please type the following command and hit Enter.
DiskMasterUI /r /t system /s “D:\system backup\systembackup1.fvd” /d 2
If you want to restore to another computer, Qiling command line still can do this for you.
2️⃣ For example: Restore the system in the image named "systembackup1.fvd" to partition 0 on disk 0 and perform a universal restore.
DiskMasterUI /r /t system /s "D:\system backup\system backup2.fvd" /d 0:0 /x
Using command prompt to repair Windows Server 2008 is relatively technical, and is not friendly to many users, especially for novices. So if you are not familiar with the command prompt, try Windows backup software like Qiling Disk Master Server based on a graphic user interface.
Before start, please be sure the following two items:
Step 1. Connect the disk containing a system image backup. Then, Boot your computer into the recovery environment, and access Windows Server backup software - Qiling Disk Master Server. Click Restore and Select Task to find the image file.
Step 2. Select the backup image you want to restore and click Next. If you cannot see any backup in the following window, go back and click Select Image File to manually choose the backup image.
Step 3. Select Restore this system backup and click Next.
Step 4. Confirm the operation summary and click Proceed to repair Windows Server 2008 R2.
As you can see from above, you have serveral ways to repair Windows Server 2008 R2 using command prompt, select the one according to your situation and the cause for the no boot issue. Among them. Qiling.exe has better compatibility, which not only allows you to restore system to the current computer but also new computer with dissimilar hardware. In addition, it still has a graphic user interface to make this process easy.
Except for the backup and restore feature, it is also a professional disk clone software to help you clone Windows Server 2008 R2, 2012, 2016, 2019, etc. easily and without effort. Its advanced version Qiling Disk Master Technician Plus can help you protect unlimited PCs and servers within one company. It offers unlimited billable technical services to clients as well as enables you to copy the installation directory for portable version creation.