Red Hat Bugzilla – Bug 994587
removing /etc/os-release prevents boot
Last modified: 2013-09-11 20:04:17 EDT
Description of problem: removing fedora-release rpm removes file necessary for boot
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. mv /etc/os-release /etc/_os-release
3. "Not switching root: /sysroot does not seem to be an OS tree"
(In reply to Richard S. Hendershot from comment #0)
> Description of problem: removing fedora-release rpm removes file necessary
> for boot
What is the reason for removing the package?
> Steps to Reproduce:
> 1. mv /etc/os-release /etc/_os-release
> 2. reboot
> 3. "Not switching root: /sysroot does not seem to be an OS tree"
The check for the presence of /etc/os-release is intentional. The full error message is:
Not switching root: /sysroot does not seem to be an OS tree. /etc/os-release
... which seems clear enough. You get dropped to a shell in the initramfs, with /sysroot mounted, so it's even possible to create an os-release file from there, exit the shell and continue booting.
Not sure whether we should change anything here. I suppose we could have systemd Require /etc/os-release. Then attempts to remove fedora-release would fail, because yum will refuse to remove systemd (it's protected).
The partition, for me, is mounted at /sysroot but RO. I know to re-mount it but that could be a problem for many. There's probably no good reason to remove release rpm
...but my scenario was in trying to remove everything I could from gnome and replace it with mate. The system was behaving irrationally and this would re-generate configs, identify deps, remove duplicate apps, etc.
The release rpm appeared in the list of removals and I did not know the consequence (seems this didn't happen with past versions?)
I know there have been times I've replaced one release with another as a way of getting some legacy collection of packages. I don't remember how successful but wanted to mention it. Probably need to be able to remove the release rpm.
I was wondering if a fallback to deciding the release version could be gathered from the running kernel ?
We use /etc/os-release as indication that we are actually booting a real operating system. That's a safety feature, not a bug. Closing.