Ask Your Question

Emergency mode after upgrade to Fedora26 (Switch Root failed)

asked 2017-10-28 17:00:22 -0600

philsp gravatar image

updated 2017-10-28 18:08:50 -0600


I upgraded from Fedora 25 to 26 using the Software Center and now my machine won´t boot anymore after pressing the restart button. Error message: Failed to switch root: Specified root path /sysroot does not seem to be an OS tree. os-release file is missing.

The Kernel also shows just up as "Generic release 26" and not as "Workstation Fedora 25" as before. There is an os-release in /sysroot/etc which is a symlink to ../usr/lib/os-release which symlinks to ./os-release.d/os-release-fedora and this file does not exist.

The other os-release files in e.g. /usr/lib contain:

Name="dracut" Version="dracut-046-2.git20170811.fc26" Id=dracut VersionId=046-2.git20170811.fc26 Prettyname='dracut-046-2.git20170811.fc26 (initramfs)' Ansi_color="0;34"

I tried symlinking /sysroot/etc/os-release to one of the files but I still get the same error.

I also tried booting with an older kernel but always land in emergency mode. Any ideas on how to fix this or at least recover my data?

edit retag flag offensive close merge delete


Welcome to ask.fedora. I'm not sure, yet, what needs to be done, but I can explain one thing: The latest kernel is "Generic release 26" for two reasons: first, because you upgraded and you're now running Fedora 26 instead of 25 and second because the new kernel is generic to all forms of Fedora 26 so there's no reason to be more specific. Are you able to boot from a LiveUSB? If so, we can talk you through getting some more information and either recovering or saving needed data.

sideburns gravatar imagesideburns ( 2017-10-28 18:13:02 -0600 )edit

@sideburns Thanks, I was right now downloading LiveUSB for Windows while fiddling around in emergency mode. I was able to solve it by copying the file, symlinking did not work.

philsp gravatar imagephilsp ( 2017-10-28 18:42:11 -0600 )edit
florian gravatar imageflorian ( 2017-10-28 23:38:59 -0600 )edit

3 Answers

Sort by » oldest newest most voted

answered 2017-10-28 18:40:59 -0600

philsp gravatar image

I was able to solve this by copying os-release from /usr/lib to /sysroot/etc Symlinking did not work.

edit flag offensive delete link more


I got into the same situation when upgrading from F26 to F27 now. You saved me few hours, as this worked for me! Thanks!

Seking gravatar imageSeking ( 2017-11-25 05:25:51 -0600 )edit

I only did an innocent sudo dnf update on my Fedora 24 which caused the problem. Thank you!! You have saved my evening and probably the whole week ;)

p33k gravatar imagep33k ( 2018-02-19 11:15:10 -0600 )edit

answered 2017-11-14 19:54:08 -0600

jtison gravatar image

Haven't yet got enough karma to upvote philsp's answer, but it worked for me too. However, I'm waiting for the other shoe to drop at next upgrade. Is there a better solution than this? (no wonder I have no karma :-))

edit flag offensive delete link more


here you have some karma...

florian gravatar imageflorian ( 2017-11-14 22:07:38 -0600 )edit

After add EPEL repo. with upgrade system by DNF - on Fedora 27 workstation - os-release was override - and empty in /sysroot/etc. This solution copy os-release from /usr/lib to /sysroot/etc work as well in this situation. For now, i only disable EPEL repo. by dnf config-manager --set-disabled epel.

Adam Łangowicz gravatar imageAdam Łangowicz ( 2018-01-29 11:55:08 -0600 )edit

answered 2017-12-14 06:06:43 -0600

@sideburns I have exactly the same problem and I can boot via live cd. Can you provide further instructions for debugging? thanks

edit flag offensive delete link more


Have you tried doing what @philsp did?

sideburns gravatar imagesideburns ( 2017-12-14 14:07:46 -0600 )edit

@sideburns tried that, it doesn't let me copy the file os-release from /usr/lib to /sysroot/etc in emergency mode. says: "cp: not writing through dangling symlink '/sysroot/etc/os-release'

I would really appreciate your help. It's super critical. And many thanks again

mickyowly gravatar imagemickyowly ( 2017-12-16 03:42:20 -0600 )edit

You can find the details for the copy, there : the shell commands to type are given. I prefered to look at all the links, and restore the same things as it was. that is : copy the file to this file name : /usr/lib/os.release.d/os-release-fedora The links are yet set to go to it.

ant010 gravatar imageant010 ( 2017-12-20 06:27:05 -0600 )edit

Question Tools

1 follower


Asked: 2017-10-28 17:00:22 -0600

Seen: 4,527 times

Last updated: Oct 28 '17