CentOS 7 to CentOS 8 upgrade script

Issues related to applications and software problems and general support
zippieok
Posts: 2
Joined: 2019/09/27 17:56:57

CentOS 7 to CentOS 8 upgrade script

Post by zippieok » 2019/09/27 18:11:22

https://github.com/johnj/centos-to8-upgrade

author here, this I'll give the usual disclaimer, is a dangerous and unsupported online upgrade.

CentOS did not migrate, and has no plans to (from reading these forums), RHEL's 7 to 8 migration tool (https://access.redhat.com/documentation ... el_8/index).

Here to take any feedback (critical feedback especially appreciated) and answer questions.

AdamAU
Posts: 4
Joined: 2019/10/05 09:23:16

Re: CentOS 7 to CentOS 8 upgrade script

Post by AdamAU » 2019/10/05 09:44:07

Awesome just what I was looking for.
I was going to use the redhat-upgrade-tool and was checking out the forums to see if anyone had success but this looks promising.

To be quite honest, live/online upgrade should be supported by centos like come on its 2019... Its no unsafer then upgrading from a disk (does anyone even do that anymore?) and easier than a clean install.

I don't see it being too difficult to check installed packages compare against what is in the repo's and flag the missing? either way if you committed to a clean install and find out a package is missing (because you did not check it out first) your up shit creek, if the systems no longer functional and you didn't backup.. then it sounds like a personal problem haha.. if its a configuration issue afterwards then RTFM :lol:

Redhat can do it and yeah.... Debian & "Ubuntu" can do it too...

AdamAU
Posts: 4
Joined: 2019/10/05 09:23:16

Re: CentOS 7 to CentOS 8 upgrade script

Post by AdamAU » 2019/10/05 11:17:55

Tested your script with a clone of my installation.. i will note for what ever reason it didn't disable selinux so i had to disable it in /etc/selinux/config
I also had to add the epel-repo to your repo list

once that was done everything seemed to go OK, however YUM wasn't updated, so i downloaded the yum rpm from the centos 8 repo and all was good with that.

Only other thing that was missed was the kernel it was still 3.x so yum install kernel brought it up to date as yum upgrade didnt seem to notice..
Which means the package db is broken doing things this way, I'll look in to this some more
Last edited by AdamAU on 2019/10/05 11:35:52, edited 1 time in total.

User avatar
TrevorH
Forum Moderator
Posts: 29722
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 to CentOS 8 upgrade script

Post by TrevorH » 2019/10/05 11:32:51

Please note that there is NO UPGRADE from CentOS 7 to 8. Any "upgrade" script here is entirely at your own risk and the resulting system, if it experiences any problems in future, will be completely unsupported.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

AdamAU
Posts: 4
Joined: 2019/10/05 09:23:16

Re: CentOS 7 to CentOS 8 upgrade script

Post by AdamAU » 2019/10/05 11:34:49

TrevorH wrote:
2019/10/05 11:32:51
Please note that there is NO UPGRADE from CentOS 7 to 8. Any "upgrade" script here is entirely at your own risk and the resulting system, if it experiences any problems in future, will be completely unsupported.
Yes TrevorH we get it. 8-)

pcmc
Posts: 4
Joined: 2017/10/04 09:06:03

Re: CentOS 7 to CentOS 8 upgrade script

Post by pcmc » 2019/10/10 10:04:43

Hello zippieok,

I have tried out this script, but I am afraid the yum install command didn't quite work:

yum install -y --installroot=$STAGING_DIR hostname yum centos-release centos-release-8.0 glibc-langpack-en $(rpmquery -a --queryformat '%{NAME} ') 2>&1 | tee -a $STAGING_DIR/to8.log
+ tee -a /to8/to8.log
++ rpmquery -a --queryformat '%{NAME} '
+ yum install -y --installroot=/to8 hostname yum centos-release centos-release-8.0 glibc-langpack-en texlive-colortbl icedax xorg-x11-xinit ipa-pmincho-fonts poppler-qt …

The to8.log is showing this error at the end:
---> Package redhat-lsb-desktop.x86_64 0:4.1-47.el8 will be installed
---> Package redhat-lsb-languages.x86_64 0:4.1-47.el8 will be installed
--> Processing Dependency: /usr/bin/python3 for package: redhat-lsb-languages-4.1-47.el8.x86_64
---> Package redhat-lsb-printing.x86_64 0:4.1-47.el8 will be installed
---> Package redhat-lsb-submod-multimedia.x86_64 0:4.1-47.el8 will be installed
---> Package redhat-lsb-submod-security.x86_64 0:4.1-47.el8 will be installed
---> Package redhat-menus.noarch 0:12.0.2-12.el8 will be installed
---> Package redhat-rpm-config.noarch 0:116-1.el8.0.1 will be installed

Error: Invalid version flag: if
[root@cumulus ~]#

A google search on this error suggests something incompatible on yum / dnf:
https://bugzilla.redhat.com/show_bug.cgi?id=1489315

Any idea how to overcome this?

Regards,
Peter Chiu

User avatar
TrevorH
Forum Moderator
Posts: 29722
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 to CentOS 8 upgrade script

Post by TrevorH » 2019/10/10 10:29:34

I know I've said this before but this is totally unsupported and if you come requesting assistance from CentOS in the future and we discover that this is a 7 to 8 conversion we will just tell you to go reinstall properly.

An upgrade from CentOS 7 to 8 is unsupported, liable to breakage and is generally not worth the effort or trouble. Save yourself some time and energy and peace of mind and install a fresh system and migrate.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

AdamAU
Posts: 4
Joined: 2019/10/05 09:23:16

Re: CentOS 7 to CentOS 8 upgrade script

Post by AdamAU » 2019/10/10 10:48:04

TrevorH wrote:
2019/10/10 10:29:34
I know I've said this before but this is totally unsupported and if you come requesting assistance from CentOS in the future and we discover that this is a 7 to 8 conversion we will just tell you to go reinstall properly.

An upgrade from CentOS 7 to 8 is unsupported, liable to breakage and is generally not worth the effort or trouble. Save yourself some time and energy and peace of mind and install a fresh system and migrate.
Poor TrevorH, you have to post this alot

sgk
Posts: 1
Joined: 2020/02/17 16:51:18

Re: CentOS 7 to CentOS 8 upgrade script

Post by sgk » 2020/02/17 17:02:53

Hello TrevorH,
I am trying to understand how can we achieve this 7 to 8 upgrade, and found there is a bug report which states the need for packaging leapp https://bugs.centos.org/view.php?id=16116
so that means fixing 16116 is the first step towards achieving the upgrade.Is it?

User avatar
TrevorH
Forum Moderator
Posts: 29722
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CentOS 7 to CentOS 8 upgrade script

Post by TrevorH » 2020/02/17 17:07:53

AFAIK, the CentOS team have said that they will not package leapp unless there is someone from the community willing to do all the work (and probably take all the blame for the inevitable failures). The current stance is that Red Hat pay people to do this and if it's something you want badly enough then you can pay for RHEL and use that. And even RH only support it for very limited configurations - last time I looked it was "no third party repos and nothing with any sort of GUI" which makes it sort of useless for most people.

Personally I think that since each version is supported for 10 years, it's really not that much to ask that you do a fresh install on new hardware when you replace one machine with another. At my $dayjob we replace hardware at least every 5 years and sometimes sooner and we always do a fresh install. With everything in configuration management it really isn't that much effort and you end up with a supported machine with no cruft and no legacy crap on it.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

Post Reply

Return to “CentOS 8 - General Support”