Troubleshoot Boot Drives with Startup Diskpart Command When Windows fails to boot, the culprit is often a misconfigured, corrupted, or disconnected boot drive. Standard troubleshooting menus frequently fail to resolve these deep system errors. In such scenarios, the command-line utility Diskpart serves as a reliable tool for diagnosing and repairing drive issues directly from the Windows recovery environment.
This guide provides a systematic approach to using Diskpart at startup to restore system functionality. Accessing Diskpart at Startup
To modify a boot drive, you must access the Command Prompt outside the standard Windows environment.
Turn on your computer and repeatedly press F8, F11, or Shift + F8 (depending on your manufacturer) to open the Advanced Startup Options menu. Alternatively, boot from a Windows installation USB and click Repair your computer.
Navigate to Troubleshoot > Advanced options > Command Prompt.
In the black console window, type diskpart and press Enter. The prompt will change to DISKPART>, indicating the utility is active. Step 1: Identify the Boot Drive and Layout
Before applying any fixes, you must locate the drive housing your operating system and identify its partition style. Type list disk and press Enter.
Look at the disk numbers (Disk 0, Disk 1) and sizes to find your primary drive.
Check the Gpt column. If an asterisk (*) is present, your system uses the modern GPT/UEFI layout. If it is blank, your system uses the legacy MBR/BIOS layout. Step 2: Verify and Fix Partition Status
A frequent cause of boot failures is an inactive or hidden boot partition. For Legacy MBR Systems
Legacy systems require the system partition to be explicitly marked as “Active” to boot.
Type select disk X (replace X with your primary disk number). Type list partition to view the structure.
Locate your system partition (usually a small 100MB to 500MB partition, or your main C: drive partition).
Type select partition Y (replace Y with the system partition number). Type active and press Enter. For Modern GPT (UEFI) Systems
GPT systems do not use active partitions. Instead, they rely on an EFI System Partition (ESP). If Windows cannot find it, you must assign it a drive letter to repair it. Type list volume to view all partitions across your drives.
Look for a volume formatted in FAT32, usually labeled “System” or sized around 100MB–260MB.
Type select volume Z (replace Z with the FAT32 volume number).
Type assign letter=V to temporarily mount the hidden boot partition. Type exit to leave Diskpart. Step 3: Rebuilding the Boot Configuration Data (BCD)
Once the partitions are properly targeted and visible, you must rebuild the instructions Windows uses to boot. While still in the standard Command Prompt (after exiting Diskpart), execute the following commands based on your system type: For MBR Systems: bootrec /fixmbr bootrec /fixboot bootrec /rebuildbcd Use code with caution. For GPT/UEFI Systems:
Use the drive letter assigned in the previous step (e.g., V:) to recreate the boot files from scratch: bcdboot C:\Windows /s V: /f UEFI Use code with caution.
(Note: Ensure C: matches the actual letter of your main Windows partition, which you can verify during the list volume step in Diskpart). Step 4: Final Diagnostics and Reboot
If the drive still fails to boot, verify the health of the file system using the Check Disk utility before exiting the recovery environment. Run the following command: chkdsk C: /f /r Use code with caution.
This utility scans the main Windows partition for file system corruption and fixes bad sectors. Once the scan finishes, close the Command Prompt window and select Continue to Windows to test your boot sequence.
To ensure we tailor the next troubleshooting steps to your exact scenario, could you tell us:
What specific error message appears on your blue or black screen when booting?
Is your system running on a traditional HDD or a modern SSD/NVMe drive?
Leave a Reply