How To Reinstall Ubuntu
Reinstalling Ubuntu's system files may sometimes be the quickest way to solve a problem, for example if an upgrade failed or if your graphics driver is broken.
Since Hardy it is possible to reinstall Ubuntu without losing the content of the /home folder (the folder that contains program settings, internet bookmarks, emails and all your documents, music, videos and other user files). This can be done even if /home is not on a separate partition (which is the case by default if you did not manually separate it when installing Ubuntu originally). This tutorial can also be used to upgrade Ubuntu (eg 11.04 -> 12.04 from a 12.04 live-CD).
Before doing anything
This operation should not damage your documents but, for security, backup your documents and settings (including /home hidden files) on external disk or DVDs. (eg via CloneZilla) Note: Some special applications settings may be in system folders, eg LAMP, see below in the thread.
Run the Ubuntu installer
- Run the Ubuntu installer
- Follow the prompts until the "Installation type" (or "Allocate disk space") menu
- Choose the right option as described below:
Choose the right option
There are two possibilities - choose the one that fits what the installer is showing:
- If an "Upgrade 1X.XX to 1Y.YY" option is available (like in the screenshot below), choose it.
- Or, if the above option is not available, choose manual partitioning ("Something-else" option), then select Ubuntu system partition, set its mount point as "/" (keep the same format type, the same size, and untick the "Format" checkbox). Also set other partitions (/boot, /home... see DiskSpace) if needed.
Then finish the installation process. (this may take several hours, like a normal install)
After reinstalling, user accounts must be re-created with the same login and password.