I reinstalled the grub and now I am able to boot into ubuntu. But there is one more problem. The windows still doesn't recognize the partition type. I have attached the screenshot when I open up 'Disk Utility'.
It shows EFI (FAT-12/16/32) (0xef) as the partition type. When I change it to HPFS/NTFS (0x07), then it shows the following error (screenshot attached).
Now what to do?