Os-release file not found


Greetings everyone, I have already exposed this issue on telegram group, didn’t get any help. So “cat /run/initramfs/rdsosreport.txt” shows an error “/sysroot does not seem to be an os tree. Os-release file is missing.”

cat /sysroot/root/etc/os-release is not empty
ls -l /sysroot/root/etc/os-release shows a symlink to usr/lib/os-release which content is the same of the/etc/os-relase and it has a symlink to intird-release.

initrd-release also has the same content but has no symlink. I already tried everything suggested in the only post I found about this issue (Error booting: Generating "/run/initramfs/rdsosreport.txt")
,so mounting sysroot as rw, removing and copying files… but it didn’t work. Thanks everyone who is going to try helping me :slight_smile:

1 Like

Which version & spin of fedora are you running?
The text implies that it may be silverblue, kinoite, coreOS, IoT, or similar but we do not know and would only guess without your input.

Please provide more info.
When and how do you see this error? ( /sysroot should only be available during boot before the actual file systems are mounted)
What version of fedora and which spin? (workstation, silverblue, or ? )
Does the system boot fully or is it hanging during boot.

You’re right. I should’ve given more info. It’s IoT with i3 installation tho. The error is visibile only when I select the most updated kernel version the older works fine. The system fully boots but just brings me there.

1 Like

I have the same problem since I updated to kernel 5.18.19 on KDE Nobara Project.

Previous kernels work fine.

I also tried mounting and copying the files.

Steps to reproduce,

  1. on grub choose to boot with the latest kernel.

It will lead you to a terminal in emergency mode, where you can cat /run/initramfs/rdsosreport.txt or journalctl both will show you the messages

Failed to switch root: Specified switch root path ‘/sysroot’ does not seem to be an 0S tree, os-release file is missing

initrd-switch-root.service: Failed
Failed to start Switch Root

It seems that something similar is happening since Fedora 24, and most people are “fixing” it by reinstalling.

The difference I found on older posts is that they have /sysroot/etc/os-release
On mine and OP it seems to be /sysroot/root/etc/os-release

The steps described here solved my problem.

initrd-switch-root.service failed (#32) · Issues · Thomas Crider / Nobara Images · GitLab

I had to update GRUB_CMDLINE_LINUX, so the new kernel knows the path to root.

1 Like