Add a Windows boot entry to grub

  • First step find the UUID of the installed EFI Windows partition. Type lsblk --fs and write on a paper the UUID of the FAT32 Windows partition.
  • Open the file /etc/grub.d/40_custom
  • Copy/paste the following lines in the file :
if [ "${grub_platform}" == "efi" ]; then
        menuentry "Microsoft Windows 10  UEFI/GPT" {
                insmod part_gpt
                insmod fat
                insmod chain
                search --no-floppy --fs-uuid --set=root YOUR_WINDOWS_FAT32_UUID
                chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi
        }
fi

Replace YOUR_WINDOWS_FAT32_UUID with the UUID you’ve written on a paper.

  • Then use the following command :
grub-mkconfig -o /boot/grub/grub.cfg

untagged

85 Words

2022-11-21 10:59 +0100