CentOS 7 to CentOS 8 upgrade script
CentOS 7 to CentOS 8 upgrade script
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.
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.
Re: CentOS 7 to CentOS 8 upgrade script
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
Redhat can do it and yeah.... Debian & "Ubuntu" can do it too...
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

Redhat can do it and yeah.... Debian & "Ubuntu" can do it too...
Re: CentOS 7 to CentOS 8 upgrade script
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
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.
Re: CentOS 7 to CentOS 8 upgrade script
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 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Re: CentOS 7 to CentOS 8 upgrade script
Yes TrevorH we get it.

Re: CentOS 7 to CentOS 8 upgrade script
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
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
Re: CentOS 7 to CentOS 8 upgrade script
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.
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 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Re: CentOS 7 to CentOS 8 upgrade script
Poor TrevorH, you have to post this alotTrevorH wrote: ↑2019/10/10 10:29:34I 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.
Re: CentOS 7 to CentOS 8 upgrade script
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?
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?
Re: CentOS 7 to CentOS 8 upgrade script
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.
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 8 died a premature death at the end of 2021 - migrate to Rocky/Alma/OEL/Springdale ASAP.
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 and 6 are dead, do not use them.
Use the FAQ Luke