5

I have a Dual Boot setup using Ubuntu 20.04 and Windows. Today I updated Windows 10 to Windows 11 using Windows Update and I lost my GRUB bootloader (Windows 11 was working fine).

I managed to recover the GRUB by changing the Boot order in UEFI and everything seemed alright after that. Then, I ran sudo update-grub because I read that you had to do so in this forum, got many errors in the output, restarted my computer and everything went wrong after that... Now when I select "Windows Boot Manager" I get an error:

/EndEntire
error: cannot load image

I read that this could be solved by booting into Windows and running some commands but I cannot boot into Windows anymore choosing the bootloader in UEFI! If I choose Windows, my computer restarts but fails to do so and defaults to GRUB again. It seems like Windows cannot boot anymore.

Things I have tried:

  • Disabling Secure Boot again
  • Running boot-repair with the "Repair Windows boot files" option
  • Running boot-repair with the "Backup and rename Windows EFI files" option
  • Running sudo update-grub multiple times

boot-repair results of the 1st time I ran the tool:

Output of update-grub:

Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-72-generic
Found initrd image: /boot/initrd.img-5.15.0-72-generic
Found linux image: /boot/vmlinuz-5.15.0-71-generic
Found initrd image: /boot/initrd.img-5.15.0-71-generic
Found linux image: /boot/vmlinuz-5.13.0-52-generic
Found initrd image: /boot/initrd.img-5.13.0-52-generic
Found linux image: /boot/vmlinuz-5.11.0-46-generic
Found initrd image: /boot/initrd.img-5.11.0-46-generic
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings
done

Output of fdisk -l:

Disk /dev/nvme1n1: 931,53 GiB, 1000204886016 bytes, 1953525168 sectors
Disk model: WDS100T3X0C-00SJG0                      
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: FFC58535-6B06-4DDC-81BC-ED4A4575504F

Device Start End Sectors Size Type /dev/nvme1n1p1 2048 156250111 156248064 74,5G Linux filesystem /dev/nvme1n1p2 156250112 234375167 78125056 37,3G Linux swap /dev/nvme1n1p3 234375168 236328959 1953792 954M EFI System /dev/nvme1n1p4 236328960 1701173247 1464844288 698,5G Linux filesystem

Disk /dev/nvme0n1: 476,96 GiB, 512110190592 bytes, 1000215216 sectors Disk model: SKHynix_HFS512GDE9X084N
Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disklabel type: gpt Disk identifier: AA11E4E4-987D-4872-88CD-DF2600D0C425

Device Start End Sectors Size Type /dev/nvme0n1p1 2048 534527 532480 260M EFI System /dev/nvme0n1p2 534528 567295 32768 16M Microsoft reserved /dev/nvme0n1p3 567296 998166527 997599232 475,7G Microsoft basic data /dev/nvme0n1p4 998166528 1000214527 2048000 1000M Windows recovery enviro

It is just weird that even when booting Windows by UEFI it does not work neither.

Runsis
  • 203

1 Answers1

5

FINALLY SOLVED THIS!

Because of the Dual Boot with Ubuntu and the Windows update from Windows 10, Windows 11 boot files were just corrupted and even using the Recovery flash drive and the Troubleshoot option did not work

SOLUTION

  1. Flash a USB with Windows 11 Recovery files. Go to https://www.microsoft.com/software-download/windows11 and Download the "Windows 11 Installation Media" file in another Windows machine (or a Virtual Machine with Windows). Run the installer with the flash a USB option.
  2. Reboot your computer with the flashed USB and in the UEFI/BIOS menu boot from the USB drive to enter a Windows 11 installation GUI.
  3. Choose a language and then in the second step click the small "Repair" button
  4. From now on you can follow this video https://www.youtube.com/watch?v=F72D7uL6cZg or continue reading
  5. Choose the "Command Prompt" option to open a cmd in this recovery mode. (or click Troubleshoot if that appears first)
  6. Type diskpart
  7. list disk and choose the disk where the original Windows is using select disk # (# is the number of the disk)
  8. list partition and select partition # by choosing the partition number of where the boot files of Windows are (every Windows installation will have this. It's usually a 300-500 MB partition. Careful here)
  9. format to format that boot partition
  10. Now, assign a letter to this boot partition assign letter=n:
  11. Select the other WIndows partition where your files are usually stored (this is probably the biggest partition of the list). Use select partition #
  12. Assign a letter to this partition "C": asssign letter=c:
  13. exit
  14. bootsect /nt60 all /force. This just updates all the target volumes to be compatible with the bootloader.
  15. Type c:
  16. bcdboot c:\windows /s n: /f all (Instead of n: use the letter you assigned to the boot partition )
  17. Now the final steps: bootrec /scanos
  18. bootrec /fixmbr
  19. bootrec /fixboot (note: this can give you a pemission denied error. Just skip this step if you have that error and continue with the next command. It still worked for me. Otherwise, google the error and try some solutions.)
  20. bootrec /rebuildbcd
  21. Exit the Windows recovery mode and continue to Windows 11 and it should be working fine now.

Thanks to @olfred for the help too.

Runsis
  • 203