Fix Windows Booting From D Drive Instead of C
In this article
Windows is booting from D: instead of C: because the boot configuration or the drive letter assignment is wrong. The fix is to rebuild the boot files on the correct drive and correct the letters in Disk Management. You will need a Windows installation USB (or recovery drive), about 30–60 minutes, and a backup of important files. The steps below assume Windows 10 or 11; menu labels can differ slightly by version, device, or region.
What You'll Need
- A Windows 10 or 11 installation USB or recovery drive (8 GB or larger).
- Administrator access to the PC.
- A backup of important files on both C: and D: (drive-letter changes can break shortcuts and some apps).
- Patience: you may need to restart several times.
Step-by-Step
- Back up your data first. Copy personal files from C: and D: to an external drive. Changing drive letters or rebuilding boot files can make some programs stop working until they are reinstalled or reconfigured.
- Check the current boot order and drive letters. Open Disk Management (right-click Start > Disk Management). Note which disk holds Windows (usually the one with the EFI or System Reserved partition) and which letters are assigned. If D: is marked as the boot drive, that is the problem.
- Create a Windows installation USB. On another working PC, use the official Media Creation Tool from Microsoft to make a bootable USB. If you already have a recovery drive, you can use that instead.
- Boot from the USB. Restart the PC and enter the boot menu (often F12, F11, Esc, or Del during startup; the exact key varies by manufacturer). Select the USB drive. If you do not see it, enable USB boot in the BIOS/UEFI settings.
- Open Command Prompt from the installer. On the first setup screen, press Shift+F10 to open a command prompt.
- Identify the correct disk and partition. Type
diskpart, thenlist disk, thenselect disk 0(replace 0 with the disk that contains Windows). Typelist partitionto see partitions. The EFI system partition is usually 100–500 MB and formatted FAT32; the Windows partition is large and NTFS. Note the volume letter of the Windows partition (often C: or D: in the recovery environment). - Rebuild the boot files. Exit diskpart (
exit). Then run these commands one at a time, replacingC:with the actual letter of your Windows partition as seen in the recovery environment:bootrec /fixmbrbootrec /fixboot(if you get “Access is denied”, skip to the next command)bootrec /scanosbootrec /rebuildbcd— when asked to add the installation to the boot list, type Y and press Enter.
- Set the correct drive letter in Windows. Restart into Windows normally. Open Disk Management again. If Windows is on C: but another partition is using D: as the system/boot volume, right-click the volume that should be C: and choose “Change Drive Letter and Paths”. If C: is already taken by another volume, you must first change that volume to a different letter (for example, E:), then assign C: to the Windows volume. You cannot change the letter of the system or boot volume while Windows is running; use the recovery environment’s Disk Management or diskpart for that.
- Verify the boot configuration. Open Command Prompt as administrator and run
bcdedit /enum. The “Windows Boot Manager” entry should point to the partition that holds Windows (the “device” and “osdevice” lines). If it points to D: but Windows is on C:, usebcdedit /set {default} device partition=C:andbcdedit /set {default} osdevice partition=C:(replace the identifier if needed). Then restart. - Check BIOS/UEFI boot order. Enter BIOS/UEFI setup and make sure the Windows Boot Manager entry for the correct disk is first in the boot order. Save and exit.
Common Mistakes
- Changing the wrong drive letter. Never change the letter of the EFI system partition or the recovery partition. Only change the large Windows partition and any data partitions.
- Running bootrec from the wrong environment. These commands must be run from the Windows Recovery Environment (WinRE) or the installation USB, not from a normal command prompt inside Windows.
- Ignoring “Access is denied” on fixboot. This often means the EFI partition is not mounted or you are not in the right environment. Use
bootrec /rebuildbcdand check the EFI partition letter in diskpart. - Forgetting to back up. Drive-letter changes can break installed programs, game saves, and shortcuts. Back up first.
- Assuming D: is always the second drive. In some PCs, D: is a partition on the same physical disk as C:. Check Disk Management before acting.
Tips
- Use the official Microsoft Media Creation Tool to make the USB; third-party tools can add unwanted software.
- If you have a recovery drive, it often includes the same repair tools and is faster than downloading Windows again.
- Write down the original drive letters before changing anything, so you can revert if needed.
- After fixing the boot, run
sfc /scannowandDISM /Online /Cleanup-Image /RestoreHealthfrom an administrator command prompt to repair any system file damage. - If you have multiple drives, label them physically (e.g., with a sticker) so you know which is which.
Troubleshooting
If Windows still boots from D: after the steps above, check the following:
- Bootrec rebuildbcd finds no installations: The Windows partition may not be marked active or the EFI partition may be missing. In diskpart, select the Windows partition and type
active(for MBR disks only). For UEFI systems, ensure the EFI partition exists and is FAT32. - “The boot configuration data store could not be opened”: Run
bootrec /rebuildbcdagain, or usebcdboot C:\Windows(replace C: with the correct letter) to recreate the boot files. - Drive letter changes revert after restart: Some third-party partition tools or mounted virtual disks can cause this. Disconnect external drives and check for scheduled tasks that reassign letters.
- Windows won’t boot at all after changes: Boot from the USB again and use Startup Repair (Repair your computer > Troubleshoot > Advanced options > Startup Repair).
- You cannot change the system volume letter in Disk Management: This is normal. Use the recovery environment’s diskpart:
select volume X, thenassign letter=C. Note that assigning C: to a volume that is not the actual Windows volume will break booting.
Frequently Asked Questions
Can I just change the drive letter in Disk Management?
You can change data drive letters there, but you cannot change the letter of the system or boot volume while Windows is running. Use the recovery environment for that.
Will changing the drive letter break my installed programs?
Possibly. Programs that store absolute paths (including some games and creative software) may need reinstallation or reconfiguration. Back up and be prepared to repair.
Why does Windows show D: as the boot drive when C: exists?
The boot files (BCD) may point to the D: partition, or the drive letters were reassigned. Rebuilding the BCD and correcting letters fixes it.
Do I need to reinstall Windows?
Usually no. Rebuilding the boot configuration and fixing drive letters is enough. Reinstall only if system files are severely corrupted and repair tools fail.
What if I don’t have a Windows installation USB?
You can create one on another PC using Microsoft’s Media Creation Tool, or use a recovery drive if you made one earlier. Without either, some repairs are not possible.
Is it safe to run bootrec commands?
Yes, when run from the recovery environment and targeted at the correct disk. They rewrite boot records, so back up important data first.