linux內(nèi)核編譯常出現(xiàn)的問題有哪些

這篇文章主要介紹了linux內(nèi)核編譯常出現(xiàn)的問題有哪些,具有一定借鑒價值,感興趣的朋友可以參考下,希望大家閱讀完這篇文章之后大有收獲,下面讓小編帶著大家一起了解一下。

成都創(chuàng)新互聯(lián)公司為您提適合企業(yè)的網(wǎng)站設(shè)計(jì)?讓您的網(wǎng)站在搜索引擎具有高度排名,讓您的網(wǎng)站具備超強(qiáng)的網(wǎng)絡(luò)競爭力!結(jié)合企業(yè)自身,進(jìn)行網(wǎng)站設(shè)計(jì)及把握,最后結(jié)合企業(yè)文化和具體宗旨等,才能創(chuàng)作出一份性化解決方案。從網(wǎng)站策劃到成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè), 我們的網(wǎng)頁設(shè)計(jì)師為您提供的解決方案。

1、若編譯內(nèi)核時總是出現(xiàn)同一個錯誤,如下:
在make modules_install時最后幾行彈出錯誤:
if [ -r System.map -a -x /sbin/depmod ]; then /sbin/depmod -ae -F System.map 2.6.12.2; fi
/bin/sh: line 1: 3357 已殺死 /sbin/depmod -ae -F System.map 2.6 .12.2
make: *** [_modinst_post] 錯誤 137
如果繼續(xù)make install,重啟,是進(jìn)不去剛剛編譯安裝的那個內(nèi)核的,顯示內(nèi)核錯誤。
分析:如果 System.map可讀 并且 /sbin/depmod可執(zhí)行;那么就執(zhí)行/sbin/depmod -ae -F System.map 2.6.20;結(jié)束
depmod(depend module)
功能說明:分析可載入模塊的相依性。
語 法:depmod [-adeisvV][-m <文件>][--help][模塊名稱]
補(bǔ)充說明:depmod可檢測模塊的相依性,供modprobe在安裝模塊時使用。
參 數(shù):
-a或--all 分析所有可用的模塊。
-d或debug 執(zhí)行排錯模式。
-e 輸出無法參照的符號。
-i 不檢查符號表的版本。
-m<文件>或system-map<文件> 使用指定的符號表文件。
-s或--system-log 在系統(tǒng)記錄中記錄錯誤。
-v或--verbose 執(zhí)行時顯示詳細(xì)的信息。
-V或--version 顯示版本信息。
--help 顯示幫助。
解決方法:make module_install之前你是否關(guān)閉了selinux,
該問題是selinux阻止寫/lib/modules/ <version> 目錄
2、若重啟系統(tǒng)后顯示:
Warning--SElinux relabel is required
Disabling security enforcement
Relabeling could take a very long time
depending on file system size
可以更改grub.conf 將selinux=0添加到如下位置
kernel /vmlinuz-2.6.11-1.1369_FC4 ro root=LABEL=/ selinux=0 rhgb quiet
或者更改/etc/selinux/config,將SELINUX=Disabled,存盤就可以把 selinux 關(guān)閉了
3、修改selinux
在新版本中的Red Hat 和 Fedora 上,修改檔案/etc/sysconfig/selinux:
# 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 - SELinux is fully disabled.
SELINUX=enforcing
# SELINUXTYPE= type of policy in use. Possible values are:
# targeted - Only targeted network daemons are protected.
# strict - Full SELinux protection.
SELINUXTYPE=targeted
把 SELINUX設(shè)定為disable, 下次啟動系統(tǒng)后將會停止SElinux.
Linux核心參數(shù)(Kernel Parameter)
或者可以在核心參數(shù)后加上: selinux=0 (停止) 或 selinux=1 (開啟)參數(shù)
檔案/boot/grub/menu.lst
title Fedora Core (2.6.18-1.2798.fc6)
root (hd0,0)
kernel /vmlinuz-2.6.18-1.2798.fc6 ro root=LABEL=/ rhgb quiet selinux=0
initrd /initrd-2.6.18-1.2798.fc6.img
檢查SELinux現(xiàn)時況態(tài)
要知到你現(xiàn)在是否使用 SELinux:
# getenforce
disabled
4、重啟后若出現(xiàn)Kernel panic:VFS: Unable to mount root fs on unknown-block(0,0)
從錯誤信息上看,是沒有識別到硬盤。看來,我機(jī)器上的SATA硬盤必須在內(nèi)核中做相應(yīng)的配置才能識別。
仔細(xì)閱讀了內(nèi)核配置時的幫助信息,得知內(nèi)核支持兩種SATA驅(qū)動程序:一種是libata,在SCSI子系統(tǒng)中,支持最新的SATA控制器;還有一種是 IDE驅(qū)動程序中的SATA,主要是支持第一代的SATA控制器。我的機(jī)器應(yīng)該是比較新的,所以先按libata的方式來配置試試。
先看看我的SATA控制器是什么類型的?運(yùn)行l(wèi)spci,輸出如下:
00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Con troller (rev 01)
就是SATA控制器的類型。
解決方法:在make menuconfig中設(shè)置以下選項(xiàng):
Device Driver
|---->SCSI device support
|---->SCSI disk support
|----->verbose SCSI error reporting (不是必須的,但可方便問題定位)
|----->SCSI low-level drivers
|---->Serial ATA (SATA) support
|---->intel PIIX/ICH SATA support
<*> RAM disk support 在 device drivers -> Block devices中
<*> Initial RAM disk (initrd) support 在 device drivers -> Block devices中
<*> Compressed ROM file system support (cramfs) 在file systems -> Miscellaneous filesystems中
5、若重啟之后出現(xiàn)網(wǎng)卡不識別,無法激活,出現(xiàn)via-rhine device eth0 does not seem to be present, delaying initialization
缺少VIA 驅(qū)動
運(yùn)行 make menuconfig
在Networking support-->Networking device support --> Ethernet (10 or 100Mbit) 里找到 <M>"VIA Rhine RevB support"
6、若重啟后顯示如下:
reading all physical volumns, this may take a while&hellip;
no volumns group found!
unable to find volumns group "VolGroup00"
ERROR: /bin/lvm exited abnormal with value 5 (pid 335)
error 6 mounting ext3
ERROR OPENING /dev/console!!:2
error dup2ing fd of 0 to 0
error dup2ing fd of 1 to 1
error duping fd of 2 to 2
switchroot:mount failed:22
kernel panic - no syncing: attempted to kill init!
運(yùn)行make menuconfig時在 device drivers ->[*] Multiple devices driver support (RAID and LVM)
如果有以下選項(xiàng),也應(yīng)該啟用它們:<*> Logical volume manager (LVM) support

感謝你能夠認(rèn)真閱讀完這篇文章,希望小編分享的“l(fā)inux內(nèi)核編譯常出現(xiàn)的問題有哪些”這篇文章對大家有幫助,同時也希望大家多多支持創(chuàng)新互聯(lián),關(guān)注創(chuàng)新互聯(lián)行業(yè)資訊頻道,更多相關(guān)知識等著你來學(xué)習(xí)!

本文標(biāo)題:linux內(nèi)核編譯常出現(xiàn)的問題有哪些
URL鏈接:http://muchs.cn/article6/iepgig.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供全網(wǎng)營銷推廣、網(wǎng)站設(shè)計(jì)公司、網(wǎng)站導(dǎo)航、網(wǎng)站制作、虛擬主機(jī)、面包屑導(dǎo)航

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)

成都網(wǎng)站建設(shè)