{"id":14110459,"url":"https://github.com/oracle/centos2ol","last_synced_at":"2025-04-05T04:12:49.054Z","repository":{"id":38026107,"uuid":"320391906","full_name":"oracle/centos2ol","owner":"oracle","description":"Script and documentation to switch CentOS/Rocky Linux to Oracle Linux","archived":false,"fork":false,"pushed_at":"2024-05-13T15:03:23.000Z","size":75,"stargazers_count":350,"open_issues_count":41,"forks_count":83,"subscribers_count":32,"default_branch":"main","last_synced_at":"2025-03-29T03:07:36.616Z","etag":null,"topics":["centos","hacktoberfest","linux","oracle","oracle-linux","switch"],"latest_commit_sha":null,"homepage":"https://linux.oracle.com/switch/centos/","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"upl-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/oracle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-12-10T21:15:46.000Z","updated_at":"2025-03-18T03:11:50.000Z","dependencies_parsed_at":"2022-07-12T17:04:56.952Z","dependency_job_id":"0c6cf1b7-69d8-4f58-a1e1-31082efaa7e1","html_url":"https://github.com/oracle/centos2ol","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fcentos2ol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fcentos2ol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fcentos2ol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fcentos2ol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle","download_url":"https://codeload.github.com/oracle/centos2ol/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247284951,"owners_count":20913704,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["centos","hacktoberfest","linux","oracle","oracle-linux","switch"],"created_at":"2024-08-14T10:02:51.547Z","updated_at":"2025-04-05T04:12:49.037Z","avatar_url":"https://github.com/oracle.png","language":"Shell","readme":"# Switch from CentOS/Rocky Linux to Oracle Linux\n\nThis script is designed to automatically switch a CentOS or Rocky Linux instance to Oracle Linux\nby removing any distribution-specific packages or replacing them with the Oracle Linux\nequivalent.\n\n## Supported versions and architectures\n\nThis script currently supports switching CentOS Linux 6, CentOS Linux 7,\nCentOS Linux 8, Rocky Linux 8 and Rocky Linux 9 on both `x86_64` and `aarch64` architectures. \nIt does **not** support CentOS Stream.\n\n\u003e Support for switching Rocky Linux should be considered **experimental** due to limited testing. Likewise, switching any of the\n\u003e operating systems mentioned above on `aarch64` hosts should be considered **experimental**.\n\u003e\n\u003e The script does not support switching from Rocky Linux images built for Raspberry Pi (aarch64).\n\u003e\n\u003e Please ensure you have a **complete _working_ backup** before attempting\n\u003e to switch and [report any issues][6] you encounter during the process.\n\n## Before you start\n\n**IMPORTANT:** this script is a work-in-progress and is not designed to handle\nall possible configurations. Please ensure you have a **complete working backup**\nof the system _before_ you start this process in the event the script is unable to\nconvert the system successfully or unable to rollback the changes it made.\n\n**NOTE**: CentOS 8 has reached end-of-life and its repos have moved to `vault.centos.org`.\nPlease ensure that your CentOS 8 system is up-to-date and able to access those\nrepos before you start.\n\n### Remove all non-standard kernels\n\nBecause of the [GRUB2 BootHole][1] vulnerability, our SecureBoot shim can\nonly boot kernels signed by Oracle and we can only replace the default\nCentOS kernels. While this may not have an impact if SecureBoot is currently\ndisabled, enabling it at a later date could render the system unbootable.\nFor that reason, we strongly recommend removing all non-standard kernels, i.e.\nany kernel that is installed that is _not_ provided by either the `base` or\n`updates` repo. This includes the [`centosplus`][2] kernels.\n\n1. Ensure your CentOS `yum` or `dnf` configuration is working, i.e. there are no\n   stale repositories.\n1. Disable all non-CentOS repositories. You can re-enable the repos after the switch.\n1. Ensure you have at least 5GB of free space in `/var/cache`.\n1. All automatic updates, e.g. via `yum-cron` should be disabled.\n\n## Usage\n\n1. Login to your CentOS Linux 6, 7 or 8 or Rocky Linux 8 or 9 instance as a user \n   who has `sudo` privileges.\n1. Either clone this repository or download the [`centos2ol.sh`][3] script.\n1. Run `sudo bash centos2ol.sh` to switch your CentOS instance to Oracle Linux.\n\n### Usage options\n\n* `-r` Reinstalls all CentOS RPMs with Oracle Linux RPMs\n\n   If a system is switched to Oracle Linux and there is no newer Oracle Linux version\n   of a package already installed then the CentOS version remains.\n   This option proceeds to reinstall any CentOS RPM with an identical version from\n   Oracle Linux. This is not necessary for support and has no impact to a systems functionality\n   but is offered so a user can remove CentOS GPG keys from the truststore.\n   A list of all non-Oracle RPMs will be displayed after the reinstall process.\n\n* `-k` Do not install the UEK kernel and disable UEK repos\n\n  This option will not install the UEK kernel and will disable all UEK yum repositories.\n\n* `-V` Verify RPM information before and after the switch\n\n  This option creates four output files in `/var/tmp/`:\n\n  * `${hostname}-rpms-list-[before|after].log`: a sorted list of installed\n    packages `before` and `after` the switch to Oracle Linux.\n  * `${hostname}-rpms-verified-[before|after].log`: the RPM verification results\n     for all installed packages `before` and `after` the switch to Oracle Linux.\n\n## Testing\n\nSee [`TESTING.md`](./TESTING.md) for instructions on the available tests and\nhow to run them.\n\n## Known issues\n\n1. There is a [reported issue with the upstream OpenJDK][9] package resetting the\n   `alternatives` configuration during a `dnf reinstall` transaction.\n\n   We recommend recording the output of `alternatives --list` prior to running\n   `centos2ol.sh` and reviewing the same output after switching. If you experience\n   an issue with a package other than OpenJDK, please [open an issue][6]\n\n## Limitations\n\n1. The script currently needs to be able communicate with the CentOS/Rocky and Oracle\n   Linux yum repositories either directly or via a proxy.\n1. The script currently does not support instances that are registered to a\n   third-party management tool like Spacewalk, Foreman or Uyuni.\n1. Compatibility with packages installed from third-party repositories is\n   expected but not guaranteed. Some software doesn't like the existence of an\n   `/etc/oracle-release` file, for example.\n1. Packages that install third-party and/or closed-source kernel modules, e.g.\n   commercial anti-virus products, may not work after switching.\n1. The script only enables the base repositories required to enable switching\n   to Oracle Linux. Users may need to enable additional repositories to obtain\n   updates for packages already installed (see [issue #1][4].\n\n## Debugging\n\nRun `sudo bash -x centos2ol.sh` to switch your CentOS instance to Oracle Linux\nin debug mode. This will print a trace of commands and their arguments or\nassociated word lists after they are expanded but before they are executed.\n\n## Get involved\n\nWe welcome contributions! See our [contribution guidelines][5].\n\n## Support\n\n* Open a [GitHub issue][6] for non-security related bug reports, questions, or\n  requests for enhancements.\n* To report a security issue or vulnerability, please follow the\n  [reporting security vulnerabilities][7] instructions.\n\n## Resources\n\nFor more information on Oracle Linux, please visit [oracle.com/linux][8].\n\n## Contributing\n\nThis project welcomes contributions from the community. Before submitting a pull request, please [review our contribution guide](./CONTRIBUTING.md)\n\n## Security\n\nPlease consult the [security guide](./SECURITY.md) for our responsible security vulnerability disclosure process\n\n## License\n\nCopyright (c) 2020, 2023 Oracle and/or its affiliates.\n\nLicensed under the Universal Permissive License v 1.0 as shown at\n\u003chttps://oss.oracle.com/licenses/upl/\u003e\n\n[1]: https://blogs.oracle.com/linux/cve-2020-10713-grub2-boothole\n[2]: https://wiki.centos.org/AdditionalResources/Repositories/CentOSPlus\n[3]: https://raw.githubusercontent.com/oracle/centos2ol/main/centos2ol.sh\n[4]: https://github.com/oracle/centos2ol/issues/1\n[5]: ./CONTRIBUTING.md\n[6]: https://github.com/oracle/centos2ol/issues\n[7]: ./SECURITY.md\n[8]: https://www.oracle.com/linux\n[9]: https://bugzilla.redhat.com/show_bug.cgi?id=1200302\n","funding_links":[],"categories":["Shell"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Fcentos2ol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle%2Fcentos2ol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Fcentos2ol/lists"}