以前に、CentOS 8→AlmaLinux Betaへの移行に関する記事を書いた。
Rocky Linuxもリリースされ、Almaと両方の移行について手順を整理することにした。
とりあえず、AlmaLinuxから。
環境
$ cat /etc/redhat-release CentOS Linux release 8.4.2105
移行手順
以下に移行スクリプトがある。
GitHub - AlmaLinux/almalinux-deploy: EL to AlmaLinux migration tool.
移行スクリプトを入手
# wget https://raw.githubusercontent.com/AlmaLinux/almalinux-deploy/master/almalinux-deploy.sh
実行権を与えて実行
# chmod +x almalinux-deploy.sh # bash almalinux-deploy.sh Check root privileges OK Check centos-8.x86_64 is supported OK Download RPM-GPG-KEY-AlmaLinux OK Import RPM-GPG-KEY-AlmaLinux to RPM DB OK Download almalinux-release package OK Verify almalinux-release package OK Your OS is supported OK Remove OS specific rpm packages OK Verifying... ######################################## 準備しています... ######################################## 更新中 / インストール中... almalinux-release-8.4-2.el8 ######################################## Install almalinux-release package OK Backup of alternatives is done OK 最速のミラーを確定しています (125 hosts).. AlmaLinux 8 - BaseOS 504 kB/s | 3.5 MB 00:07 AlmaLinux 8 - AppStream 5.9 MB/s | 7.5 MB 00:01 AlmaLinux 8 - Extras 14 kB/s | 2.5 kB 00:00 依存関係が解決しました。 ======================================================================================= パッケージ Arch バージョン Repo サイズ ======================================================================================= インストール: kernel x86_64 4.18.0-305.3.1.el8_4 baseos 5.9 M kernel-core x86_64 4.18.0-305.3.1.el8_4 baseos 36 M kernel-modules x86_64 4.18.0-305.3.1.el8_4 baseos 28 M アップグレード: chrony x86_64 3.5-2.el8.alma baseos 269 k grub2-common noarch 1:2.02-99.el8.alma baseos 889 k grub2-efi-x64 x86_64 1:2.02-99.el8.alma baseos 477 k ・・・省略 完了しました! Run dnf distro-sync -y OK Restoring of alternatives is done OK Generating grub configuration file ... Adding boot menu entry for EFI firmware configuration done All Secure Boot related packages which were released by not AlmaLinux are reinstalledOK BootCurrent: 0003 BootOrder: 0004,0003,0000,0001,0002 Boot0000* EFI Virtual disk (0.0) Boot0001* EFI VMware Virtual SATA CDROM Drive (0.0) Boot0002* EFI Network Boot0003* CentOS Linux Boot0004* AlmaLinux The new EFI boot record for AlmaLinux is added OK Migration to AlmaLinux is completed
OS再起動する
# reboot
OS起動時のカーネル選択画面にて、AlmaLinuxのものが選択されているか確認。
見逃した場合、以下で確認
# grubby --info DEFAULT | grep title title="AlmaLinux (4.18.0-305.3.1.el8_4.x86_64) 8.4 (Electric Cheetah)"
OS情報のファイルが、AlmaLinuxに変わっているか確認
# cat /etc/redhat-release AlmaLinux release 8.4 (Electric Cheetah)
リポジトリもAlmaLinuxになっている
# ls /etc/yum.repos.d/almalinux*
/etc/yum.repos.d/almalinux-ha.repo /etc/yum.repos.d/almalinux-powertools.repo /etc/yum.repos.d/almalinux.repo
以前のBataへの移行の時のようなエラーは出ず、スムーズに移行完了。
追記
CentOS→Rocky Linuxへの移行に関する記事はコチラ
shobon.hatenablog.com