Linux kernel在make install时的问题分析汇总
发布时间:2022-06-19 18:25:47 所属栏目:教程 来源:互联网
导读:编译KVM后安装时的经常有错误提示,make install 也可能会遇到类似的 ERROR:modinfo:could not find module XXX的问题,现在我们来分析一些这些问题然后解决掉. 在编译内核后,make install 时可能遇到ERROR:modinfo: could not find module XXX的问题,命令行
编译KVM后安装时的经常有错误提示,make install 也可能会遇到类似的 “ERROR:modinfo:could not find module XXX”的问题,现在我们来分析一些这些问题然后解决掉. 在编译内核后,make install 时可能遇到“ERROR:modinfo: could not find module XXX”的问题,命令行中操作看到的内容如下: [root@smilejay linux-3.12]# make modules_install .......... INSTALL sound/soundcore.ko INSTALL sound/synth/emux/snd-emux-synth.ko INSTALL sound/synth/snd-util-mem.ko INSTALL sound/usb/snd-usb-audio.ko INSTALL sound/usb/snd-usbmidi-lib.ko INSTALL sound/usb/usx2y/snd-usb-usx2y.ko DEPMOD 3.12.0 [root@smilejay linux-3.12]# make install sh /root/linux-3.12/arch/x86/boot/install.sh 3.12.0 arch/x86/boot/bzImage System.map "/boot" ERROR: modinfo: could not find module power_meter ERROR: modinfo: could not find module nf_conntrack_ipv4 ERROR: modinfo: could not find module nf_defrag_ipv4 ERROR: modinfo: could not find module nf_conntrack_ipv6 ERROR: modinfo: could not find module nf_defrag_ipv6 ERROR: modinfo: could not find module xt_state ERROR: modinfo: could not find module nf_conntrack ERROR: modinfo: could not find module i2c_piix4 ERROR: modinfo: could not find module sg ERROR: modinfo: could not find module ext4 ERROR: modinfo: could not find module mbcache ERROR: modinfo: could not find module jbd2 ERROR: modinfo: could not find module sr_mod ERROR: modinfo: could not find module cdrom ERROR: modinfo: could not find module pata_acpi ERROR: modinfo: could not find module ata_generic ERROR: modinfo: could not find module ata_piix 原因分析:在make install时,为了让新内核中不缺少所需module,会先检查当前系统已经加载了的module(lsmod命令可查看),然后对比新安装的内核模块,如果新的内核模块中缺少一些module(和当前lsmod命令的输出做对比),就会报“ERROR: modinfo: could not find module power_meter”这样的错误信息. 具体来说,缺少相应module而报错,大致可分为3种情况: 1.确实是缺少了某个module,其解决方法是:如果报的module对于你来说是有用,检查编译kernel时的.config文件,加上对应的配置(配为=m),重新编译和安装modules即可,如果你觉得这个module没啥用,大可不必管它了. 2.新编译的kernel已经将该选项编译进kernel了(.config中选择为=Y),从而不需要生成这个module的.ko文件,系统找不到对应的.ko文件,但是已经在新内核中了,不必理会这个报错,例如,上面的“ERROR: modinfo:could not find module ext4”是因为我将EXT4文件系统模块编译为built-in了,如下: [root@smilejay linux-3.12]# grep EXT4 .config CONFIG_EXT4_FS=y --phpfensi.com # CONFIG_EXT4_FS_POSIX_ACL is not set # CONFIG_EXT4_FS_SECURITY is not set # CONFIG_EXT4_DEBUG is not set 3.模块的名称变了,用当前系统lsmod命令查找的模块名称,在新编译的内核中找不到module了,只需要检查确认即可,如这里的“ERROR: modinfo:could not find module power_meter”就是这种类型,检查方式如下: # 当前系统已经加载了power_meter模块 [root@smilejay ~]# lsmod | grep meter power_meter 9169 1 # 但是kernel 3.12 中该module名称为 acpi_power_meter,和'lsmod'查到的power_meterb不一致。 [root@smilejay ~]# find /lib/ -name "*power_meter.ko" /lib/modules/2.6.32-358.el6.x86_64/kernel/drivers/acpi/power_meter.ko /lib/modules/3.12.0/kernel/drivers/hwmon/acpi_power_meter.ko 最后,如果那些错误报的内核模块,你认为不重要或者都经过上面的分析解决后,你就可以忽略这些错误提示了,尽管有这些“ERROR:modinfo:”错误提示,但是kernel还是被正确安装了的,往下继续操作使用即可. (编辑:聊城站长网) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |
站长推荐