A few months ago Fedora crashed, and wouldn’t boot. It seems to do that from time to time. I have about had it with Fedora. I have at least three times as much trouble with Fedora as I do with Ubuntu.
So I reinstalled Fedora. I was back-level anyway, as I have grown very cautious of their automatic update – which about a third of the time ends up requiring a full system rebuild. My thinking about it wasn’t quite this black and white, but might has well have been: “It’s going to crash eventually, and require me to scrape it down to the bare metal – I might as well wait till that happens, rather than hastening the process by trying to update fedora.”
Anyway, on that occasion back in May, I rebuilt a new Fedora 30 system on a new disk, and restored everything.
One thing I apparently did not ever do was assign a password for root. No need to – anaconda no longer asks for it. I always sign in as dee and su if I need to.
So today Fedora crashed between key-strokes, and when I tried to reboot it failed. Of course. It spins its wheels for 5-10 minutes, and then falls into emergency mode. But something new. When it tried to drop into the emergency rescue shell it couldn’t. It said “root account is locked”. It couldn’t open the console so it thumbed its nose at me and told me to reboot. Of course there was no indication that one could glean as to what was going on, why it wouldn’t boot. But the long 5-10 minute delay sounds like it might be waiting for one of the raid arrays to appear. Sure enough, boot in single mode and you can watch it wait, and then fail.
Usually if an mdadm array is broken you can punch through it in the console and fix it once you are up. But not if you can’t get into the console.
Fortunately I had other boxes running and could go look up this “root account is locked” thing. Turns out this means “root” is locked in shadow – has no password. Ok. I pulled the hard disk, mounted it on a working ubuntu box, edited shadow to give root a password, reinstalled the disk, boot up and voila “give the man a silver dollar”.
So it seems dumb to me not to insist (in anaconda) on having a root password if it is required to run the emergency shell.
And the problem turns out sure enought to be that one of the md sets (the one having everything important) is rebuilding, so I’m just letting it rebuild in emergency mode, and then I’ll reboot again.
After it completed rebooting, I was able to exit the shell, and the boot completed fine.