linux中使用broadcom型号卡上网

xiyoukeke 2010-01-19

确认下网卡型号:

sanshang@ubuntu:~$lspci|grep-inetwork

06:00.0Networkcontroller:BroadcomCorporationBCM4312802.11b/g(rev01)

1、进入http://www.broadcom.com/support/802.11/linux_sta.php下载驱动,我选择的是32-bitdriver;

新建目录,解压文件

#mkdirhybrid_wl

#cdhybrid_wl

#tarxzf/home/sanshang/Downloads/hybrid-portsrc-x86_32-v5.10.91.9.3.tar.gz

2.BuildthedriverasaLinuxloadablekernelmodule(LKM):

#makeclean(optional)

#make

Whenthebuildcompletes,itwillproduceawl.kofileinthetoplevel

directory.

3:RemoveanyotherdriversfortheBroadcomwireless.

ThereareseveralopensourcedriversthatareusedtodriveBroadcom802.11

chipssuchasb43andssb.Ifanyofthesearepresenttheyneedtoberemovedbeforethis

drivercanbeinstalled.Anypreviousrevisionsofthewldriveralsoneedto

beremoved.

#lsmod|grep"b43\|ssb\|wl"

Ifanyoftheseareinstalled,removethem:

#rmmodb43

#rmmodssb

#rmmodwl

Toblacklistthesedriversandpreventthemfromloadinginthefuture:

#echo"blacklistssb">>/etc/modprobe.d/blacklist.conf

#echo"blacklistb43">>/etc/modprobe.d/blacklist.conf

4:Insmodthedriver.

Ifyouwerealreadyrunningapreviousversionofwl,you'llwanttoprovidea

cleantransitionfromtheolderdriver.(Thepathtopreviousdriverisusually

/lib/modules/<kernel-version>/kernel/net/wireless)

#rmmodwl

#mv<path-to-prev-driver>/wl.ko<path-to-prev-driver>/wl.ko.orig

#cpwl.ko<path-to-prev-driver>/wl.ko

#depmod

#modprobewl

Otherwise,ifyouhavenotpreviouslyinstalledawldriverdothis:

如果没有,就直接执行下面的命令:

#modprobelib80211

#insmodwl.ko

wl.koisnowoperational.ItmaytakeseveralsecondsfortheNetworkManager

tonoticeanewnetworkdriverhasbeeninstalledandshowthesurrounding

wirelessnetworks.

按照readme中的步骤就可以安装完成,但是每次系统启动的时候不会自动加载,那么就需要将wl.ko拷贝到:

/lib/modules/2.6.31-14-generic/kernel/net/wireless/

目录,然后在/etc/rc.local加入:

modprobe-rssb

modprobewl

or

modprobelib80211

insmod/lib/modules/2.6.31-14-generic/kernel/net/wireless/wl.ko

这样就可以了

激活网卡驱动

系统管理--硬件驱动--BroadcomSTA无线驱动

解决QQ掉线

sudogedit/usr/bin/qq

此为打开编辑命令,打开后显示:

#!/bin/sh

cd/usr/share/tencent/qq/

./qq

在中间加入一句即可

#!/bin/sh

exportGDK_NATIVE_WINDOWS=true

cd/usr/share/tencent/qq/

./qq

升级后启动不了的解决办法:

grub>ls

grub>ls(hd0,7)/#找出WUBI安装的盘,里面有ubuntu/这个目录。

grub>insmodntfs#加载ntfs模块,因为WUBI将ubuntu安装到了我分的ntfs盘上

grub>setroot=(hd0,7)#这里(hd0,7)就是我找到的ubuntu安装的分区

grub>ls$Boot#找到我们BOOT分区的UUID,下一步要用到,我这里显示出来的是2250018e50016a3d

grub>search--no-floppy--fs-uuid--setf2250018e50016a3d#这里的UUID就是上一定找出来的那个

grub>loopbackloop0/ubuntu/disks/root.disk#设loop0,WUBI装ubuntu安装成了一个root.disk文件

grub>setroot=(loop0)#重设root

grub>linux/boot/vmlinuzxxxxxxxxx(tab补全即可,有2个,14和19,补全14的那个,注意文件名要完整)root=/dev/sda7loop=/ubuntu/disks/root.diskroquietsplash#加载内核,sda7对应就是(hd0,7)

grub>initrd/boot/initrd.imgxxxxxxxxxxxx(tab补全即可,同样选14的那个)#不用说大家都知道

gurb>boot

ENTER就可以启动了。进入熟悉的系统,打开终端

代码:

首先切换到root用户,sudo-s-H

#update-grub2

#reboot

相关推荐