Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1512584 - Installing generic-release over fedora-release-workstation results in unbootable system
Summary: Installing generic-release over fedora-release-workstation results in unboota...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: generic-release
Version: 26
Hardware: Unspecified
OS: Unspecified
medium
high
Target Milestone: ---
Assignee: Tom "spot" Callaway
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2017-11-13 15:18 UTC by Mirosław Zalewski
Modified: 2018-02-27 17:17 UTC (History)
12 users (show)

Fixed In Version: generic-release-27-2.fc27
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-02-27 17:17:42 UTC


Attachments (Terms of Use)

Description Mirosław Zalewski 2017-11-13 15:18:15 UTC
Users with fedora-release-workstation package installed can make their systems unbootable by installing generic-release package. This action will result in /etc/os-release being dangling symlink, which bother systemd to a point that it refuses to pivot into such filesystem.

I am filing this against dnf, but I am not entirely sure that it is at fault. I was not able to simulate reproducing steps using pure rpm, but running `rpm -i --replaceold ./generic-release*.rpm` does not fix the issue. So maybe this is more of rpm issue.


Version-Release number of selected component (if applicable):
# dnf --version
2.7.5
  Installed: dnf-0:2.7.5-1.fc26.noarch at Wed Nov  1 14:34:05 2017
  Built    : Fedora Project at Wed Oct 18 19:03:41 2017

  Installed: rpm-0:4.13.0.2-1.fc26.x86_64 at Fri Nov 10 09:09:26 2017
  Built    : Fedora Project at Thu Oct 26 08:32:51 2017

Reporting against Fedora 26, which I am using, but I could reproduce on Fedora 27 as well (using Fedora-Workstation-Live-x86_64-27-1.6.iso).


How reproducible:
Always


Steps to Reproduce:
1. Make sure that fedora-release-workstation package is installed
2. As root, run: dnf install --allowerasing generic-release
3. Accept solution proposed by dnf (remove fedora-release and fedora-release-workstation, install generic-release)
4. Reboot system

Actual results:
During boot, rescue shell of initrd is invoked automatically. User is advised to copy log file to USB device for further debugging and is left wondering what could be broken so badly.

The most relevant lines are these two:
systemctl: Failed to switch root: Specified switch root path '/sysroot' does not sem to be an OS tree. os-release file is missing.
systemd: initrd-switch-root.service: Main process exited, code=exited, status=1/FAILURE

File /etc/os-release in /sysroot exists, but is dangling symlink:

# cat /sysroot/etc/os-release
cat: /sysroot/etc/os-release: No such file or directory

Turns out that /sysroot/etc/os-release points at /sysroot/usr/lib/os-release. But the latter one, instead of being normal file (as provided by generic-release package), actually is symlink to /sysroot/usr/lib/os.release.d/os-release-fedora. There is also equally broken /sysroot/usr/lib/os-release.rpmsave pointing at /sysroot/usr/lib/os.release.d/os-release-fedora-workstation. But there is no /sysroot/usr/lib/os.release.d/ directory at all.


Expected results:
After installing generic-release in place of fedora-release-workstation, /usr/lib/os-release is normal file instead of dangling symlink.
System is bootable.

Additional info:
If I remove fedora-release-workstation, leaving only fedora-release package installed, and then install generic-release package, issue will not happen. /usr/lib/os-release will be normal file.

Additionally, dnf will propose removal of NetworkManager-config-connectivity-fedora package. This package is not scheduled for removal if steps to reproduce are followed literally. This might mean that dnf is too aggressive at bundling operations together.

Comment 1 Daniel Mach 2017-11-15 12:10:53 UTC
The problem seems to be in packaging / dependencies.
It's nothing that can be fixed in DNF.

Comment 2 Tom "spot" Callaway 2017-11-15 20:21:33 UTC
There are two solutions to this that I can see:

* Make generic-release a true copy of fedora-release, with the same layout and subpackages.
* Kill off generic-release entirely

Since I think there are people who actually use generic-release to make remixes that do not use the Fedora trademark, I do not think we can do option 2. I'll work on option 1.

Comment 3 Fedora Update System 2017-11-15 21:56:51 UTC
generic-release-26-2.fc26 has been submitted as an update to Fedora 26. https://bodhi.fedoraproject.org/updates/FEDORA-2017-90fb43c1b3

Comment 4 Fedora Update System 2017-11-15 21:57:03 UTC
generic-release-27-2.fc27 has been submitted as an update to Fedora 27. https://bodhi.fedoraproject.org/updates/FEDORA-2017-b9dca5efd2

Comment 5 Fedora Update System 2017-11-17 18:54:33 UTC
generic-release-27-2.fc27 has been pushed to the Fedora 27 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-b9dca5efd2

Comment 6 Fedora Update System 2017-11-18 01:44:19 UTC
generic-release-26-2.fc26 has been pushed to the Fedora 26 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-90fb43c1b3

Comment 7 angelo-veltens 2017-12-04 20:00:14 UTC
I upgraded Fedora on Nov. 28th and still had the issue.

Comment 8 Tom "spot" Callaway 2017-12-04 20:08:02 UTC
This update has not landed in stable yet.

Comment 9 Scott Williams 2018-02-21 16:34:10 UTC
I updated bodhi to give a +1 on the -2 patch.  This hit a coworkers Fedora machine yesterday causing it to be unbootable.  My workaround was the following in the systemd shell:

# mount -o remount,rw /sysroot
# rm /sysroot/etc/os-release
# cp /usr/lib/os-release /sysroot/etc/os-release

Then full reboot (not just Ctrl-D).

From then the user was able to login and we applied update in bodhi and the issue was resolved.  I can also confirm that generic-release was the culprit via `rpm -qf /etc/os-release`.

Comment 10 Fedora Update System 2018-02-27 17:17:42 UTC
generic-release-27-2.fc27 has been pushed to the Fedora 27 stable repository. If problems still persist, please make note of it in this bug report.


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