• 幕客老师召集小伙伴
  • python自动化运维项目实战
  • nginx从入门到实战
  • 阿里云与Centos7实战

linux内核(驱动安装)

驱动安装
========================================================
1. 网卡
2. HBA卡(光纤卡)

kernel-headers-2.6.32-358.el6.x86_64
kernel-devel-2.6.32-358.el6.x86_64

一、安装网卡驱动
1. 模拟e1000e网卡驱动不存在

[root@jeson ~]# modinfo -n e1000e/lib/modules/3.12.7-hahahaha/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko
[root@jeson ~]# rm -rf /lib/modules/3.12.7-yang/kernel/drivers/net/ethernet/intel/e1000e/e1000e.ko[root@station230 ~]# depmod [root@station230 ~]# modinfo e1000e
modinfo: could not find module e1000e

2. 安装e1000e网卡驱动安装
下载相应的网卡驱动

[root@station230 ~]# tar xvf e1000e-2.0.0.1.tar.gz[root@station230 ~]# cd e1000e-2.0.0.1[root@station230 e1000e-2.0.0.1]# ls
COPYING  e1000e.7  e1000e.spec  pci.updates  README  src  SUMS
[root@station230 e1000e-2.0.0.1]# vim README2.Untar/unzip archive:
     tar zxf e1000e-x.x.x.tar.gz
3.Change to the driver src directory:
     cd e1000e-x.x.x/src/4.Compile the driver module:# make install[root@station230 src]# pwd/root/e1000e-2.0.0.1/src
[root@station230 src]# make install[root@station230 ~]# depmod [root@station230 ~]# modinfo e1000e[root@station230 ~]# modprobe e1000e[root@station230 ~]# lsmod |grep e1000e
e1000e                18760808021q259292 e1000e,cxgb3

========================================================
1. 查当前是否找到网卡设备

[root@jeson ~]# lspci |grep -i eth02:00Ethernet controller:AtherosCommunicationsInc. AR8151 v2.0GigabitEthernet(rev c0)03:00Ethernet controller:RealtekSemiconductorCo.,Ltd. RTL-8139/8139C/8139C+(rev 10)

2. 查看网卡是否加载驱动

[root@jeson ~]# dmesg |grep -i eth8139cp:8139cp:10/100 PCI Ethernet driver v1.3(Mar22,2004)8139too:8139tooFastEthernet driver 0.9.288139too0000:03:00.0 eth1:RealTek RTL8139 at 0xffffc900108f8000,40:16:9f:eb:32:9d, IRQ 20IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
8139too0000:03:00.0 eth1: link up,100Mbps, full-duplex, lpa 0xC5E1

3. 查看eth0使用的驱动

[root@yangs ~]# # ethtool -i eth1
driver:8139too
version:0.9.28
firmware-version: 
bus-info:0000:03:00.0
supports-statistics: yes
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no

linux内核(驱动安装)

Pingbacks已打开。

引用地址

暂无评论

发表评论