The way to get out of emergency mode in Ubuntu — using Live USB

Thin Nguyen Duy
4 min readOct 25, 2021
Photo by Gabriel Heinzer on Unsplash

The problem comes…

On an autumn day, it’s sunny, cloudy and everything goes right until when I install something. In the installing progress, it had some errors due to install unsuccessfully. But not enough, it led to the shit. And I think, you got the same shit to me because you have no reason to find and read this article except you are trying to find the solution for your problem — like what I was.

Screen told that you are in emergency mode

And how did I fix it? I tried a lot of ways to fix it, but almost all these ways did not work. And I had to try the last way (with me) because this way has a little bit complicated.

Fix it

Now there are 2 solutions that may help you fix the problem:

1. Run the script directly

It did not work for me, but maybe can help you.

You press enter following the instructions as displayed on the screen. And then you run those scripts in the terminal:

fdisk -l or fsck /dev/sda to list all the disk partitions.

Then:

  • identify the /dev/sdXX device name for your “Linux Filesystem”
  • type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier
  • sudo fsck -f /dev/sda9
  • repeat the fsck command if there were errors
  • type reboot

If it does not work, move on to the next solution.

2. Using Live USB

Preparation

First, you need 1 USB and install Ubuntu on that. Why? This way uses live USB to fix that problem.
You have to use the Live USB to:

Step 1: Create a Bootable USB Ubuntu with a compatible version

  1. Download image from the Linux home If you are using Ubuntu 20.04, you should download the Ubuntu 20.04 .iso https://ubuntu.com/download/desktop
  2. Download Rufus: https://rufus.ie/en/
  3. Install Ubuntu on USB using Rufus
    Open Rufus and install with the .iso file you downloaded before
Install Ubuntu on USB using Rufus

Step 2: Access BIOS mode to choose boot using USB (installed Ubuntu)

  1. Access BIOS mode
    First, you have to access BIOS mode to choose boot using USB. There are ways to access BIOS mode with different laptop brands:
  • ASRock: F2 or DEL
  • ASUS: F2 for all PCs, F2 or DEL for Motherboards
  • Acer: F2 or DEL
  • Dell: F2 or F12
  • ECS: DEL
  • Gigabyte / Aorus: F2 or DEL
  • HP: F10
  • Lenovo (Consumer Laptops): F2 or Fn + F2
  • Lenovo (Desktops): F1
  • Lenovo (ThinkPads): Enter then F1.
  • MSI: DEL for motherboards and PCs
  • Microsoft Surface Tablets: Press and hold the volume up button.
  • Origin PC: F2
  • Samsung: F2
  • Toshiba: F2
  • Zotac: DEL

In BIOS mode, you choose to start with USB (installed Ubuntu):

  • In Boot Priority frame, you choose your USB
  • Or, press F8 ( Boot Menu) and choose your USB
BIOS screen

And then, it starts your Ubuntu on Live USB, the process will take several minutes to load (depending on your laptop), when everything is done, you choose Try Ubuntu.

Step 3: The most important step:

When you booted Ubuntu on live USB successfully, then you have to do these steps sequentially:

  • open a terminal window by pressing Ctrl + Alt + T
  • type sudo fdisk -l
  • identify the /dev/sdXX device name for your “Linux Filesystem”
  • type sudo fsck -f /dev/sdXX, replacing sdXX with the number you found earlier
  • sudo fsck -f /dev/sda9
  • repeat the fsck command if there were errors
  • type reboot

And now, you have completely fixed it. Good luck!

Photo by Ludemeula Fernandes on Unsplash

--

--

Thin Nguyen Duy

The guy loves learning new things and on the way to become a DataGuy. Interesting in neuroscience, mindfulness, meditation.