When RHEL repos are available from an ISO mount reinstalling the filesystem package shows errors:
[root@ima ~]# dnf reinstall filesystem ... Running transaction test Transaction test succeeded. Running transaction Running scriptlet: filesystem-3.16-2.el9.x86_64 1/1 Preparing : 1/1 Reinstalling : filesystem-3.16-2.el9.x86_64 1/2 error: lsetfilecon: (29 /mnt, system_u:object_r:mnt_t:s0) Read-only file system error: Plugin selinux: hook fsm_file_prepare failed Error unpacking rpm package filesystem-3.16-2.el9.x86_64 Verifying : filesystem-3.16-2.el9.x86_64 1/2 Verifying : filesystem-3.16-2.el9.x86_64 2/2 Installed products updated. Failed: filesystem-3.16-2.el9.x86_64 filesystem-3.16-2.el9.x86_64 Error: Transaction failed
This came up when preparing a system for IMA which currently requires all packages to be reinstalled, in that case with the rpm-plugin-ima package installed we see:
[root@ima ~]# dnf reinstall filesystem ... Running transaction test Transaction test succeeded. Running transaction Running scriptlet: filesystem-3.16-2.el9.x86_64 1/1 Preparing : 1/1 Reinstalling : filesystem-3.16-2.el9.x86_64 1/2 error: ima: could not apply signature on '/mnt': Read-only file system error: Plugin ima: hook fsm_file_prepare failed error: lsetfilecon: (29 /mnt, system_u:object_r:mnt_t:s0) Read-only file system error: Plugin selinux: hook fsm_file_prepare failed Error unpacking rpm package filesystem-3.16-2.el9.x86_64 Verifying : filesystem-3.16-2.el9.x86_64 1/2 Verifying : filesystem-3.16-2.el9.x86_64 2/2 Installed products updated. Failed: filesystem-3.16-2.el9.x86_64 filesystem-3.16-2.el9.x86_64 Error: Transaction failed
Thanks.