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

Issues related to applications and software problems
Post Reply
planhack
Posts: 2
Joined: 2020/05/16 23:59:17

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

Post by planhack » 2020/05/17 00:32:55

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?
Last edited by planhack on 2020/05/17 23:40:59, edited 1 time in total.

User avatar
TrevorH
Site Admin
Posts: 33202
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

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

Post by TrevorH » 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"
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

planhack
Posts: 2
Joined: 2020/05/16 23:59:17

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

Post by planhack » 2020/05/17 23:39:48

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!

Post Reply