DEV Community

Wildan Mubarok
Wildan Mubarok

Posted on • Edited on • Originally published at blog.wellosoft.net

1 1

Stuck Trying to Migrate from CentOS Linux to Rocky Linux after EOL?

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
Enter fullscreen mode Exit fullscreen mode

Error screenshot

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
Enter fullscreen mode Exit fullscreen mode

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
Enter fullscreen mode Exit fullscreen mode

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.

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (2)

Collapse
 
aasieg profile image
aasieg

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.

Collapse
 
willnode profile image
Wildan Mubarok

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.

Qodo Takeover

Introducing Qodo Gen 1.0: Transform Your Workflow with Agentic AI

Rather than just generating snippets, our agents understand your entire project context, can make decisions, use tools, and carry out tasks autonomously.

Read full post

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay