zoukankan      html  css  js  c++  java
  • 20190603

    现象

    最近 Windows 和两台 Mac 混用,将 Windows VirtualBox 中安装的 CentOS 7 拷贝到 Mac 上。

    启动 CentOS 7 时,图形界面进度卡在最后,按 Esc 看到如下提示:

    Failed to load SELinux policy. Freezing

    原因分析

    可能由于 SELinux 设置错误导致,结果就是,重启后,机器无法正常进入 CentOS 7 引导菜单,导致卡住不能动。

    解决办法

    1.、重启时按 E,进入 grub 页面。

    2、在大约 16 行,language 后,也就是 LANG=**_**.UTF-8后加入空格,再加上

    selinux=0

    3、按 ctrl + x 启动,即看到录界面,再执行

    vim /etc/selinux/config

    4、修改文件内容如下,主要是非注释行。

    # This file controls the state of SELinux on the system.
    
    # SELINUX= can take one of these three values:
    # enforcing - SELinux security policy is enforced.
    # permissive - SELinux prints warnings instead of enforcing.
    # disabled - No SELinux policy is loaded.
    SELINUX=disabled
    # SELINUXTYPE= can take one of three two values:
    # targeted - Targeted processes are protected,
    # minimum - Modification of targeted policy. Only selected processes are protected. 
    # mls - Multi Level Security protection.
    SELINUXTYPE=targeted

    5、修改完 按vim 命令 :wq! 保存,重启机器。

  • 相关阅读:
    随便练习的进制转换
    回顾快速排序
    常用c++函数
    POJ 1163 The Triangle
    HDU 1155 Bungee Jumping
    ZOJ 3861 Valid Pattern Lock
    POJ 1273 Drainage Ditches
    Hrbust 2240 土豪的时代
    POJ 3468 A Simple Problem with Integers
    POJ 1061 青蛙的约会
  • 原文地址:https://www.cnblogs.com/likun/p/how-to-solve-selinux-freeze-centos-7.html
Copyright © 2011-2022 走看看