Page 1 of 1

[SOLVED] System falls in to emergency mode due initrd-switch-root.service entered failed state.

Posted: 2020/05/17 00:32:55
by planhack
Hi all,

After updating to CentOS 7.8, the system boots to emergency.target and `systemctl | grep fail` shows initrd-switch-root as failed.

The system will boot correctly after changing /usr/lib/systemd/system/initrd-switch-root.service to boot to default.target on failure

Code: Select all

ed /usr/lib/systemd/system/initrd-switch-root.service
/^OnFailure
s/emergency/default/
wq
reboot
This seems like a doubleplus ungood hack. RedHat says they have a solution hidden behind their paywall.

Anyone know a better fix?

Re: System falls in to emergency mode due initrd-switch-root.service entered failed state.

Posted: 2020/05/17 12:17:16
by TrevorH
You can read that page with one of the free Developer subscriptions but the gist of it says: run "dracut --force --regenerate-all"

Re: System falls in to emergency mode due initrd-switch-root.service entered failed state.

Posted: 2020/05/17 23:39:48
by planhack
TrevorH wrote:
2020/05/17 12:17:16
You can read that page with one of the free Developer subscriptions but the gist of it says: run "dracut --force --regenerate-all"
Thanks for both pointers!