1

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?

JW0914
  • 7,865

2 Answers2

1

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

JW0914
  • 7,865
harrymc
  • 480,290
  • I tried it but still the same blue screen. For some reason I don't have the option "place the boot flag on", but I added the boot flag on the efi fat32 partition with GParted – Joseph Chataignon Feb 10 '21 at 15:51
  • Does your computer use EFI, and is the disk formatted as MBR or GPT? Do you have a Windows installation media? – harrymc Feb 10 '21 at 16:25
  • The disk is formatted as GPT, I'm not sure about EFI but I have an option about UEFI in the GRUB booting menu. I don't have a Windows installation media (I tried to create one but it didn't work, I might retry). – Joseph Chataignon Feb 10 '21 at 16:53
  • Try perhaps Rescatux. You can create it from Linux. – harrymc Feb 10 '21 at 16:57
  • I tried the following options from Rescatux, unsuccessfully: File system check:
    • sda1 (windows efi): OK
    • sda2 (windows reserved partition 16 Mo, no filesystem): ERROR filesystem check with automatic fix failed
    • sda3 (windows OS): OK
    • sda4 (recovery, I guess? ntfs 875Mo): OK

    Reinstall Microsoft Windows UEFI:

    • WARNING: backup of EFI directory went wrong
    • ERROR: the reinstallation of Windows UEFI boot entries went wrong
    – Joseph Chataignon Feb 11 '21 at 06:55
  • complete logs for the filesystem check of sda2 say the superblock could not be rad or does not describe a valid ext2/ext3/ext4 filesystem – Joseph Chataignon Feb 11 '21 at 07:03
  • @harrymc I wasn't aware BootRec will cause issues with GRUB and I've edited your answer with a whitespace so I can switch my downvote to an upvote – JW0914 Feb 20 '21 at 15:51
  • @JW0914: Thank you. – harrymc Feb 20 '21 at 17:07
0

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.