rocky-linux / rocky-tools Goto Github PK
View Code? Open in Web Editor NEWLicense: MIT License
License: MIT License
It's good to have an option to limit IO when running mirrorsync.sh
.
IPA server fails to start after migration.
Much like #75 but also when migrating from CentOS 8 (NOT stream) to Rocky, which is the primary use of the script. Also the same problem could apply to other packages, too:
ipa-server
is newer in CentOS 8 repo than in Rocky repopre_update
step of the script upgrades the package to the latest version in CentOS repo by calling dnf update
, which also migrates the data to this versionService ipa
fails to start because the data is newer than the program.
My workaround was to add --exclude ipa-server ipa-client ipa-common --nobest
to the dnf update
in line 637. And of course starting the migration with the system NOT being updated with dnf update
, i.e. with a package version no higher than the latest in Rocky repo.
originally installed: 4.8.7-16.module_el8.3.0+753+f535d84d
latest in centos repo: 4.9.2-4.module_el8.4.0+846+96522ed7
latest in rocky repo: ipa-server-4.9.2-4.module+el8.4.0+589+9650b94f
It would be good if the script could somehow handle this problem (at least for IPA) and not render the system unusable (until Rocky packages are updated).
I also think this is a very important issue because users of FreeIPA depend much on EL distributions.
[root@tux ~]# ./migrate2rocky.sh -r
Removing dnf cache
Preparing to migrate CentOS Linux 8 to Rocky Linux 8.
Determining repository names for CentOS Linux 8.Importing GPG key 0x24098CB6:
Userid : "Grafana <[email protected]>"
Fingerprint: 4E40 DDF6 D76E 284A 4A67 80E4 8C8C 34C5 2409 8CB6
From : https://packages.grafana.com/gpg.key
^C
[root@tux ~]#
Failed to fetch info for package apr-util-ldap.x86_64.
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.
A log of this installation can be found at /var/log/migrate2rocky.log
[root@tux ~]#
Thus my conclusion was:
[root@tux ~]# dnf info apr-util-ldap.x86_64
grafana 2.5 kB/s | 454 B 00:00
grafana 19 kB/s | 1.7 kB 00:00
GPG-Schlüssel 0x24098CB6 wird importiert:
Benutzer-ID : »Grafana <[email protected]>«
Fingerabdruck: 4E40 DDF6 D76E 284A 4A67 80E4 8C8C 34C5 2409 8CB6
Von : https://packages.grafana.com/gpg.key
Ist dies in Ordnung? [j/N]: y
grafana 7.0 MB/s | 5.4 MB 00:00
InfluxDB Repository 235 kB/s | 33 kB 00:00
Verfügbare Pakete
Name : apr-util-ldap
Version : 1.6.1
Release : 6.el8
Architecture : x86_64
Size : 25 k
Quelle : apr-util-1.6.1-6.el8.src.rpm
Repository : appstream
Summary : APR utility library LDAP support
URL : http://apr.apache.org/
Lizenz : ASL 2.0
Description : This package provides the LDAP support for the apr-util.
[root@tux ~]#
Unfortunately, this didn't solve anything but lead to exactly the same issue again (and again). The only thing that really helped was to set repo_gpgcheck=0
and gpgcheck=0
in /etc/yum.repos.d/grafana.repo
temporarily during the migration.
Using a private repository that is returning HTTP 307 on /RPM-GPG-KEY-rockyofficial, cURL does not follow the Location: header
, creates an empty RPM-GPG-KEY-rockyofficial, then sha512sum check fails
Adding --location
to the cURL call fixes the problem
rocky-tools/migrate2rocky/migrate2rocky.sh
Line 857 in bc7a35a
Running dnf update before we attempt the migration.
Last metadata expiration check: 0:00:47 ago on Mon Aug 16 20:44:42 2021.
Dependencies resolved.
Nothing to do.
Complete!
rpm: no packages given for erase
Could not remove packages from the rpm db:
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.
A log of this installation can be found at /var/log/migrate2rocky.log
after that ALL of dnf & repo management was broken whatever I try to do
as this
Unable to detect release version (use '--releasever' to specify release version)
here is the end of the running migrate2rocky.sh
I tried to fix it by myself but I broke the dnf repo, so I reset it all to get back to a working centOS8 version of dnf
539 cat /etc/redhat-release
540 dnf makecache
541 wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/dnf-4.4.2-11.el8.noarch.rpm
542 rpm -ivh ./dnf-4.4.2-11.el8.noarch.rpm --force
543 dnf update
544 wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-linux-release-8.4-1.2105.el8.noarch.rpm
545 wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-linux-repos-8-2.el8.noarch.rpm
546 ls -lrth
547 rpm -ivh ./centos-linux-release-8.4-1.2105.el8.noarch.rpm ./centos-linux-repos-8-2.el8.noarch.rpm --force
548 wget http://mirror.centos.org/centos/8/BaseOS/x86_64/os/Packages/centos-gpg-keys-8-2.el8.noarch.rpm
549 rpm -ivh ./centos-gpg-keys-8-2.el8.noarch.rpm --force
550 rpm -ivh ./centos-linux-release-8.4-1.2105.el8.noarch.rpm ./centos-linux-repos-8-2.el8.noarch.rpm --force
551 dnf makecache
552 dnf update
553 history
554 ls -lrth
555 history | tail -20 ; ./migrate2rocky.sh -r
556 rpm --initdb
557 dnf install epel-release -y
then I rebooted & got back a centOS-8 working (even dnf of course)
then If I try again to run migrate2rocky.sh, now it doen't broke anymore dnf, but It cannot finish the run
Removing dnf cache
Preparing to migrate CentOS Linux 8 to Rocky Linux 8.
Determining repository names for CentOS Linux 8.....
Found the following repositories which map from CentOS Linux 8 to Rocky Linux 8:
CentOS Linux 8 Rocky Linux 8
appstream appstream
baseos baseos
extras extras
Getting system package names for CentOS Linux 8..........
Found the following system packages which map from CentOS Linux 8 to Rocky Linux 8:
CentOS Linux 8 Rocky Linux 8
centos-logos-ipa rocky-logos-ipa
centos-backgrounds rocky-backgrounds
centos-gpg-keys rocky-gpg-keys
centos-logos rocky-logos
centos-indexhtml rocky-indexhtml
centos-linux-release rocky-release
centos-logos-httpd rocky-logos-httpd
centos-linux-repos rocky-repos
Getting list of installed system packages.
We will replace the following CentOS Linux 8 packages with their Rocky Linux 8 equivalents
Packages to be Removed Packages to be Installed
centos-gpg-keys rocky-gpg-keys
centos-linux-release rocky-release
centos-linux-repos rocky-repos
Also to aid the transition from CentOS Stream the repos included in the following packages will be renamed and retained but disabled:
epel-next-release
In addition to the above the following system packages will be removed:
centos-linux-release
centos-linux-release
Getting a list of enabled modules for the system repositories.
Excluding modules:
libselinux-python:2.8
Found the following modules to re-enable at completion:
container-tools:rhel8
javapackages-runtime:201801
llvm-toolset:rhel8
perl-IO-Socket-SSL:2.066
perl-libwww-perl:6.34
perl:5.26
python27:2.7
python36:3.6
python38:3.8
satellite-5-client:1.0
virt:rhel
Running dnf update before we attempt the migration.
Last metadata expiration check: 0:00:47 ago on Mon Aug 16 20:44:42 2021.
Dependencies resolved.
Nothing to do.
Complete!
rpm: no packages given for erase
Could not remove packages from the rpm db:
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.
nota getting stdout as log is useless or I am not reading the right file
migration script leaves orphaned redhat-logos-httpd package, it should be replaced with rocky-logos-httpd
Can we get a script to convert to Rocky Linux once it's released? After the CentOS announcement, I ran this script:
https://github.com/oracle/centos2ol
to convert to Oracle Linux but I would much rather be on Rocky Linux than Oracle if possible.
Let me know how I can help. 👍
I migrated my systems using the migration script and it worked without any problems, but there was only one Springdale Linux 8 package that the script didn't catch. The package that was still left installed was springdale-logos-httpd, which I removed and then reinstalled the Rocky Linux equivalent:
After migration to Rocky Linux on a server which uses md module of httpd, httpd
service could not be started, I investigated and reached this in /var/log/audit/audit.log
when trying to start httpd
service.
type=AVC msg=audit(1628946222.330:216): avc: denied { write } for pid=2168 comm="httpd" name="example.org" dev="sda1" ino=46137569 scontext=system_u:system_r:httpd_t:s0 tcontext=system_u:object_r:httpd_config_t:s0 tclass=dir permissive=0
find / -xdev -inum 46137569
returns: /etc/httpd/md/domains/example.org
Also
ll /etc/httpd/md/domains/ -Z
total 0
drwx------. 2 root root system_u:object_r:httpd_config_t:s0 75 Aug 8 03:27 example.org
Hello,
When you are running an ipa server on stream8 the migrate script will downgrade the ipa packages.
A downgraded ipa refuses to start.
Reverting back to stream8 fixes the problem.
Maybe include an option in the script to exclude a certain package set ?
Rob
Hi
[me@centos8t01 rocky-tools]$ cat /etc/redhat-release
CentOS Linux release 8.3.2011
[me@centos8t01 rocky-tools]$
[me@centos8t01 rocky-tools]$ git log -1
commit f5f9ac2761275abfe6a7f5b5fbfa39d113f632a1 (HEAD -> main, origin/main, origin/HEAD)
Author: nazunalika <[email protected]>
Date: Sun Apr 25 10:10:34 2021 -0700
fix readme
[me@centos8t01 rocky-tools]$
[me@centos8t01 rocky-tools]$ git remote -v
origin https://github.com/rocky-linux/rocky-tools.git (fetch)
origin https://github.com/rocky-linux/rocky-tools.git (push)
[me@centos8t01 rocky-tools]$
[me@centos8t01 rocky-tools]$ sudo ./centos2rocky.sh
Ensuring rpm, yum, and curl are here.
Ensuring your version of CentOS is supported
Finding our modules that are enabled
error: package centos-repos is not installed
[me@centos8t01 rocky-tools]$ sudo dnf install centos-repos
Last metadata expiration check: 0:21:43 ago on Fri 30 Apr 2021 06:25:48 AM EDT.
No match for argument: centos-repos
Error: Unable to find a match: centos-repos
[me@centos8t01 rocky-tools]$
I propose we add a single, clear DISCLAIMER to this directory in the form of a separate file which can be included / linked in the README and from other sources (eg. Technical Notes / Guides / Documentation).
The full DISCLAIMER.md
should be shown if/when migrate2rocky.sh
is run with the -h
option and a short DISCLAIMER referencing the full DISCLAIMER.md
(via a link and/or suggestion to run with -h
) should be shown before a migration is attempted.
migration script suggests removing subscription-manager, but not dnf-plugin-subscription-manager
After subscription-manager is removed, the following warnings are produced
Failed loading plugin "upload-profile": cannot import name 'packageprofilelib'
Failed loading plugin "subscription-manager": cannot import name 'injection'
Failed loading plugin "product-id": No module named 'subscription_manager.productid'
They are solved by removing dnf-plugin-subscription-manager
I have a CentOS 8.4 box that failed the migration due to no repo for the package libedit-devel.
I had edited /etc/yum.repos.d/CentOS-Linux-PowerTools.repo to enable the repo, libedit-devel is part of that.
I'm very sorry that I lost the log file with the exact wording in my rush to recover the system.
This was the second box I tried to migrate, the first one migrated perfectly (it didn't have the PowerTools repo enabled.)
Thanks for you work on this project!
Dear All,
I have the following error with the migrate script :
Removing dnf cache
Preparing to migrate CentOS Linux 8 to Rocky Linux 8.
Determining repository names for CentOS Linux 8.Importing GPG key 0x307EA071:
Userid : "Rapture Automatic Signing Key (cloud-rapture-signing-key-2021-03-01-08_01_09.pub)"
Fingerprint: 7F92 E05B 3109 3BEF 5A3C 2D38 FEEA 9169 307E A071
From : https://packages.cloud.google.com/yum/doc/yum-key.gpg
Failed to fetch info for package apr-util-ldap.x86_64.
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.
Env :
CentOS Linux release 8.4.2105
NAME="CentOS Linux"
VERSION="8"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="8"
PLATFORM_ID="platform:el8"
PRETTY_NAME="CentOS Linux 8"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:centos:centos:8"
HOME_URL="https://centos.org/"
BUG_REPORT_URL="https://bugs.centos.org/"
CENTOS_MANTISBT_PROJECT="CentOS-8"
CENTOS_MANTISBT_PROJECT_VERSION="8"
CentOS Linux release 8.4.2105
CentOS Linux release 8.4.2105
Any idea ?
Thanks
Starting here:
rocky-tools/migrate2rocky/migrate2rocky.sh
Line 355 in 1602af2
for a system with software-mirrored (during install) EFI boot partitions, the migration tool fails.
For example, with (trimmed here) lsblk output of:
nvme1n1 259:0 0 477G 0 disk
├─nvme1n1p2 259:3 0 601M 0 part
│ └─md125 9:125 0 601M 0 raid1 /boot/efi
nvme0n1 259:1 0 477G 0 disk
├─nvme0n1p2 259:6 0 601M 0 part
│ └─md125 9:125 0 601M 0 raid1 /boot/efi
and following along in the script's steps:
# findmnt --mountpoint /boot/efi --output SOURCE --noheadings
/dev/md125
# lsblk -no pkname "/dev/md125"
<empty response>
which sets efi_disk empty.
When findmnt returns /dev/mdXXX, something along the lines of
# mdadm -v --detail --scan --export /dev/md125 | awk -F = '/DEVICE.*_DEV/{print $2}'
/dev/nvme0n1p2
/dev/nvme1n1p2
# lsblk -no pkname -l /dev/nvme0n1p2
nvme0n1p2
nvme0n1
# cat /sys/block/nvme0n1/nvme0n1p2/partition
2
(looping over the mdadm outputs) will be needed to collect the list of devices and partitions that need to be added as EFI boot entries. (here efibootmgr -c -d /dev/nvme0n1 -p 2 ...
, and again with nvme1n1.)
I just migrated a CentOS 8 system to Rocky Linux that has the following java packages installed:
java-1.8.0-openjdk.x86_64 1:1.8.0.292.b10-1.el8_4 @appstream
java-1.8.0-openjdk-headless.x86_64 1:1.8.0.292.b10-1.el8_4 @appstream
java-11-openjdk.x86_64 1:11.0.11.0.9-2.el8_4 @appstream
java-11-openjdk-devel.x86_64 1:11.0.11.0.9-2.el8_4 @appstream
java-11-openjdk-headless.x86_64 1:11.0.11.0.9-2.el8_4 @appstream
After the migration there are no symbolic links for all the java related tools in /etc/alternatives
any more.
It would be great if you could improve the migration script to keep the symbolic links :-)
Hi,
when I try to migrate with migrate2rocky script I get this issue :
Migration from katello-modified systems is not supported by migrate2rocky.
The support of "katello-modified systems" will be enabled in the future ?
Is there a way to get by ?
Thanks to the team for all the work :)
After migration from CentOS 8 to Rocky Linux 8 on a UEFI system, the new EFI entry can be incorrectly created if the EFI partition isn't the first partition on the disk.
The call to efibootmgr
in fix_efi()
does not include the -p
parameter to indicate the partition on the disk. By default, the first partition is used (default value of -p
is 1
)
efibootmgr -c -d "$efi_mount" -L "Rocky Linux" -l /EFI/rocky/grubx64.efi
should be something such as
efibootmgr -c -d "$efi_disk" -p "$efi_disk_part" -L "Rocky Linux" -l /EFI/rocky/grubx64.efi
Ex,
efibootmgr -c -d /dev/sda -p 2 -L "Rocky Linux" -l /EFI/rocky/grubx64.efi
instead of
efibootmgr -c -d /dev/sda2 -L "Rocky Linux" -l /EFI/rocky/grubx64.efi
My working centos box has never had issues with secure boot, but after converting to Rocky using the script, it no longer was happy with secure boot, needed to disable it in BIOS in order to get system to boot up.
I had a error running migrate2rocky due to a RPM conflict I needed to resolve before distro-sync would run. After fixing the RPM issue I naively ran the migrate2rocky script again. But since my system was already considered Rocky at that point, the script got confused and ended up deleting some RPMs I needed before it failed.
Log from first attempt, failed distro-sync due to RPM conflict: https://pastebin.com/hg1KSbRL
Log from second attempt, with Rocky->Rocky failure: https://pastebin.com/mxsi1PVf
If the script must depend on the locale en_US.UTF-8 (#67?) it should make sure it is installed.
If it is not present, the output is full of warnings(?) starting with file not found for line 108. While the system seems to operate normally after reboot, these messages don't promote trust in the result.
Not knowing what's the purpose of setting the locale I can't provide a fix.
Big THANKS for Rocky Linux!
sudo ./migrate2rocky.sh -r
./migrate2rocky.sh: Zeile 108: Warnung: setlocale: LC_ALL: Kann die Locale nicht ändern (en_US.UTF-8): Datei oder Verzeichnis nicht gefunden
./migrate2rocky.sh: Zeile 108: Warnung: setlocale: LC_ALL: Kann die Locale nicht ändern (en_US.UTF-8).
Removing dnf cache
Preparing to migrate CentOS Linux 8 to Rocky Linux 8.
Determining repository names for CentOS Linux 8.Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
Found the following repositories which map from CentOS Linux 8 to Rocky Linux 8:
CentOS Linux 8 Rocky Linux 8
appstream appstream
baseos baseos
extras extras
Getting system package names for CentOS Linux 8Failed to set locale, defaulting to C.UTF-8
Failed to set locale, defaulting to C.UTF-8
Failed to set locale, defaulting to C.UTF-8
Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
.Failed to set locale, defaulting to C.UTF-8
... and so on
> Leaving Shell
Removing dnf cache
Ensuring repos are enabled before the package swap
No such command: config-manager. Please use /usr/bin/dnf --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(config-manager)'"
Repo name missing?
Full output:
./migrate2rocky.sh -r
Preparing to migrate CentOS Linux 8 to Rocky Linux 8.
Determining repository names for CentOS Linux 8.....
Found the following repositories which map from CentOS Linux 8 to Rocky Linux 8:
CentOS Linux 8 Rocky Linux 8
appstream appstream
baseos baseos
extras extras
Getting system package names for CentOS Linux 8..........
Found the following system packages which map from CentOS Linux 8 to Rocky Linux 8:
CentOS Linux 8 Rocky Linux 8
centos-logos-ipa rocky-logos-ipa
centos-backgrounds rocky-backgrounds
centos-gpg-keys rocky-gpg-keys
centos-logos rocky-logos
centos-indexhtml rocky-indexhtml
centos-linux-release rocky-release
centos-logos-httpd rocky-logos-httpd
centos-linux-repos rocky-repos
Getting list of installed system packages.
We will replace the following CentOS Linux 8 packages with their Rocky Linux 8 equivalents
Packages to be Removed Packages to be Installed
centos-gpg-keys rocky-gpg-keys
centos-logos rocky-logos
centos-linux-release rocky-release
centos-linux-repos rocky-repos
Getting a list of enabled modules for the system repositories.
In addition to the above the following system packages will be removed:
centos-linux-release
centos-linux-release
Excluding modules:
libselinux-python:2.8
Found the following modules to re-enable at completion:
mariadb:10.3
perl-IO-Socket-SSL:2.066
perl-libwww-perl:6.34
python27:2.7
python36:3.6
redis:5
Running dnf update before we attempt the migration.
Last metadata expiration check: 0:26:53 ago on Wed 07 Jul 2021 03:41:42 PM CEST.
Dependencies resolved.
Nothing to do.
Complete!
Added rockyappstream repo from https://dl.rockylinux.org/pub/rocky/8/AppStream/x86_64/os/
Added rockybaseos repo from https://dl.rockylinux.org/pub/rocky/8/BaseOS/x86_64/os/
rockyappstream 4.1 MB/s | 7.8 MB 00:01
rockybaseos 4.2 MB/s | 3.5 MB 00:00
Last metadata expiration check: 0:00:02 ago on Wed 07 Jul 2021 04:08:41 PM CEST.
> > > ================================================================================
Package Arch Version Repository Size
================================================================================
Installing:
rocky-gpg-keys noarch 8.4-30.el8 rockybaseos 11 k
rocky-logos x86_64 84.5-8.el8 rockybaseos 328 k
rocky-release noarch 8.4-30.el8 rockybaseos 20 k
rocky-repos noarch 8.4-30.el8 rockybaseos 13 k
Removing:
centos-gpg-keys noarch 1:8-2.el8 @@commandline 3.3 k
centos-linux-release noarch 8.4-1.2105.el8 @@commandline 25 k
centos-linux-repos noarch 8-2.el8 @@commandline 26 k
centos-logos x86_64 85.8-1.el8 @baseos 716 k
Transaction Summary
================================================================================
Install 4 Packages
Remove 4 Packages
Total download size: 371 k
Downloading Packages:
(1/4): rocky-gpg-keys-8.4-30.el8.noarch.rpm 104 kB/s | 11 kB 00:00
(2/4): rocky-release-8.4-30.el8.noarch.rpm 175 kB/s | 20 kB 00:00
(3/4): rocky-repos-8.4-30.el8.noarch.rpm 1.8 MB/s | 13 kB 00:00
(4/4): rocky-logos-84.5-8.el8.x86_64.rpm 2.4 MB/s | 328 kB 00:00
--------------------------------------------------------------------------------
Total 2.5 MB/s | 371 kB 00:00
warning: /var/cache/dnf/rockybaseos-56e41edc159a87c2/packages/rocky-gpg-keys-8.4-30.el8.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID 6d745a60: NOKEY
rockybaseos 1.6 MB/s | 1.6 kB 00:00
Importing GPG key 0x6D745A60:
Userid : "Release Engineering <[email protected]>"
Fingerprint: 7051 C470 A929 F454 CEBE 37B7 15AF 5DAC 6D74 5A60
From : /tmp/tmp.fQefCdFmJG/gpg/RPM-GPG-KEY-rockyofficial
Key imported successfully
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
Preparing : 1/1
Running scriptlet: rocky-gpg-keys-8.4-30.el8.noarch 1/1
Installing : rocky-gpg-keys-8.4-30.el8.noarch 1/8
Installing : rocky-release-8.4-30.el8.noarch 2/8
Installing : rocky-repos-8.4-30.el8.noarch 3/8
Installing : rocky-logos-84.5-8.el8.x86_64 4/8
Running scriptlet: rocky-logos-84.5-8.el8.x86_64 4/8
Erasing : centos-linux-release-8.4-1.2105.el8.noarch 5/8
Erasing : centos-linux-repos-8-2.el8.noarch 6/8
Erasing : centos-gpg-keys-1:8-2.el8.noarch 7/8
Erasing : centos-logos-85.8-1.el8.x86_64 8/8
Running scriptlet: centos-logos-85.8-1.el8.x86_64 8/8
Running scriptlet: rocky-logos-84.5-8.el8.x86_64 8/8
Running scriptlet: centos-logos-85.8-1.el8.x86_64 8/8
Verifying : rocky-gpg-keys-8.4-30.el8.noarch 1/8
Verifying : rocky-logos-84.5-8.el8.x86_64 2/8
Verifying : rocky-release-8.4-30.el8.noarch 3/8
Verifying : rocky-repos-8.4-30.el8.noarch 4/8
Verifying : centos-gpg-keys-1:8-2.el8.noarch 5/8
Verifying : centos-linux-release-8.4-1.2105.el8.noarch 6/8
Verifying : centos-linux-repos-8-2.el8.noarch 7/8
Verifying : centos-logos-85.8-1.el8.x86_64 8/8
Installed:
rocky-gpg-keys-8.4-30.el8.noarch rocky-logos-84.5-8.el8.x86_64
rocky-release-8.4-30.el8.noarch rocky-repos-8.4-30.el8.noarch
Removed:
centos-gpg-keys-1:8-2.el8.noarch centos-linux-release-8.4-1.2105.el8.noarch
centos-linux-repos-8-2.el8.noarch centos-logos-85.8-1.el8.x86_64
Complete!
Last metadata expiration check: 0:00:08 ago on Wed 07 Jul 2021 04:08:41 PM CEST.
> Leaving Shell
Removing dnf cache
Ensuring repos are enabled before the package swap
No such command: config-manager. Please use /usr/bin/dnf --help
It could be a DNF plugin command, try: "dnf install 'dnf-command(config-manager)'"
Repo name missing?
After running the script I as someone else also got:
Ensuring rpm, yum, and wget are here.
Ensuring your version of CentOS is supported
Finding our modules that are enabled
There are some modules that are unsure of how to handle. This normally shouldn't happen. Do you want to resolve this yourself (Yes) or continue (No)?
Without any clue to which module it was, not in the output and not in the logs. After continuing I got one error:
Failed to add dependency on unit, unit systemd-ask-password-plymouth.service does not exist.
The script finished successfully.
I run the script migrate2rocky.sh in one of my 2 VMs to migrate from Oracle Linux Server 8.4 to Rocky Linux 8.
The script fails with the error message:
Error during distro-sync.
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.
I uploaded the log file from the migrate2rocky script to the past bin service and the generated link is: https://rpa.st/WGXQ
A new weak dependency was added to epel-release (epel-next-release) which is installed if the system is stream. When migrating to rocky, this package should be removed (or not installed at all during pre-migration update).
This may also apply to other weak deps.
I ran into an issue where a bad repository resulted in the following errors;
After correcting the error (removing the bad repository) and attempting to rerun the script to continue the migration, received the following errors;
So the system was left in a broken state with no tools available to either complete the migration or roll back.
mirrorsync.sh
just returns permission denied when running as non-root user trying to write to a directory not owned by itself.
I'm not saying to always check for sudo
and run it as root as this may lead to unexpected issues for those who do not want to, but it can either ask or just tries to run with sudo
when it cannot write to directory.
Something like this will do:
command_exists() {
command -v "$@" > /dev/null 2>&1
}
user="$(id -un 2>/dev/null || true)"
do_change() {
user="$(id -un 2>/dev/null || true)"
sh_c='sh -c'
if [ "$user" != 'root' ]; then
if command_exists sudo; then
sh_c='sudo -E sh -c'
elif command_exists su; then
sh_c='su -c'
else
cat >&2 <<-'EOF'
Error: this installer needs the ability to run commands as root.
We are unable to find either "sudo" or "su" available to make this happen.
EOF
exit 1
fi
fi
then run commands with:
$sh_c "whatever command"
[me@centos8t01 rocky-tools]$ sudo ./centos2rocky.sh
Ensuring rpm, yum, and wget are here.
Ensuring your version of CentOS is supported
Finding our modules that are enabled
There are some modules that are unsure of how to handle. This normally shouldn't happen. Do you want to resolve this yourself (Yes) or continue (No)?
1) Yes
2) No
#? 2
~/release /home/me/github/rocky-tools
warning: /etc/yum.repos.d/CentOS-Linux-Sources.repo saved as /etc/yum.repos.d/CentOS-Linux-Sources.repo.rpmsave
warning: /etc/yum.repos.d/CentOS-Linux-PowerTools.repo saved as /etc/yum.repos.d/CentOS-Linux-PowerTools.repo.rpmsave
warning: /etc/yum.repos.d/CentOS-Linux-HighAvailability.repo saved as /etc/yum.repos.d/CentOS-Linux-HighAvailability.repo.rpmsave
warning: /etc/yum.repos.d/CentOS-Linux-Devel.repo saved as /etc/yum.repos.d/CentOS-Linux-Devel.repo.rpmsave
warning: rocky-gpg-keys-8.3-11.el8.noarch.rpm: Header V4 RSA/SHA256 Signature, key ID 6d745a60: NOKEY
Verifying... ################################# [100%]
Preparing... ################################# [100%]
Updating / installing...
1:rocky-gpg-keys-8.3-11.el8 ################################# [ 33%]
2:rocky-release-8.3-11.el8 ################################# [ 67%]
3:rocky-repos-8.3-11.el8 ################################# [100%]
Removing dnf cache
Ensuring repos are enabled before the package swap
Rocky Linux 8 - AppStream 13 MB/s | 6.6 MB 00:00
Rocky Linux 8 - BaseOS 7.1 MB/s | 2.5 MB 00:00
Rocky Linux 8 - Devel WARNING! FOR BUILDROOT USE ONLY! 1.8 kB/s | 858 B 00:00
Errors during downloading metadata for repository 'devel':
- Status code: 404 for http://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=Devel-8 (IP: 199.232.78.132)
Error: Failed to download metadata for repo 'devel': Cannot prepare internal mirrorlist: Status code: 404 for http://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=Devel-8 (IP: 199.232.78.132)
[me@centos8t01 rocky-tools]$ ls /etc/yum.repos.d/ |grep devel
[me@centos8t01 rocky-tools]$ ls /etc/yum.repos.d/
CentOS-Linux-Devel.repo.rpmsave docker-ce.repo epel-testing-modular.repo Rocky-Devel.repo Rocky-PowerTools.repo
CentOS-Linux-HighAvailability.repo.rpmsave epel-modular.repo epel-testing.repo Rocky-Extras.repo Rocky-Sources.repo
CentOS-Linux-PowerTools.repo.rpmsave epel-playground.repo Rocky-AppStream.repo Rocky-HighAvailability.repo
CentOS-Linux-Sources.repo.rpmsave epel.repo Rocky-BaseOS.repo Rocky-Media.repo
[me@centos8t01 rocky-tools]$ git log -1
commit 32a574c7f76b7954d07bd027afc72fbe381837aa (HEAD -> main, origin/main, origin/HEAD)
Author: nazunalika <[email protected]>
Date: Sun May 2 10:47:22 2021 -0700
add -L to mitigate issues
[me@centos8t01 rocky-tools]$
[me@centos8t01 yum.repos.d]$ ls
CentOS-Linux-HighAvailability.repo.rpmsave Rocky-Extras.repo
CentOS-Linux-PowerTools.repo.rpmsave Rocky-HighAvailability.repo
epel.repo Rocky-Media.repo
Rocky-AppStream.repo Rocky-PowerTools.repo
Rocky-BaseOS.repo Rocky-Sources.repo
Rocky-Devel.repo
[me@centos8t01 yum.repos.d]$ find .tmp/
.tmp/
.tmp/CentOS-Linux-Sources.repo
.tmp/CentOS-Linux-ContinuousRelease.repo
.tmp/CentOS-Linux-Debuginfo.repo
.tmp/CentOS-Linux-Devel.repo
.tmp/epel-playground.repo
.tmp/epel-modular.repo
.tmp/docker-ce.repo
.tmp/epel-testing-modular.repo
.tmp/epel-testing.repo
.tmp/CentOS-Linux-Media.repo
.tmp/CentOS-Linux-Plus.repo
.tmp/CentOS-Linux-FastTrack.repo
[me@centos8t01 yum.repos.d]$
I was updating a container system in a chroot that didn't have /sys mounted and had to comment out this block in order for it to proceed.
# Check if we have /sys mounted and it is looking sane
if ! [[ -d /sys/class/block ]]; then
exit_message "/sys is not accessible."
fi
It looks like /sys is only used for efi updating, and the the /sys/firmware/efi check just below this block seems to be sufficient for that.
Or, if the update_efi boolean could be dependent on both /sys/class/block and and /sys/firmware/efi existing if it is important.
Script lines:
32) Rocky ain't RC anymore.
43) BASH_VERSINFO is missing the $ for a variable
49) EUID is missing the $ for a variable
Errors during downloading metadata for repository 'appstream':
mirrorsync.sh
just exits when destination directory does not exist (default: dst="/mnt/mirrorserver/${mirrormodule}"
for example).
It's good to create directory if it does not exist itself.
[me@centos8t01 rocky-tools]$ git log -1
commit 32a574c7f76b7954d07bd027afc72fbe381837aa (HEAD -> main, origin/main, origin/HEAD)
Author: nazunalika <[email protected]>
Date: Sun May 2 10:47:22 2021 -0700
add -L to mitigate issues
[me@centos8t01 rocky-tools]$ sudo ./centos2rocky.sh
answer option 2(No)
<snipped>
xorg-x11-server-utils-7.7-27.el8.x86_64 xz-5.2.4-3.el8.x86_64
xz-libs-5.2.4-3.el8.x86_64 yum-4.2.23-4.el8.noarch
yum-utils-4.0.17-5.el8.noarch zip-3.0-23.el8.x86_64
zstd-1.4.4-1.el8.x86_64
Removed:
kernel-4.18.0-193.el8.x86_64 kernel-core-4.18.0-193.el8.x86_64 kernel-modules-4.18.0-193.el8.x86_64
Complete!
/home/me/github/rocky-tools
Last metadata expiration check: 0:14:59 ago on Sun 02 May 2021 09:03:48 PM EDT.
Unable to resolve argument
Error: Problems in request:
missing groups or modules:
[me@centos8t01 rocky-tools]$
Describe the bug
Fresh install of Oracle Linux 8.4 from DVD inside VirtualBox on macOS fails migration to Rocky with migrate2rocky.sh
.
To Reproduce
Steps to reproduce the behavior:
migrate2rocky.sh
script and runObserved behavior
[root@localhost ~]# cat /etc/os-release
NAME="Oracle Linux Server"
VERSION="8.4"
ID="ol"
ID_LIKE="fedora"
VARIANT="Server"
VARIANT_ID="server"
VERSION_ID="8.4"
PLATFORM_ID="platform:el8"
PRETTY_NAME="Oracle Linux Server 8.4"
ANSI_COLOR="0;31"
CPE_NAME="cpe:/o:oracle:linux:8:4:server"
HOME_URL="https://linux.oracle.com/"
BUG_REPORT_URL="https://bugzilla.oracle.com/"
ORACLE_BUGZILLA_PRODUCT="Oracle Linux 8"
ORACLE_BUGZILLA_PRODUCT_VERSION=8.4
ORACLE_SUPPORT_PRODUCT="Oracle Linux"
ORACLE_SUPPORT_PRODUCT_VERSION=8.4
[root@localhost ~]# curl -LOR https://raw.githubusercontent.com/rocky-linux/rocky-tools/main/migrate2rocky/migrate2rocky.sh
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 28338 100 28338 0 0 114k 0 --:--:-- --:--:-- --:--:-- 114k
[root@localhost ~]# md5sum migrate2rocky.sh
388771d261b8a529b44e6f688da5cd2c migrate2rocky.sh
[root@localhost ~]# chmod +x migrate2rocky.sh
[root@localhost ~]# ./migrate2rocky.sh -r
Preparing to migrate Oracle Linux Server 8.4 to Rocky Linux 8.
Determining repository names for Oracle Linux Server 8.4.....
Found the following repositories which map from Oracle Linux Server 8.4 to Rocky Linux 8:
Oracle Linux Server 8.4 Rocky Linux 8
ol8_appstream appstream
ol8_baseos_latest baseos
...<snip>...
Error:
Problem: package libblockdev-btrfs-2.24-5.0.1.el8.x86_64 requires libblockdev-utils(x86-64) = 2.24-5.0.1.el8, but none of the providers can be installed
- libblockdev-utils-2.24-5.0.1.el8.x86_64 does not belong to a distupgrade repository
- problem with installed package libblockdev-btrfs-2.24-5.0.1.el8.x86_64
Error during distro-sync.
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.
Full log output is in Rocky Pastebin.
Expected behavior
Oracle Linux 8.4 system is migrated to Rocky Linux 8.4
Hi!
Thanks by your great job.
We would like to migrate our current servers from CEntOS-7.x to RockLinux-8.x.
Please, what's the best way to accomplish this?
Hi, could you please add some options to migrate systems that are registered to the Red Hat Satellite product?
migrate2rocky should remove old centos uefi boot entries.
From logfile:
Complete!
Generating grub configuration file ...
Adding boot menu entry for EFI firmware configuration
done
efibootmgr: ** Warning ** : Boot0003 has same label Rocky Linux
efibootmgr: ** Warning ** : Boot0006 has same label Rocky Linux
efibootmgr: ** Warning ** : Boot0007 has same label Rocky Linux
BootCurrent: 0005
BootOrder: 0008,0005,0007,0006,0003,0000,0001,0002,0004
Boot0000* EFI Virtual disk (0.0)
Boot0001* EFI VMware Virtual SATA CDROM Drive (0.0)
Boot0002* EFI Network
Boot0003* Rocky Linux
Boot0004* EFI Internal Shell (Unsupported option)
Boot0005* CentOS Linux
Boot0006* Rocky Linux
Boot0007* Rocky Linux
Boot0008* Rocky Linux
\S
Kernel \r on an \m
Done, please reboot your system.
A log of this installation can be found at /var/log/migrate2rocky.log
When i trying to migrate from CentOS to Rocky, an error occurs: https://pastebin.com/LubK24hY
Definition "export LANG = en_US.UTF-8" in the script is clearly not enough.
How fixed:
LANGUAGE=en_US ./migrate2rocky.sh -r
Result is successful: https://pastebin.com/EZTcPR8i
Please add "export LANGUAGE=en_US" to the script.
Commandline error:
Syncing packages
Last metadata expiration check: 0:00:09 ago on Wed 23 Jun 2021 02:14:52 PM CEST.
Error:
Problem 1: package python3-pip-9.0.3-19.el8.noarch requires platform-python-pip = 9.0.3-19.el8, but none of the providers can be installed
Error during distro-sync.
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.
A log of this installation can be found at /var/log/migrate2rocky.log
After converting to Rocky with only a minor error #10, Rocky drops to grub when booting.
System BootOrder not found. Initializing defaults.
Creating boot entry "boot0006" with label "Rocky Linux" for file "\EFI\rocky\shimx64.efi"
The system was a almost clean CentOS 8.3 minimal installed on esxi with the same config as I have also installed RockyLinux with earlier.
Trying to convert Centos 8 to Rocky with latest script.
Server is default Centos 8 with following extra packages:
Logs:
Running scriptlet: chrony-3.5-2.el8.x86_64 699/1508
Downgrading : ipa-client-4.9.2-4.module+el8.4.0+589+9650b94f 700/1508
Running scriptlet: ipa-client-4.9.2-4.module+el8.4.0+589+9650b94f 700/1508
Running scriptlet: ipa-server-4.9.2-4.module+el8.4.0+589+9650b94f 701/1508
Downgrading : ipa-server-4.9.2-4.module+el8.4.0+589+9650b94f 701/1508
Running scriptlet: ipa-server-4.9.2-4.module+el8.4.0+589+9650b94f 701/1508
Reinstalling : dracut-network-049-135.git20210121.el8.x86_64 702/1508
Downgrading : python3-wheel-wheel-1:0.31.1-2.module+el8.4.0+ 703/1508
Downgrading : python3-virtualenv-15.1.0-19.module+el8.4.0+59 704/1508
Running scriptlet: python3-virtualenv-15.1.0-19.module+el8.4.0+59 704/1508
Reinstalling : kexec-tools-2.0.20-46.el8_4.1.x86_64 705/1508
Running scriptlet: kexec-tools-2.0.20-46.el8_4.1.x86_64 705/1508migrate2rocky.sh: line 646: 2453678 Killed dnf -y distro-sync
Error during distro-sync.
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.
I was forced to rollback, so this server is no-longer available for further debugging. If needed I can try again the migration on copy of this server.
Hi!
Thanks by your great job.
I try to migrate from Centos 8.4 to Rocky 8 with the migrate2rocky script.
When i deal with a bind server, I have an error message:
Error unpacking rpm package bind-32:9.11.26-4.el8_4.x86_64
error: unpacking of archive failed on file /var/named/named.empty: cpio: chown failed - Inappropriate ioctl for device
error: bind-32:9.11.26-4.el8_4.x86_64: install failed
Can you help me?
I don't know if this should be considered a "Defect" or "Feature Request", but can we have the script check for conditions that we know will make it fail? For example, I had nodejs installed on my CentOS 8 laptop, from the nodejs repository. When I ran migrate2rocky, the script abended because there was some conflict with npm. After the abend the system was non-recoverable. I attempted to simply run a 'dnf update' (thinking it would work since the Rocky base packages had been installed by this point) and it did update a few hundred packages, but the system was not bootable after that.
As more and more people use migrate2rocky, I'm sure they will report other conditions that break the script. It would be nice if we had a list of "dangerous" packages and/or other conditions built-in to the script, so that it could check for these conditions and abort the migration.
Attempting to run script on freshly installed CentOS 8.3, minimal install
Physical install on server hardware, getting the following
# ./centos2rocky.sh
Ensuring rpm, yum, and curl are here.
Ensuring your version of CentOS is supported
Finding our modules that are enabled
There are some modules that are unsure of how to handle. This normally shouldn't happen. Do you want to resolve this yourself (Yes) or continue (No)?
Reviewing script options and code I'm not sure how to determine which modules are in question.
Hello,
Our nodes do not have access to external repositories, we can only connect to our private repo.
Before starting the migration script, I make sure to use stock repo config files, the only thing that is changed is the baseurl=
URL, #mirrorlist=
stays commented out
However, package rocky-repos-8.4-32.el8.noarch
is installed during the migration process, and this reverts the repo configs to mirrorlist=https://mirrors.rockylinux.org/[...]
[...]
Installed:
rocky-gpg-keys-8.4-32.el8.noarch rocky-release-8.4-32.el8.noarch
rocky-repos-8.4-32.el8.noarch
Removed:
centos-gpg-keys-1:8-2.el8.noarch centos-linux-release-8.4-1.2105.el8.noarch
centos-linux-repos-8-2.el8.noarch
Complete!
Last metadata expiration check: 0:00:03 ago on Tue 10 Aug 2021 03:24:50 PM GMT.
> Leaving Shell
Ensuring repos are enabled before the package swap
No matches found for the following enable plugin patterns: config-manager
Enabling modules
Rocky Linux 8 - AppStream 0.0 B/s | 0 B 06:00
Errors during downloading metadata for repository 'appstream':
- Curl error (28): Timeout was reached for https://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=AppStream-8 [Connection timed out after 30001 milliseconds]
- Curl error (28): Timeout was reached for https://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=AppStream-8 [Connection timed out after 30000 milliseconds]
Error: Failed to download metadata for repo 'appstream': Cannot prepare internal mirrorlist: Curl error (28): Timeout was reached for https://mirrors.rockylinux.org/mirrorlist?arch=x86_64&repo=AppStream-8 [Connection timed out after 30001 milliseconds]
Can't enable modules perl-IO-Socket-SSL:2.066 perl-libwww-perl:6.34 python36:3.6
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.
A log of this installation can be found at /var/log/migrate2rocky.log
Maybe skipping installing the rocky-repos
package would fix this? Or any other ideas?
Thanks
this is the error:
Can't find EFI mount. No EFI boot detected.
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.
Hello,
We are using GlusterFS on some of our machines. It is installed from CentOS Storage SIG.
I've tried migrating one of the machines using migrate2rocky.sh script.
During migration GlusterFS repository is removed and not replaced by alternative Rocky repository. Therefore migration fails due to mismatched versions of the gluster from CentOS Storage SIG and repositories of Rocky Linux.
How can I solve this? Can I leave GlusterFS repository? Or is there alternative Rocky repository, which is not installed by migration script?
A log of the migration attempt:
migrate2rocky.log
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.