24.5. Troubleshooting systemd failure to load the IMA policy


If systemd does not load /etc/ima/ima-policy, the system hangs and displays the error systemd[1]: Freezing execution.

[    5.829882] ima: policy update failed
[    5.830094] ima: signed policy file (specified as an absolute pathname) required
[!!!!!!] Failed to load IMA policy.
…
[    5.859994] systemd[1]: Freezing execution.

There are three methods that you can use to recover your system.

24.5.1. Turn off Secure Boot

If the policy cannot be loaded because it is not signed, you might see errors similar to the following examples.

[    5.661906] ima: policy update failed
[    5.662290] ima: signed policy file (specified as an absolute pathname) required
[    5.662496] systemd[1]: Failed to load the IMA custom policy file /etc/ima/ima-policy1: Permission denied
[    5.662663] ima: policy update failed
[    5.662856] audit: type=1800 audit(1744968172.925:7): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 op=appraise_data cause=IMA-signature-required comm="systemd" name="/etc/ima/ima-policy" dev="vda3" ino=25679834 res=0 errno=0
[    5.663205] audit: type=1802 audit(1744968172.925:8): pid=1 uid=0 auid=4294967295 ses=4294967295 subj=system_u:system_r:init_t:s0 op=policy_update cause=failed comm="systemd" res=0 errno=0
[!!!!!!] Failed to load IMA policy.

As a workaround, you can turn off Secure Boot temporarily and follow Deploying a custom signed IMA policy for UEFI systems to fix the issue.

To boot the system with the init=/bin/bash kernel parameter, you can use the following steps.

  1. Modify the bootloader entry and add the init=/bin/bash kernel parameter.
  2. After you access the shell, remount the system with write permissions:

    # mount -o remount,rw /
  3. Rename /etc/ima/ima-policy to /etc/ima/ima-policy.bak:

    # mv /etc/ima/ima-policy /etc/ima/ima-policy.bak
  4. Reboot the system:

    # echo 1 > /proc/sys/kernel/sysrq
    # printf "s\nb" > /proc/sysrq-trigger
  5. Resolve any issues in /etc/ima/ima-policy.bak and verify that the policy can be loaded:

    # echo /etc/ima/ima-policy.bak >> /sys/kernel/security/integrity/ima/policy
  6. Rename /etc/ima/ima-policy.bak to /etc/ima/ima-policy:

    # mv /etc/ima/ima-policy.bak /etc/ima/ima-policy

If the system hangs with the error systemd[1]: Freezing execution, you can boot the system with the initcall_blacklist=init_ima kernel parameter to disable the IMA policy.

  1. Modify the boot loader entry and add the initcall_blacklist=init_ima kernel parameter.
  2. Rename /etc/ima/ima-policy to /etc/ima/ima-policy.bak:

    # mv /etc/ima/ima-policy /etc/ima/ima-policy.bak
  3. Reboot the system:

    # systemctl reboot
  4. Resolve any issues in /etc/ima/ima-policy.bak and verify that the policy can be loaded:

    # echo /etc/ima/ima-policy.bak >> /sys/kernel/security/integrity/ima/policy
  5. Rename /etc/ima/ima-policy.bak to /etc/ima/ima-policy:

    # mv /etc/ima/ima-policy.bak /etc/ima/ima-policy
Red Hat logoGithubredditYoutubeTwitter

学习

尝试、购买和销售

社区

关于红帽文档

通过我们的产品和服务,以及可以信赖的内容,帮助红帽用户创新并实现他们的目标。 了解我们当前的更新.

让开源更具包容性

红帽致力于替换我们的代码、文档和 Web 属性中存在问题的语言。欲了解更多详情,请参阅红帽博客.

關於紅帽

我们提供强化的解决方案,使企业能够更轻松地跨平台和环境(从核心数据中心到网络边缘)工作。

Theme

© 2026 Red Hat
返回顶部