|
Linux 版本:
RH-AS4
Linux核心:2.6.9-34.ELsmp/2.6.9-34.EL
硬件平台:
泰安(TAYAN)5396主板
主板集成2块intel e1000 网卡
安装完Linux后,发现在/lib/modules/2.6.9-34.ELsmp/kernel/drivers/net/e1000下有默认的e1000驱动e1000.ko
但用"kudzu"检测不到网卡,"lsmod"没有发现网卡驱动模块,于是动态加载"modprobe e1000",之后用"lsmod"可以发现网卡驱动
***************************************************************
[root@host ~]# lsmod |grep e1000
e1000 166400 0
***************************************************************
但用"kudzu"仍然检测不到网卡.于是从intel下载e1000驱动,重新编译,也是同样的结果.
上google找解决方法,根据"Hacking initrd.img - 添加网卡驱动,网络安装 Linux"的指导,修改了/lib/modules/2.6.9-34.ELsmp下的modules.alias,modules.pcimap,把vendor code和device code加入之后重启动系统,可以探测到新硬件,但是提示
***************************************************************
弹出环回接口: [ 确定 ]
弹出界面 eth0: e1000 设备 eth0 似乎不在。将要推迟它的初始化。
[失败]
弹出界面 eth1: e1000 设备 eth1 似乎不在。将要推迟它的初始化。
[失败]
***************************************************************
也就是目前我这里的情况.发现在/etc/sysconfig/hwconf里有network的相关内容,但是没有mac地址的表述,hwconf内容如下:
***************************************************************
class: NETWORK
bus: PCI
detached: 0
device: eth1
driver: e1000
desc: "Intel Corporation Enterprise Southbridge DPT LAN Copper"
vendorId: 8086
deviceId: 1096
subVendorId: 8086
subDeviceId: 0000
pciType: 1
pcidom: 0
pcibus: f
pcidev: 0
pcifn: 1
-
class: NETWORK
bus: PCI
detached: 0
device: eth0
driver: e1000
desc: "Intel Corporation Enterprise Southbridge DPT LAN Copper"
vendorId: 8086
deviceId: 1096
subVendorId: 8086
subDeviceId: 0000
pciType: 1
pcidom: 0
pcibus: f
pcidev: 0
pcifn: 0
-
***************************************************************
我手动在hwconf添加了"network.hwaddr:***(mac)***",发现一执行"kudzu"命令后,手动添加的mac地址就被删除掉了."service network restart"结果如下:
***************************************************************
[root@host ~]# service network restart
关闭环回接口: [ 确定 ]
设置网络参数: [ 确定 ]
弹出环回接口: [ 确定 ]
弹出界面 eth0: e1000 设备 eth0 似乎不在。将要推迟它的初始化。
[失败]
弹出界面 eth1: e1000 设备 eth1 似乎不在。将要推迟它的初始化。
[失败]
***************************************************************
下面贴出dmesg,lspci,ifconfig,lsmod的内容和/etc/sysconfig/hwconf,/etc/sysconfig/network-scripts/ifcfg-eth0,/etc/sysconfig/network-scripts/ifcfg-eth1,/etc/modprobe.conf的内容:
***************************************************************
[root@host ~]# dmesg |grep eth
divert: not allocating divert_blk for non-ethernet device lo
divert: not allocating divert_blk for non-ethernet device sit0
***没有eth0\eth1的相关内容***
***************************************************************
***************************************************************
[root@host ~]# lspci |grep LAN
0f:00.0 Ethernet controller: Intel Corporation Enterprise Southbridge DPT LAN Copper (rev 01)
0f:00.1 Ethernet controller: Intel Corporation Enterprise Southbridge DPT LAN Copper (rev 01)
***可以找到2块网卡***
***************************************************************
***************************************************************
[root@host ~]# ifconfig -a
lo Link encapocal Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:2493 errors:0 dropped:0 overruns:0 frame:0
TX packets:2493 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4048636 (3.8 MiB) TX bytes:4048636 (3.8 MiB)
sit0 Link encap:IPv6-in-IPv4
NOARP MTU:1480 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
***没有eth0\eth1的相关内容***
***************************************************************
***************************************************************
[root@host ~]# lsmod |grep e1000
e1000 166400 0
***驱动已加载***
***************************************************************
***************************************************************
***modprobe.conf***
alias scsi_hostadapter mptbase
alias scsi_hostadapter1 mptscsih
alias scsi_hostadapter2 ata_piix
alias snd-card-0 snd-azx
options snd-card-0 index=0
install snd-azx /sbin/modprobe --ignore-install snd-azx && /usr/sbin/alsactl restore >/dev/null 2>&1 || :
remove snd-azx { /usr/sbin/alsactl store >/dev/null 2>&1 || : ; }; /sbin/modprobe -r --ignore-remove snd-azx
alias usb-controller ehci-hcd
alias usb-controller1 uhci-hcd
alias eth0 e1000
alias eth1 e1000
***************************************************************
***************************************************************
***hwconf***
class: NETWORK
bus: PCI
detached: 0
device: eth1
driver: e1000
desc: "Intel Corporation Enterprise Southbridge DPT LAN Copper"
vendorId: 8086
deviceId: 1096
subVendorId: 8086
subDeviceId: 0000
pciType: 1
pcidom: 0
pcibus: f
pcidev: 0
pcifn: 1
-
class: NETWORK
bus: PCI
detached: 0
device: eth0
driver: e1000
desc: "Intel Corporation Enterprise Southbridge DPT LAN Copper"
vendorId: 8086
deviceId: 1096
subVendorId: 8086
subDeviceId: 0000
pciType: 1
pcidom: 0
pcibus: f
pcidev: 0
pcifn: 0
-
***ifcfg-eth0***
# Intel Corporation Enterprise Southbridge DPT LAN Copper
DEVICE=eth0
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.7.142
NETMASK=255.255.255.0
GATEWAY=192.168.7.254
***ifcfg-eth1***
# Intel Corporation Enterprise Southbridge DPT LAN Copper
DEVICE=eth1
ONBOOT=yes
BOOTPROTO=static
IPADDR=192.168.7.141
NETMASK=255.255.255.0
GATEWAY=192.168.7.254
*************************************************************** |
|