The latest grub update, version 2:2.12.r212.g4dc616657-2, causes a segmentation fault with Windows dual boot systems. So after running it the Windows boot entry fails to boot Windows and displays a black screen.
I researched the issue and found that this is not CachyOS specific problem, but due to an upstream bug. I’m only mentioning it here so that other CachyOS users will have a simple way to know about and remedy the problem.
While there are a few workarounds mentioned on the internet, in my view they’re too complex and unreliable, so I believe the best remedy is to downgrade to the previous working version, grub-2:2.12-3.1, until the upstream bug is fixed. I’ve done this and everything is back to working normally.
Here’s the output of the grub command with the failed grub:
$ sudo grub-mkconfig -o /boot/grub/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-linux-cachyos-lts
Found initrd image: /boot/initramfs-linux-cachyos-lts.img
Found fallback initrd image(s) in /boot: initramfs-linux-cachyos-lts-fallback.img
Found linux image: /boot/vmlinuz-linux-cachyos
Found initrd image: /boot/initramfs-linux-cachyos.img
Found fallback initrd image(s) in /boot: initramfs-linux-cachyos-fallback.img
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
/usr/lib/os-probes/50mounted-tests: line 72: 17151 Segmentation fault (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72: 17171 Segmentation fault (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72: 17190 Segmentation fault (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72: 17442 Segmentation fault (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72: 17461 Segmentation fault (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72: 17480 Segmentation fault (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72: 17501 Segmentation fault (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72: 17586 Segmentation fault (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
/usr/lib/os-probes/50mounted-tests: line 72: 17605 Segmentation fault (core dumped) grub-mount "$partition" "$tmpmnt" 2> /dev/null
Found Windows Boot Manager on /dev/nvme0n1p1@/EFI/Microsoft/Boot/bootmgfw.efi
Found Windows Boot Manager on /dev/nvme1n1p1@/efi/Microsoft/Boot/bootmgfw.efi
Adding boot menu entry for UEFI Firmware Settings ...
Found memtest86+ EFI image: /boot/memtest86+/memtest.efi
/usr/bin/grub-probe: warning: unknown device type nvme0n1.
done