So CentOS Linux is already passed their End of Life and I forgot to migrate my system to Rocky Linux. What could be worse?
I run the migration script today and I encountered this pellicular error:
Error: Error downloading packages: No URLs in mirrorlist
I thought it was just a random network error, well it also failed with dnf update
. Things go dark from here.
After a few hours of trial and error debugging the network. I successfully fixed it by changing the CentOS' YUM repo server to one of the mirror servers. What this is means is that the canonical CentOS YUM repo server list (mirrorlist.centos.org
) is simply no longer be usable anymore and we need to change it to one of the usable mirrors left in the world.
One of the mirrors that worked for me when I wrote this is http://repo.uk.bigstepcloud.com/centos-vault/
. There are lots of other mirrors to choose from listed here.
To change the CentOS YUM repo server used, you need to modify these files using vim
or nano
(your list may be more or less, you need to check which yum repos enabled in your machine using yum repolist --enabled
) :
/etc/yum.repos.d/CentOS-Linux-AppStream.repo
/etc/yum.repos.d/CentOS-Linux-BaseOS.repo
/etc/yum.repos.d/CentOS-Linux-Extras.repo
You need to comment out the mirrorlist
and uncomment the baseurl
with changing the mirror base URL. The changes are done like this:
[baseos]
name=CentOS Linux $releasever - BaseOS
- mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
+ #mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra
- #baseurl=http://mirrorlist.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/
+ baseurl=http://repo.uk.bigstepcloud.com/centos-vault/$contentdir/$releasever/BaseOS/$basearch/os/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial
I run the migration system again and things work so well. guess I need to share this small tip so I can save someone else's hours haha. Hope it is useful!
Blog Changes 2022-02-02: Prepended path /centos-vault/
to the mirror URL.
Top comments (2)
How did you get this to work? There's no BaseOS folder in any of the Centos 8 release folders on any of the mirrors so that baseurl line brought up 404 errors. Had to use "baseurl=repo.uk.bigstepcloud.com/centos/8...." to successfully "dnf install" but the Rocky Linux script couldn't find system-logos-ipa package to complete the migration.
Ended up just updating to Centos stream. If any one wants to update their EOL Centos 8 to Centos Stream, change the baseurl line to "baseurl=repo.uk.bigstepcloud.com/$contentd..." and then follow this guide: ostechnix.com/how-to-migrate-to-ce.... It's going to be easier to migrate from Rocky Linux from there.
Wow. Looks like last night they're moving it to
http://repo.uk.bigstepcloud.com/centos-vault/
. I clearly have seen them working on my machine the night before I wrote this article. Sorry, updated my article.