본문으로 바로가기
반응형

leapp을 통한 RHEL7 -> RHEL8 업그레이드는 아래 환경에서만 가능하다.

 - RHEL 7.6에서 업그레이드

 - RHEL 7.9에서 업그레이드

 

leapp-data14.tar.gz
0.13MB

 

1. 현재 버전 확인

[root@rhel7 ~]# cat /etc/*-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.7 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.7"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.7 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.7:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.7
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.7"
Red Hat Enterprise Linux Server release 7.7 (Maipo)
Red Hat Enterprise Linux Server release 7.7 (Maipo)


2. subscription 등록 및 레포지토리 활성화

[root@rhel7 ~]# subscription-manager register
등록 대상: subscription.rhsm.redhat.com:443/subscription
사용자 이름: hkjeon@etechsystem.co.kr
암호:
시스템은 ID로 등록되어 있습니다: a2833a2f-d110-495f-b78c-e0de650ba590
등록된 시스템 이름: rhel7


[root@rhel7 files]# subscription-manager list --available
[root@rhel7 files]# subscription-manager attach --pool=Pool ID
서브스크립션을 제대로 첨부했습니다: Red Hat Enterprise Linux, Standard Support (128 Sockets, NFR, Partner Only)


# 의존성 및 leapp 활성화를위한 extras repository
[root@rhel7 ~]# subscription-manager repos --enable rhel-7-server-extras-rpms
리포지터리 'rhel-7-server-extras-rpms'이/가 이 시스템에 대해 활성화되어 있습니다.

 

3. yum update

[root@rhel7 ~]# yum update -y


4. reboot

[root@rhel7 ~]# reboot



5. 현재 버전 확인

[root@rhel7 ~]# cat /etc/*-release
NAME="Red Hat Enterprise Linux Server"
VERSION="7.9 (Maipo)"
ID="rhel"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="7.9"
PRETTY_NAME="Red Hat Enterprise Linux Server 7.9 (Maipo)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:7.9:GA:server"
HOME_URL="https://www.redhat.com/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 7"
REDHAT_BUGZILLA_PRODUCT_VERSION=7.9
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="7.9"
Red Hat Enterprise Linux Server release 7.9 (Maipo)
Red Hat Enterprise Linux Server release 7.9 (Maipo)




6. leapp 패키지 설치

[root@rhel7 ~]# yum install -y leapp leapp-repository
...
Installed:
  leapp.noarch 0:0.12.1-1.el7_9                      leapp-repository.noarch 0:0.14.0-4.el7_9

Dependency Installed:
  audit-libs-python.x86_64 0:2.8.5-4.el7                      checkpolicy.x86_64 0:2.5-8.el7
  dnf.noarch 0:4.0.9.2-2.el7_9                                dnf-data.noarch 0:4.0.9.2-2.el7_9
  json-glib.x86_64 0:1.4.2-2.el7                              leapp-deps.noarch 0:0.12.1-1.el7_9
  leapp-repository-deps.noarch 0:0.14.0-4.el7_9               libcgroup.x86_64 0:0.41-21.el7
  libcomps.x86_64 0:0.1.8-14.el7                              libdnf.x86_64 0:0.22.5-2.el7_9
  libmodulemd.x86_64 0:1.6.3-1.el7                            librepo.x86_64 0:1.8.1-8.el7_9
  libreport-filesystem.x86_64 0:2.1.11-53.el7                 librhsm.x86_64 0:0.0.3-3.el7_9
  libsemanage-python.x86_64 0:2.5-14.el7                      libsolv.x86_64 0:0.6.34-4.el7
  libyaml.x86_64 0:0.1.4-11.el7_0                             pciutils.x86_64 0:3.5.1-3.el7
  policycoreutils-python.x86_64 0:2.5-34.el7                  python-IPy.noarch 0:0.75-6.el7
  python-chardet.noarch 0:2.2.1-3.el7                         python-enum34.noarch 0:1.0.4-1.el7
  python-requests.noarch 0:2.6.0-10.el7                       python-urllib3.noarch 0:1.10.2-7.el7
  python2-dnf.noarch 0:4.0.9.2-2.el7_9                        python2-hawkey.x86_64 0:0.22.5-2.el7_9
  python2-leapp.noarch 0:0.12.1-1.el7_9                       python2-libcomps.x86_64 0:0.1.8-14.el7
  python2-libdnf.x86_64 0:0.22.5-2.el7_9                      setools-libs.x86_64 0:3.3.8-4.el7





7. leapp 이동 및 leapp에 필요한 필수 데이터 파일을 다운로드

leapp-data14.tar.gz 다운로드 및 업그레이드 시스템에 업로드 (공식가이드임)
다운로드 사이트 : https://access.redhat.com/articles/3664871


[root@rhel7 ~]# cd /etc/leapp/files/
[root@rhel7 files]# ls
leapp-data14.tar.gz


[root@rhel7 files]# tar -xzf leapp-data14.tar.gz && rm ./leapp-data14.tar.gz
rm: remove 일반 파일 `./leapp-data14.tar.gz'? y
[root@rhel7 files]# ls
leapp-data14.tar.gz-backup  pes-events.json  repomap.csv  unsupported_driver_names.json  unsupported_pci_ids.json

 

8. leapp preupgrade

[root@rhel7 files]# leapp preupgrade
...
============================================================
                     UPGRADE INHIBITED
============================================================

Upgrade has been inhibited due to the following problems:
    1. Inhibitor: Possible problems with remote login using root account
    2. Inhibitor: Detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed.
    3. Inhibitor: Missing required answers in the answer file
Consult the pre-upgrade report for details and possible remediation.



## 위 에러에 대한 해결 방법

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

Upgrade has been inhibited due to the following problems:
    1. Inhibitor: Possible problems with remote login using root account
    해결: vi /etc/ssh/sshd_config
    PermitRootLogin : yes
    
    2. Inhibitor: Detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed.
    vi /var/log/leapp/leapp-report.txt
    Risk Factor: high (inhibitor)
Title: Detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed.
Summary: Support for the following RHEL 7 device drivers has been removed in RHEL 8: 
     - floppy
     - pata_acpi
    해결: rmmod floppy
       rmmod pata_acpi
    
    3. Inhibitor: Missing required answers in the answer file
    해결: leapp answer --section remove_pam_pkcs11_module_check.confirm=True
Consult the pre-upgrade report for details and possible remediation.

 

9. leapp preupgrade

[root@rhel7 files]# leapp preupgrade
...
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

 

10. leapp upgrade

[root@rhel7 files]# leapp upgrade
...
The downloaded packages were saved in cache until the next successful transaction.
You can remove cached packages by executing 'dnf clean packages'.
==> Processing phase `InterimPreparation`
====> * initram_disk_generator
        Creates the upgrade initram disk


====> * add_upgrade_boot_entry
        Add new boot entry for Leapp provided initramfs.
====> * efi_interim_fix
        Adjust EFI boot entry for first reboot
A reboot is required to continue. Please reboot your system.


Debug output written to /var/log/leapp/leapp-upgrade.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


11. reboot

[root@rhel7 files]# reboot 
#재부팅 이후에 SELINUX를 사용한다면 enforcing으로 변경 후 재부팅한다.


재부팅하면 부팅모드에
"RHEL-Upgrade-Initramfs" 가 보인다. 

그냥 두면 알아서 추가 업그레이드를 더 진행하고 재부팅한다.


12. 현재 버전확인

[root@rhel7 ~]# cat /etc/*-release
NAME="Red Hat Enterprise Linux"
VERSION="8.4 (Ootpa)"
ID="rhel"
ID_LIKE="fedora"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Red Hat Enterprise Linux 8.4 (Ootpa)"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:redhat:enterprise_linux:8.4:GA"
HOME_URL="https://www.redhat.com/"
DOCUMENTATION_URL="https://access.redhat.com/documentation/red_hat_enterprise_linux/8/"
BUG_REPORT_URL="https://bugzilla.redhat.com/"

REDHAT_BUGZILLA_PRODUCT="Red Hat Enterprise Linux 8"
REDHAT_BUGZILLA_PRODUCT_VERSION=8.4
REDHAT_SUPPORT_PRODUCT="Red Hat Enterprise Linux"
REDHAT_SUPPORT_PRODUCT_VERSION="8.4"
Red Hat Enterprise Linux release 8.4 (Ootpa)
Red Hat Enterprise Linux release 8.4 (Ootpa)

 

13. 그 외

업그레이드전에 enforcing이였는데, 업그레이드 후에 확인해보면 permissive로 되어있다.

[root@rhel7 ~]# cat /etc/selinux/config

# This file controls the state of SELinux on the system.
# SELINUX= can take one of these three values:
#     enforcing - SELinux security policy is enforced.
#     permissive - SELinux prints warnings instead of enforcing.
#     disabled - No SELinux policy is loaded.
SELINUX=permissive
# SELINUXTYPE= can take one of three values:
#     targeted - Targeted processes are protected,
#     minimum - Modification of targeted policy. Only selected processes are protected.
#     mls - Multi Level Security protection.
SELINUXTYPE=targeted

 

728x90