Fixing Windows 10 bootloader with bcdboot

In this tutorial I will outline one way to fix an issue with the Windows 10 bootloader if you’ve run into an issue. This isn’t the only possible option, however I found this worked for me after performing a restore of the main NTFS OS partition but not any of the boot or system partitions at this same time. This may also help if your Windows 10 installation isn’t detected on boot after performing a disk clone, or if you’ve installed a fresh copy of Windows 10 to fix a boot issue, and then tried to restore the NTFS OS partition over the top of that fresh install, but then the OS doesn’t boot. You may simply see a Windows boot screen with an error, or a black screen with a message along the lines of “No operating system installed”.


You’ll need access to some form of Windows 10 installation media, such as a USB drive or DVD. You can download the media creation tool from Microsoft here – https://www.microsoft.com/en-au/software-download/windows10

Boot your PC into the Windows 10 installation media.

At the first screen which asks for region information, click next. You’ll then see a “Repair your computer” option at the very bottom left. Click on this.

From here you should be able to go “Troubleshoot”, then “Advanced Options”, and finally “Command Prompt”.


At the command prompt, type –

diskpart
list volume


You should see a list of volumes (partitions) that are detected. We want to locate the volume that is used for your bootloader. Typically this is going to be the one without a drive letter already assigned, and it’ll usually be a small partition under 1GB in size. It’ll also use a FAT32 filesystem.

  Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     X                NTFS   Simple      1863 GB  Healthy
  Volume 1     C                NTFS   Partition    162 GB  Healthy    
  Volume 2                      FAT32  Partition    600 MB  Healthy    
  Volume 3     R                NTFS   Partition    111 GB  Healthy
  Volume 4     S                NTFS   Partition    111 GB  Healthy
  Volume 5     Z                NTFS   Partition    931 GB  Healthy
  Volume 6     V                NTFS   Partition   2794 GB  Healthy
  Volume 7     D                FAT32  Removable     28 GB  Healthy


We need to select that volume and assign a drive letter to it –

select volume 2
assign letter B
list volume


When you list the volumes again, you should now see that the volume “2” has been assigned letter “B” –

 Volume ###  Ltr  Label        Fs     Type        Size     Status     Info
  ----------  ---  -----------  -----  ----------  -------  ---------  --------
  Volume 0     X                NTFS   Simple      1863 GB  Healthy
  Volume 1     C                NTFS   Partition    162 GB  Healthy    
  Volume 2     B                FAT32  Partition    600 MB  Healthy    
  Volume 3     R                NTFS   Partition    111 GB  Healthy
  Volume 4     S                NTFS   Partition    111 GB  Healthy
  Volume 5     Z                NTFS   Partition    931 GB  Healthy
  Volume 6     V                NTFS   Partition   2794 GB  Healthy
  Volume 7     D                FAT32  Removable     28 GB  Healthy


Exit diskpart at this point and you’ll be dropped back into the normal command prompt –

exit


Here we’ll run the “bcdboot” command. In this case, you want to first define the volume that you know has your Windows installation on it – your main NTFS OS partition. Typically you can figure this out based on the size if you know what that would be, if not… you’ll need to search around for more pointers as it’s beyond what I’ll be explaining here.


The command will be set to first define the volume where your Windows installation is, and then the drive letter we just assigned for the drive with the bootloader. So for instance we have “volume 1 – C” as our Windows install, and “volume 2 – B” as the boot volume.

bcdboot C:\Windows -s B:


This should (hopefully!) succeed, and then on reboot you’ll be able to boot into Windows. If you happen to see multiple “Windows” installs to choose from, where one is the one we’ve just fixed, but the other leads nowhere – you can run “msconfig” inside windows and go to the “Boot” tab, and then delete that second option from the boot menu.