How to Repair an Ubuntu Installation: 10 Steps

Table of contents:

How to Repair an Ubuntu Installation: 10 Steps
How to Repair an Ubuntu Installation: 10 Steps
Anonim

This article explains how to restore a corrupt Ubuntu installation. If your computer's Ubuntu operating system doesn't boot or doesn't work properly, you can fix the problem using the command line. If using the "Terminal" window the problem is not solved, you can boot the system in "recovery" mode to repair all the corrupted packages. If even this solution does not solve the problem, you will have to reinstall the entire operating system.

Steps

Method 1 of 2: Using the Terminal Window

Recover Ubuntu Step 1
Recover Ubuntu Step 1

Step 1. Launch the "Terminal" app

It has a black icon with a command prompt in the upper left corner.

Recover Ubuntu Step 2
Recover Ubuntu Step 2

Step 2. Type the following command into the "Terminal" window and press the Enter key:

sudo su -c "apt-get update". This command checks for new updates for packages installed on Ubuntu.

Recover Ubuntu Step 3
Recover Ubuntu Step 3

Step 3. Type the next command in the "Terminal" window and hit the Enter key:

sudo su -c "dpkg --configure -a". This command is intended to correct all errors related to the Ubuntu package manager, "dpkg".

Recover Ubuntu Step 4
Recover Ubuntu Step 4

Step 4. Run the next command by typing it in the "Terminal" window and pressing the Enter key:

sudo su -c "apt-get -f install". This command is used to attempt to locate all corrupt dependencies existing between system files and restore them.

Recover Ubuntu Step 5
Recover Ubuntu Step 5

Step 5. Restart Ubuntu

After running all the given commands, try restarting your computer to check if the problem is resolved. Otherwise, continue reading the article.

Method 2 of 2: Use Recovery Mode

Recover Ubuntu Step 6
Recover Ubuntu Step 6

Step 1. Restart Ubuntu

In order to have access to the Ubuntu "GRUB" menu, you need to restart your computer. To restart the system, click on the gear icon in the upper right corner of the desktop and select the "Shutdown" option.

Recover Ubuntu Step 7
Recover Ubuntu Step 7

Step 2. Hold down the ⇧ Shift key while the computer restarts

This will display the special "GRUB" menu.

Recover Ubuntu Step 8
Recover Ubuntu Step 8

Step 3. Select the Advanced Options for Ubuntu item

It is the second option in the "GRUB" boot menu.

Recover Ubuntu Step 9
Recover Ubuntu Step 9

Step 4. Select Ubuntu, with Linux x.xx.x 32 generic (recovery mode)

This way the Ubuntu system will boot into "recovery" mode.

Recover Ubuntu Step 10
Recover Ubuntu Step 10

Step 5. Choose the dpkg Repair broken packages option

It is the third item in Ubuntu's recovery menu. The program will try to automatically repair all corrupt packages present in the system. It will also run a full scan of your hard drive for errors. Observe the result of the system driver scan. If any errors have been found, the problem may be with the computer's hard drive. If no errors were found and the problem persists, the solution may be to reinstall Ubuntu.

Recommended: