I am trying to migration my server from RedHat 8 to Rocky 8, with the migrate2rocky.sh script, but it’s blocking with my repo file. I am using my local repository for redhat and rocky servers.
Please assist me to fix this issue.
Error:
+++ safednf -y -q provides /etc/yum.repos.d/Server.repo
+++ awk ‘{print $1; nextfile}’
+++ args=()
+++ for a in “$@”
+++ [[ -n -y ]]
+++ args+=("$a")
+++ for a in “$@”
+++ [[ -n -q ]]
+++ args+=("$a")
+++ for a in “$@”
+++ [[ -n provides ]]
+++ args+=("$a")
+++ for a in “$@”
+++ [[ -n /etc/yum.repos.d/Server.repo ]]
+++ args+=("$a")
+++ dnf -y -q provides /etc/yum.repos.d/Server.repo
Error: No Matches found
++ provides=
++ return 1
pkg_map[$pkg]=
exit_message ‘Can’’‘t get package that provides /etc/yum.repos.d/Server.repo.’
errmsg ’
Can’’'t get package that provides /etc/yum.repos.d/Server.repo.
’
local msg
msg_format msg ’
Can’’'t get package that provides /etc/yum.repos.d/Server.repo.
’
local _var
_var=msg
shift
(( 1 > 1 ))
printf -v msg %s ’
Can’’'t get package that provides /etc/yum.repos.d/Server.repo.
’
printf %s ’
Can’’'t get package that provides /etc/yum.repos.d/Server.repo.
’
Can’t get package that provides /etc/yum.repos.d/Server.repo.
printf %s%s%s ‘’ ’
Can’’'t get package that provides /etc/yum.repos.d/Server.repo.
’ ‘’
final_message
errmsg '%s ’ ‘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.
’
local msg
msg_format msg '%s ’ ‘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.
In other words you can’t use remote RHEL repos – its local or nothing?
The script detects file /etc/yum.repos.d/Server.repo that is not from any package.
Idea B: edit the RHEL repo files that are from RHEL package(s) to point (baseurl) to your local RHEL repos. Then you don’t need the /etc/yum.repos.d/Server.repo.
(That is a similar workaround as what was used for CentOS Linux 8 → Rocky migration after CentOS repos vanished to vault.)
You’ve found an edge-case that makes it impossible for rocky2linux to determine which package name needs to be removed and replaced with the rocky-repos package.
$ bash ./migrate2rocky.sh -r
migrate2rocky - Begin logging at Wed 16 Mar 2022 04:26:27 PM UTC.
Migration from Katello-modified systems is not supported by migrate2rocky. See the README file for details.
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
Thanks pajamina
but indiapsr tried to migrate RHEL8 and didn’t work and you made a fix for him hence the confusion how he could use for RHEL8 migration it it’s Centos only?