I foolishly decided to delete and recreate my EFI partition (I needed to expand it.) The UUID obviously changed. I did not realize how disastrous this would be. After a few hours, I managed to fix my Ubuntu installation by using a live USB and editing /etc/fstab
. However, Windows 10 will not boot no matter what I try. I used a recovery USB and tried using BCDBoot
, automatic repair, etc. but nothing seems to work. Can anyone offer a specific set of instructions to fix the issue? I'm using UEFI, not MBR.
For grub-mkconfig, how would that recreate my Windows bootloader with updated GUID?
Let assume the partition style is as following (omitting Windows Recovery partition):
| Partition | Name | Style | Mount Point |
|:-----------:|:--------:|:-------:|:-------------:|
| /dev/sdaX | EFI | FAT32 | /boot/efi |
| /dev/sdaY | Windows | NTFS | /mnt/Windows |
| /dev/sdaZ | Linux | EXT4 | / |
In Windows, bcdboot C:\Windows
fixes and copies (if necessary) the boot files to EFI partition and adds a new Boot Configuration Data entry (if not present).
Now come to GRUB. EFI System Partition aka. /boot/efi
is expressed as esp in short. First grub-install
adds the EFI file in esp/EFI/Boot/bootx64.efi
. If Windows and EFI partitions are mounted correctly grub-mkconfig
(also os-prober) detects the Windows bootloader in esp/EFI/Microsoft/Boot/bootmgfw.efi
. Then it add the menu entry in /boot/grub/grub.cfg
file. So Windows bootloader is not directly executed. GRUB is executed first then it executes Windows bootloader. This is called chain loading. Now GRUB doesn't care in Windows realm. bootmgfw.efi
loads Windows\system32\winload.efi
file in C drive (here /dev/sdaY
) then NT kernel takes over.
User contributions licensed under CC BY-SA 3.0