How can I repair my installation?

Does ubuntu 11.10 have a repair setup like windows that repairs the operating system files? Or do we have to do a whole new installation?

If not, is there a backup solution so I can re-install Ubuntu and just use the backup file to put all my programs back etc?


There is a 'Recovery Mode' boot option on startup;

This mode just loads some basic services and drops you into command line mode. You are then logged in as root (the superuser) and can repair your system using command line tools.

Reference

Unlike a Windows recovery it will not automatically fix any errors - you will need to use command line tools and understand exactly what you are doing to repair your installation.

As Michael K suggested you can also use a live CD to recover an installation but once again you must know what you are doing and use command line tools to carry out the repair. There is a good Ubuntu Documentation page on Live CD Recovery that I recommend you have a read through to get a good understanding of what is required and how to use it.

A third option is to do a re-install of the operating system but do not format and just 'overwrite' your existing installation.

  • Boot to the install media and go through the install process as usual.
  • When you get to the partitioner to allocate drive space, depending on the version you are installing check the box marked 'Manually select partitions' or 'Something else' and click forward. Use the SAME user name and password as the existing account when setting up again.
  • Find your existing installation and you must UNCHECK all the 'format' boxes and mount the partitions in the same place they are now.

As long as no 'format' boxes are checked, no data will be lost in your home folder and the system files will be overwritten with the originals. You should then complete all system updates again.

Regardless of what option you choose to use to try and recover an installation you should regularly back up your important documents and files so that you can restore them if needed.

Read through the answers to Comparison of backup tools for a comprehensive list of recommendations.


With Ubuntu 12.10, the third option given by Mark Rooney has been greatly simplified.

When you start the install process, once you get to the format wizard screen, a new option appears at the top if an existing installation is detected. It just asks if you would like to re-install the current installation, and will preserve your files and, where possible, your installed programs.