I have Windows 10 and Ubuntu 16.04 LTS installed in seperate partitions. I followed a tutorial on how to restore grub after installing Windows. Grub did install, I could boot into Ubuntu, however, it didn't recognize Windows. I could boot into Windows through F12 menu, however, booting into Windows deleted grub. Then I found out I should disable the "fast boot" option of Windows to prevent it from hibernating and allow grub to recognize it. Now grub did recognize Windows, however, it seems that Windows messes it up. I boot into Ubuntu, all works fine. Than I boot into "Windows Boot Manager" option in grub. It boots into Windows. After shutting down computer and turning it on again, it now boots into Windows without opening GRUB. However, if I place Ubuntu live USB in, enter try Ubuntu mode and than shut down(without doing any further action), after reboot it again opens grub menu. Thus I understand that grub isn't deleted by Windows. However, Windows does something to prevent grub from showing up at the start of boot(propably enables "Windows Boot Manager" as default boot option and hides grub?). I want to know how to fix this option and make me able to boot into Ubuntu without having to use live USB now.
It looks like I found a working solution.
Installing boot-repair(https://help.ubuntu.com/community/Boot-Repair) and running recommended repair adds a working boot entry for Windows in grub. Selecting this entry does not break grub, allowing to boot into Linux afterwards.