diskpart
list disk
sel disk 0
list partition
sel partition 1
detail partition
active
exit
Select the small System Reserved partition (or the Windows partition if there is no System Reserved), not partition 1 blindly. Then reboot.
Unplug every USB drive, external disk, SD card, and disc, then reboot. If Windows starts, the firmware was booting the wrong device. Enter BIOS/UEFI setup (usually Del, F2, or Esc at power-on) and put the Windows drive first in the boot order. If you see the error while booting a Windows install USB, use the one-time boot menu (often F12) and pick the USB’s UEFI entry instead of the legacy one.
In BIOS setup, check that the Windows drive is listed with its correct model and size. If it’s missing or shows a wrong size, power off, reseat the SATA/M.2 connection and cable, and check again. A drive the firmware can’t read properly will not be fixed by any command below.
This error appears before Windows loads, so forced restarts usually won’t open Automatic Repair. Boot from a Windows 10/11 install USB, choose Next → Repair your computer, then Troubleshoot → Advanced options. Try Startup Repair first and reboot. If it fails, return to Advanced options → Command Prompt.
Run diskpart, then list disk. A * in the Gpt column means the disk is GPT — GPT disks have no active flag, so the firmware should be booting it in UEFI mode; set UEFI boot mode in BIOS and see the bcdboot rebuild rather than continuing here. For an MBR disk:
sel disk 0
list partition
sel partition 1
detail partition
Run sel partition and detail partition for each partition and note the Active line. The System Reserved partition (typically 100–500 MB) should be the only one showing Yes; if there is no System Reserved partition, the Windows partition should be. To fix it, select the correct partition and run active. If a second partition also shows Active: Yes, select it and run inactive. Then exit and reboot.
If the active flag is correct and the error persists, rewrite the boot code from the same Command Prompt:
bootrec /fixmbr
bootrec /fixboot
bootrec /scanos
bootrec /rebuildbcd
Type Y if /rebuildbcd offers to add a Windows installation. Know the limit: bootrec /fixmbr overwrites only the master boot code, not the partition table. If the partition table itself is damaged, this step won’t fix it.
If list partition shows no partitions or unallocated space where Windows used to be, or list volume shows the Windows volume as RAW, the partition table is damaged or the drive is failing. Do not create, delete, clean, or convert anything. Run the drive maker’s diagnostic, image the disk to a healthy drive, and work on the image with a partition-recovery tool such as TestDisk or hand it to a recovery service. If a volume is still visible, you can check it with chkdsk C: /f (use the Windows drive letter shown in WinRE) — but only after you have an image.
bootrec or chkdsk. Some guides tell you to run clean and convert gpt in diskpart — that erases every partition. Never do it on a disk holding data you need, and never run repairs on the only copy of irreplaceable data.
Yes, as long as you have a Windows install USB. WinRE normally lives on the broken PC itself, but because this error stops the boot before Windows loads, you will usually reach it by booting any Windows 10/11 install USB and choosing Repair your computer. Every command on this page runs there. No second computer is needed for the repair. (GRAM runs inside Windows rather than from boot media — use it once the machine boots to verify disk health and confirm the root cause.)
No. active and inactive change only the boot flag in the partition table, and bootrec rewrites boot code and boot configuration, not your files. The risk is marking the wrong partition active, which can stop the PC from starting until you correct it. Image the drive first if the data is irreplaceable.
The message comes from MBR boot code, which only runs when the firmware boots a disk in Legacy/CSM mode. On a UEFI PC it usually means the firmware fell back to legacy booting of a USB stick or a second disk. Unplug extra drives, set the Windows drive first in the boot order, and boot install media through its UEFI entry.
Not necessarily, but it’s a warning sign. bootrec /fixmbr replaces only the boot code; if the partition table itself is damaged, it can’t help. Check whether diskpart still lists your partitions and run the drive maker’s diagnostic. Missing or RAW partitions mean you should image the disk and use partition-recovery tools on the copy.
Related: BOOTMGR is missing · Operating system not found · All Windows boot error codes