I am working on Windows Server 2012 VMware, I tried to expand the OS drive as mentioned at How to Expand Virtual Machine Hard Disk & Extend the Operating System Drive in Windows Server?
Then I turned off the VM, power it on again, but unfortunately, I got the following error :
The Boot Configuration Data for your PC is missing or contains errors.
Cause:
In my case, the BCD file is corrupted because of the Extending operation for the Operating system Active partition.
Solution:
One of the suggested solutions is running the Automatic/StartUp Repair, but in my case, this does not solve the issue!
So I tried to rebuild the BCD file via the Bootrec.exe tool by doing the following:
- Power Off the VM.
- Go to VM Settings from left side >hardware tab > CD/DVD > Browse.
- Locate the Windows Server 2012 R2 media (ISO/DVD).
- Note: It should be the same Windows version.
- Set the default boot device to CD/DVD via the following:
- Power On VM > Press F2 to go to Bios Setup > Boot Menu > Select CD-ROM Drive and press + to go up as shown below.
- Press F10 to save and exit.
- The VM should be now restarted directly, and the following window should be shown > Press any key to boot from CD.
- Select your language and click next.
- Click Repair your Computer.
- Click Troubleshoot.
- Click on Command Prompt
- The Command Prompt should now be started > Type the following command to rebuild BCD
bootrec /RebuildBcd
- Close CMD > Click on Continue.
- The windows server should be now booted successfully.
Note: In some cases, you might need to run “Bootrec” command before rebuilding the BCD file with the following options:
- bootrec /FixMbr
- bootrec /FixBoot
Let’s now talk about The Bootrec.exe tool options in details.
The Bootrec.exe tool supports the following options. Use the option that’s appropriate for your situation.
- /FixMbr
- This option writes a Windows 7 or Windows Vista-compatible MBR to the system partition. It does not overwrite the existing partition table. Use this option when you must resolve MBR corruption issues, or when you have to remove the non-standard code from the MBR.
- /FixBoot
- This option writes a new boot sector to the system partition by using a boot sector that’s compatible with Windows Vista or Windows 7. Use this option if one of the following conditions is true:
- The boot sector was replaced with a non-standard Windows Vista or Windows 7 boot sector.
- The boot sector is damaged.
- An earlier Windows operating system was installed after Windows Vista or Windows 7 was installed. In this situation, the computer starts by using Windows NT Loader (NTLDR) instead of Windows Boot Manager (Bootmgr.exe).
- This option writes a new boot sector to the system partition by using a boot sector that’s compatible with Windows Vista or Windows 7. Use this option if one of the following conditions is true:
- /ScanOs
- This option scans all disks for installations that are compatible with Windows Vista or Windows 7. It also displays the entries that are currently not in the BCD store. Use this option when there are Windows Vista or Windows 7 installations that the Boot Manager menu does not list.
- /RebuildBcd
- This option scans all disks for installations that are compatible with Windows Vista or Windows 7. Additionally, it lets you select the installations that you want to add to the BCD store. Use this option when you must completely rebuild the BCD store.
For more details check Use Bootrec.exe in the Windows RE to troubleshoot startup issues.
just wanted to say “thanks” 😉
LikeLike
Thanks Bro its shorted out my issue
LikeLike
Glad to hear that 🙂
LikeLike
Thank you Very much for posting the solution. It really saved a lot of time and effort
LikeLike
you are welcome, glad to hear it helped you
LikeLike
This saved me, many thanks! Had the same error as shown in your screen grab
LikeLike
Most welcome, glad to hear it helped you
LikeLike