CentOS8 upgrade via migrate2rocky.sh fails with rootfiles install

We are seeing migrate2rocky.sh failing because of rootfiles-8.1.22.el8.noarch.

We have a fully patched CentOS 8 system that is a VMWare VM. Running migrate2rocky.sh results in a failure of rootfiles-8.1.22.el8.noarch. Because of that failure, fix_efi doesn’t get called in migrate2rocky.sh, which means a reboot of the system results in a grub prompt.

Relevant bits from /var/log/migrate2rocky.log:

Reinstalling : rootfiles-8.1-22.el8.noarch 455/940Error unpacking rpm package rootfiles-8.1-22.el8.noarch

Reinstalling : iwl7260-firmware-1: 456/940
error: unpacking of archive failed on file /root/.bash_logout: cpio: utime failed - Inappropriate ioctl for device
error: rootfiles-8.1-22.el8.noarch: install failed

We reverted to a pre-migrate snapshot and received the same error when running the migrate script. We manually downloaded rootfiles-8.1-22.el8.noarch.rpm, validated the signature and extracted the files via “rpm2cpio rootfiles-8.1-22.el8.noarch.rpm | cpio -idmv”. That did not error out and files looked good.

Running a “dnf install rootfiles” says that it is already installed. Running a “dnf reinstall rootfiles” errors out. Details of the end of that command with debugging turned up:

Downloading Packages:
rootfiles-8.1-22.el8.noarch.rpm 116 kB/s | 12 kB 00:00

Total 48 kB/s | 12 kB 00:00
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
timer: transaction test: 2 ms
Running transaction
RPM transaction start.
Preparing : 1/1
Reinstall: rootfiles-8.1-22.el8.noarch
Reinstalling : rootfiles-8.1-22.el8.noarch 1/2
Error unpacking rpm package rootfiles-8.1-22.el8.noarch
RPM transaction over.
Errors occurred during transaction.
Verifying : rootfiles-8.1-22.el8.noarch 1/2
Verifying : rootfiles-8.1-22.el8.noarch 2/2
timer: verify transaction: 153 ms
timer: transaction: 183 ms
Completion plugin: Generating completion cache…
Failed: rootfiles-8.1-22.el8.noarch
Failed: rootfiles-8.1-22.el8.noarch

rootfiles-8.1-22.el8.noarch rootfiles-8.1-22.el8.noarch

This was us shooting ourselves in the foot. We had files like .bash_logout set as append only (why it wasn’t immutable, I do not know and plan to ask). That was preventing the rootfiles package from replacing those files. With some help from the Rocky chat interface, I was able to find the issue. Removing that a attribute allowed the script to work.