I was installing drivers for Nvidia GPU where I stopped lightdm to do so.
The drivers were installed through shell (ctrl+alt+f4) which I could verify.
And then I tried to login to my ubuntu desktop. It looped back to the same login screen.
I followed the steps mentioned here
ubuntu gets stuck in a login loop
But none seemed to work. I even uninstalled and reinstalled lightdm again. But didnt work. Then I purged and installed gdm through sudo apt-get purge lightdm && sudo apt-get install gdm
After this when I rebooted back, my login screen isn't appearing too and black screen is flashing continuously. I can't get access to my shell too now through ctrl+alt+f4 (f4 in my system).
I tried sshing to this system from another system but no hope.
Please help!
I'm using ubuntu 16.04 desktop