rocky-tools icon indicating copy to clipboard operation
rocky-tools copied to clipboard

Failure while migrating from CentOS 8

Open vandah opened this issue 3 years ago • 10 comments

I tried running the migrate2rocky tool but arrived at the following error:

Getting system package names for CentOS Linux 8........Error: No Matches found

Can't get package that provides /etc/yum.repos.d/local-repository-0.repo.

This is right after running the CentOS 8 (8.3.2011) installation and rebooting. I also tried with: CentOS 8.4.2105 and AlmaLinux 8.4 (all originally from the same ISO file) and got the same results.

More details:

[root@g-vm06 ~]# curl https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh -o migrate2rocky.sh
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 37406  100 37406    0     0   176k      0 --:--:-- --:--:-- --:--:--  175k
[root@g-vm06 ~]# chmod +x migrate2rocky.sh
[root@g-vm06 ~]# ./migrate2rocky.sh -r

Removing dnf cache
Preparing to migrate CentOS Linux 8 to Rocky Linux 8.

Determining repository names for CentOS Linux 8.....

Found the following repositories which map from CentOS Linux 8 to Rocky Linux 8:
CentOS Linux 8                                Rocky Linux 8
appstream                                     appstream
local-centos8-x86_64--install-centos8-x86_64  baseos
extras                                        extras

Getting system package names for CentOS Linux 8........Error: No Matches found

Can't get package that provides /etc/yum.repos.d/local-repository-0.repo.

An error occurred while we were attempting to convert your system to Rocky Linux. Your system may be unstable. Script will now exit to prevent possible damage.

 A log of this installation can be found at /var/log/migrate2rocky.log

vandah avatar Nov 11 '21 16:11 vandah

I think you should update to centos 8.5 first and then run the migration script.

from Rocky Docs:

Screenshot 2021-12-18 192414

saifhalila avatar Dec 18 '21 18:12 saifhalila

Did you modify the repos to point to a local repo, perhaps with a different name other than baseos?

Where did you get the install isos from? This doesn't look to be a stock CentOS 8 install.

pajamian avatar Dec 18 '21 22:12 pajamian

I'm facing the same issue. Did you ever resolve this? And if so, how?

LinusLarssonn avatar Dec 13 '22 08:12 LinusLarssonn

I'm facing the same issue.

yourchanges avatar Apr 11 '23 02:04 yourchanges

I am having the same problem as well.

dovi5988 avatar Apr 21 '23 12:04 dovi5988

Me too.

Server (VM) was created from official ISO. Was updated to 8.5.2111 Does indeed use modified repo config because server is behind a firewall and does not have internet access. Repos are mirrored on a local server.

EdKok avatar May 09 '23 11:05 EdKok

Same issue here, anybody fixed?

felloz avatar Jun 24 '24 18:06 felloz

If you're trying to migrate from CentOS Stream 8 please see #215 as it's a known issue and there is a workaround until it can be fixed.

For migrations from CentOS Linux 8 (Not Stream) please post your migrate2rocky.log file.

pajamian avatar Jun 25 '24 04:06 pajamian

你只要使用原版的yum.repos.d就不会出这个问题了,恶心了我很久这问题,你可以虚拟机中先从8.2升级到了8.5.2111,然后把里面的yum.repos.d拷贝出来,替换报有问题的机器上的yum.repos.d,然后执行sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*,然后yum update -y --allowerasing,然后再运行migrate2rocky.sh就没问题了

1101302428 avatar Sep 06 '24 07:09 1101302428

(translated) If you just use the original yum.repos.d, this problem will not occur. This problem has disgusted me for a long time. You can upgrade from 8.2 to 8.5.2111 in the virtual machine, then copy the yum.repos.d in it, replace the yum.repos.d on the machine with the problem, and then execute sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-* sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*, then yum update -y --allowerasing, and then run migrate2rocky.sh. There will be no problem.

The issue has been fixed in the latest update of migrate2rocky. Please let me know if there's still issues.

pajamian avatar Sep 06 '24 10:09 pajamian