Linux – Repair Windows Boot Loader After Cloning to SSD

bootbootloaderlinuxmulti-boot

I bought my PC with Windows 10 on it, later installing Ubuntu for dual-booting. Recently, I wanted to replace the HDD inside with an SSD of the same size, so I copied all the partitions to the SSD (GPT partitioning) using GParted and installed the SSD in the laptop.

On startup, GRUB is loaded and I can:

  • Boot Ubuntu normally
  • Select the "Windows Boot Manager on /boot/sda1 or select bootmgfw.efi manually, however it loads a Recovery BSOD, stating the following with options to access the recovery environment (F1) or boot parameters (F8) but those don't work (same screen):
    File: \WINDOWS\system32\winload.efi is missing or broken
    Error code: 0xc000000e
    

As I understand it, Windows Boot Manager is loaded but cannot find the Windows boot loader (probably because not looking into the right partition), so what I need to do is give the right partition to the boot loader, but I have no idea how to do that.

How do I fix this, preferably something that can be done from Linux and doesn't involve a reinstall of Windows?

Best Answer

Enter the following commands in the terminal:

sudo add-apt-repository ppa:yannubuntu/boot-repair  
sudo apt update  
sudo apt install -y boot-repair
sudo boot-repair  

Open the Boot Repair application and select Advanced Options > Other Options tab - Repair Windows boot files. The boot flag should be placed on the same partition on which Ubuntu is installed.

enter image description here

Related Question