Comment in below the "Boot to console" line, and remove comment below the "Boot to X11" line. Then at the bottom of the file, comment in on the 'xdm' line and remove comment from the 'kdm' line. Reboot afterwards (use the reboot command in the console since you can't reboot using the normal way).
I hope it works. I had a similar problem and this solved it.
]]>...
[Shutdown]
BootManager=Grub
HaltCmd=/sbin/halt
RebootCmd=/sbin/reboot
...
[X-:*-Core]
AllowShutdown=All
...
I hope this helps you. Have a nice evening!
]]>