In an event of a complete system failure where your Ubuntu refuses to boot in spite of running grub repair tool, you don't have many choices other than to reinstall Ubuntu. Don't worry, when I say reinstall Ubuntu, I don't want to scare the hell out of you! Your personal data in the directories are still safe - you are only resetting Ubuntu system files.
Note that this guide is only for software related issues due to which your Ubuntu won't boot. If you have a major system failure because of hardware related issues, like for instance hard disk failure, this guide is useless.
Reinstall Ubuntu, but keep personal data
Step 1) First step is to create an Ubuntu Live DVD or USB drive, which will be used to reinstall Ubuntu. Head over to our detailed guide and return back with an Ubuntu Live DVD/USB drive.
Step 2) Boot your computer into the Ubuntu Live disk.
Step 3) Select “Install Ubuntu”.
Step 4) Optionally, you can select to download updates and third-party software while installing Ubuntu itself, provided your PC is connected to the internet now. Click 'Continue'.
Step 5) The next dialog box is the most important one. The installer will show you several options on what you can do from here and the options may differ for you based on your system configuration. If you only had Ubuntu on your PC, the options should be same as what I have shown below. Select “Reinstall Ubuntu 17.10”. This option will keep your documents, music and other personal files intact. The installer will try to keep your installed software too where possible. However, any personalized system settings like auto-startup applications, keyboard shortcuts, etc. will be deleted. Your version number may be different. Click 'Install Now'.
Step 6) Continue to follow on-screen instructions. You will pass through location, keyboard layout, and finally user account details. Click 'Continue'.
You can notice during installation, Ubuntu will try to restore as many applications as possible.
It's typical to see an error that says problem while restoring installed applications. There is nothing much you can do for this error other than reinstalling those applications manually after reset is complete.
That's it!