2013年11月9日 星期六

[Linux] Ubuntu 10.04在x220下找不到ethernet

因為Ubuntu 12.04用不習慣, 只好裝回10.04, 但杯具馬上發生, 安裝完後竟然找不到ethernet
dmesg|grep -in eth
沒有網路也沒辦法下載套件,source等, 什麼都沒辦法做, 還好有估到一篇

解決步驟 1. 查詢裝置類型
$ lspci -nn|grep -in eth
5:00:19.0 Ethernet controller [0200]: Intel Corporation Device [8086:1502] (rev 04)
2. 根據vendor id + device id搜尋, 8086是Intel Corporation, 1502是Intel 82579LM Gigabit Network Card

3. 去intel網站下載適合的驅動程式 先搜尋"82579", 再作業系統欄位選擇"Linux", 會得到e1000e-2.5.4.tar.gz

4. 最後就編譯安裝, 重新啟動網路, 搞定, 看到ifconfig有eth0真是太感動了
$ cd e1000e-2.5.4/src$ make
make -C /lib/modules/2.6.32-38-generic/build SUBDIRS=/home/sosorry/driver/e1000e-2.5.4/src modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-38-generic'
  CC [M]  /home/sosorry/driver/e1000e-2.5.4/src/netdev.o
  CC [M]  /home/sosorry/driver/e1000e-2.5.4/src/ethtool.o
  CC [M]  /home/sosorry/driver/e1000e-2.5.4/src/param.o
  CC [M]  /home/sosorry/driver/e1000e-2.5.4/src/82571.o
  CC [M]  /home/sosorry/driver/e1000e-2.5.4/src/ich8lan.o
  CC [M]  /home/sosorry/driver/e1000e-2.5.4/src/80003es2lan.o
  CC [M]  /home/sosorry/driver/e1000e-2.5.4/src/mac.o
  CC [M]  /home/sosorry/driver/e1000e-2.5.4/src/nvm.o
  CC [M]  /home/sosorry/driver/e1000e-2.5.4/src/phy.o
  CC [M]  /home/sosorry/driver/e1000e-2.5.4/src/manage.o
  CC [M]  /home/sosorry/driver/e1000e-2.5.4/src/kcompat.o
  LD [M]  /home/sosorry/driver/e1000e-2.5.4/src/e1000e.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /home/sosorry/driver/e1000e-2.5.4/src/e1000e.mod.o
  LD [M]  /home/sosorry/driver/e1000e-2.5.4/src/e1000e.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-38-generic'
$ sudo make install
make -C /lib/modules/2.6.32-38-generic/build SUBDIRS=/home/sosorry/driver/e1000e-2.5.4/src modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-38-generic'
  Building modules, stage 2.
  MODPOST 1 modules
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-38-generic'
gzip -c ../e1000e.7 > e1000e.7.gz
# remove all old versions of the driver
find /lib/modules/2.6.32-38-generic -name e1000e.ko -exec rm -f {} \; || true
find /lib/modules/2.6.32-38-generic -name e1000e.ko.gz -exec rm -f {} \; || true
install -D -m 644 e1000e.ko /lib/modules/2.6.32-38-generic/kernel/drivers/net/e1000e/e1000e.ko
/sbin/depmod -a || true
install -D -m 644 e1000e.7.gz /usr/share/man/man7/e1000e.7.gz
man -c -P'cat > /dev/null' e1000e || true
e1000e.
$ sudo /etc/init.d/networking restart


reference: Fix for non-working wired ethernet on Dell Latitude E6520 with Intel 82579 based adapter running Ubuntu 10.04 LTS Lucid

沒有留言: