rocky-linux / rocky-tools

MIT License
407 stars 144 forks source link

Failure while migrating from CentOS 8 #118

Open vandah opened 3 years ago

vandah commented 3 years ago

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
saifhalila commented 2 years ago

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

from Rocky Docs:

Screenshot 2021-12-18 192414

pajamian commented 2 years ago

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.

LinusLarssonn commented 1 year ago

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

yourchanges commented 1 year ago

I'm facing the same issue.

dovi5988 commented 1 year ago

I am having the same problem as well.

EdKok commented 1 year ago

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.

felloz commented 4 months ago

Same issue here, anybody fixed?

pajamian commented 4 months ago

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.

1101302428 commented 2 months ago

你只要使用原版的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就没问题了

pajamian commented 2 months ago

(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.