How to Fix an Ubuntu System When It Won’t Boot

ubuntu-boot-error

Ubuntu doesn’t offer the Safe Mode and Automatic Repair tools you’ll find in Windows, but it does offer a recovery menu and a reinstall option that keeps your files and programs.

If you can’t boot anything — not even a USB drive or CD — you may need to configure the boot order in your BIOS. If this doesn’t help, there may be a hardware problem with your computer.

Check if You Can Access the GRUB Boot Loader

The first thing to check is whether you can access the GRUB2 boot loader. Boot your computer while holding the Shift key. If you see a menu with a list of operating systems appear, you’ve accessed the GRUB boot loader.

If you don’t see a menu with a list of boot options appear, the GRUB boot loader may have been overwritten, preventing Ubuntu from booting. This can happen if you install Windows on a drive after installing Ubuntu or another Linux distribution on it. Windows writes its own boot loader to the boot sector, and you won’t be able to boot Ubuntu until you reinstall GRUB.

GRUB can also boot Windows for you, so you’ll still be able to boot into Windows after you install GRUB. In dual-boot situations, you should generally install Linux on a computer after you install Windows.

access-grub2-boot-loader

Repair GRUB If You Can’t Access It

If you can’t access GRUB, you’ll need to repair it. You can use an Ubuntu installation disc or USB drive to do this. Boot into the USB drive and use the the Linux system to repair GRUB. We have a guide to reinstalling the GRUB2 boot loader on Ubuntu, either with a graphical Boot Repair tool or by using standard Linux terminal commands.

You can also just use a dedicated Boot Repair disc to boot straight to the graphical Boot Repair tool. This may be necessary, as the Boot Repair tool wasn’t available for Ubuntu 14.04 when we wrote this article.

After repairing the GRUB boot loader, you should be able to restart your computer again. The GRUB2 boot loader will appear and boot Ubuntu normally. (GRUB2 is hidden by default, so you may just see Ubuntu boot. You can hold Shift at the very beginning of the boot process to see it.)

ubuntu-grub2-boot-repair-disk

Use Recovery Mode If You Can Access GRUB

If you do see the GRUB boot menu, you can use the options in GRUB to help repair your system. Select the “Advanced options for Ubuntu” menu option by pressing your arrow keys and then press Enter. Use the arrow keys to select the “Ubuntu … (recovery mode)” option in the submenu and press Enter.

boot-to-ubuntu-recovery-mode

GRUB will boot your Ubuntu system in a very minimal recovery mode menu, skipping the majority of the system services and all the graphical applications that load. It will even load your file system in a safe read-only mode.

Select a menu option and press Enter to use it:

  • clean: Attempts to make free space on your file system. If your storage is full and this is causing some sort of problem, this can help free up space.
  • dpkg: Repairs broken software packages. If a package failed to install properly and your system doesn’t work because of it, this may help.
  • failsafeX: Boots your computer in a failsafe graphic mode. If there’s a problem with your Xorg graphical server configuration or graphics drivers and that’s causing your Ubuntu system to boot to a black screen or preventing the graphical desktop from loading properly, this can get you back to that graphical desktop.
  • fsck: Performs a file system check, which scans the computer’s file systems for errors and automatically fixes them. It’s a bit like chkdsk on Windows.
  • grub: Updates the GRUB boot loader. If you could use the GRUB boot loader to get to this menu, this option probably won’t help.
  • network: Enable networking, which is disabled by default in recovery mode.
  • root: Leaves the menu and goes to a root shell prompt. From here, you can mount the file system in write-mode and run commands that may help fix problems with the system. You should only do this if you know what you’re doing — it’s a way to fix the problem by hand if you know how.

ubuntu-recovery-menu

Reinstall Ubuntu While Keeping Files and Programs

if there’s a problem with your installed Ubuntu system, you should still be able to boot up an Ubuntu live CD or USB drive. Boot to the live media and start installing Ubuntu. Ubuntu should find your existing installation and give you a “Reinstall Ubuntu” option. When you perform a reinstall, the installer will keep all your personal files and settings. It will even keep your installed software packages, if possible. The Reinstall option will wipe away all your system-wide settings and return them to their defaults, but that should fix problems that misconfigured system settings could cause.

Select this option and continue through the process to reinstall Ubuntu on your computer. The installation process will also reinstall the GRUB2 boot loader along with Ubuntu, so it will also fix any GRUB issues.

reinstall-ubuntu-while-keeping-files-and-programs

If you’re worried about losing your files, it’s always a good idea to have backups. You can use the “Try Ubuntu” option on the Ubuntu installation media to access a graphical desktop. From here, open the file manager and access the files stored on your Ubuntu system drive. Connect some sort of external storage — such as a USB flash drive or external hard drive — to the computer and use the graphical file manager to back up your files.

You’ll find the Ubuntu drive under Devices in the sidebar. You’ll find your personal files in your /home/NAME directory for. Be sure to remember your hidden configuration files if you want to back those up, too.

In theory, this shouldn’t be necessary — the Reinstall option shouldn’t erase your files. However, it’s always a good idea to have backup copies of your files. if you don’t, it’s probably a good idea to create that backup before doing anything else. Something could always go wrong.

back-up-files-from-ubuntu-live-media


This process should have fixed Ubuntu if it won’t boot. If it doesn’t work, there may be a more serious problem with your computer’s hardware or its system drive. For example, if your computer says it has no internal boot device and you can’t see its internal drive when you boot to the Ubuntu live media, the system drive may be physically damaged.

If nothing happens when you boot your computer — not even a boot logo or some sort of BIOS or UEFI startup message — the computer’s hardware may be damaged. If it’s a laptop, its battery may just be dead.

Image Credit: Mila Ranta on Flickr

Chris Hoffman is a technology writer and all-around computer geek. He's as at home using the Linux terminal as he is digging into the Windows registry. Connect with him on Twitter.