I have migrated some old linux systems from an MBR based laptop with a dead GPU to a new machine and thought it would be best to keep things as simple as possible. So I disabled the CSM and specified UEFI in a number of places on the UEFI firmware setup screens. Naturally I followed the tutorials found elsewhere and set up the disks with ESP partitions where relevant. At this point I am able to boot into the various linux systems. But then I noticed that the Microsoft Windows 10 icon/entry had disappeared from the rEFInd welcome screen.
It looks like I did something I shouldn't have.
Apparently rEFInd is no longer able to find the Windows bootloader so I may have accidentally removed it?
Now the question is how would I go about figuring out what's broken in my setup (and possibly fix it)?
Not sure what kind of documentation might help diagnose.
Here's the output of the gdisk command on the two disks that matter:
GPT fdisk (gdisk) version 1.0.6
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/sda: 976773168 sectors, 465.8 GiB
Model: CT500MX500SSD1
Sector size (logical/physical): 512/4096 bytes
Disk identifier (GUID): D63EB811-6D72-455C-9605-37C5D8507BF7
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 976773134
Partitions will be aligned on 2048-sector boundaries
Total free space is 705976301 sectors (336.6 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 411647 200.0 MiB EF00 EFI system partition
2 66635776 271437823 97.7 GiB 8300
5 1050624 66635775 31.3 GiB 8300 Linux filesystem
Command (? for help): q
___________________________________________________________________________________
root@pavo:~# gdisk /dev/sdb
GPT fdisk (gdisk) version 1.0.6
Partition table scan:
MBR: protective
BSD: not present
APM: not present
GPT: present
Found valid GPT with protective MBR; using GPT.
Command (? for help): p
Disk /dev/sdb: 500118192 sectors, 238.5 GiB
Model: KINGSTON OM8P0S3
Sector size (logical/physical): 512/512 bytes
Disk identifier (GUID): C70C063F-76CE-4D90-B234-A85625B4E965
Partition table holds up to 128 entries
Main partition table begins at sector 2 and ends at sector 33
First usable sector is 34, last usable sector is 500118158
Partitions will be aligned on 2048-sector boundaries
Total free space is 187148909 sectors (89.2 GiB)
Number Start (sector) End (sector) Size Code Name
1 2048 206847 100.0 MiB EF00 EFI system partition
2 206848 468991 128.0 MiB 0C01 Microsoft reserved ...
3 468992 170446847 81.1 GiB 0700 Basic data partition
4 498126848 500117503 972.0 MiB 2700 Basic data partition
5 170446848 229040127 27.9 GiB 8300
6 229040128 229044223 2.0 MiB EF02
7 229044224 310964223 39.1 GiB 8300
8 310964224 310980607 8.0 MiB 0700
Command (? for help): q
root@pavo:~# ```
Update
As requested here's the output of the efibootmgr command:
root@pavo:~# efibootmgr -v
BootCurrent: 0004
Timeout: 65535 seconds
BootOrder: 0000,0002,0001,0004,0003
Boot0000* Windows Boot Manager HD(1,GPT,bb717fa7-abdd-479c-bd4c-a017bf0f9f1a,0x800,0x32000)/File(\EFI\MICROSOFT\BOOT\BOOTMGFW.EFI)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0001* debian VenHw(99e275e7-75a0-4b37-a2e6-c5385e6c00cb)
Boot0002* ubuntu HD(1,GPT,bb717fa7-abdd-479c-bd4c-a017bf0f9f1a,0x800,0x32000)/File(\EFI\UBUNTU\SHIMX64.EFI)
Boot0003* deepin HD(1,GPT,1b07c421-5264-41b7-b770-b929245d705c,0x800,0x64000)/File(\EFI\deepin\grubx64.efi)
Boot0004* UEFI OS HD(1,GPT,bb717fa7-abdd-479c-bd4c-a017bf0f9f1a,0x800,0x32000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Update - 2021/05/08:
Output of the requested commands:
root@pavo:~# tree /boot/efi
/boot/efi
└── EFI
├── BOOT
│ ├── BOOT.CSV
│ ├── bootx64.efi
│ ├── drivers_x64
│ │ └── ext4_x64.efi
│ ├── icons
│ │ ├── arrow_left.png
│ │ ├── arrow_right.png
│ │ ├── boot_linux.png
│ │ ├── boot_win.png
│ │ ├── func_about.png
│ │ ├── func_bootorder.png
│ │ ├── func_csr_rotate.png
│ │ ├── func_exit.png
│ │ ├── func_firmware.png
│ │ ├── func_hidden.png
│ │ ├── func_install.png
│ │ ├── func_reset.png
│ │ ├── func_shutdown.png
│ │ ├── mouse.png
│ │ ├── os_arch.png
│ │ ├── os_artful.png
│ │ ├── os_bionic.png
│ │ ├── os_centos.png
│ │ ├── os_chakra.png
│ │ ├── os_chrome.png
│ │ ├── os_clover.png
│ │ ├── os_crunchbang.png
│ │ ├── os_debian.png
│ │ ├── os_devuan.png
│ │ ├── os_elementary.png
│ │ ├── os_fedora.png
│ │ ├── os_freebsd.png
│ │ ├── os_frugalware.png
│ │ ├── os_gentoo.png
│ │ ├── os_gummiboot.png
│ │ ├── os_haiku.png
│ │ ├── os_hwtest.png
│ │ ├── os_kubuntu.png
│ │ ├── os_legacy.png
│ │ ├── os_linuxmint.png
│ │ ├── os_linux.png
│ │ ├── os_lubuntu.png
│ │ ├── os_mac.png
│ │ ├── os_mageia.png
│ │ ├── os_mandriva.png
│ │ ├── os_netbsd.png
│ │ ├── os_network.png
│ │ ├── os_opensuse.png
│ │ ├── os_redhat.png
│ │ ├── os_refind.png
│ │ ├── os_refit.png
│ │ ├── os_slackware.png
│ │ ├── os_suse.png
│ │ ├── os_systemd.png
│ │ ├── os_trusty.png
│ │ ├── os_ubuntu.png
│ │ ├── os_unknown.png
│ │ ├── os_void.png
│ │ ├── os_win8.png
│ │ ├── os_win.png
│ │ ├── os_xenial.png
│ │ ├── os_xubuntu.png
│ │ ├── os_zesty.png
│ │ ├── README
│ │ ├── tool_apple_rescue.png
│ │ ├── tool_fwupdate.png
│ │ ├── tool_memtest.png
│ │ ├── tool_mok_tool.png
│ │ ├── tool_netboot.png
│ │ ├── tool_part.png
│ │ ├── tool_rescue.png
│ │ ├── tool_shell.png
│ │ ├── tool_windows_rescue.png
│ │ ├── transparent.png
│ │ ├── vol_external.png
│ │ ├── vol_internal.png
│ │ ├── vol_net.png
│ │ └── vol_optical.png
│ ├── keys
│ │ ├── altlinux.cer
│ │ ├── canonical-uefi-ca.cer
│ │ ├── centos.cer
│ │ ├── fedora-ca.cer
│ │ ├── microsoft-kekca-public.cer
│ │ ├── microsoft-pca-public.cer
│ │ ├── microsoft-uefica-public.cer
│ │ ├── openSUSE-UEFI-CA-Certificate-4096.cer
│ │ ├── openSUSE-UEFI-CA-Certificate.cer
│ │ ├── refind.cer
│ │ ├── refind_local.cer
│ │ ├── refind_local.crt
│ │ └── SLES-UEFI-CA-Certificate.cer
│ ├── refind.conf
│ └── refind.conf-sample
└── tools
6 directories, 91 files
root@pavo:~# lsblk -o PARTUUID
PARTUUID
1b07c421-5264-41b7-b770-b929245d705c
39a19869-4d29-444f-a156-b4c5777b34c0
5b4c8c9f-f12d-4bbd-ae8e-17043b2e4510
07b2faf3-f0ce-4d73-ab59-b87b5f8b66a6
bb717fa7-abdd-479c-bd4c-a017bf0f9f1a
9b6445b7-5cdb-4462-b9cf-5b0c5b2bb9ae
879b7145-b406-4467-81bd-f66739b8e072
c7013692-6d6f-427b-a6b0-03fb3294e571
452bb93f-6eaf-498a-a817-19cb26c00740
f3400b2d-753b-41ec-8aca-5774d73b2c1e
0a28e723-c34b-fa49-9f37-7158ddcaa8e0
ef8c9c3f-54b2-0f47-929e-6ee0bf5178a6