Bug 1678634

Summary: Installation of RHEL 8 fails to boot with message "Failed to switch root: Specified switch root path '/sysroot' does not seem to be an OS tree. os-release file is missing."
Product: Red Hat Enterprise Linux 8 Reporter: Jose Castillo <jcastillo>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED NOTABUG QA Contact: Release Test Team <release-test-team-automation>
Severity: unspecified Docs Contact:
Priority: medium    
Version: 8.0CC: Claude.Frantz, jcastillo, jkonecny, jstodola, sbueno
Target Milestone: rc   
Target Release: 8.0   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-12 18:22:32 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
/run/initramfs/rdsosreport.txt in the failed state
none
rdsosreport.txt with rd.debug and rd.shell options set none

Description Jose Castillo 2019-02-19 09:27:51 UTC
Description of problem:

RHEL 8 fails to boot in a KVM (on a RHEL 7.6 Hypervisor) after customer's install script has run. It stops with the error message:
Failed to start Swtich Root

/sysroot is empty at this point. 

In rdsosreport.txt we have:

[    2.252419] gimp systemctl[543]: Failed to switch root: Specified switch root path '/sysroot' does not seem to be an OS tree. os-release file is missing.


Version-Release number of selected component (if applicable):
Red Hat Enterprise Linux 8

How reproducible:
This errors happens on 95% of all RHEL 8 installations in a KVM on customer's side.

Steps to Reproduce:
According to customer, steps to reproduce are:

1. install from RHEL 8 Snapshot 5 DVD
2. in anaconda manually configure the partitions to 
[root@elst ~]# df -Th
Filesystem                Type      Size  Used Avail Use% Mounted on
devtmpfs                  devtmpfs  8.3G     0  8.3G   0% /dev
tmpfs                     tmpfs     8.3G     0  8.3G   0% /dev/shm
tmpfs                     tmpfs     8.3G  8.7M  8.3G   1% /run
tmpfs                     tmpfs     8.3G     0  8.3G   0% /sys/fs/cgroup
/dev/mapper/root_vg-root  xfs        22G  4.8G   18G  22% /
/dev/mapper/oral_vg-oral  xfs       200G  1.5G  199G   1% /oral
/dev/mapper/orac_vg-orac  xfs       400G  2.9G  397G   1% /orac
/dev/mapper/home_vg-home  xfs       100G  747M  100G   1% /home
/dev/vda1                 xfs       994M  171M  824M  18% /boot
/dev/mapper/root_vg-var   xfs       9.8G  346M  9.5G   4% /var
/dev/mapper/root_vg-core  xfs       7.4G   85M  7.3G   2% /var/core
/dev/mapper/root_vg-log   xfs       9.8G  121M  9.7G   2% /var/log
/dev/mapper/root_vg-audit xfs       4.9G   69M  4.9G   2% /var/log/audit
tmpfs                     tmpfs     1.7G  4.0K  1.7G   1% /run/user/0
3. choose minimal installation (we have seen the error with other configurations too)
4. I also configured the time zone and the NIC, but this should be irrelevant
5. start the installation
6. you need access to the repositories:
rhel-8-for-x86_64-baseos-htb-rpms 
rhel-8-for-x86_64-appstream-htb-rpms 
codeready-builder-htb-for-rhel-8-x86_64-rpms
7. yum install perl-Net-Ping perl-URI
8. ./linux_trailer -A

Actual results:
The system cannot boot.

Expected results:
The system boots normally.

Additional info:
I'll attach the linux_trailer script and other config files to the bz.

Comment 3 Samantha N. Bueno 2019-02-19 21:16:43 UTC
Does a basic installation work, e.g. without running the "linux_trailer" script? Would it be possible to attach installation logs (in /tmp before reboot)? Right now it's difficult to pinpoint what might have gone wrong/where.

Comment 8 Claude Frantz 2019-05-30 17:42:56 UTC
I observe the same behaviour on a 32 bit Fedora 30, after the system upgrade, using "dnf system-upgrade", coming from Fedora 28. When calling "systemctl status initrd-switch-root.service", the same status about missing os-release file and /sysroot can be seen here, on my system. I have a simple laptop with a single HD drive. 

Is there an interim solution available ?

Comment 9 Claude Frantz 2019-06-01 04:35:58 UTC
I seems difficult to me to copy the installation log in /tmp, because, in the state where the error occurs, I cannot mount an USB stick and I have no access to /boot. Only very few executables are available. 

In the past, a very similar error has been reported to bugzilla, related to an older release.

Comment 10 Claude Frantz 2019-06-01 05:54:08 UTC
Created attachment 1575861 [details]
/run/initramfs/rdsosreport.txt in the failed state

Remember that I'm reporting about Fedora 30

Comment 11 Claude Frantz 2019-06-01 05:57:14 UTC
When trying to boot using the F28 kernel, which is still available after the upgrade, the problem reported here appears too. Before the upgrade, this kernel worked well.

Comment 12 Claude Frantz 2019-06-02 07:12:51 UTC
While observing the supplied log, I'm surprised about this sequence:

[   11.889392] deby audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=plymouth-switch-root comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'
[   11.889871] deby audit[1]: SERVICE_STOP pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=plymouth-switch-root comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=success'

.......

[   12.147882] deby audit[1]: SERVICE_START pid=1 uid=0 auid=4294967295 ses=4294967295 subj=kernel msg='unit=initrd-switch-root comm="systemd" exe="/usr/lib/systemd/systemd" hostname=? addr=? terminal=? res=failed'

Comment 13 Claude Frantz 2019-06-02 16:23:25 UTC
Created attachment 1576339 [details]
rdsosreport.txt with rd.debug and rd.shell options set

In the emergency shell, I have entered:

ln -s /dev/sda7 /dev/root
exit

Later, the system stops again.

Comment 14 Jan Stodola 2020-02-12 18:22:32 UTC
I'm closing this bug based on comment 6.

Claude, could you please report the issue you are seeing against Fedora Product if you are still able to reproduce it?