Try going to your bios and disabling secure boot, and then paste this into your /etc/grub.d/40_custom file:
menuentry "Windows 8 (loader) (on /dev/sda4)" { insmod part_gpt insmod chain set root='(hd0,gpt2)' chainloader /EFI/Microsoft/Boot/bootmgfw.efi }
then run grub-update in the terminal
I never understood why this happens because I have secure boot and uefi and I have grub(Linux mint and windows 8.1) running without any issues.