Basically I've lost my Windows 8 boot option and the boot repair from Windows installation media doesn't fix the problem.
I know this is more-or-less a Windows' problem but I'm seeking a efibootmgr solution rather than a solution that uses the much more awkward Windows based bcdedit command. Hence I ask here instead of super user.
The detailed background is here, basically my system was initial setup in BIOS/MBR/CSM mode, Windows 10 is refusing to be installed there, so I have to converted my MBR disk to GPT. I got everything on the Linux side working afterward, but fixing Windows boot via Windows installation media failed.
- All my Linux OS/partitions were found by update-grub, but my Windows 8 is missing from the GRUB menu.
- The os-proberwas not able to list/find my Windows 8 either.
I hope the fix is simply adding my Windows 8 back as an boot entry using efibootmgr, but this is where I got lost and need help. Again further detailed like current partition schema can be found here. Thx.
Maybe my Windows 8 was installed in BIOS/MBR/CSM mode, and has no EFI booting capability as I don't see a /EFI directory within it? Here are all root level directories in my Windows 8 partition:
$Recycle.Bin/              ProgramData/
$WINDOWS.~BT/              Programs/
$Windows.~WS/              Recovery/
BOOTNXT                    Recovery.txt
BOOTSECT.BAK               System Volume Information/
Boot/                      Tmp/
Documents and Settings/    Users/
ESD/                       Windows/
Intel/                     bootmgr
Program Files/             pagefile.sys
Program Files (x86)/       swapfile.sys
Or maybe I don't need efibootmgr at all, just a custom entry in /etc/grub.d/40_custom like the following?
menuentry "Windows 8 BIOS MBR" {
     insmod part_msdos
     insmod ntldr
     insmod ntfs
     ntldr (hd0,msdos1)/bootmgr
}
chainloader /EFI/Microsoft/Boot/bootmgfw.efiwould be the GRUB configuration line that fires up the Windows boot manager on the ESP partition. NTLDR is for Windows XP and older only. But bootmgfw.efi requires a number of other files to accompany it, and one of them isBCDwhich needs to be tailored for your installation. The repair tools on the installation media should be able to do it.