1. 程式人生 > >Kali之——安裝BCM43142 802.11b/g/n Linux 驅動

Kali之——安裝BCM43142 802.11b/g/n Linux 驅動

轉載部分:

本人筆記本的型號為lenovo G510,Ubuntu 中,通常有線網絡卡為eth0,無線網絡卡則為wlan0,後續增加的以此類推(可能某些無線網絡卡型號命名為eth1,而非wlan0。用ifconfig命令檢視系統的網絡卡資訊,根本沒有出現wlan0或者eth1,說明驅動沒有安裝。

安裝網絡卡驅動的話,需要了解網絡卡型別,用lspci命令檢視,發現我的網絡卡是

Broadcom Corporation BCM43142 802.11b/g/n (rev 01)

這個網絡卡是一個很老的網絡卡,已經很少用了,所以驅動非常難下載。嘗試了很多辦法,終於在下面的網上找到了:

我所做的事情如下:

sudo apt-get install linux-headers$(uname -r | grep -Po "\-[a-z].*")

sudo apt-get install build-essential dkms

sudo apt-get install dpkg

sudo apt-get install bcmwl-kernel-source

然後無線網路就可以用了,用ifconfig命令發現出現了eth1

整理部分:

整理Shell指令碼如下:

# Update and install necessary packages
apt-get update
apt-get install linux-image-$(uname -r|sed 's,[^-]*-[^-]*-,,') linux-headers-$(uname -r|sed 's,[^-]*-[^-]*-,,')

# Download some extra packages, that do the trick for "wl module not found"
wget http://old.kali.org/kali/pool/main/g/gcc-6/cpp-6_6.4.0-9_amd64.deb
wget http://old.kali.org/kali/pool/main/g/gcc-6/gcc-6-base_6.4.0-9_amd64.deb
wget http://old.kali.org/kali/pool/main/l/linux/linux-compiler-gcc-6-x86_4.13.10-1kali2_amd64.deb
wget http://old.kali.org/kali/pool/main/l/linux/linux-kbuild-4.13_4.13.10-1kali2_amd64.deb
wget http://old.kali.org/kali/pool/main/l/linux/linux-headers-4.13.0-kali1-common_4.13.10-1kali2_all.deb
wget http://old.kali.org/kali/pool/main/l/linux/linux-headers-4.13.0-kali1-amd64_4.13.10-1kali2_amd64.deb
wget http://old.kali.org/kali/pool/non-free/b/broadcom-sta/broadcom-sta-dkms_6.30.223.271-7_all.deb
wget http://old.kali.org/kali/pool/main/d/dkms/dkms_2.3-3_all.deb

# Install with correct order
dpkg -i cpp-6_6.4.0-9_amd64.deb
dpkg -i gcc-6-base_6.4.0-9_amd64.deb
dpkg -i linux-compiler-gcc-6-x86_4.13.10-1kali2_amd64.deb
dpkg -i linux-kbuild-4.13_4.13.10-1kali2_amd64.deb
dpkg -i linux-headers-4.13.0-kali1-common_4.13.10-1kali2_all.deb
dpkg -i linux-headers-4.13.0-kali1-amd64_4.13.10-1kali2_amd64.deb
dpkg -i broadcom-sta/broadcom-sta-dkms_6.30.223.271-7_all.deb
dpkg -i dkms_2.3-3_all.deb


# Install broadcom drivers
apt-get install broadcom-sta-dkms

# Enable modules and disabled unnecessary ones 
modprobe -r b44 b43 b43legacy ssb brcmsmac bcma
modprobe wl

# Done :)
echo "WI-FI work now!"
echo "Don't forget to enable network-manager: nano /etc/NetworkManager/NetworkManager.conf to true and restart the service."

附github連線