oracle / centos2ol

Script and documentation to switch CentOS/Rocky Linux to Oracle Linux
https://linux.oracle.com/switch/centos/
Universal Permissive License v1.0
344 stars 81 forks source link

CentOS 8 migration fails after EOL with error: Cannot prepare internal mirrorlist: No URLs in mirrorlist #128

Open dskfh opened 2 years ago

dskfh commented 2 years ago

Now that CentOS 8 is history, using centos2ol.sh does not work any more because the CentOS repositories have become unavailable.

Running the script produces something like this:

Checking for required packages...
Checking your distribution...
epel-release-8-13.el8.noarch
Checking for yum lock...
Checking for required python packages...
Identifying dnf modules that are enabled
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
Finding your repository directory...
Learning which repositories are enabled...
Repositories enabled before update include:
appstream
baseos
extras
elrepo
epel
epel-modular
ol8_baseos_latest
ol8_appstream
ol8_UEKR6
Looking for yumdownloader...
CentOS Linux 8 - AppStream                                                                                                           1.3 kB/s |  38  B     00:00
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: No URLs in mirrorlist
'yumdownloader' command not found. Please install or add it to your PATH and try again.
For assistance, please open an issue via GitHub: https://github.com/oracle/centos2ol/.


Right now, I am updating files in /etc/yum.repos.d/, replacing mirrorlist=... with this:

baseurl=http://vault.centos.org/$contentdir/$releasever/[Appstream|...]/$basearch/os/

What is the recommended migration path now, and will centos2ol.sh be updated to handle this automatically?

ehb54 commented 2 years ago

There is a note about this in the README When I ran into this issue, I updated as you did for all repos, extrapolated from shaneholloman's currently last comment in #126 :

BTW, since centos8 repos have move to vault I also

Change to following line to each respective file:

[root@etp-monitor1 ansible]# vi /etc/yum.repos.d/CentOS-Linux-BaseOS.repo
[root@etp-monitor1 ansible]# vi /etc/yum.repos.d/CentOS-Linux-AppStream.repo

CentOS-Linux-BaseOS.repo baseurl=http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/ CentOS-Linux-AppStream.repo baseurl=http://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/

Comment the mirrors

Agree it would be nice if someone could update the scripts to handle this automatically.