Fix reboot loop after a fail upgrade of Windows 10, Version 2004, Build 19041
Microsoft released the Windows 10 May 2020 update. The most compelling feature is the Windows Subsystem for Linux version 2 (WSL2), which uses the latest and greatest in virtualization technology to run a Linux kernel inside of a lightweight utility virtual machine (VM).
The WSL2 has a faster File IO performance and 100% system call compatibility, compared to the WSL1 1. Program Manager Craig Loewen 2 at Microsoft demonstrated the WSL2 is about 5-6 times faster than the WSL1. He also performed running an app from inside a container using Docker Desktop for Windows and debug it using VS Code. It’s great news for developers 👨💻.
To enable the WSL2, your operating system must be Windows 10, Version 2004, Build 19041 or higher.
You can find your build number by pressing the Start button or Win + R keys, and then type in winver 3 and hit the Enter key.
It will show the About Windows dialog. For example, the above screenshot has a Windows 10, Version 1903, Build 18362. This means an update to Windows 10 May 2020 Update is required. I recommend you to watch the video below, which introduces how to get the update by Windows engineer Savitha Quadros.
This browser does not support the YouTube video player. Watch on YouTube
Open the Windows Update from the Control panel. If you see "Download and install" as the screenshot below, your device is ready for the update. You can click on it to run the process in the background. The updater will ask you to reboot your device when it finishes the job. 🥳👏
DO NOT Try To Force Update Your Windows 10
However, you may see the warning sign as shown in the screenshot below. This indicates that it will have issues during updating or starting. Click on the "Learn more" button in the Windows Update settings. One of my PCs associates with that. I tried to work around by downloading the ISO image file and manually update the Windows from a USB drive. BOOM!… 💥 I crash my operation system. Thus, I don’t recommend you force update your Windows 10 to the new build.
When the update fails, the boot loader will try to restore your previous version of Windows. Unfortunately, my Windows 10 gets stuck to a boot loop displaying a black screen with the message Restoring your previous version of Windows… 😱
Fix Reboot Loop After Fail Windows Upgrade
Many search results relate to this issue, if you google it. However, I found most of them did not work for my computer.
Eventually, I troubleshot the problem by repairing the boot configuration data (BCD) in the EFI partition for Windows 10. To do that, you need a Windows 10 repair disc or a Windows 10 installation USB drive. If you don’t have one, use another computer to visit Download Windows 10 on the Microsoft website. Then, download and run the Media Creation Tool to create a bootable USB or DVD. After preparing the repair media 📀, move it to the fault machine and boot up to the Windows Startup Repair mode.
In the Advanced options, select the Command Prompt option. Use the following commands to identify the partitions:
- X:\>
diskpart
- DISKPART>
list disk
- DISKPART>
select disk 0
* or the number for the boot disk that has the EFI partition - DISKPART>
list partition
- DISKPART>
select partition 1
* or the number for the EFI partition, which usually is only a few hundred MB in size - DISKPART>
assign letter=S
- DISKPART>
exit
Next, change the current path to the partition and use the bcdboot
command to repair the damaged boot files:
- X:\>
S:
- S:\>
bcdboot D:\Windows /s S: /f UEFI
* replaceD:
with the letter for the partition that has the Windows system - S:\>
exit
Reboot your computer, the Windows 10 will start normally if the fix works.
Useful External Links:
If you are new to WSL, here is an article about what you can start with:
-
3 Fun Linux Tools to Run on Windows 10 With WSL | How-To Geek
- 🌞 Get the Weather in the Terminal
- ⚾ Get Major League Baseball (MLB) Scores with MLB’s Stats API
- Read Twitter on the Command Line using Python
Footnotes: