Hello,
I have a side disk that has Windows 10 installed in order to run some games that I cannot run in linux because of the Anti-cheat system.
So I had a disk with windows installed I can change to it from bios but not from Grub boot.
Device Start End Sectors Size Type
/dev/sda1 2048 206847 204800 100M EFI System
/dev/sda2 206848 239615 32768 16M Microsoft reserved
/dev/sda3 239616 467267583 467027968 222,7G Microsoft basic data
/dev/sda4 467267584 468858879 1591296 777M Windows recovery environment
/dev/sdb: 931,51 GiB is also in gpt and btrfs for linux
Tried this config but does not work
### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry "Windows Boot Manager" {
insmod part_gpt
insmod fat
search --no-floppy --fs-uuid --set=root 7A67-D4ED # Adjust to your disk and partition
chainloader /EFI/Microsoft/Boot/bootmgfw.efi
}
### END /etc/grub.d/40_custom ###
Below linux partition config.
Device Start End Sectors Size Type
/dev/sdb1 2048 4095 2048 1M BIOS boot
/dev/sdb2 4096 2101247 2097152 1G Linux extended boot
/dev/sdb3 2101248 1953523711 1951422464 930,5G Linux filesystem
Also have previously ran Dracut dracut --regenerate-all --force
Remove the custom entry you made in /etc/grub.d/40_custom.
Then try booting into linux and use sudo grub2-mkconfig -o /boot/grub2/grub.cfg.
This should run the os-prober as part of the process and automatically find the windows boot loader and make it part of the grub menu.
The results should look something like this
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
done
Also note that you seem to have removed two important lines in that file. Lines 1 & 2 do not appear in what you posted, but are 100% necessary.
$ sudo cat /etc/grub.d/40_custom
#!/usr/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
Your Windows installation uses UEFI mode (there’s an EFI System partition) but your Fedora is in legacy BIOS mode (there’s a BIOS Boot partition but no EFI System partition).
So when you boot into Fedora’s GRUB, you’re in legacy mode and I suspect it can’t successfully chainload the Windows UEFI bootloader from there.
You could either:
Just accept switching with the BIOS boot menu rather than GRUB
Reinstall Fedora in UEFI mode
…or maybe there’s a less destructive way to convert Fedora to UEFI mode, if someone knows it…