"os-release file is missing" on custom installation DVD

General support questions
Post Reply
kornoux
Posts: 2
Joined: 2018/11/21 05:50:38

"os-release file is missing" on custom installation DVD

Post by kornoux » 2018/11/21 06:21:02

Hello!

I need to create CentOS 7.3 installation DVD with most recent 7.3 kernel version - 3.10.0-514.26.2 (I have a server with CPU which is not supported by original kernel - 3.10.0-514 - from DVD so I can't even boot from it). I'm working on it on my CentOS 7.5 installation, so I've installed 3.10.0-514.26.2 kernel and created initrd for it with

Code: Select all

mkinitrd /build_dir/initrd.img 3.10.0-514.26.2
, then moved it with corresponding kernel to isolinux directory within original DVD file tree and created ISO. When I booted up from the ISO I got "os-release file is missing" error. Then I added code to generate /usr/lib/os-release and /etc/os-release to /usr/lib/dracut/modules.d/99base/module-setup.sh, here it is:

Code: Select all

#ln -sf initrd-release $initdir/etc/os-release

{
	echo 'NAME="CentOS Linux"'
	echo 'VERSION="7 (Core)"'
	echo 'ID="centos"'
	echo 'ID_LIKE="rhel fedora"'
	echo 'VERSION_ID="7"'
	echo 'PRETTY_NAME="CentOS Linux 7 (Core)"'
	echo 'ANSI_COLOR="0;31"'
	echo 'CPE_NAME="cpe:/o:centos:centos:7"'
	echo 'HOME_URL="https://www.centos.org/"'
	echo 'BUG_REPORT_URL="https://bugs.centos.org/"'
	echo
	echo 'CENTOS_MANTISBT_PROJECT="CentOS-7"'
	echo 'CENTOS_MANTISBT_PROJECT_VERSION="7"'
	echo 'REDHAT_SUPPORT_PRODUCT="centos"'
	echo 'REDHAT_SUPPORT_PRODUCT_VERSION="7"'
} > $initdir/usr/lib/os-release

ln -sfr $initdir/usr/lib/os-release $initdir/etc/os-release
mkinitrd runs without any errors, output of lsinitrd:

Code: Select all

lsinitrd initrd.img | grep release
	-rw-r--r-- 1 root root 151 Nov 21 09:11 etc/initrd-release
	lrwxrwxrwx 1 root root 21 Nov 21 09:11 etc/os-release -> ../usr/lib/os-release
	-rw-r--r-- 1 root root 392 Nov 21 09:11 usr/lib/os-release
I rebuilded the ISO again, and again I got "os-release file is missing". In emergency shell I can see both files and /etc/os-release is a symlink to /usr/lib/os-release.

I logged in as root, SELinux is disabled. I don't see what's wrong, please help me.

User avatar
TrevorH
Site Admin
Posts: 33216
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: "os-release file is missing" on custom installation DVD

Post by TrevorH » 2018/11/21 08:09:14

No-one should be using 7.3. It's more than 2 years out of date.
The future appears to be RHEL or Debian. I think I'm going Debian.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are deadest, do not use them.
Use the FAQ Luke

kornoux
Posts: 2
Joined: 2018/11/21 05:50:38

Re: "os-release file is missing" on custom installation DVD

Post by kornoux » 2018/11/21 10:57:51

Thank you for pointing this out but I just repeated whole procedure with 7.5 ISO and got the same results - "os-release file is missing", and the /etc/os-release is there.

Post Reply