Truc Migrer de CentOS 7 vers Rocky Linux 8

De Lea Linux
Révision datée du 14 décembre 2024 à 22:47 par Lea (discussion | contributions)
(diff) ← Version précédente | Voir la version actuelle (diff) | Version suivante → (diff)
Aller à la navigation Aller à la recherche

Ce truc marche pour migrer vers Rocky Linux depuis CentOS Stream, CentOS, AlmaLinux, RHEL ou Oracle Linux.

D'abord, mettez CentOS 7 à jour; avec un nouveau dépôt car les dépôts officiels de CentOS 7 sont désactivés :

sudo curl -o /etc/yum.repos.d/CentOS-Base.repo https://el7.repo.almalinux.org/centos/CentOS-Base.repo
sudo yum upgrade -y

Ensuite téléchargez les scripts de migration de Rocky Linux :

sudo yum install -y leapp-upgrade leapp-data-rocky

On va ensuite lancer le script de pré-migration :

sudo leapp preupgrade

Ce script va prendre du temps pour arriver à terme. Un rapport en anglais va indiquer les principaux problèmes ou risques et commencer les réparer dans /var/log/leapp/leapp-report.txt et globalement dans /var/log/leapp/ se trouvent tous les informations du rapport.

Lancez le script de migration. Ce script va s'occuper de tout :

Related links:

   - Leapp preupgrade getting "Inhibitor: Detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed." : https://access.redhat.com/solutions/6971716
   - Leapp upgrade fail with error "Inhibitor: Detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed.": https://access.redhat.com/solutions/5436131

sudo rmmod pata_acpi

2. Mettre à jour /etc/ssh/sshd_config pour autoriser le login en root :

echo PermitRootLogin yes | sudo tee -a /etc/ssh/sshd_config

3. Déactiver le module pam_pkcs11 de la configuration PAM pour que la mise à jour ne s'interrompe pas

sudo leapp answer --section remove_pam_pkcs11_module_check.confirm=True

Relancer le script

sudo leapp preupgrade


Quand vous voyez un message « Complete! » à la fin, vous avez juste à redémarrer le serveur.

Stderr: Failed to create directory /var/lib/leapp/el8userspace//sys/fs/selinux: Read-only file system

           Failed to create directory /var/lib/leapp/el8userspace//sys/fs/selinux: Read-only file system
           No matches found for the following disable plugin patterns: subscription-manager
           Repository extras is listed more than once in the configuration
           Warning: Package marked by Leapp to upgrade not found in repositories metadata: gpg-pubkey leapp leapp-upgrade-el7toel8 python2-leapp
           RPM: warning: Generating 6 missing index(es), please wait...
           Error: Transaction test error:
             file /usr/lib64/libwebp.so.7 from install of libwebp-1.0.0-10.el8.x86_64 conflicts with file from package libwebp7-1.0.3-2.el7.remi.x86_64
             file /usr/lib64/libwebpdecoder.so.3 from install of libwebp-1.0.0-10.el8.x86_64 conflicts with file from package libwebp7-1.0.3-2.el7.remi.x86_64
             file /usr/lib64/libwebpdemux.so.2 from install of libwebp-1.0.0-10.el8.x86_64 conflicts with file from package libwebp7-1.0.3-2.el7.remi.x86_64
             file /usr/lib64/libwebpmux.so.3 from install of libwebp-1.0.0-10.el8.x86_64 conflicts with file from package libwebp7-1.0.3-2.el7.remi.x86_64
             file /usr/lib64/.libcrypto.so.1.1.1k.hmac from install of openssl-libs-1:1.1.1k-14.el8_10.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
             file /usr/lib64/.libssl.so.1.1.1k.hmac from install of openssl-libs-1:1.1.1k-14.el8_10.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
             file /usr/lib64/engines-1.1/afalg.so from install of openssl-libs-1:1.1.1k-14.el8_10.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
             file /usr/lib64/engines-1.1/capi.so from install of openssl-libs-1:1.1.1k-14.el8_10.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
             file /usr/lib64/engines-1.1/padlock.so from install of openssl-libs-1:1.1.1k-14.el8_10.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
             file /usr/lib64/libcrypto.so.1.1.1k from install of openssl-libs-1:1.1.1k-14.el8_10.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
             file /usr/lib64/libssl.so.1.1.1k from install of openssl-libs-1:1.1.1k-14.el8_10.x86_64 conflicts with file from package openssl11-libs-1:1.1.1k-7.el7.x86_64
   Hint: If there was a problem reaching remote content (see stderr output) and proxy is configured in the YUM/DNF configuration file, the proxy configuration is likely causing this error. Make sure the proxy is properly configured in /etc/dnf/dnf.conf. It's also possible the proxy settings in the DNF configuration file are incompatible with the target system. A compatible configuration can be placed in /etc/leapp/files/dnf.conf which, if present, it will be used during some parts of the upgrade instead of original /etc/dnf/dnf.conf. In such case the configuration will also be applied to the target system. Note that /etc/dnf/dnf.conf needs to be still configured correctly for your current system to pass the early phases of the upgrade process.