Problem upgrading CentOS 7 to AlmaLinux 8

Hello,

I am trying to upgrade my CentOS 7.9 server to AlmaLinux via the guide How to Migrate CentOS 7 to AlmaLinux 8: A Step-by-Step Guide.

The preupgrade states that 2 drivers need to be removed. The second time I run the preupgrade chek I always get the error:

============================================================
                           ERRORS                           
============================================================

2022-05-14 13:26:57.756213 [ERROR] Actor: target_userspace_creator
Message: Unable to install RHEL 8 userspace packages.
Summary:
    Details: Command ['systemd-nspawn', '--register=no', '--quiet', '-D', '/var/lib/leapp/scratch/mounts/root_/system_overlay', '--setenv=LEAPP_NO_RHSM=0', '--setenv=LEAPP_EXPERIMENTAL=0', '--setenv=LEAPP_COMMON_TOOLS=:/etc/leapp/repos.d/system_upgrade/el7toel8/tools', '--setenv=LEAPP_COMMON_FILES=:/etc/leapp/repos.d/system_upgrade/common/files:/etc/leapp/repos.d/system_upgrade/el7toel8/files', '--setenv=LEAPP_UNSUPPORTED=0', '--setenv=LEAPP_EXECUTION_ID=4b06a9a1-4e6f-4917-86ff-a60335738d38', '--setenv=LEAPP_HOSTNAME=srv-dns-005.alpaca.int', 'dnf', 'install', '-y', '--nogpgcheck', '--setopt=module_platform_id=platform:el8', '--setopt=keepcache=1', '--releasever', u'8.4', '--installroot', '/el8target', '--disablerepo', '*', '--enablerepo', u'almalinux8-baseos', '--enablerepo', u'almalinux8-powertools', '--enablerepo', u'almalinux8-resilientstorage', '--enablerepo', u'almalinux8-extras', '--enablerepo', u'almalinux8-highavailability', '--enablerepo', u'almalinux8-appstream', 'dnf', 'dnf-command(config-manager)', '--disableplugin', 'subscription-manager'] failed with exit code 1.
    Stderr: Failed to create directory /var/lib/leapp/scratch/mounts/root_/system_overlay//sys/fs/selinux: Read-only file system
            Failed to create directory /var/lib/leapp/scratch/mounts/root_/system_overlay//sys/fs/selinux: Read-only file system
            Host and machine ids are equal (4e3bf1688a5744d698d980f621bf9021): refusing to link journals
            Failed to synchronize cache for repo 'almalinux8-highavailability', ignoring this repo.
            Failed to synchronize cache for repo 'almalinux8-extras', ignoring this repo.
            Failed to synchronize cache for repo 'almalinux8-appstream', ignoring this repo.
            Failed to synchronize cache for repo 'almalinux8-powertools', ignoring this repo.
            Failed to synchronize cache for repo 'almalinux8-resilientstorage', ignoring this repo.
            Failed to synchronize cache for repo 'almalinux8-baseos', ignoring this repo.
            Error: Unable to find a match: dnf dnf-command(config-manager)

============================================================
                       END OF ERRORS                        
============================================================

Can somebody help me with this error?

Regards,

Raf

Only upgraded one machine as a test but for that one I created a 10 gig temporary partition and mounted with default options on /var/lib/leapp to avoid issues with too small /var partition or mount option not suited for leapp. After the upgrade I just removed that partiton.

1 Like

Hi Tedevil,

Thanks for the tip. I have a 20GB /var partition, 97% free…
But the error still persists…

The drivers may reapear after rebooting, so their removal is only temporary, but that is sufficient to run the preupgrade and upgrade.

If you get a kernel mismatch problem (Inhibitor: Newest installed kernel not in use), you can remove the kernels (uname -r showing something else than cat /etc/*release) all totally and install the version you need (might require to unblock systemd, reinstall of network/sshd before reboot!), and use grubby to fix the grub cfg file.

If you get files not removable, e.g. ipaddress.py in the way of an rpm update, then remove all those related rpm, then remove all non-centos repo (use only repos as in rpm -Uvh --force http://mirror.centos.org/centos/7/updates/x86_64/Packages/centos-release-7-9.2009.1.el7.centos.x86_64.rpm), then reinstall those rpm as removed.