Dual-boot stopped working – Ubuntu 20.04 and Windows 10

dual-bootgrub2

Installed Windows 10 first, then Ubuntu 20.04 on top, in dual-boot. Worked very well for a few months, suddenly the Windows boot option returned this:

"error: file '/EFI/Microsoft/Boot/bootmgfw.efi' not found"

I ran bootinfoscript, and got this first RESULTS.txt: https://u.pcloud.link/publink/show?code=XZXMYlXZGVTc4SlE7LR0sfdKoPUuORUcRubV

I checked this folder in the EFI System Partition (sdb1), and sure enough there was no "bootmgfw.efi" file there. I got this file from the Windows partition (/Windows/Boot) and tried to copy to the place the grub was looking for, but this is what I got:

root@i3-4170-ubuntu:/mnt/EFI/Microsoft/Boot# cp -f /home/wolf/bootmgfw.efi /mnt/EFI/Microsoft/Boot/.

cp: cannot create regular file '/mnt/EFI/Microsoft/Boot/./bootmgfw.efi': Read-only file system

Following instructions from a forum post, I went with sudo update-grub and the result was:

Sourcing file `/etc/default/grub'

Sourcing file `/etc/default/grub.d/init-select.cfg'

Generating grub configuration file …

Found linux image: /boot/vmlinuz-5.11.0-27-generic

Found initrd image: /boot/initrd.img-5.11.0-27-generic

Found linux image: /boot/vmlinuz-5.11.0-25-generic

Found initrd image: /boot/initrd.img-5.11.0-25-generic

find: ‘/boot/efi/EFI/Microsoft/Boot/es-ES’: Input/output error

Adding boot menu entry for UEFI Firmware Settings

done

I restarted and, this time, the Windows boot option did not appear at all. In fact, the computer booted directly into Ubuntu 20.04, skipping the menu entirely.

I tried boot-repair, which was also suggested in a forum. It failed to repair the GRUB, stating that it found a LegacyWindows partition and that a compatibility mode had to be se in the UEFI firmware. I highly doubt it, since I very consciouly installed Windows 10 and Ubuntu on UEFI mode, with Legacy disabled. Plus, it was never a problem for the last few months.

I ran bootinfoscript after this, and got this second log, renamed RESULTS-2.txt: https://u.pcloud.link/publink/show?code=XZMxYlXZHrECQn04trJYv3eYKdrNYRIwXuCk

This line from update-grub above caught my attention: find: ‘/boot/efi/EFI/Microsoft/Boot/es-ES’: Input/output error. But I will not mess with it further until I get some help, if anyone could be so kind.

Best Answer

Solved:

-Tried booting into the Windows partition directly from the UEFI Boot Menu. It didn't work.

-Booted into a Windows 10 installation USB pendrive, then "Repair", then "Repair Windows initialization" or something like that. It automatically found the windows partition and repaired it.

-With that, I was able to boot into Windows from the UEFI. I just needed to repair the GRUB, which I did booting into Ubuntu and running sudo update-grub

Thanks @ChanganAuto for the help.

Related Question