AlmaLinux 8升级9记录

2023-03-09  本文已影响0人  叶迎宪

步骤参考
https://wiki.almalinux.org/elevate/ELevate-testing-guide.html

sudo curl https://repo.almalinux.org/elevate/testing/elevate-testing.repo -o /etc/yum.repos.d/elevate-testing.repo
sudo rpm --import https://repo.almalinux.org/elevate/RPM-GPG-KEY-ELevate

yum install leapp-upgrade leapp-data-almalinux
结果报错

Package leapp-data-almalinux-0.1-6.el7.noarch is already installed.
Error:
 Problem: package leapp-upgrade-el7toel8-1:0.16.0-6.el7.elevate.8.noarch conflicts with leapp-upgrade-el8toel9 provided by leapp-upgrade-el8toel9-1:0.16.0-6.el8_6.elevate.8.noarch
  - package leapp-upgrade-el8toel9-1:0.16.0-6.el8_6.elevate.8.noarch conflicts with leapp-upgrade-el7toel8 provided by leapp-upgrade-el7toel8-1:0.16.0-6.el7.elevate.8.noarch
  - cannot install the best candidate for the job
  - problem with installed package leapp-upgrade-el7toel8-1:0.16.0-6.el7.elevate.8.noarch

冲突的原因应该是之前也是用leapp从CentOS7升级到AlmaLinux 8的。搞了好久没解决冲突,最后用rpm来一个个删
rpm -e leapp-upgrade-el7toel8-0.16.0-6.el7.elevate.8.noarch leapp-0.14.0-1.el7.noarch
rpm -e python2-leapp-0.14.0-1.el7.noarch
dnf remove leapp*

虽然删干净了leapp相关的包,新的还是死活装不上去
yum install leapp-upgrade

 Problem: package leapp-upgrade-el8toel9-1:0.16.0-6.el8_6.elevate.8.noarch requires leapp, but none of the providers can be installed
  - cannot install the best candidate for the job
  - package leapp-0.15.0-2.el8.noarch is filtered out by exclude filtering
  - package leapp-0.14.0-1.el8_6.noarch is filtered out by exclude filtering

最后还是找到了罪恶的根源
https://bugzilla.redhat.com/show_bug.cgi?id=2008847

执行一下
dnf config-manager --save --setopt exclude=''
把 /etc/dnf/dnf.conf 中的exclude内容清空。加入这些exclude应该是为了保护7到8升级过程中,leapp相关的包不被删除。8升级完后就可以把exclude内容清空了。

干掉原来的 /etc/yum.repos.d/ELevate.repo
yum clean all
yum install leapp-upgrade
yum install leapp-data-almalinux

终于安装成功了。做升级检查
leapp preupgrade

没有报错,只需要做一个回答
leapp answer --section check_vdo.no_vdo_devices=True

开始升级
leapp upgrade

结果升级失败,报错

Error: Transaction test error:
  file /usr/include/gnumake.h from install of make-1:4.3-7.el9.x86_64 conflicts with file from
package make-devel-1:4.2.1-11.el8.x86_64

先删掉吧,yum remove make-devel。再次升级,升级成功了

不过升级完,docker又废掉了。容器起不来

[root@localhost ~]# docker start 1567ad817138
Error response from daemon: OCI runtime create failed: container_linux.go:346: starting container process caused "process_linux.go:297: applying cgroup configuration for process caused "open /sys/fs/cgroup/docker/1567ad817138ff7b8dbc908d81f05e7cdfc720f3a233b6113df9ac330391d23a/cpuset.cpus.effective: no such file or directory"": unknown

找到的答案
https://devopstales.github.io/linux/docker-on-fedora31/

因为almalinux 9用了cgroups v2 ,而docker不支持v2。
vi /etc/default/grub
GRUB_CMDLINE_LINUX后面加上"systemd.unified_cgroup_hierarchy=0"

执行
grub2-mkconfig -o /boot/grub2/grub.cfg
使grub配置生效

重启后,docker可以起来了。但是网络又不正常了,整个网络都不通。用nmtui看了下,是网卡配置乱了。把原来的配置都删了,给ens3网卡重新配置了ip地址又可以了

上一篇 下一篇

猜你喜欢

热点阅读