Description of problem:
# cat /etc/os-release
cat: /etc/os-release: No such file or directory
# ls -l /etc/os-release
lrwxrwxrwx. 1 root root 21 May 16 20:03 /etc/os-release -> ../usr/lib/os-release
[dangling]
# cd /etc
# ls -l ../usr/lib/os-release
lrwxrwxrwx. 1 root root 32 Jun 6 18:19 ../usr/lib/os-release -> ./os.release.d/os-release-fedora
[dangling]
There is no such directory as /usr/lib/os.release.d.
Note that with a fresh installation the content is actually following:
# ls -l /etc/os-release
lrwxrwxrwx. 1 root root 21 May 16 20:03 /etc/os-release -> ../usr/lib/os-release
# cd /etc
# ls -l ../usr/lib/os-release
-rw-r--r--. 1 root root 737 May 16 20:03 ../usr/lib/os-release
# cat ../usr/lib/os-release
NAME=Fedora
VERSION="30 (MATE-Compiz)"
ID=fedora
VERSION_ID=30
VERSION_CODENAME=""
PLATFORM_ID="platform:f30"
PRETTY_NAME="Fedora 30 (MATE-Compiz)"
ANSI_COLOR="0;34"
LOGO=fedora-logo-icon
CPE_NAME="cpe:/o:fedoraproject:fedora:30"
HOME_URL="https://fedoraproject.org/"
DOCUMENTATION_URL="https://docs.fedoraproject.org/en-US/fedora/f30/system-administrators-guide/"
SUPPORT_URL="https://fedoraproject.org/wiki/Communicating_and_getting_help"
BUG_REPORT_URL="https://bugzilla.redhat.com/"
REDHAT_BUGZILLA_PRODUCT="Fedora"
REDHAT_BUGZILLA_PRODUCT_VERSION=30
REDHAT_SUPPORT_PRODUCT="Fedora"
REDHAT_SUPPORT_PRODUCT_VERSION=30
PRIVACY_POLICY_URL="https://fedoraproject.org/wiki/Legal:PrivacyPolicy"
VARIANT="MATE-Compiz"
VARIANT_ID=matecompiz
Version-Release number of selected component (if applicable):
fedora-release-common-30-3.noarch
How reproducible:
Always
Steps to Reproduce:
1. Upgrade f29 to f30
2. fails to boot
Actual results:
fails to boot until /sysroot/etc/os-release gets recreated.
Expected results:
Never allow /etc/os-release to be a dangling symlink!