I have 2 nvme drives one with Windows 10 and the other Arch Linux installed. I was under the impression that the 2 OSes have their bootloaders on their own disks which is not the case in retrospect.
Today I took a look at the efi partition of the linux disk and found a windows entry. I thought this was redundant and wanted to remove it. In the spirit of backing up things, I made a copy of /boot/EFI/Microsoft
directory.
Now after reboot, the windows boot entry disappeared from the motherbother's boot menu. So I went back into Arch and put the backup directory back. But the windows boot entry didn't reappear after another reboot. I tried disabling fast boot but it didn't help.
Anything I can do to fix this issue preferably from Linux? Also downloading windows disk image in case that is required.
Here's the disk setup and content of the esp.
❯❯❯ sudo fdisk -l /dev/nvme0n1
Disk /dev/nvme0n1: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 960 EVO 500GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 01DE889D-9319-4179-920D-4EB5E1A08F94
Device Start End Sectors Size Type
/dev/nvme0n1p1 2048 34815 32768 16M Microsoft reserved
/dev/nvme0n1p2 34816 976773119 976738304 465.8G Microsoft basic data
❯❯❯ sudo fdisk -l /dev/nvme1n1
Disk /dev/nvme1n1: 465.78 GiB, 500107862016 bytes, 976773168 sectors
Disk model: Samsung SSD 970 EVO 500GB
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: gpt
Disk identifier: 270C4D3C-BF3C-4DF1-A834-C03B8BBB6692
Device Start End Sectors Size Type
/dev/nvme1n1p1 2048 1050623 1048576 512M EFI System
/dev/nvme1n1p2 1050624 34605055 33554432 16G Linux swap
/dev/nvme1n1p3 34605056 708337678 673732623 321.3G Linux filesystem
/dev/nvme1n1p4 708339712 976773134 268433423 128G Linux filesystem
❯❯❯ tree -L 4 /boot
/boot
├── e0dbb6ba929948f599abce57c8e2eb65
├── EFI
│ ├── BOOT
│ │ └── BOOTX64.EFI
│ ├── Microsoft
│ │ ├── Boot
│ │ │ ├── BCD
│ │ │ ├── BCD.LOG
│ │ │ ├── BCD.LOG1
│ │ │ ├── BCD.LOG2
│ │ │ ├── bg-BG
│ │ │ ├── bootmgfw.efi
│ │ │ ├── bootmgr.efi
│ │ │ ├── BOOTSTAT.DAT
│ │ │ ├── boot.stl
│ │ │ ├── cs-CZ
│ │ │ ├── da-DK
│ │ │ ├── de-DE
│ │ │ ├── el-GR
│ │ │ ├── en-GB
│ │ │ ├── en-US
│ │ │ ├── es-ES
│ │ │ ├── es-MX
│ │ │ ├── et-EE
│ │ │ ├── fi-FI
│ │ │ ├── Fonts
│ │ │ ├── fr-CA
│ │ │ ├── fr-FR
│ │ │ ├── hr-HR
│ │ │ ├── hu-HU
│ │ │ ├── it-IT
│ │ │ ├── ja-JP
│ │ │ ├── kd_02_10df.dll
│ │ │ ├── kd_02_10ec.dll
│ │ │ ├── kd_02_1137.dll
│ │ │ ├── kd_02_14e4.dll
│ │ │ ├── kd_02_15b3.dll
│ │ │ ├── kd_02_1969.dll
│ │ │ ├── kd_02_19a2.dll
│ │ │ ├── kd_02_1af4.dll
│ │ │ ├── kd_02_8086.dll
│ │ │ ├── kd_07_1415.dll
│ │ │ ├── kd_0C_8086.dll
│ │ │ ├── kdstub.dll
│ │ │ ├── ko-KR
│ │ │ ├── lt-LT
│ │ │ ├── lv-LV
│ │ │ ├── memtest.efi
│ │ │ ├── nb-NO
│ │ │ ├── nl-NL
│ │ │ ├── pl-PL
│ │ │ ├── pt-BR
│ │ │ ├── pt-PT
│ │ │ ├── qps-ploc
│ │ │ ├── Resources
│ │ │ ├── ro-RO
│ │ │ ├── ru-RU
│ │ │ ├── sk-SK
│ │ │ ├── sl-SI
│ │ │ ├── sr-Latn-RS
│ │ │ ├── sv-SE
│ │ │ ├── tr-TR
│ │ │ ├── uk-UA
│ │ │ ├── winsipolicy.p7b
│ │ │ ├── zh-CN
│ │ │ └── zh-TW
│ │ └── Recovery
│ │ ├── BCD
│ │ ├── BCD.LOG
│ │ ├── BCD.LOG1
│ │ └── BCD.LOG2
│ └── systemd
│ └── systemd-bootx64.efi
├── initramfs-linux-fallback.img
├── initramfs-linux.img
├── intel-ucode.img
├── loader
│ ├── entries
│ │ └── arch.conf
│ ├── loader.conf
│ └── random-seed
├── System Volume Information
│ ├── AadRecoveryPasswordDelete
│ └── ClientRecoveryPasswordRotation
└── vmlinuz-linux
sudo efibootmgr -v
, not sure Arch is same or not.