3

I looked into this a while back, and lots of people were saying it wasn't supported, and talking about "hacky" ways of doing it. That was 2 years ago though.

Some googling now suggests it might be as simple as:

dnf install dnf-plugin-system-upgrade
dnf system-upgrade download --releasever=9 --allowerasing
dnf system-upgrade reboot

But I'm unclear if my services (php, mariadb, etc) will continue to operate, or if I'd have to reinstall them and my data and conf files etc.

I could spin up a new server and install fresh, but would prefer to not jump through those hoops and upgrade this one, if people who see this question have tried it and have any words of wisdom or encouragement!

2 Answers 2

2

I've been researching this tonight, too. I have a "CentOS Stream release 8" VM in VirtualBox. I fully upgraded it and made a snapshot of it before testing the 3 lines you posted. I was warned to first run "sudo dnf --refresh upgrade" first so I did. Once I began the upgrade, I was met with suggestions to add "--skip-broken" and "--nobest". After adding both of those, I was able to trigger the update after a reboot. Now, however, I'm met with the inability to do much due to "This system is not registered with an entitlement server. You can use subscription-manager to register."

I renew a free RHEL Developer's License annually to keep my RHEL 9 VM operational but I've never needed to register a version of CentOS. I'm not sure if there's a registration required now or if this is just not such a great idea. Fortunately with that snapshot it was easy to rollback.

2
  • 1
    The message "This system is not registered with an entitlement server" is perfectly normal for any system which isn't RHEL with a valid subscription (so you'll see it on CentOS and even Fedora). It's not an error. Just ignore it unless you actually want to make use of an EL subscription.
    – TooTea
    Apr 15 at 10:54
  • What do you say to TooTea's comment @Myke Carter - might you have been able to just ignore that message, or was it preventing you from doing things on the box somehow?
    – Codemonkey
    Apr 15 at 11:40
0

You will be jumping through hoops for upgrades, just a question of where you want to spend time.

EL major version upgrades like that are not tested consistently. Especially for a moving target like CentOS Stream, and even more difficult if third party packages are also installed. In theory the package manager can handle an enormous distro wide upgrade transaction. In practice, RHEL invented a whole set of tooling to make the leap easy.

ELevate brings that tooling to the rest of EL. As of April 2024, upgrade to Stream 9 are planned but under development.

Or, you can try a slightly more risky dnf system-upgrade like in your question. Pay particular attention to what packages need to be removed to make the transaction happen. And diff config files to backups or expected values from clean install automation. Some review is prudent as major versions of software are changing.

Failing an in place upgrade, yes you can clean install a new host. Annoying that this could be the easier option, but it will work.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .