0
0

More than 1 year has passed since last update.

rancherOSのcentos consoleをalmalinux 9にupgradeするためのメモ

Last updated at Posted at 2023-01-18
  • 参考記事

  • 本稿で作成したスクリプトのリポジトリ

diff -Nc almalinux-deploy.sh almalinux-deploy.sh
*** almalinux-deploy.sh 2023-01-18 13:28:28.096019365 +0000
--- almalinux-deploy.sh 2023-01-18 13:31:35.712659621 +0000
***************
*** 1014,1021 ****
      local panel_version
      assert_run_as_root
      arch="$(get_system_arch)"
!     os_type="$(get_os_release_var 'ID')"
!     os_version="$(get_os_version "${os_type}")"
      #os_version="$(get_os_release_var 'VERSION_ID')"
      #os_version="${os_version:0:1}"
      assert_supported_system "${os_type}" "${os_version}" "${arch}"
--- 1014,1021 ----
      local panel_version
      assert_run_as_root
      arch="$(get_system_arch)"
!     os_type="centos"
!     os_version="8"
      #os_version="$(get_os_release_var 'VERSION_ID')"
      #os_version="${os_version:0:1}"
      assert_supported_system "${os_type}" "${os_version}" "${arch}"
***************
*** 1070,1082 ****
      restore_alternatives
      restore_issue
      # don't do this steps if we inside the lxc container
!     if [ $is_container -eq 0 ]; then
!         install_kernel
!         grub_update
!         reinstall_secure_boot_packages
!         add_efi_boot_record
!     fi
!     check_custom_kernel
      save_status_of_stage "completed"
      printf '\n\033[0;32mMigration to AlmaLinux is completed\033[0m\n'
  }
--- 1070,1082 ----
      restore_alternatives
      restore_issue
      # don't do this steps if we inside the lxc container
!     #if [ $is_container -eq 0 ]; then
!         #install_kernel
!         #grub_update
!         #reinstall_secure_boot_packages
!         #add_efi_boot_record
!     #fi
!     #check_custom_kernel
      save_status_of_stage "completed"
      printf '\n\033[0;32mMigration to AlmaLinux is completed\033[0m\n'
  }

 # chmod -v +x almalinux-deploy.sh
 # ./almalinux-deploy.sh

  • (3) Almalinux 8 → Almalinux 9
     # dnf install -y https://repo.almalinux.org/almalinux/9.1/BaseOS/x86_64/os/Packages/almalinux-{gpg-keys,release,repos}-9.1-1.9.el9.x86_64.rpm
     # dnf install -y epel-release-9
     # dnf -y --releasever=9 --allowerasing --setopt=deltarpm=false distro-sync --skip-broken # rpm --rebuilddb
     # cp /var/lib/rpmrebuilddb.xxxx/* /var/lib/rpm
     # dnf -y module reset perl perl-IO-Socket-SSL perl-libwww-perl
     (以下、元のconsole imageに入っていないパッケージを削除)
     # rpm -e compat-openssl10 dbus-daemon dbus-tools dnf-plugins-core ed elfutils-debuginfod-client file freetype fuse-libs gawk-all-langpacks gettext gettext-libs glibc-gconv-extra gnupg2-smime graphite2 grub2-common grub2-tools grub2-tools-efi grub2-tools-extra grub2-tools-minimal grubby harfbuzz hwdata kbd-legacy libcroco libmetalink libnsl libpng libusbx libxcrypt-compat libxkbcommon make memstrack openssl-pkcs11 os-prober patch pciutils pciutils-libs perl-AutoLoader perl-B perl-Data-Dumper perl-Digest perl-Digest-MD5 perl-FileHandle perl-IO-Socket-IP perl-IO-Socket-SSL perl-Mozilla-CA perl-NDBM_File perl-Net-SSLeay perl-URI perl-Unicode-Normalize perl-base perl-libnet protobuf-c python-unversioned-command python3-dateutil python3-dbus python3-dnf-plugins-core python3-six python3-unbound rdma-core rpm-plugin-systemd-inhibit trousers trousers-lib unbound-libs xkeyboard-config
     # rpm -e `rpm -qa | grep el7`
     # rpm -e `rpm -qa | grep el8`
     # ln -sf /usr/bin/ros /sbin/shutdown (元のsymlinkの修復)
     # shutdown -r now
0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0