# CentOS 8 to Rocky Migration Errors

**URL:** <https://forums.rockylinux.org/t/centos-8-to-rocky-migration-errors/13421>\
**Category:** Rocky Linux Help & Support\
**Created:** [April 2, 2024, 12:54pm UTC](https://forums.rockylinux.org/t/centos-8-to-rocky-migration-errors/13421 "2024-04-02T12:54:34Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Abhishek](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Abhishek](https://forums.rockylinux.org/u/Abhishek)\
**Post date:** [April 2, 2024, 12:54pm UTC](https://forums.rockylinux.org/t/centos-8-to-rocky-migration-errors/13421/1 "2024-04-02T12:54:34Z")

</div>

I am trying to migrate the CentOS 8 to Rocky 8,

used below repos

vi CentOS-AppStream.repo

# CentOS-AppStream.repo

# 

# The mirror system uses the connecting IP address of the client and the

# update status of each mirror to pick mirrors that are updated to and

# geographically close to the client. You should use this for CentOS updates

# unless you are manually picking other mirrors.

# 

# If the mirrorlist= does not work for you, as a fall back you can try the

# remarked out baseurl= line instead.

# 

# 

[AppStream]  
name=CentOS-$releasever - AppStream  
#mirrorlist=[http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra](http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=AppStream&infra=$infra)  
#baseurl=[http://mirror.centos.org/$contentdir/$releasever/AppStream/$basearch/os/](http://mirror.centos.org/$contentdir/$releasever/AppStream/$basearch/os/)  
baseurl=[http://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/](http://vault.centos.org/$contentdir/$releasever/AppStream/$basearch/os/)  
gpgcheck=1  
enabled=1  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

============================

vi CentOS-Base.repo

# CentOS-Base.repo

# 

# The mirror system uses the connecting IP address of the client and the

# update status of each mirror to pick mirrors that are updated to and

# geographically close to the client. You should use this for CentOS updates

# unless you are manually picking other mirrors.

# 

# If the mirrorlist= does not work for you, as a fall back you can try the

# remarked out baseurl= line instead.

# 

# 

[BaseOS]  
name=CentOS-$releasever - Base  
#mirrorlist=[http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra](http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=BaseOS&infra=$infra)  
#baseurl=[http://mirror.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/](http://mirror.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/)  
baseurl=[http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/](http://vault.centos.org/$contentdir/$releasever/BaseOS/$basearch/os/)  
gpgcheck=1  
enabled=1  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

=========================

vi CentOS-centosplus.repo

# CentOS-centosplus.repo

# 

# The mirror system uses the connecting IP address of the client and the

# update status of each mirror to pick mirrors that are updated to and

# geographically close to the client. You should use this for CentOS updates

# unless you are manually picking other mirrors.

# 

# If the mirrorlist= does not work for you, as a fall back you can try the

# remarked out baseurl= line instead.

# 

# 

#additional packages that extend functionality of existing packages  
[centosplus]  
name=CentOS-$releasever - Plus  
mirrorlist=[http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra](http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus&infra=$infra)  
#baseurl=[http://mirror.centos.org/$contentdir/$releasever/centosplus/$basearch/os/](http://mirror.centos.org/$contentdir/$releasever/centosplus/$basearch/os/)  
gpgcheck=1  
enabled=0  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

=============================

vi CentOS-Extras.repo

# CentOS-Extras.repo

# 

# The mirror system uses the connecting IP address of the client and the

# update status of each mirror to pick mirrors that are updated to and

# geographically close to the client. You should use this for CentOS updates

# unless you are manually picking other mirrors.

# 

# If the mirrorlist= does not work for you, as a fall back you can try the

# remarked out baseurl= line instead.

# 

# 

#additional packages that may be useful  
[extras]  
name=CentOS-$releasever - Extras  
#mirrorlist=[http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra](http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=extras&infra=$infra)  
#baseurl=[http://mirror.centos.org/$contentdir/$releasever/extras/$basearch/os/](http://mirror.centos.org/$contentdir/$releasever/extras/$basearch/os/)  
baseurl=[http://vault.centos.org/$contentdir/$releasever/extras/Source/](http://vault.centos.org/$contentdir/$releasever/extras/Source/)  
gpgcheck=1  
enabled=1  
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-centosofficial

============================

Then,

sudo yum reinstall centos-release

wget [https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh](https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh)

chmod u+x migrate2rocky.sh

./migrate2rocky.sh -r

================

getting below Error;

Can’t get package that provides /etc/yum.repos.d/CentOS-Base.repo.

An error occurred while we were attempting to convert your system to Rocky Linux. Your system may be unstable. Script will now exit to prevent possible damage.

Please help on this

---

<div class="post-metadata">

**Author:** ![Abhishek](https://avatars.discourse-cdn.com/v4/letter/a/7ba0ec/32.png) [@Abhishek](https://forums.rockylinux.org/u/Abhishek)\
**Post date:** [April 3, 2024, 7:20am UTC](https://forums.rockylinux.org/t/centos-8-to-rocky-migration-errors/13421/2 "2024-04-03T07:20:27Z")

</div>

Please help on this error

Can’t get package that provides /etc/yum.repos.d/CentOS-Base.repo.

An error occurred while we were attempting to convert your system to Rocky Linux. Your system may be unstable. Script will now exit to prevent possible damage.

Please help on this

---

<div class="post-metadata">

**Author:** ![label](https://avatars.discourse-cdn.com/v4/letter/l/c5a1d2/32.png) [@label](https://forums.rockylinux.org/u/label)\
**Post date:** [April 3, 2024, 7:38am UTC](https://forums.rockylinux.org/t/centos-8-to-rocky-migration-errors/13421/3 "2024-04-03T07:38:25Z")

</div>

I would recommend looking here to see if your problem was seen before and the solution. Otherwise, open an issue and the maintainer will attempt to assist you.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex020/uploads/rockylinux/original/1X/91b7219eec10e30013422e4df76c1d898711a5d5.svg) [@system](https://forums.rockylinux.org/u/system)\
**Post date:** [June 2, 2024, 7:39am UTC](https://forums.rockylinux.org/t/centos-8-to-rocky-migration-errors/13421/4 "2024-06-02T07:39:10Z")

</div>

Closed on June 2, 2024, 7:39am UTC

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
