標籤:
新裝了台fedora20的虛擬機器,安裝升級了一些東西後。啟動時過了fedora的logo畫面後就是黑屏。
也沒提示不論什麼錯誤,好在shell還能進去。查看/var/log/anaconda/syslog日誌,發現錯誤例如以下:
20:40:34,794 NOTICE kernel:[ 1256.967907] type=1400 audit(1409517634.790:29): avc: denied { read write } for pid=26214 comm="ldconfig" path="/dev/pts/0 " dev="devpts" ino=3 scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:devpts_t:s0 tclass=chr_file1770 20:40:34,794 NOTICE kernel:[ 1256.970292] type=1400 audit(1409517634.792:30): avc: denied { read } for pid=26214 comm="ldconfig" path="/proc/1025/mount s" dev="proc" ino=17433 scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:system_r:initrc_t:s0 tclass=file1771 20:41:02,416 NOTICE kernel:[ 1284.579392] type=1400 audit(1409517662.415:31): avc: denied { write } for pid=30896 comm="ldconfig" path="/var/tmp/dracut -log.IKiLpk/systemd-cat" dev="sda5" ino=275146 scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=fifo_file1772 20:41:02,419 NOTICE kernel:[ 1284.581518] type=1400 audit(1409517662.417:32): avc: denied { read } for pid=30896 comm="ldconfig" name="ld.so.conf.d" de v="sda5" ino=276572 scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=dir1773 20:41:02,424 NOTICE kernel:[ 1284.586709] type=1400 audit(1409517662.422:33): avc: denied { write } for pid=30896 comm="ldconfig" name="etc" dev="sda5" ino=275151 scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=dir1774 20:41:02,424 NOTICE kernel:[ 1284.586723] type=1400 audit(1409517662.422:34): avc: denied { add_name } for pid=30896 comm="ldconfig" name="ld.so.cache~ " scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=dir1775 20:41:02,424 NOTICE kernel:[ 1284.586747] type=1400 audit(1409517662.422:35): avc: denied { create } for pid=30896 comm="ldconfig" name="ld.so.cache~" scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=file1776 20:41:02,424 NOTICE kernel:[ 1284.586853] type=1400 audit(1409517662.422:36): avc: denied { setattr } for pid=30896 comm="ldconfig" name="ld.so.cache~" dev="sda5" ino=276580 scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=file1777 20:41:02,424 NOTICE kernel:[ 1284.586879] type=1400 audit(1409517662.422:37): avc: denied { remove_name } for pid=30896 comm="ldconfig" name="ld.so.cac he~" dev="sda5" ino=276580 scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=dir1778 20:41:02,424 NOTICE kernel:[ 1284.586888] type=1400 audit(1409517662.422:38): avc: denied { rename } for pid=30896 comm="ldconfig" name="ld.so.cache~" dev="sda5" ino=276580 scontext=system_u:system_r:ldconfig_t:s0 tcontext=system_u:object_r:initrc_tmp_t:s0 tclass=file1779 20:41:20,086 NOTICE kernel:[ 1302.240139] type=1400 audit(1409517680.084:39): avc: denied { read write } for pid=34152 comm="adduser" path="/dev/mapper /control" dev="devtmpfs" ino=8956 scontext=system_u:system_r:useradd_t:s0 tcontext=system_u:object_r:lvm_control_t:s0 tclass=chr_file
這說明一些操作被拒絕了。抽取第一條來看。avc: denied代表操作被拒絕。{ read write }代表該操作須要讀-read 和 寫-write 許可。pid=26214代表進程號為1876的進程試圖運行操作……等等。
這些是SELINUX的安全檢查,核心在運行系統調用前會詢問 SELinux 進程是否獲得了運行操作的授權。
解決的辦法也非常easy,就是對對應的進程進行授權,或是關閉SELINUX,這裡。我選擇後者,改動檔案/etc/selinux/config,將當中的
SELINUX=enforcing
改動為
SELINUX=disabled
重新啟動後即可了。
vmplayer中的fedora20無法進入圖形介面