Add Windows partition to GRUB

I dual-booted the two OSes, and it was fine for a while. However, after a manual re-install of Manjaro, the Windows (10) entry in GRUB disappeared.
Current Grub entries are:

Manjaro Linux
Manjaro Linux (Kernel: 5.10.2-2-MANJARO x64)
Manjaro Linux (Kernel: 5.10.2-2-MANJARO x64 - fallback initramfs)
UEFI Firmware Settings

I know the Windows partition still exists from lsblk:

nvme0n1     259:0    0 476.9G  0 disk 
├─nvme0n1p1 259:1    0   260M  0 part /boot/efi
├─nvme0n1p2 259:2    0    16M  0 part 
├─nvme0n1p3 259:3    0 132.6G  0 part 
├─nvme0n1p4 259:4    0   511M  0 part 
└─nvme0n1p5 259:5    0 343.5G  0 part /

nvme0n1p3 is Windows, and nvme0n1p5 is Manjaro.
What’s the easiest way to add Windows back as a GRUB entry?
Thanks in advance.

Hello @redbrain144 :wink:

Is there a folder called Microsoft?

su -c "ls /boot/efi/EFI/"

If so, then please run:


Is Windows detected?

Otherwise you have to reinstall the Windows Bootloader with the windows setup disk.

Usually a simple

sudo update-grub

and a reboot is sufficient to regenerate the Windoze entry in the grub menu.

Who knows what he did there, it’s always nice to see questions without details that led to the problem :wink:

[redbrain@envy ~]$ sudo ls /boot/efi/EFI
[sudo] password for redbrain: 
boot  Manjaro

I think when I reinstalled Manjaro, it didn’t bother probing for other OSes.

Is there a way to do this without destroying / having to then reinstall Manjaro?
Thanks for everyone’s help

You will have to use the commandline in windows (in the win10 setup disk) and using bcdedit somehow. Not sure, since i never done this. It should recreate the efi entry.

Then, if Windows is booting correctly, you will need to reinstall grub. Boot a manjaro live iso and follow these steps: GRUB/Restore the GRUB Bootloader - Manjaro

1 Like

I was able to get back into Windows by formatting the EFI partition to FAT32, assigning it a drive letter E, and then executing this command on a Windows rescue disk:

bcdboot C:\Windows /S E: /F UEFI

However, I can’t seem to get Grub to recognize Windows on reinstall.
Here’s exactly what I’m doing

sudo mount /dev/nvme0n1p5 /mnt # my main partition
sudo mount /dev/nvme0n1p1 /mnt/boot/efi # the EFI partition
manjaro-chroot /mnt /bin/bash
# in chroot, as root
mount /dev/nvme0n1p3 /mnt # mounting the Windows partition for os-prober to see
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=manjaro --recheck
# this runs just fine
grub-mkconfig -o /boot/grub/grub.cfg 
# the prober spits out a couple warnings about not reading the livecd
awk -F\' '/menuentry / {print $2}' /boot/grub/grub.cfg 
# Windows Boot Manager is not in the resulting list.

Can you help me with this portion?

On top of this, once I boot back into my Linux install, the boot process begins but never gets to the login screen.

Hello @redbrain144 :wink:

Question: Is the folder “Microsoft” available in /mnt/boot/efi/EFI ?

That is not necessary, because grub just triggers the EFI entry and boots windows. Therefore only /mnt/boot/efi/EFI/Microsoft needs to be readable by grub.

Try this with --force and --verbose

On top… i guess you forgot to modprobe efivarfs before manually chroot:

Which is (as i think) done with manjaro-chroot -a, but not when running: manjaro-chroot /mnt /bin/bash

I did forget modprobe efivarfs.
I started mounting the Windows partition after the thing failed once, in case it made a difference.
I’ll try again tomorrow morning (est) and make sure that the EFI filesystem is actually loaded this time.
I’m not as knowledgeable as you all on these boot things, so thanks again for your help.

GRUB is working now; however, my system still fails to boot properly as described in post #8:

Any idea as to what is going wrong? Not sure what information would be of a use to you; let me know if you’d like me to share any log files, etc.

no idea… a journal log and Xorg log could say more. Please run this when in chroot:

journalctl -b1 | curl -F'file=@-'
for x in $(ls /var/log/Xorg*); do echo -e "---$x---\n\n $(cat $x)\n\n"; done | curl -F'file=@-'

Maybe also your Xorg confs:

for x in $(ls /etc/X11/xorg.conf.d/*); do echo -e "---$x---\n\n $(cat $x)\n\n"; done | curl -F'file=@-'

Please post just the links here. :wink:

Never heard of, but it’s a really clever tool.
Here are the links from those commands in order:

@redbrain144 On the Dec 24 morning was the last boot until you rebooted at midday and the Xorg logs displays also no errors. So i would assume, it did not even start booting since then.

If you can boot to the grub menu, then go to the menu entry of Manjaro, type e to edit it and remove quiet there. Then boot with F10. Hope the is an error or something visible then.

Removed “quiet” (using chroot and update-grub) and found this:

What should I do from here? Thanks for your continued support.

Nothing. That’s systemd logs. Enjoy watching it go smoothly.
If you put quiet back, it’ll still happen anyway, but hidden.

@redbrain144 Looks like the /boot/efi can not be mounted which is a dependency to continue.

Please check with sudo blkid and cat /etc/fstab if the UUID of the efi partition is the same. If not, then correct the one with nano /etc/fstab. The reason for this change is that you recreate the efi partition with windows:

That did the trick, thanks to everyone who helped (especially megavolt) for your support!
For future people with the same inquiry, here are the exact steps I followed (assuming UEFI):

  1. Create a Windows rescue disk with the Windows 10 Media Creation Tool. At time of writing, newest verstion of that tool is 20H2.
  2. Boot into that disk, and select “Repair installation.” From there, check “Advanced”, and then “Command prompt” (or something like that) to get to a command line
  3. In the prompt, use diskpart to identify the EFI volume and give it any open drive letter (e.g. E:). Then format it as FAT32, using a command such as format E: /FS:FAT32
  4. Run this command to regenerate Microsoft’s EFI: bcdboot [WINDIR] /S [EFILETTER] /F UEFI
    Fill in the appropriate fields, like this example: bcdboot C:\Windows /S E: /F UEFI
  5. Boot into Windows to make sure it’s okay.
  6. Get a live Manjaro disk and manjaro-chroot into your system.
  7. Follow the steps in this wiki article to reinstall the GRUB bootloader.
  8. blkid your EFI partition, and edit /etc/fstab with the correct UID of that partition.
  9. That should be it!
1 Like

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