Make Grub find a Windows partition
Posted: 2024-04-07 Filed under: system | Tags: boot, efi, grub, UEFI, windows Leave a commentI have Linux installed on sda and Windows 10 installed on sdb. Both disks are EFI and I want to make Grub add Windows to the boot menu.
I am using CRUX 3.7 at the moment. So… First, install os-prober, available from contrib:
prt-get depinst os-prober
In my case, the EFI boot partition of Windows is sdb1, as reported by fdisk -l:
Device Start End Sectors Size Type /dev/sdb1 2048 206847 204800 100M EFI System /dev/sdb2 206848 239615 32768 16M Microsoft reserved /dev/sdb3 239616 1948339888 1948100273 928.9G Microsoft basic data /dev/sdb4 1948340224 1953523711 5183488 2.5G Windows recovery environment
It should be mounted somewhere, so do as root:
mkdir -p /mnt/win
mount /dev/sdb1 /mnt/win
Then, simply run:
grub-mkconfig > /boot/grub/grub.cfg
In the output, there should be this:
Found Windows Boot Manager on /dev/sdb1@/EFI/Microsoft/Boot/bootmgfw.efi
That’s it.
I have my own, custom /etc/default/grub, which will be discussed in another post.
