当前位置: 首页 > 知识 >正文

linux内核编译常常出现的问题的解决办法是(linux内核编译出错)

1.如果编译内核时总是出现相同的错误,如下所示:

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:第一行:3357已杀死/sbin/dep mod-AE-F系统。地图2.6。12.2

Brand: * * * [_ modinst _ post] Error 137

如果继续进行安装重启,就无法进入刚刚编译安装好的内核,显示内核错误。

分析:如果System.map可读/sbin/depmod可执行;然后执行/sbin/dep mod-AE-f system . map 2 . 6 . 20;结束

Depmod (slave module)

功能描述:分析可加载模块的依赖关系。

语言:depmod[-adei svv][-m file][-help][模块名]

补充说明:depmod可以检测模块的依赖关系,供modprobe在安装模块时使用。

参数:

-a or - all分析所有可用的模块。

-d或debug来执行调试模式。

-e输出不能被引用的符号。

-我没有检查符号表的版本。

-m文件或系统映射文件使用指定的符号表文件。

-s或- system-log在系统记录中记录一个错误。

-v或- verbose在执行时显示详细信息。

-V或- version显示版本信息。

- help显示帮助。

解决方案:在make module_install之前是否关闭了selinux?

问题是selinux阻止写入/lib/modules/version目录。

2.如果在重新启动系统后显示:

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,保存后关闭。

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设置为disable,SELINUX将在下次系统启动后停止。

Linux核心参数(Kernel Parameter)

或者可以在核心参数后加上: selinux=0 (停止) 或selinux=1 (开启)参数

档案/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现时况态

要知到你现在是否使用SELinux:

# getenforce

disabled

4、重启后若出现Kernel panic:VFS: Unable to mount root fs on unknown-block(0,0)

从错误信息上看,是没有识别到硬盘。看来,我机器上的SATA硬盘必须在内核中做相应的配置才能识别。

仔细阅读了内核配置时的帮助信息,得知内核支持两种SATA驱动程序:一种是libata,在SCSI子系统中,

支持最新的SATA控制器;还有一种是IDE驱动程序中的SATA,主要是支持第一代的SATA控制器。我的机器应该是比较新的,所以先按libata的方式来配置试试。

先看看我的SATA控制器是什么类型的?运行lspci,输出如下:

00:1f.2 IDE interface: Intel Corporation 82801GBM/GHM (ICH7 Family) SATA IDE Con troller (rev 01)

就是SATA控制器的类型。

解决方法:在make menuconfig中设置以下选项:

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中

nbsp

相关文章:
  • 4月6日基金净值:广发创业板ETF最新净值1.4259,涨0.2%_基金频道_证券之星
  • 7月10日基金净值:大成北交所两年定开混合A最新净值0.7452,跌0.07%
  • 4月21日基金净值:易方达新利灵活配置混合最新净值1.588,跌0.31%
  • 4月20日基金净值:汇添富沪深300指数增强A最新净值1.2753,跌0.51%
  • 7月3日基金净值:广发价值领先混合A最新净值1.6697,涨4.06%
  • 6月16日基金净值:摩根强化回报债券A最新净值1.5647,涨0.11%
  • 嘉实医药健康100ETF净值下跌1.12% 请保持关注
  • 4月6日基金净值:鹏华精选成长混合A最新净值2.329,涨0.3%_基金频道_证券之星
  • Centos6.3下Apache配置基于加密的认证https加密证书访问
  • 6月30日基金净值:泰康沪深300ETF最新净值4.1342,涨0.67%