Windows will overwrite the boot sector whenever you install it, upgrade it to a new version, or use tools like bootrec /fixmbr, bootrec /fixboot, or the older fdisk /mbr. In general, install Windows first, then Linux. The boot sector will stay put until you do one of the things above. (And perhaps there are also other ways to write onto the MBR.) But, if you lose GRUB, it is easily restored:

  1. Boot from a live CD (CD/DVD or flash drive).
  2. Become root or use sudo with commands below.
  3. List the available partitions if needed: fdisk -l
  4. Windows will almost certainly exist on /dev/sda1: mount /dev/sda1 /mnt
  5. Reinstall GRUB in the MBR: grub-install --root-directory=/mnt/ /dev/sda
  6. Reboot: shutdown -r now
  7. Restore the GRUB menu: update-grub

You could also install 100% Unix, Linux, or BSD and simply run Windows in a virtual machine if the computer is strong enough for that.

Also: your computer's BIOS may have an option to protect the boot sector.



open gparted , right click the partition that has Grub in it, go to manage flags and mark boot.