If Fedora can’t mount /home partition for any reason, it’ll enter emergency mode (also known as dracut emergency shell) as it should, but will give this error message:
Cannot open access to console, the root account is locked.
See sulogin(8) man page for more details.
Press Enter to continue.
On pressing [Enter] it tries to reload emergency shell and the process repeats. Emergency shell is unusable.
This is a known problem. It happens Fedora releases 28 and newer, which don’t require password for root account during installation and use first user added as administrator/superuser. In this case root account is locked, and if /home is inaccessible – then the system can’t use superuser/administrator account either.
What to do
If you find yourself in this situation and you can’t resolve problem with /home mounting from Live disk/USB, and you need access to emergency mode, the solution is simple.
Boot into Live disk/usb and chroot into your Fedora installations as documented in this Fedora quick-docs article – following steps 1 through 8.
Unlock root account by supplying password for it:
passwd root
Exit chroot environment with [Ctrl-d] or
exit
Reboot your computer with GUI or with
systemctl reboot
You should get back to emergency mode but with perfectly functional shell/console.
I have the same problem as nightromantic’s posted solution and I am trying to solve this. I have the below output, but I don’t know how to match my output with the instructions of Fedora quick-docs article.
Device Start End Sectors Size Type
/dev/sda1 2048 923647 921600 450M Windows recovery environment
/dev/sda2 923648 1128447 204800 100M EFI System
/dev/sda3 1128448 1161215 32768 16M Microsoft reserved
/dev/sda4 1161216 313420961 312259746 148.9G Microsoft basic data
/dev/sda5 313421824 315121663 1699840 830M Windows recovery environment
/dev/sda6 315121664 317218815 2097152 1G Linux filesystem
/dev/sda7 317218816 1953523711 1636304896 780.3G Linux LVM
Note that (at least in F31) you can’t enter into rescue.target (by running systemctl isolate command or by adding systemd.unit kernel parameter, it’s the same) if SELinux is in “enforcing” mode. I don’t know it’s a bug or not, but keep in mind that if you want to use rescue target, previously you should have put your system in “permissive” SELinux’s mode
I think, also, it needs a little tailoring for people who have this specific console problem, which we see pretty frequently. (This topic has almost 80,000 views!)