After reinstalling windows bootloader, grub-update cannot find it

Hi, after I reinstalled the windows bootloader (via bcdboot), update-grub stopped detecting it.
But at the same time, through bios (boot order) I can start windows
I already tried to search for a similar problem on the forum, but without success.

Here is some information:


Generating grub configuration file ...
Found theme: /usr/share/grub/themes/manjaro/theme.txt
Found linux image: /boot/vmlinuz-5.16-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.16-x86_64.img
Found initrd fallback image: /boot/initramfs-5.16-x86_64-fallback.img
Found linux image: /boot/vmlinuz-5.15-x86_64
Found initrd image: /boot/intel-ucode.img /boot/initramfs-5.15-x86_64.img
Found initrd fallback image: /boot/initramfs-5.15-x86_64-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ image: /boot/memtest86+/memtest.bin

efibootmgr -v:

BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,000B,0009
Boot0000* manjaro	HD(4,GPT,673c9c37-39a8-4247-8ba3-09b8534b18dd,0x249f0800,0xfa000)/File(\EFI\manjaro\grubx64.efi)
Boot0009* Hard Drive 	BBS(HD,,0x0)..GO..NO........O.S.T.>..Gd-.;.A..MQ..L. . . . . . . . . . . . .9.Z.8.A.V.P.B.9........BO
Boot000B* Windows Boot Manager	HD(4,GPT,673c9c37-39a8-4247-8ba3-09b8534b18dd,0x249f0800,0xfa000)/File(\EFI\Microsoft\Boot\bootmgfw.efi)


sda      8:0    0 931.5G  0 disk 
├─sda1   8:1    0    16M  0 part 
├─sda2   8:2    0 146.5G  0 part 
├─sda3   8:3    0 146.5G  0 part 
├─sda4   8:4    0   500M  0 part /boot/efi
├─sda5   8:5    0  15.6G  0 part [SWAP]
├─sda6   8:6    0 195.3G  0 part /
└─sda7   8:7    0 427.1G  0 part /home

parted -l:

Model: ATA ST1000DM010-2EP1 (scsi)
Disk /dev/sda: 1000GB
Sector size (logical/physical): 512B/4096B
Partition Table: gpt
Disk Flags: 

Number  Start   End     Size    File system     Name                          Flags
 1      1049kB  17.8MB  16.8MB                  Microsoft reserved partition  msftres
 2      17.8MB  157GB   157GB   ntfs            Basic data partition          msftdata
 3      157GB   315GB   157GB   ntfs                                          msftdata
 4      315GB   315GB   524MB   fat32                                         msftdata
 5      315GB   332GB   16.8GB  linux-swap(v1)                                swap
 6      332GB   542GB   210GB   ext4
 7      542GB   1000GB  459GB   ext4

ls -l /boot/efi/EFI/

total 12
drwx------ 2 root root 4096 Mar 20 01:03 boot
drwx------ 2 root root 4096 Mar 20 01:03 Manjaro
drwx------ 4 root root 4096 Mar 20 13:19 Microsoft

I know you might wonder why I (re)installed bootloader , it so happened that after reinstalling manjaro I “accidentally” formatted /boot/efi :upside_down_face:

I am nowhere an expert but as I understand it, if Windows is installed with an UEFI partition Grub will not detect it. Both Win and Manjaro have to be installed with BIOS partitions to have an actual dual boot machine.

Maybe add the esp and boot flags to the EFI partition?

sudo parted /dev/sda set 4 esp on
sudo parted /dev/sda set 4 boot on

And then try again with update-grub.

1 Like

Thank you, this really solved the problem

1 Like

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.