upgrading_from_rhel_7_to_rhel_8

해당 문서는 RHEL7.9 에서 RHEL8 로 업그레이드 하는 방법을 나열한 문서입니다.
내부망 만을 이용하여 업그레이드 하였으며, 레포는 로컬 레포를 이용하여 업그레이드 작업 수행

## repository file - rhel-7
rhel-7-server-rpms
rhel-7-server-extras-rpms

## repository file - rhel-8
rhel-8-for-x86_64-baseos-rpms
rhel-8-for-x86_64-appstream-rpms
# yum update -y

# sync;sync;sync;
# reboot

leapp 패키지 설치

# yum install leapp leapp-repository

leapp 필수 데이터 파일 다운로드

## https://access.redhat.com/articles/3664871 사이트 참고하여 데이터 다운로드
# wget https://access.redhat.com/node/3664871/5121/0/20659902
# tar -xzf leapp-data14.tar.gz -C /etc/leapp/files
# ls -al /etc/leapp/files/
-rw-rw-r--. 1 1000 1000 3057300 May 14 23:00 pes-events.json
-rw-rw-r--. 1 1000 1000   39703 Apr 27 16:19 repomap.csv
-rw-rw-r--. 1 1000 1000   20711 Jan 26  2021 unsupported_driver_names.json
-rw-rw-r--. 1 1000 1000   47708 Jan 26  2021 unsupported_pci_ids.json

locale 확인

# cat /etc/locale.conf
LANG="en_US.UTF-8"

NIC interface 확인

NIC interface 가 ethX 명명되어 있으면, 일관된 네트워크 장치 이름으로 변경하여야 한다.

  • ansible 파일을 이용하여 변경하는 방법
  • 매뉴얼 방식으로 변경

RHEL8.4 repository 활성

### 기존 rhel79 repo는 비활성화

# rhel-8-for-x86_64-baseos-rpms
# rhel-8-for-x86_64-appstream-rpms

leapp preupgrade 수행

## RHEL8에서 사용되지 않는 드라이버 삭제
# lsmod | grep -q floppy && sudo rmmod floppy
# lsmod | grep -q pata_acpi && sudo rmmod pata_acpi

# leapp preupgrade --no-rhsm --enablerepo rhel-8-for-x86_64-baseos-rpms --enablerepo rhel-8-for-x86_64-appstream-rpms
============================================================
                     UPGRADE INHIBITED
============================================================

Upgrade has been inhibited due to the following problems:
    1. Inhibitor: Missing required answers in the answer file
Consult the pre-upgrade report for details and possible remediation.

============================================================
                     UPGRADE INHIBITED
============================================================


Debug output written to /var/log/leapp/leapp-preupgrade.log

============================================================
                           REPORT
============================================================

A report has been generated at /var/log/leapp/leapp-report.json
A report has been generated at /var/log/leapp/leapp-report.txt

============================================================
                       END OF REPORT
============================================================

Answerfile has been generated at /var/log/leapp/answerfile

## Answerfile 열어서 안에 있는 내용에 대해 응답 해야함 
# leapp answer --section remove_pam_pkcs11_module_check.confirm=True


## preupgrade 재수행 
# leapp preupgrade --no-rhsm --enablerepo rhel-8-for-x86_64-baseos-rpms --enablerepo rhel-8-for-x86_64-appstream-rpms
Debug output written to /var/log/leapp/leapp-preupgrade.log

============================================================
                           REPORT
============================================================

A report has been generated at /var/log/leapp/leapp-report.json
A report has been generated at /var/log/leapp/leapp-report.txt

============================================================
                       END OF REPORT
============================================================

Answerfile has been generated at /var/log/leapp/answerfile

## 위와 같이 나오면 성공

leapp upgrade 수행

# leapp upgrade  --no-rhsm --enablerepo rhel-8-for-x86_64-appstream-rpms --enablerepo rhel-8-for-x86_64-baseos-rpms
# sudo touch /.autorelabel
# reboot

RHEL8.4 업그레이드 확인

# cat /etc/redhat-release
Red Hat Enterprise Linux release 8.4 (Ootpa)

# uname -r
4.18.0-305.el8.x86_64

잔류로 남아있는 RHEL7 패키지 삭제

### RHEL7 패키지 확인
# rpm -qa | grep -e '\.el[67]' | grep -vE '^(gpg-pubkey|libmodulemd|katello-ca-consumer)' | sort
kernel-3.10.0-1160.36.2.el7.x86_64
kernel-3.10.0-1160.el7.x86_64
leapp-0.12.0-1.el7_9.noarch
leapp-repository-0.13.0-2.el7_9.noarch
python2-leapp-0.12.0-1.el7_9.noarch
python-passlib-1.6.5-2.el7.noarch
sshpass-1.06-2.el7.x86_64
ustr-1.0.4-16.el7.x86_64

## RHEL7 커널 확인 및 모듈 삭제
# cd /lib/modules && ls -d *.el7*
3.10.0-1160.36.2.el7.x86_64  3.10.0-1160.el7.x86_64

# [ -x /usr/sbin/weak-modules ] && /usr/sbin/weak-modules --remove-kernel 3.10.0-1160.36.2.el7.x86_64
# [ -x /usr/sbin/weak-modules ] && /usr/sbin/weak-modules --remove-kernel 3.10.0-1160.el7.x86_64

## 부트로더에서 커널 제거
# /bin/kernel-install remove 3.10.0-1160.36.2.el7.x86_64 /lib/modules/3.10.0-1160.36.2.el7.x86_64/vmlinuz
로그인하면 댓글을 남길 수 있습니다.
  • upgrading_from_rhel_7_to_rhel_8.txt
  • 마지막으로 수정됨: 2022/04/07 08:14
  • 저자 koov