Windows OS Hub
  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu
  • Home
  • About

Windows OS Hub

  • Windows Server
    • Windows Server 2022
    • Windows Server 2019
    • Windows Server 2016
    • Windows Server 2012 R2
    • Windows Server 2008 R2
    • SCCM
  • Active Directory
    • Active Directory Domain Services (AD DS)
    • Group Policies
  • Windows Clients
    • Windows 11
    • Windows 10
    • Windows 8
    • Windows 7
    • Windows XP
    • MS Office
    • Outlook
  • Virtualization
    • VMWare
    • Hyper-V
    • KVM
  • PowerShell
  • Exchange
  • Cloud
    • Azure
    • Microsoft 365
    • Office 365
  • Linux
    • CentOS
    • RHEL
    • Ubuntu

 Windows OS Hub / Linux / Fix: Linux Boots into “Welcome to Emergency”

March 30, 2021 CentOSLinuxQuestions and AnswersRHELUbuntu

Fix: Linux Boots into “Welcome to Emergency”

In my work I sometimes come across a problem when Linux is booted with the “Welcome to emergency mode” message. Most often, this problem occurs after an emergency power outage on a server, after a system crush or other similar situations. In 90% of cases, the error is related to fstab or Linux file system damage which can be fixed quite easily.

In this article we will discuss some ways to solve this issue.

Contents:
  • How to Fix Linux File System Errors Using LiveCD?
  • Emergency Mode due to /etc/fstab Issues
  • Linux Has Been Installed from a USB Stick
  • Dualboot Windows and Linux configuration

How to Fix Linux File System Errors Using LiveCD?

Suppose, you have had a failure on your server, like an emergency power outage, and when connecting to your Linux server in the remote console or VNC, you see the following:

Welcome to emergency mode! After logging in, type “journalctl -xb” to view system logs, “systemctl reboot” to reboot, “systemctl default” or ^D to try again boot into default mode.
Give root password for maintained (or press Control-D to continue).

Linux boot to Welcome to emergency mode! After logging in, type “journalctl -xb” to view system logs, “systemctl reboot” to reboot

The emergency mode provides minimum Linux environment to recover your system, if an OS cannot boot into the Rescue mode. In the emergency mode, Linux mounts the root file system as read-only. Other local file systems are not mounted, network interface is not brought up.

If you press Control + D, your system will start booting, but in some time it gets back to the emergency mode:

linux can't boot normally, emergency mode

To solve this problem, you need to boot your server from a LiveCD or LiveUSB and use the SystemRescueCd tool. I have booted my host from a LiveCD image with built-in systemrescuecd:

boot from LInux LiveCD with systemrescuecd

Then run file system check and fix all found errors using this command:

# fsck -y /dev/sda1 — where sda1 is your disk partition

You must check all partitions and restart your host. In most cases, your problem will be solved.

Emergency Mode due to /etc/fstab Issues

Another problem that may occur is an fstab damage or incorrect configuration. In my case, when I booted from systemrescuecd and checked the system, no errors were found, but the problem was not solved. Having opened fstab, I saw that there were no disk partitions to mount, only the boot disk entry was available in the configuration file:

chech fstab enrty

To solve this problem, you must get UUIDs of your disks using blkid:

Get the UUID with blkid

Then add all the information you have got in fstab and reboot your Linux host. If you have done it correctly, your Linux will boot in normal mode.

Linux Has Been Installed from a USB Stick

Also, I came across a situation when Linux had been installed from a USB media, and after a server restart, the system booted with ‘Welcome to emergency mode!’ message. After viewing fstab, it turned out that the USB device was displayed there as a working partition. In this case you can delete the USB drive mount entry and reboot the system. Like in the first case, you must boot from systemrescuecd and open fstab. It is likely, you will see a similar entry— /mnt/usb1:

linux disable mounting of external usb drive in fstab

Just remove this line if you are not using the USB drive.

Dualboot Windows and Linux configuration

Another variant of this problem reported by users is using both Windows and CentOS on the same computer (in dual boot configuration). The emergency mode error often occurs when mounting Windows partitions during the boot. Usually the problem is solved by disabling Windows fast startup.

To disable it, select Change settings that are currently unavailable in Control Panel\All Control Panel Items\Power Options\System Settings. Uncheck the option “Turn on fast startup”.

windows - disable fast startup in dual boot configuration with linux

Save the changes and restart your device. After doing it, your Linux should boot normally.

If you use LVM partitions, this error may also occur. In general, the solution is similar to that related to a common partition: check your fstab configuration and fix errors in it.

0 comment
1
Facebook Twitter Google + Pinterest
previous post
Using Windows File Recovery Tool (WINFR) on Windows 10
next post
How to Map Network Drives (Shared Folders) with Group Policy?

Related Reading

How to Increase Size of Disk Partition in...

October 5, 2023

How to Use Ansible to Manage Windows Machines

September 25, 2023

Fixing ‘The Network Path Was Not Found’ 0x80070035...

August 30, 2023

How to Install and Configure Ansible on Linux

August 27, 2023

Computer Doesn’t Turn Off After Shutting Down Windows...

August 26, 2023

Leave a Comment Cancel Reply

Categories

  • Active Directory
  • Group Policies
  • Exchange Server
  • Microsoft 365
  • Azure
  • Windows 11
  • Windows 10
  • Windows Server 2022
  • Windows Server 2019
  • Windows Server 2016
  • PowerShell
  • VMWare
  • Hyper-V
  • Linux
  • MS Office

Recent Posts

  • How to Connect VPN Before Windows Logon

    November 14, 2023
  • Removing Azure Arc Setup Feature on Windows Server 2022

    November 9, 2023
  • Using WPAD (Web Proxy Auto-Discovery Protocol) on Windows

    November 7, 2023
  • Send Emails with Microsoft Graph API and PowerShell

    November 6, 2023
  • Zabbix: How to Get Data from PowerShell Scripts

    October 27, 2023
  • Tracking Printer Usage with Windows Event Viewer Logs

    October 19, 2023
  • PowerShell: Configure Certificate-Based Authentication for Exchange Online (Azure)

    October 15, 2023
  • Reset Root Password in VMware ESXi

    October 12, 2023
  • How to Query and Change Teams User Presence Status with PowerShell

    October 8, 2023
  • How to Increase Size of Disk Partition in Ubuntu

    October 5, 2023

Follow us

  • Facebook
  • Twitter
  • Telegram
Popular Posts
  • How to Configure MariaDB Master-Master/Slave Replication?
  • How to Mount Google Drive or OneDrive in Linux?
  • KVM: How to Expand or Shrink a Virtual Machine Disk Size?
  • Adding VLAN Interface in CentOS/Fedora/RHEL
  • Install and Configure SNMP on RHEL/CentOS/Fedor
  • Configuring High Performance NGINX and PHP-FPM Web Server
  • How to Install and Configure Squid Proxy Server on Linux
Footer Logo

@2014 - 2023 - Windows OS Hub. All about operating systems for sysadmins


Back To Top