Grub cannot find the other linux os installed on the hard drive

Example:

menuentry 'Fedora custom ' --class fedora --class os $menuentry_id_option 'custom-efi-B8ED-F5C9' {
    insmod part_gpt
    insmod fat
    search --no-floppy --fs-uuid --set=root B8ED-F5C9
    chainloader /EFI/Fedora/grub-x86_64.efi
}

Modify this /EFI/Fedora/grub-x86_64.efi to the proper Fedora grub efi bootloader, looking into $ESP (/boot/efi/)