适用于内核 4.5 的 iscsi_trgt 模块

适用于内核 4.5 的 iscsi_trgt 模块

Ubuntu 15.10,内核 4.5

我遵循了以下指南:http://www.cyberciti.biz/faq/debian-ubuntu-building-installing-a-custom-linux-kernel/我正在运行内核 4.5,但缺少 iscsi_trgt 模块。

我是否对 (不支持的) 内核重新编译了 iscsitarget?如果是,我试过了,从 1.4.20 分支编译后得到如下结果:

iscsitarget-1.4.20.2/src/kernel/iscsi.c:978:7: error: ‘SERVICE_ACTION_IN’ undeclared (first use in this function)
  case SERVICE_ACTION_IN:
       ^

systemctl status iscsitarget.service

● iscsitarget.service - LSB: Starts and stops the iSCSI software target
   Loaded: loaded (/etc/init.d/iscsitarget)
   Active: failed (Result: exit-code) since Wed 2016-03-23 11:16:00 CET; 10min ago
     Docs: man:systemd-sysv-generator(8)
  Process: 2233 ExecStart=/etc/init.d/iscsitarget start (code=exited, status=1/FAILURE)

Mar 23 11:16:00 zeus systemd[1]: Starting LSB: Starts and stops the iSCSI software target...
Mar 23 11:16:00 zeus iscsitarget[2233]: * Starting iSCSI enterprise target service
Mar 23 11:16:00 zeus systemd[1]: iscsitarget.service: Control process exited, code=exited status=1
Mar 23 11:16:00 zeus systemd[1]: Failed to start LSB: Starts and stops the iSCSI software target.
Mar 23 11:16:00 zeus systemd[1]: iscsitarget.service: Unit entered failed state.
Mar 23 11:16:00 zeus systemd[1]: iscsitarget.service: Failed with result 'exit-code'.
Mar 23 11:16:00 zeus iscsitarget[2233]: modprobe: FATAL: Module iscsi_trgt not found.
Mar 23 11:16:00 zeus iscsitarget[2233]: ...fail!

答案1

首先尝试更新然后升级当前版本。如果这不成功,那么我猜想你没有所需的标头,请尝试:

$ sudo apt-get install linux-image-4.2.0.34 
$ sudo apt-get install linux-headers-4.2.0.34
$ sudo apt-get update
$ sudo apt-get upgrade

相关内容