You can always reinstall the same Ubuntu version without reformatting the system directory. In that case, all you user files and settings will stay in place. At most, you may need to reinstall some applications you installed yourself.
To recover your system this way, boot up an installation medium of the same Ubuntu version. In the Installer, on the "Installation type" dialog, select "Something else". Indicate your current system partition as the partition to be used as root ("/") and uncheck the "format" checkbox. If you had a home folder or any other part of the system on another partition, reassign the same partitions, making sure "format" is unchecked.
This will repair your system while leaving your setup largely in place, except from some applications you may need to reinstall. After reinstall, also these applications will continue to be configured as before, because your user preferences are still in place.
Needless to say, even if this preserves all your date, make sure that the back up of all your personal user data is updated before proceeding.