• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
  • Skip to footer navigation

The Geek Diary

  • OS
    • Linux
    • CentOS/RHEL
    • Solaris
    • Oracle Linux
    • VCS
  • Interview Questions
  • Database
    • oracle
    • oracle 12c
    • ASM
    • mysql
    • MariaDB
  • DevOps
    • Docker
    • Shell Scripting
  • Big Data
    • Hadoop
    • Cloudera
    • Hortonworks HDP

How to Find the Original Installation OS Version in CentOS/RHEL

by admin

This post explains how to find the OS version which was first installed on a CentOS/RHEL system.

CentOS/RHEL 6

Run grep -m1 “label =” /var/log/anaconda.storage.log to find the original installation OS version.

Current version:

# cat /etc/redhat-release
CentOS Linux release 6.10

Original installation version:

# grep -m1 "label =" /var/log/anaconda.storage.log
  label = EL6.8_x86_64_Disc_1_20160518  size = 0  targetSize = 0

The above shows original installation was CentOS 6.8.

CentOS/RHEL 7 and above

For CentOS/RHEL 7

Run grep -m1 inst.stage2=hd:LABEL /var/log/anaconda/syslog to find the original installation OS version.

Current Version:

# cat /etc/redhat-release
CentOS Linux release 7.9

Original installation version:

# grep -m1 inst.stage2=hd:LABEL /var/log/anaconda/syslog
08:12:14,153 INFO kernel:[    0.000000] Command line: initrd=initrd.img inst.stage2=hd:LABEL=EL-7.2\x20Server.x86_64 quiet BOOT_IMAGE=vmlinuz

The above shows original installation was CentOS 7.2.

For CentOS/RHEL 8

Current Version:

# cat /etc/redhat-release
CentOS Linux release 8.3

Original installation version:

# grep -m1 inst.stage2=hd:LABEL /var/log/anaconda/syslog
09:07:12,619 INFO kernel:Command line: BOOT_IMAGE=vmlinuz initrd=initrd.img inst.stage2=hd:LABEL=EL-8-0-0-BaseOS-x86_64 quiet

The above shows original installation was CentOS 8.0.

Filed Under: CentOS/RHEL, CentOS/RHEL 6, CentOS/RHEL 7, CentOS/RHEL 8, Linux

Some more articles you might also be interested in …

  1. rpm: error while loading shared libraries: invalid ELF header
  2. diff Command Examples in Linux
  3. isosize: command not found
  4. groupdel: command not found
  5. killall: command not found
  6. CentOS / RHEL : How to find free space in a Volume Group in LVM
  7. How to use the “screen” command in Linux
  8. How to Extend allowed number of loopback devices
  9. CentOS / RHEL 7 : How to enable telnet for a group of users
  10. Unable to Run X Applications Through SSH in Linux

You May Also Like

Primary Sidebar

Recent Posts

  • nixos-rebuild Command Examples in Linux
  • nixos-option: Command Examples in Linux
  • nixos-container : Command Examples in Linux
  • nitrogen Command Examples in Linux

© 2023 · The Geek Diary

  • Archives
  • Contact Us
  • Copyright