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.
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.
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.
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.
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.
@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.
@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):
Create a Windows rescue disk with the Windows 10 Media Creation Tool. At time of writing, newest verstion of that tool is 20H2.
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
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
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
Boot into Windows to make sure it’s okay.
Get a live Manjaro disk and manjaro-chroot into your system.
Follow the steps in this wiki article to reinstall the GRUB bootloader.
blkid your EFI partition, and edit /etc/fstab with the correct UID of that partition.