A windows installation wipe out your old GRUB2. You want to repair.
Suppose that /dev/sdaX is where your ubuntu was installed and /dev/sdaY is where you want to install GRUB2.
Boot with Ubuntu LiveCD. Open a terminal, then do the following:
# We call the Ubuntu from the LiveCD the Live Ubuntu
# We call the Ubuntu on our local partition /dev/sdaX the Local Ubuntu
sudo mount /dev/sdaX /mnt # mount the Local Ubuntu into the Live Ubuntu
sudo mount /dev/sdaY /mnt/boot/efi # mount the GRUB2 partition into the Local Ubuntu
for i in /dev /dev/pts /proc /sys /run; do sudo mount -B $i /mnt$i; done
# This step is NECESSARY. It makes the Local Ubuntu see what the Live Ubuntu see. Then the update-grub can work correctly.
sudo chroot /mnt # Now we switch from the Live Ubuntu to the Local Ubuntu
sudo grub-install /dev/sdaY # Install GRUB2
sudo update-grub # Update GRUB2