I've downloaded the NVIDIA 319.17 .run driver on www.nvidia.com and i tried to install it in Ubuntu 12.04. So I logged out, I pressed CTRL+ALT+F2 and I wrote the following commands:

sudo service lightdm stop
sudo chmod a+x NVIDIA-Linux-x86_64-319.17.run
sudo ./NVIDIA-Linux-x86_64-319.17.run

After the NVIDIA script said the driver was installed succesfully I did:

sudo shutdown -r now

When rebooting, I see a purple screen then a black screen with a blinking white underscore and that's all. I waited a few moments but nothing happens. The Ubuntu login screen never appears so I had to press the shutdown button to turn off the computer. Now I can't use Ubuntu at all.

What can I do to recover after this failed NVIDIA driver installation?