repair windows boot loader after cloning to SSD

Posted on

Problem :

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: WINDOWSsystem32winload.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?

Solution :

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

This worked only because I had kept the old hard drive, but at least solved my problem.

I created a Clonezilla Live USB, and followed their instructions to perform disk-to-disk cloning from the old HDD to the new SSD. It all worked fine and I was able to boot on Windows as well as Ubuntu right after cloning.

Leave a Reply

Your email address will not be published. Required fields are marked *