Bug 994587 - removing /etc/os-release prevents boot
removing /etc/os-release prevents boot
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: systemd (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: systemd-maint
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-07 10:38 EDT by Richard S. Hendershot
Modified: 2013-09-11 20:04 EDT (History)
10 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-09-11 20:04:17 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Richard S. Hendershot 2013-08-07 10:38:38 EDT
Description of problem: removing fedora-release rpm removes file necessary for boot


Version-Release number of selected component (if applicable):


How reproducible:


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"

Actual results:


Expected results:


Additional info:
Comment 1 Michal Schmidt 2013-08-07 15:23:05 EDT
(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
  is missing.
... 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).
Comment 2 Richard S. Hendershot 2013-08-07 16:20:18 EDT
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 ?
Comment 3 Lennart Poettering 2013-09-11 20:04:17 EDT
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.

Note You need to log in before you can comment on or make changes to this bug.