I've got a pi 3b that boots from the ssd card, but has an external usb drive to store media files. The external drive seems to have died (makes terrible sounds and doesn't spin up) but the bigger problem is that I can't access the system anymore. While booting it times out after waiting for the bad device, then reports "You are in emergency mode." After a few more messages it says

Cannot open access to console, the root account is locked. See sulogin(8) man page fore more details. 

Press Enter to continue.

But pressing enter or switching to other virtual consoles doesn't give me a command or login prompt. I tried booting in safemode by adding S to /boot/cmdline.txt but there's no change.

  • Please edit your question and add the contents of your /boot/cmdline.txt to it.
    – Ingo
    Commented May 20, 2020 at 9:37
  • What is "ssd card", a solid-state drive, or a secure digital card? Commented Mar 17, 2021 at 12:21

2 Answers 2


I have never heard of this method and the command line is not correct for current Raspbian. You should list your actual cmdline.txt

Your best option is to restore from your backup.

If you do not have a backup you can attempt to repair problems on the Pi by rebooting to a root shell. This won't work if you have used NOOBS

  1. Append init=/bin/sh at the end of cmdline.txt and reboot. (This will need to be done on another computer.)
  2. After booting you will be at the prompt in a root shell.
  3. Your root file system is mounted as readonly now, so remount it as read/write mount -n -o remount,rw /

You can then edit files.

  • No dice. Adding init=/bin/sh makes the boot hang early after random: crng init done but with no error messages.
    – pgcudahy
    Commented May 20, 2020 at 7:09

So, this worked for me. From this article all i did was:

  1. add the init=/bin/sh to the cmdline.txt file in the /boot partition of the SD card for the pi.
  2. once you are in the cmd prompt enter sync twice

kali@kali:~ sync

kali@kali:~ sync

  1. run exit

kali@kali:~ exit

When you run the exit command you will get a load of kernel warnings. Ignore these and wait for them to finish then off the pi. Remove the line from step 1. Reboot the pi and all should be fine.

Let me know if this works for you

Reference: https://talhasariyuerek.com/en/linux-raspberry-pi-3b3b4-emergency-mode-root-account-locked-solution/

  • Just running sync will not fix anything. Sounds like have skipped a couple of crucial steps from the tutorial. Commented Mar 23, 2021 at 15:39

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.