ubuntu12.04 "eth0 device not found"

包含网卡/无线网的网络问题和ADSL/校园网/宽带拨号支持及代理/共享等网络使用问题
回复
tigerlau225
帖子: 17
注册时间: 2010-04-13 13:33

ubuntu12.04 "eth0 device not found"

#1

帖子 tigerlau225 » 2014-07-12 19:11

Hi Guys,

我现在使用ubuntu12.04(kernel version 3.5.0-42). 前两天我从kernel.org下载了 3.5.1编译了自己的模块和bzimage替换了原先的modules和bzimage. 启动没有问题,但启动后网络不再可用。ifconfig 提示 'eth0 device not found'. lspci可以看到网卡硬件信息 '02:00.0 Ethernet controller:Marvell Tchnology Group Ltd.
88E8057 PCI-E Gigabit Ethernet Controller (rev 10)'. 这个是不是意味着驱动是没问题的? 如果是,请问我该如何继续来解决这个问题? 非常感谢!
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu12.04 "eth0 device not found"

#2

帖子 poloshiao » 2014-07-12 19:30

把下面指令 複製 貼進終端機 執行
1. sudo lshw -numeric -class network
2. sudo ifconfig -a
3. sudo route -nv
4. sudo dhclient -v
5. sudo cat /etc/udev/rules.d/70-persistent-net.rules
把結果直接複製 貼上來
头像
astolia
论坛版主
帖子: 6703
注册时间: 2008-09-18 13:11

Re: ubuntu12.04 "eth0 device not found"

#3

帖子 astolia » 2014-07-12 20:37

lspci只能代表识别出了硬件,不能代表安装了驱动
tigerlau225
帖子: 17
注册时间: 2010-04-13 13:33

Re: ubuntu12.04 "eth0 device not found"

#4

帖子 tigerlau225 » 2014-07-13 9:36

poloshiao 写了:把下面指令 複製 貼進終端機 執行
1. sudo lshw -numeric -class network
2. sudo ifconfig -a
3. sudo route -nv
4. sudo dhclient -v
5. sudo cat /etc/udev/rules.d/70-persistent-net.rules
把結果直接複製 貼上來
// ----
root@tigerlau225-Lenovo-Product:/home/tigerlau225# lshw -numeric -class network
*-network UNCLAIMED
description: Ethernet controller
product: 88E8057 PCI-E Gigabit Ethernet Controller [11AB:4380]
vendor: Marvell Technology Group Ltd. [11AB]
physical id: 0
bus info: pci@0000:02:00.0
version: 10
width: 64 bits
clock: 33MHz
capabilities: pm vpd msi pciexpress bus_master cap_list
configuration: latency=0
resources: memory:feafc000-feafffff ioport:d800(size=256) memory:feac0000-feadffff
root@tigerlau225-Lenovo-Product:/home/tigerlau225# ifconfig -a
lo Link encap:Local 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:48 errors:0 dropped:0 overruns:0 frame:0
TX packets:48 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:3648 (3.6 KB) TX bytes:3648 (3.6 KB)

root@tigerlau225-Lenovo-Product:/home/tigerlau225# route -nv
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
root@tigerlau225-Lenovo-Product:/home/tigerlau225# dhclient -v
Internet Systems Consortium DHCP Client 4.1-ESV-R4
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

No broadcast interfaces found - exiting.
root@tigerlau225-Lenovo-Product:/home/tigerlau225# cat /etc/udev/rules.d/70-persistent-net.rules
# This file was automatically generated by the /lib/udev/write_net_rules
# program, run by the persistent-net-generator.rules rules file.
#
# You can modify it, as long as you keep each rule on a single
# line, and change only the value of the NAME= key.

# PCI device 0x11ab:/sys/devices/pci0000:00/0000:00:1c.1/0000:02:00.0 (sky2)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:01:6c:47:ea:5b", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
root@tigerlau225-Lenovo-Product:/home/tigerlau225#
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu12.04 "eth0 device not found"

#5

帖子 poloshiao » 2014-07-13 9:55

product: 88E8057 PCI-E Gigabit Ethernet Controller [11AB:4380]
vendor: Marvell Technology Group Ltd. [11AB]
有線網卡 88E8057
physical id: 0
configuration: latency=0
沒有被驅動
所以沒有偵測到 mac 碼
所以沒有指定 eth0
tigerlau225
帖子: 17
注册时间: 2010-04-13 13:33

Re: ubuntu12.04 "eth0 device not found"

#6

帖子 tigerlau225 » 2014-07-20 14:43

Hi Guys,

我找到网卡的驱动驱动文件了. 叫sky2.ko. 手动insmod一下就能上网了. 现在的问题是我如何将insmod sky2.ko这个操作加到开机流程中呢 ? 之前3.5.0-42的内核是开机就能上网,我却没有找到他开机加载sky2.ko的地方. Help! Thanks a lot !
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu12.04 "eth0 device not found"

#7

帖子 poloshiao » 2014-07-20 16:15

如何将insmod sky2.ko这个操作加到开机流程中呢 ?
gksudo gedit /etc/modules
把 sky2 加在最後一行
重開機
sudo lsmod | grep sky2
看看 有沒有 sky2

如果是第一次使用 gksudo
要先安裝 gksu 套件
tigerlau225
帖子: 17
注册时间: 2010-04-13 13:33

Re: ubuntu12.04 "eth0 device not found"

#8

帖子 tigerlau225 » 2014-07-20 18:26

poloshiao 写了:
如何将insmod sky2.ko这个操作加到开机流程中呢 ?
gksudo gedit /etc/modules
把 sky2 加在最後一行
重開機
sudo lsmod | grep sky2
看看 有沒有 sky2

如果是第一次使用 gksudo
要先安裝 gksu 套件
我这么干了,没用唉。。
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu12.04 "eth0 device not found"

#9

帖子 poloshiao » 2014-07-20 21:05

没用唉
請把
lsmod
複製貼上來

把下面指令 複製 貼進終端機 執行
1. sudo lshw -numeric -class network
2. sudo ifconfig -a
把結果直接複製 貼上來
tigerlau225
帖子: 17
注册时间: 2010-04-13 13:33

Re: ubuntu12.04 "eth0 device not found"

#10

帖子 tigerlau225 » 2014-07-22 6:01

poloshiao 写了:
没用唉
請把
lsmod
複製貼上來

把下面指令 複製 貼進終端機 執行
1. sudo lshw -numeric -class network
2. sudo ifconfig -a
把結果直接複製 貼上來
lsmod 没有任何东西.
insmod /lib/modules/ 3.5.1/kernel/drivers/net/ethernet/marvell/sky2.ko 将这句加在
/etc/rc.local中暂时解决问题.
poloshiao
论坛版主
帖子: 18279
注册时间: 2009-08-04 16:33

Re: ubuntu12.04 "eth0 device not found"

#11

帖子 poloshiao » 2014-07-22 13:58

lsmod 没有任何东西
有點奇怪 ?
头像
cifer
帖子: 140
注册时间: 2011-10-24 23:37
系统: Debian Wheezy
联系:

Re: ubuntu12.04 "eth0 device not found"

#12

帖子 cifer » 2014-07-22 16:52

tigerlau225 写了:
poloshiao 写了:
没用唉
請把
lsmod
複製貼上來

把下面指令 複製 貼進終端機 執行
1. sudo lshw -numeric -class network
2. sudo ifconfig -a
把結果直接複製 貼上來
lsmod 没有任何东西.
insmod /lib/modules/ 3.5.1/kernel/drivers/net/ethernet/marvell/sky2.ko 将这句加在
/etc/rc.local中暂时解决问题.
lsmod 没有任何东西?
你是下载了网上编译好的内核? 是不是没有开启动态模块支持
自由, 是对人一生最重要的东西.

终于给博客想了个清新脱俗的名字, 望星听雨

听说这里挂推能够涨 fo, 于是... @cifer
tigerlau225
帖子: 17
注册时间: 2010-04-13 13:33

Re: ubuntu12.04 "eth0 device not found"

#13

帖子 tigerlau225 » 2014-07-23 7:37

内核是自己编译的,”开启动态模块支持“ 这个是menuconfig下面的一个选项吗 ?
头像
cifer
帖子: 140
注册时间: 2011-10-24 23:37
系统: Debian Wheezy
联系:

Re: ubuntu12.04 "eth0 device not found"

#14

帖子 cifer » 2014-07-23 12:56

tigerlau225 写了:内核是自己编译的,”开启动态模块支持“ 这个是menuconfig下面的一个选项吗 ?
是的, 不过一般默认是打开的, 你可以检查下
自由, 是对人一生最重要的东西.

终于给博客想了个清新脱俗的名字, 望星听雨

听说这里挂推能够涨 fo, 于是... @cifer
回复