Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
Updated to today RHEL7 nightly and I get the following errors
when booting
systemd[1]: Starting Switch Root...
systemctl[445]: Failed to switch root: Specified switch root path /sysroot does not seem to be an OS tree. os-release file is missing.
systemd[1]: initrd-switch-root.service: main process exited, code=exited, status=1/FAILURE
systemd[1]: Failed to start Switch Root.
systemd[1]: Startup finished in 595ms (kernel) + 0 (initrd) + 1.354s (userspace) = 1.950s.
systemd[1]: Unit initrd-switch-root.service entered failed state.
systemd[1]: Triggering OnFailure= dependencies of initrd-switch-root.service.
systemd[1]: initrd-switch-root.service failed.
systemd[1]: Started Emergency Shell.
The repo I used was
http://download.lab.bos.redhat.com/rel-eng/latest-RHEL-7/compose/Server/x86_64/os which contains version
systemd-219-42.el7.x86_64.rpm
How reproducible:
%100...
I just did a fresh install of RHEL-7.5-20170914.n.0 Server x86_64 which includes systemd-219-44.el7.x86_64 and it worked fine. I rebooted the system a few times and it came fine each time.
https://beaker.engineering.redhat.com/recipes/4268331
I was able to reproduce this by removing the os-release symlinks and files.
[root@localhost ~]# ls -l /etc/os-release
lrwxrwxrwx. 1 root root 21 Sep 15 15:54 /etc/os-release -> ../usr/lib/os-release
[root@localhost ~]# ls -l /usr/lib/os-release
lrwxrwxrwx. 1 root root 28 Sep 15 15:54 /usr/lib/os-release -> os.release.d/os-release-rhel
[root@localhost ~]# rm -f /etc/os-release \
/usr/lib/os-release \
/usr/lib/os.release.d/os-release-rhel
[root@localhost ~]# reboot
...
...
[ 4.910424] localhost.localdomain systemd[1]: Starting Switch Root...
[ 4.916397] localhost.localdomain systemctl[463]: Failed to switch root: Specified switch root path /sysroot does not seem to be an OS tree. os-release file is missing.
[ 4.917405] localhost.localdomain systemd[1]: initrd-switch-root.service: main process exited, code=exited, status=1/FAILURE
Do you know how your os-release file disappeared?
The symlinks seem to be new thing for RHEL 7.5
/etc/os-release -> /usr/lib/os-release -> os.release.d/os-release-rhel
RHEL 7.4 /etc/os-release is just a plain file
(In reply to Jeff Bastian from comment #5)
> The symlinks seem to be new thing for RHEL 7.5
> /etc/os-release -> /usr/lib/os-release -> os.release.d/os-release-rhel
>
> RHEL 7.4 /etc/os-release is just a plain file
Yes... /etc/os-release is a symlink but to ..
:/# ls -ld /etc/os-release
lrwxrwxrwx 1 root 0 2 Sep 15 13:27 /etc/os-release -> ..
and there is no /usr/lib/os-release
:/# ls /usr/lib/os-release
ls: cannot access /usr/lib/os-release: No such file or directory
So this must be the problem... change component to
redhat-release-server
I also ran into this issue when I upgraded one of VMs to 7.5 from 7.4 and the VM stopped booting with the same error.
As a work around, I mounted sysroot in write mode and created a symlink os-relead.d to os.release.d and the VM booted again.
I found comment #8 to be a bit cryptic, but it gave me enough
clues to get my machines working again. The exact commands I
pasted into the failed console are:
mount -o remount,rw /sysroot
cd /sysroot/usr/lib
ln -s os.release.d os-release.d
exit
I believe it's related to migration of redhat-release-{variant} into redhat-release. There was a typo in /etc/os.release.d I hope if fixes your issue as well.
Lubos