I had installed Ubuntu on my Mac recently and decided it was not for me. So I decided to remove it via disk utility. I couldn't see the Ubuntu partition in disk utility. So I clicked partition on my Macintosh HD. There was unidentified space of my Linux. So I clicked on it and pressed the '-' button below the graph. Then I clicked apply and it showed an error saying partition type not identified. So I decided not to do it without proper reference and switched it off. The next morning, macos won't boot. It takes me straight to GNU Grub and holding down option while booting doesn't show my macos partition.
The recovery mode is also missing. It boots to internet recovery instead of recovery mode. When I checked on disk utility, my drive shows up as three partitions, 2 of which is my boot camp installation. The partition which used to be Macintosh HD and the Ubuntu one is now called FFFFFFFFFF-FFFFF etc. It is not usable in any manner and I cannot install macos into it using the internet recovery and I cannot erase it.
Please do help me. If there is a way to recover my data too, that would be helpful. Reinstalling macos is not a good option for me as I do not have a good internet connection.