Cet article explique comment trouver la version du système d'exploitation qui a été installée pour la première fois sur un système CentOS/RHEL.
CentOS/RHEL 6
Exécutez grep -m1 "label =" /var/log/anaconda.storage.log pour trouver la version d'origine du système d'exploitation.
Version actuelle :
# cat /etc/redhat-release CentOS Linux release 6.10
Version d'installation d'origine :
# grep -m1 "label =" /var/log/anaconda.storage.log label = EL6.8_x86_64_Disc_1_20160518 size = 0 targetSize = 0
L'installation ci-dessus montre que l'installation d'origine était CentOS 6.8.
CentOS/RHEL 7 et supérieur Pour CentOS/RHEL 7
Exécutez grep -m1 inst.stage2=hd:LABEL /var/log/anaconda/syslog pour trouver la version d'origine du système d'exploitation.
Version actuelle :
# cat /etc/redhat-release CentOS Linux release 7.9
Version d'installation d'origine :
# 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
Ce qui précède montre que l'installation d'origine était CentOS 7.2.
Pour CentOS/RHEL 8
Version actuelle :
# cat /etc/redhat-release CentOS Linux release 8.3
Version d'installation d'origine :
# 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
Ce qui précède montre que l'installation d'origine était CentOS 8.0.