Tuesday, June 9, 2026

power outage catch-22

Throughout my lifetime, unexpected power outages would lead Arch to do a disk check during repowering. Users would then reboot normally after verifying HDD/SDD disk(s) integrity.

The latest way Linux denies a person access to their own system is much more subtle and potentially permanent. Without a massive, preconfigured, and installed (via mkinitcpio), etc/systemd/system/rescue.service and/or etc/systemd/system/emergency.service, Linux provides you with a classic Catch-22: root access to the terminal is locked. This would be an easy problem to fix if I had console access, but I'm locked-out of the console and can't fix the lock.

You are in emergency mode. After logging in, type "journalctl -xb" to view system logs, "systemctl reboot" to reboot, or "exit" to continue bootup.

"No problem" you think, "this will be an easy emergency fix via the command line in the console." But then this appears, nearly immediately after the above...

Cannot open access to console, the root account is locked. See sulogin(8) man page for more details
Thus we're not in emergency mode and we don't have console access.

The only way out is a USB resuce stick skilled use of it. Eg, chrooting to build a new mkinitcpio.

create an installable USB

  • you may need to find a VGA console and cable for the system attempting to restore. HDMI will not work until Linux is installed and it can handshake.
  • On another system, eg, some laptop, download an Arch ISO and verify its checksum. Having an old saved arch ISO avoids these stemps.
  • Burn the USB, covered here.

partial fix 00

To return our console access, we need to unlock root. The fix requires accessing the linux kernel load line during GRUB's install. Pick one of the linux kernels in the GRUB menu, and use the "e" key. This brings us to the kernel parameters, which we will need to edit. After adding the suffix (see below), "F10" to load the kernel with the added parameters.

partial fix 01

This stack exchange post provided me with a kernel parameter which successfully got me as far as the emergency access prompt.
SYSTEMD_SULOGIN_FORCE=1 init=/sbin/sulogin
The solution is only partial, because I found that I had no access to the noted passwd, mkinitcpio, nano, etc commands needed to unlock root. That is because the emergency prompt is running entirely within initramfs. Without having already configured a complete emergency.service file, a person has almost no commands beyond some basic emacs.

Meanwhile, unlocking root is still necessary else the error simply returns at reboot. Without a configured "emergency.service" file in systemd, I was right back where I started, at a locked console.

creation of emergency.service

helpful, but not a fix

Linuxconfig.org. Setting kernel boot parameters.

nope 1

Kali solution. Well documented kernel parameter addition. GRUB ignores.
single init=/bin/bash

nope 2

Well documented kernel parameter addition. GRUB ignores.
break