[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
Forum Moderator
Posts: 28881
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"
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. 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

Return to “CentOS 7 - Software Support”