-
-
Save grizz/e3668652c0f0b121118ce37d29b06dbf to your computer and use it in GitHub Desktop.
# swap back to stream repos | |
# dnf swap centos-{stream,linux}-repos -- only works if the centos-linux-repos package is cached | |
dnf install --allowerasing https://mirror.rackspace.com/centos-vault/8.5.2111/BaseOS/x86_64/os/Packages/centos-linux-repos-8-3.el8.noarch.rpm | |
# doesn't work, need to manually flip after update | |
# dnf swap centos-{stream,linux}-release | |
# update to centos-vault repos | |
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[baseos\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/BaseOS/$basearch/os' /etc/yum.repos.d/CentOS-Linux-BaseOS.repo | |
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[appstream\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/AppStream/$basearch/os' /etc/yum.repos.d/CentOS-Linux-AppStream.repo | |
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[cr\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/ContinuousRelease/$basearch/os' /etc/yum.repos.d/CentOS-Linux-ContinuousRelease.repo | |
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[devel\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/Devel/$basearch/os' /etc/yum.repos.d/CentOS-Linux-Devel.repo | |
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[extras\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/extras/$basearch/os' /etc/yum.repos.d/CentOS-Linux-Extras.repo | |
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[fasttrack\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/fasttrack/$basearch/os' /etc/yum.repos.d/CentOS-Linux-FastTrack.repo | |
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[ha\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/HighAvailability/$basearch/os' /etc/yum.repos.d/CentOS-Linux-HighAvailability.repo | |
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[plus\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/centosplus/$basearch/os' /etc/yum.repos.d/CentOS-Linux-Plus.repo | |
sudo sed -i -e '/mirrorlist=http:\/\/mirrorlist.centos.org\/?release=$releasever&arch=$basearch&repo=/ s/^#*/#/' -e '/baseurl=http:\/\/mirror.centos.org\/$contentdir\/$releasever\// s/^#*/#/' -e '/^\[powertools\]/a baseurl=https://mirror.rackspace.com/centos-vault/8.5.2111/PowerTools/$basearch/os' /etc/yum.repos.d/CentOS-Linux-PowerTools.repo | |
# remove packages not in base RHEL | |
yum remove glibc-gconv-extra NetworkManager-initscripts-updown | |
# sync to new repo files and reboot | |
dnf distro-sync | |
reboot | |
# switch from Stream release to Linux release | |
rpm -e --nodeps centos-stream-release | |
yum install centos-linux-release --releasever=8 | |
# continue on with https://github.com/AlmaLinux/almalinux-deploy | |
./almalinux-deploy.sh |
One more thing I'd add. I was getting this error: Unable to detect release version (use '--releasever' to specify release version)
Fixed by doing adding this your yum install centos-linux-release
yum install centos-linux-release --releasever=8
Thanks @itsnotyoutoday, updated -- I was lazy and just ignored it since it was a warning. :)
I've also ran into needing to remove and install qemu, so
yum remove qemu-kvm\*
If centos-linux-repos
is not found, this also works:
dnf install --allowerasing https://mirror.rackspace.com/centos-vault/8.5.2111/BaseOS/x86_64/os/Packages/centos-linux-repos-8-3.el8.noarch.rpm
Thank you, grizz, for creating this; certainly useful. I'm customizing some things on it for my uses, and I had a question. On line 4 you commented that this step may need to be run after the update. Where in this version would you recommend performing that flip?
Thank you.
@TCMcG008 Yeah, it's done on lines 25-27 -- I just left that comment in there because I forgot it didn't work and tried it twice. :)
worked for me on local VMware instance
@TCMcG008 sure, thanks
Worked for me on a Proxmox VM running Icinga over Stream 8. Everything running at first try!
Thanks!!!
Been meaning to update you here. Based on your code I've written this version:
https://github.com/TCMcG008/stream-rollback
It's got a bit more stuff due to some errors and hurdles I encountered along the way. IDK if I'll be doing too much more to update it as this is mainly a bridge to get everyone safely away from Stream.
Thank you again, Grizz!
~TCMcG
Awesome, will use that next time I need to do do it. Cheers!
this went pretty well for me up until reboot, its likely that some users will need to rebuild grub per @TCMcG008 's script:
/usr/sbin/grub2-mkconfig -o /boot/grub2/grub.cfg
Badass, cool that this was posted just shortly before I was trying to accomplish this!