sodcalculator

10 Tech How-To

Restore Windows Partition: Full Step-by-Step Guide

Guide 10-57666 · Updated · Step by step

If your Windows partition is missing, won’t boot, or shows as unallocated space, this guide walks you through restoring it using built-in Windows tools. You’ll learn how to recover a deleted or corrupted partition, rebuild the boot configuration, and get your system running again without third-party software. Before starting, back up any important data if you can, and ensure your PC is plugged into a power source.

What You’ll Need

  • A Windows installation USB drive or recovery drive (for accessing advanced startup tools)
  • Another working computer (optional, for creating the USB drive)
  • Basic knowledge of disk partitions and command line

Step-by-Step

  1. Boot from your Windows installation USB – Insert the USB, restart your PC, and press the boot menu key (often F12, Esc, or F2) to select the USB drive. If you don’t have a USB, you can try using the Windows Recovery Environment (WinRE) by pressing Shift + Restart from the login screen.
  2. Open Command Prompt – In the Windows Setup screen, click “Next,” then “Repair your computer” in the bottom-left corner. Go to Troubleshoot → Advanced options → Command Prompt.
  3. Identify the missing partition – Type diskpart and press Enter. Then type list disk to see all drives. Select the disk that contains your Windows partition (usually Disk 0) with select disk 0. Then type list partition to see existing partitions. If your Windows partition appears as “Partition 1” but is not assigned a drive letter, it may just be hidden.
  4. Assign a drive letter (if partition exists but is hidden) – If you see an unlabeled partition with the right size, select it with select partition 1 (replace 1 with the actual number), then type assign letter=C. Exit diskpart with exit. Now check if Windows boots – if it does, you’re done. If not, continue.
  5. Rebuild the Master Boot Record (MBR) – If your partition is there but Windows won’t boot, the boot sector may be corrupted. In Command Prompt, type the following commands one by one, pressing Enter after each:
    bootrec /fixmbr
    bootrec /fixboot
    bootrec /scanos
    bootrec /rebuildbcd
    If you get an “Access is denied” error on /fixboot, skip it and continue.
  6. Rebuild the BCD store manually (if needed) – If /rebuildbcd fails, type these commands to recreate the boot configuration data:
    bcdedit /export C:\BCD_Backup
    ren C:\boot\BCD BCD.old
    bootrec /rebuildbcd
  7. Check for a missing or corrupted bootmgr – If you see “bootmgr is missing,” copy the boot manager from the USB. In Command Prompt, type cd /d X:\ (where X is your USB drive letter, often D or E). Then type copy bootmgr C:\. If that fails, you may need to run bootsect /nt60 C:.
  8. Restore a deleted partition (if it shows as unallocated) – If your partition is missing entirely, you can try to recover it using diskpart. Type diskpart, then list disk, select disk 0, then list partition. If you see an “Unallocated” space, you cannot restore it with built-in tools alone – you’ll need a third-party recovery tool (see Troubleshooting). However, if the partition is just hidden, the assign letter step above will fix it.
  9. Exit and restart – Type exit to close Command Prompt, then click “Continue” or restart your PC. Remove the USB drive and let Windows boot normally.

Common Mistakes

  • Selecting the wrong disk – Always double-check with list disk and verify the size. Running commands on the wrong disk can destroy data.
  • Skipping the backup – Even though you’re using recovery tools, mistakes can happen. Always back up if you can access the drive.
  • Using clean or delete partition accidentally – These commands wipe data irreversibly. Never use them unless you intend to erase the disk.
  • Ignoring the “Access is denied” error – This often means you’re not in the right environment. Make sure you’re booted from the USB and not from Windows itself.

Tips

  • Use the 64-bit version of Windows Setup – Some older 32-bit recovery tools may not work with modern disks.
  • Run chkdsk after recovery – Once you boot back into Windows, open Command Prompt as administrator and run chkdsk /f C: to check for file system errors.
  • Create a system repair disc – After everything is fixed, create a recovery drive to avoid needing a full installation USB next time.
  • Write down your disk layout – Knowing which partition is which (EFI, Recovery, Windows) can help you make better decisions.

Troubleshooting

If the partition is still missing after diskpart: Your partition may have been deleted or the disk structure is damaged. In that case, you’ll need a third-party partition recovery tool (like TestDisk or MiniTool Partition Wizard) that can scan for lost partitions. These tools are outside the scope of this guide, but they generally work by scanning the raw disk for file system signatures.

If Windows still won’t boot after rebuilding BCD: Try the bootrec /fixboot command again, but this time after running diskpart and selecting the system partition (the small 100MB EFI partition). Assign it a letter, then run bootrec /fixboot again.

If you get “The system cannot find the path specified” when running bootrec: This usually means the boot files are on a different drive. Use diskpart to list volumes and find the drive with the Windows folder, then run bootrec from that context.

If your PC boots to a blue screen with an error like INACCESSIBLE_BOOT_DEVICE: This indicates a driver issue or a corrupted system file. Try running sfc /scannow from the recovery Command Prompt after repairing the boot sector.

Frequently Asked Questions

Will this delete my files?

No, the steps in this guide are non-destructive. They only repair boot records or assign drive letters. However, if you accidentally run clean or delete partition, you will lose data, so be careful.

What if I don’t have a Windows installation USB?

You can create one using the Media Creation Tool from Microsoft on any working PC. You need a USB drive with at least 8GB of space.

Can I restore a partition that was deleted?

If the partition was deleted (not just hidden), built-in tools cannot recover it. You’ll need third-party software that scans the disk for remnants of the partition table. The sooner you stop using the drive, the better the chances.

Why did my partition disappear in the first place?

Common causes include a power outage during a write operation, a failed Windows update, accidental deletion in Disk Management, or malware. Sometimes it’s just a corrupted boot configuration.

How long does this process take?

The commands themselves take only a few minutes. The most time-consuming part is booting from the USB and creating it if you don’t have one.

Do I need to be a computer expert?

No, but you should be comfortable typing commands and following instructions. If you feel unsure, consider asking a friend who is more technical to help.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →