Grub2 and WindSLIC: insert WindSLIC entry instead of the Windows Bootloader one

We can customize the Grub2 to boot Windows via WindSLIC.

We have to create the grub's configuration /etc/grub.d/25_windslick:

exec tail -n +3 $0
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
menuentry 'Windows Boot Manager (su /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-efi-XXXX-XXXX' {
        insmod part_gpt
        insmod fat
        set root='hd0,gpt1'
        if [ x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  XXXX-XXXX
          search --no-floppy --fs-uuid --set=root XXXX-XXXX
        chainloader /EFI/WindSLIC/WindSLIC.efi

we can copy the entire entry from the file /boot/grub/grub.cgf replacing the Windows bootloader:

chainloader /EFI/Microsoft/Boot/bootmgfw.efi

with our custom WindSLIC bootloader.

Now we have to stop the os-prober adding in the file /etc/default/grub the setting:


Finally we can execute the command: