{"id":50897861,"url":"https://github.com/oracle/migrate-to-ol","last_synced_at":"2026-07-22T07:01:16.387Z","repository":{"id":38026107,"uuid":"320391906","full_name":"oracle/migrate-to-ol","owner":"oracle","description":"Script and documentation to switch to Oracle Linux","archived":false,"fork":false,"pushed_at":"2026-05-06T22:50:10.000Z","size":158,"stargazers_count":361,"open_issues_count":0,"forks_count":91,"subscribers_count":27,"default_branch":"main","last_synced_at":"2026-06-22T14:43:53.437Z","etag":null,"topics":["centos","hacktoberfest","linux","oracle","oracle-linux","switch"],"latest_commit_sha":null,"homepage":"https://github.com/oracle/migrate-to-ol","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-migrate-to-oracle-linux.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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2020-12-10T21:15:46.000Z","updated_at":"2026-06-11T02:05:10.000Z","dependencies_parsed_at":"2022-07-12T17:04:56.952Z","dependency_job_id":"0c6cf1b7-69d8-4f58-a1e1-31082efaa7e1","html_url":"https://github.com/oracle/migrate-to-ol","commit_stats":null,"previous_names":["oracle/migrate-to-ol"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/oracle/migrate-to-ol","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fmigrate-to-ol","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fmigrate-to-ol/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fmigrate-to-ol/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fmigrate-to-ol/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/oracle","download_url":"https://codeload.github.com/oracle/migrate-to-ol/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/oracle%2Fmigrate-to-ol/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35751644,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-22T02:00:06.236Z","response_time":124,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":"2026-06-16T01:31:30.083Z","updated_at":"2026-07-22T07:01:16.381Z","avatar_url":"https://github.com/oracle.png","language":"Shell","funding_links":[],"categories":["hacktoberfest"],"sub_categories":[],"readme":"# 🔄 migrate-to-oracle-linux.sh\n\n`migrate-to-oracle-linux.sh` migrates supported Enterprise Linux systems to\nOracle Linux.\n\n🎯 Run this script on the system that will be migrated to Oracle Linux.\n\n⚠️ Do not run this script on the yum mirror server unless that mirror server is\nitself the system being migrated.\n\n🚫 Major upgrades are not supported. A 7.x source can target only Oracle Linux 7\nlatest; an 8.x source can target only Oracle Linux 8.x or 8 latest.\n\n✨ Exception: Amazon Linux 2 is treated as an EL7-compatible source and targets\nOracle Linux 7 latest.\n\n## ✅ Supported Sources\n\nArchitectures:\n\n- 🖥️ `x86_64`\n- 🔧 `aarch64`\n\n| Source | Supported releases | Target |\n| --- | --- | --- |\n| CentOS Linux | 7.9, 8.4+ | OL 7 latest, OL 8 |\n| CentOS Stream | 8, 9, 10 | OL latest in the same major |\n| AlmaLinux | 8, 9, 10 | OL 8, 9, 10 |\n| Amazon Linux | 2 | OL 7 latest |\n| Red Hat Enterprise Linux | 7.9, 8, 9, 10 | OL 7 latest, OL 8, 9, 10 |\n| Rocky Linux | 8, 9, 10 | OL 8, 9, 10 |\n\nUnsupported:\n\n- 🚫 cross-major migrations, such as 8.x to 9.x;\n- 🚫 fixed-minor targets for EL7;\n- 🚫 fixed-minor targets for CentOS Stream;\n- 🚫 RHCK on `aarch64`.\n\n## 🧭 Migration Modes\n\n| Mode | Selection | Behavior |\n| --- | --- | --- |\n| Same release | Omit `--target-version` on fixed-minor sources, or pass the current version | Replaces release packages, reinstalls exact Oracle NEVRAs, then uses nearest Oracle EVRs where needed. Higher EVRs are preferred; lower EVRs are last fallback. |\n| Specific newer release | `--target-version 8.10`, `--target-version 9.7`, etc. | Replaces release packages and syncs installed RPMs to the selected same-major Oracle Linux release. |\n| Latest | `--target-version latest` | Replaces release packages and syncs installed RPMs to Oracle Linux latest repositories, including `baseos_latest` or `ol7_latest`. |\n\nSpecial cases:\n\n- 🌊 CentOS Stream always targets Oracle Linux latest within the same major.\n- 7️⃣ RHEL 7.9 and CentOS Linux 7.9 always target Oracle Linux 7 latest.\n- ✨ Amazon Linux 2 always targets Oracle Linux 7 latest.\n- 🕒 `tzdata` and `ca-certificates` may use newer Oracle Linux builds in\n  same-release mode and are not downgraded unless no other replacement exists.\n- 🧹 RHEL subscription-management packages, Red Hat-only support packages, and\n  `gpg-pubkey` pseudo-packages are removed and reported as\n  `removed-rhel-only`.\n- ✨ Amazon Linux 2 uses an exception path to OL 7 latest. Amazon-only packages\n  with no OL 7 equivalent are removed and reported as `removed-amazon-only`;\n  required OL providers such as `oracle-logos`, `python-setuptools`, and\n  `python-six` are installed after the OL sync.\n- 🔁 On RHEL sources, `--reinstall-all` is enabled automatically unless\n  `--no-reinstall-all` is passed.\n- 📦 Third-party packages are reported as `3rd Party` and are not treated as\n  Oracle replacements.\n\n## 🧠 Kernel Selection\n\nDefault: install UEK and set it as the default boot kernel.\n\n```bash\nsudo ./migrate-to-oracle-linux.sh -y --kernel uek\nsudo ./migrate-to-oracle-linux.sh -y --kernel rhck\n```\n\nAccepted values:\n\n- `uek`\n- `rhck` on `x86_64` only\n\nAliases:\n\n- `--uek`\n- `--rhck` on `x86_64` only\n\nOn `aarch64`, Oracle Linux RHCK is not available. The script always uses UEK\nand rejects `--kernel rhck`.\n\nUEK repositories:\n\n| Oracle Linux major | UEK repository |\n| --- | --- |\n| 7 | `ol7_UEKR6` |\n| 8 | `ol8_UEKR7` |\n| 9 | `ol9_UEKR8` |\n| 10 | `ol10_UEKR8` |\n\n## 🚀 Usage\n\nRun on the system being migrated:\n\n```bash\ncurl -O https://raw.githubusercontent.com/\u003cowner\u003e/migrate-to-oracle-linux/main/migrate-to-oracle-linux.sh\nchmod +x migrate-to-oracle-linux.sh\nsudo ./migrate-to-oracle-linux.sh -y\n```\n\nDry run:\n\n```bash\nsudo ./migrate-to-oracle-linux.sh --dry-run\n```\n\nOptions:\n\n```text\n-y, --assumeyes              Run package operations non-interactively\n    --dry-run                Print commands and write reports without changes\n    --reinstall-all          Attempt exact reinstall for every installed RPM\n    --no-reinstall-all       Only exact reinstall source-vendor packages\n    --target-version VERSION Use same-major target version, such as 8.6, or latest\n    --kernel FLAVOR          Select uek or rhck; aarch64 always uses uek\n    --yum-mirror URL         Use mirror origin, such as https://yum-mirror.example.com\n    --proxy URL              Use HTTP proxy for yum/dnf, such as http://myproxy.example.com:3128\n    --strict-evr             Stop when exact Oracle NEVRAs are unavailable\n    --no-strict-evr          Continue when exact NEVRAs are unavailable; default\n    --no-reboot-check        Skip newest-installed-kernel boot check\n    --keep-bootstrap-repos   Keep temporary Oracle bootstrap repo file\n    --debug                  Enable shell tracing\n-h, --help                   Show help\n-V, --version                Show version\n```\n\nUse `--strict-evr` only when exact package release preservation is mandatory.\nDefault non-strict mode is more practical: it uses exact Oracle NEVRAs when\navailable, then nearest Oracle replacements.\n\n`--yum-mirror` accepts only the HTTPS origin. Do not include\n`/repo/OracleLinux/...`; the script builds the Oracle public yum paths itself.\nFor example, `--yum-mirror https://yum-mirror.example.com` makes the OL10 BaseOS\nLatest bootstrap URL:\n\n```text\nhttps://yum-mirror.example.com/repo/OracleLinux/OL10/baseos/latest/x86_64/\n```\n\nWhen `--yum-mirror` is used, the temporary Oracle repository definitions set\n`sslverify=0`, and yum/dnf commands receive `--setopt=sslverify=0`. This allows\nlocal mirrors that use self-signed certificates or certificates whose hostname\ndoes not match the mirror hostname. RPM GPG signature checking remains enabled.\n\n`--proxy` accepts an HTTP proxy URL and configures it in the system yum/dnf\nconfiguration before Oracle repositories are used. It also passes the proxy to\nall migration yum/dnf commands. `--proxy` cannot be used with `--yum-mirror`.\n\n## 🛠️ What The Script Does\n\n1. ✅ Validates source OS, release, architecture, and target version.\n2. 📝 Records `/etc/os-release`, enabled repositories, hostname, and RPM database.\n3. 🔍 Verifies the RPM database.\n4. 🧠 Requires the newest installed kernel to be booted unless\n   `--no-reboot-check` is passed.\n5. 📦 Adds temporary Oracle Linux bootstrap repositories.\n6. 🚫 Disables source distribution repositories.\n7. 🧹 Removes source release packages.\n8. 🧹 Removes RHEL-only packages on RHEL sources.\n9. 🐧 Installs Oracle Linux release packages.\n10. 🔁 Replaces installed RPMs:\n    - same-release mode: exact Oracle NEVRAs, nearest higher EVRs, then nearest\n      lower EVRs;\n    - specific-release/latest mode: Oracle Linux `distro-sync --nobest`.\n11. 🧠 Installs the selected Oracle Linux kernel flavor.\n12. 🔍 Rechecks source-vendor RPMs and replaces remaining RHEL-vendor packages\n    when Oracle replacements exist.\n13. ✅ Verifies `ID=ol` and the requested target version.\n14. 📊 Writes TSV and HTML reports.\n\n## 📊 Reports\n\nEvery run creates:\n\n```text\n/var/lib/migrate-to-oracle-linux/\u003crun-id\u003e/\n/var/log/migrate-to-oracle-linux/\u003crun-id\u003e.log\n```\n\nKey files:\n\n| File | Purpose |\n| --- | --- |\n| `rpmdb.before.tsv` | Pre-migration RPM inventory |\n| `rpmdb.after.tsv` | Post-migration RPM inventory |\n| `enabled-repos.before` | Enabled repositories before migration |\n| `enabled-repos.after` | Enabled repositories after migration |\n| `exact-reinstall.nevra` | Same-release exact Oracle replacements |\n| `nearest-higher-reinstall.nevra` | Same-release nearest higher Oracle replacements |\n| `nearest-lower-reinstall.nevra` | Same-release nearest lower Oracle fallback replacements |\n| `update-exception-reinstall.nevra` | `tzdata` and `ca-certificates` replacements |\n| `unavailable-reinstall.nevra` | Packages without an Oracle replacement |\n| `missing-exact.nevra` | Packages without exact Oracle NEVRAs |\n| `rhel-only-packages.removed.tsv` | RHEL-only packages intentionally removed |\n| `redhat-vendor-oracle-reinstall.nevra` | Remaining Red Hat-vendor RPMs reinstalled from Oracle repos |\n| `redhat-vendor-oracle-replacement-install.nevra` | Non-exact Oracle replacements for remaining Red Hat-vendor RPMs |\n| `redhat-vendor-source-removal.nvra` | Red Hat-vendor RPM instances removed after replacement |\n| `redhat-vendor-oracle-unavailable.tsv` | Red Hat-vendor RPMs without Oracle replacement |\n| `kernel-flavor.selected` | Selected kernel flavor |\n| `kernel-default.verified` | Final default boot kernel reported by `grubby` |\n| `migration-rpm-map.tsv` | Machine-readable RPM migration map |\n| `migration-rpm-map.html` | Main HTML RPM migration report |\n\nLegacy same-release HTML summaries may also be written:\n\n- `reinstalled-oracle-exact.html`\n- `reinstalled-oracle-nearest.html`\n- `not-reinstalled-oracle.html`\n\n`migration-rpm-map.html` includes:\n\n- hostname;\n- migration time in `HH:MM:SS`;\n- source `/etc/os-release`;\n- target `/etc/os-release`;\n- architecture;\n- selected kernel flavor;\n- vendor package counts after migration.\n\nStatus colors:\n\n| Status | Meaning | Color |\n| --- | --- | --- |\n| `exact` | Reinstalled with identical Oracle NEVRA | Light green |\n| `reinstalled; same release` | Reinstalled without EVRA change | Light green |\n| `nearest-higher-release` | Replaced with nearest higher Oracle EVR | Light yellow |\n| `nearest-lower-release` | Replaced with nearest lower Oracle EVR | Light orange |\n| `updated` | Target Oracle package is newer | Light blue |\n| `downgraded` | Target Oracle package is older | Light orange |\n| `3rd Party` | Non-source-vendor, non-Oracle package | Light orange |\n| `replaced-distribution-package` | Source release package replaced by Oracle release package | Light blue |\n| `replaced-by-linux-firmware` | EL10 split firmware package replaced by Oracle `linux-firmware` packages | Light blue |\n| `removed-rhel-only` | RHEL-only package intentionally removed | Light red |\n| `removed-source-kernel` | Source-vendor runtime kernel removed after Oracle kernel install | Light red |\n| `unavailable` | No Oracle replacement found | Light red |\n| `source-vendor-retained` | Source-vendor package remains installed | Light red |\n| `skipped` | Source RPM was unexpectedly not found after migration | Light red |\n\n## 🧯 Operational Notes\n\n- 📸 Take a VM snapshot or full system backup first.\n- 📦 Remove or disable third-party repositories unless intentionally retained.\n- 🔄 Reboot after migration to start the selected Oracle Linux kernel.\n- 🔐 Test RHEL migrations on subscribed systems with access to required package\n  metadata.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Fmigrate-to-ol","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Foracle%2Fmigrate-to-ol","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Foracle%2Fmigrate-to-ol/lists"}