Repair Windows Server 2008 R2 using Command Prompt Easily

You will learn x ways to repair Windows Server 2008 R2 using command prompt and get your computer back normally. Also works for server 2012 R2/2016 R2/2019/2022.

Ivy

by Ivy Updated on December 13, 2023

Share this: instagram reddit

Reasons and solutions for Windows Server 2008 R2 no boot issue

You may need to repair Windows Server 2008 r2 using command prompt due to many reasons, such as corrupted MBR, partition tableboot 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. 

How to repair Windows Server 2008 R2 using command prompt

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. 

Part 1: Get to the command prompt window in the recovery environment

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. 

Repair Your Computer

4. Then, select the default operating system, here maybe Windows Server 2008 R2.

5. In the System Recovery Options windows, choose “Command Prompt”.

Command Prompt

Part 2: How to repair Windows Server 2008 R2 operating system step by step 

Way 1: Repair Windows Server 2008 R2 using command prompt (Basic Repairs)

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. 

List Volume

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. 

Startup Repair

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.

Chkdsk

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. 

SFC Offline Repair

⚠️Notes:
  • Thesfc /offbootdir is tospecify the location of the offline boot directory.

  • Run sfc /offwindiris tospecify the location of the offline windows directory.

  • The data stored on USB drive will be erased in the process, so it’s better to use an empty USB. Otherwise you can backup the USB drive first.

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. )

Dism Revert

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.

  • Bootrec /fixmbr
  • Bootrec /fixboot
  •  bootrec/scanos
  • bootrec/rebuildbcd

Bootrec

Way 2: Repair Windows Server 2008 R2 operating system using System Restore

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:

Repair Windows Server 2008 R2 Using Command Prompt

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 - AOMEI Backupper Server for help. 

Way 3: Repair Windows Server 2008 R2 through AOMEI.exe command prompt 

Except for the above ways, you can still use a reliable server backup software - AOMEI Backupper 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 AOMEI Backupper Server, click Tools and open the command line. 

If the Windows Server 2008 R2 is bootable and doesn't have any device in hand, you can add a boot option with the help of the Recovery Environment feature in AOMEI Backupper. It will take effect from the next startup and allow you to perform backup/restore.

Then, navigate to AOMEI Backupper installation directory, type as: cd [installation path of AOMEI Backupper], and press Enter. For example: cd C:\Program Files\AOMEI Backupper.

AOMEI Command Line

The drive letters might change under Windows PE environment.

Next, run the following command to start restore: AMBackup /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. 

AMBackup /r /t system /s “D:\system backup\system backup.adi” /d 2

If you want to restore to another computer, AOMEI command line still can do this for you.

2️⃣ For example: Restore the system in the image named "system backup2.adi" to partition 0 on disk 0 and perform a universal restore.

AMBackup /r /t system /s "D:\system backup\system backup2.adi" /d 0:0 /x

Easier way to repair Windows Server 2008 R2 without command prompt🔥

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 AOMEI Backupper Server based on a graphic user interface.

Before start, please be sure the following two items:

  • You have an available system backup.
  • You create a recovery disk for Windows Server 2008 R2.

Step 1. Connect the disk containing a system image backup. Then, Boot your computer into the recovery environment, and access Windows Server backup software - AOMEI Backupper Server. Click Restore and Select Task to find the image file.

Select Task

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.

Select Backup Image

Step 3. Select Restore this system backup and click Next.

Restore Entire Backup

Step 4. Confirm the operation summary and click Start Restore to repair Windows Server 2008 R2. 

Universal Restore

⚠️Notes:
  • If you want to restore Windows Server backup to different computer having dissimilar hardware., this software will check the"Universal Restore" feature by default to resolve the incompatible drivers issues and ensure you can successfully boot from the new computer.

  • This software supports almost all the Windows Server systems, from 2003 to 2022, so you can use it to restore Windows Server 2012 R2 to previous date as well as other systems.

Supplement: Best enterprise backup and recovery solution👍

If you are an enterprise user who has multiple server devices that need to be backed up, try the best backup software for businesses of all sizes, AOMEI Cyber Backup.

  • It enables you to create system/disk/partition backup for a bunch of Windows PCs and Servers from one central console.
  • You can schedule a backup task to run daily/weekly/monthly using the full/incremental/differential backup method.
  • You are allowed to restore the backup image to the same computer or different computer.
  • If your backup has multiple versions, you can choose to restore from any point you want.

Download this powerful enterprise backup software now!

Download Free TrialEasiest Enterprise Backup Software
Secure Download

To make backups for client computers, just log in AOMEI Cyber Backup, and add the Windows device that you want to backup. Then click Backup Task on the left menu bar and select Backup Task Create New Task.

Create New Task

To restore data on client computers, you need to click Backup Task on the left menu bar and click the three dots icon on the task you want to restore. Then select Restore from the drop-down menu.

System Restore

Note: AOMEI Cyber Backup can not only help you backup physical machines but also virtual machines. It enables you to backup VMware and Hyper-V easily.

Start your repair now

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. AOMEI.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 AOMEI Backupper 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.

Ivy
Ivy · Editor
Ivy is an editor of AOMEI Technology, she covers backup & restore,hard disk & partitions management and cloud files transfer and so on for AOMEI. She is an outgoing girl and enjoys helping people find solutions to their problems. She loves traveling, eating, reading and so on. She usually hangs out with friends at her leisure time.