Ubuntu Linux: Install RT2870 Chipset Based USB Wireless Adapter(转)

本文提供了一步一步的指南来解决Linux环境下RT2870无线网卡无法正常工作的常见问题,包括禁用默认驱动、安装编译所需的软件包、下载和安装特定的RT2870驱动、更新usb.ids文件、配置无线适配器等步骤,并最终实现通过WPA2认证的无线连接。

This blog post listed Linux Compatible USB wireless adapters. It seems that many new Linux users frequently have problems learning how to install RT2870 driver under Linux. I also received email requesting installation instructions for the same device. This quick tutorial will explains how to install RT2870 based chipset device with WPA2 authentication and TKIP wireless encryption.

Our Sample Setup

The following instructions are tested on:

  • Ubuntu Linux 10.04.1 LTS
  • Kernel - Linux 2.6.32-24-generic-pae i686 (32 bit)
  • WPA2 with Linksys 160N router

RT2870 Chipset Based Devices Are Not Working Out Of Box

The main problem is conflicting driver which are shipped with default kernel. WPA2 is a method of security wireless networking with optional PSK for home users. The default driver only recognizes driver but always failed to join WPA2 based network. The solution is to install RT2870 driver from the vendor site.

Step #1: Disable Default Drivers

Type the following command to black list default drivers:
$ sudo vi /etc/modprobe.d/blacklist.conf
Append the following driver names:

blacklist rt2800usb
blacklist rt2x00lib
blacklist rt2x00usb

Save and close the file. Use the rmmod command to remove current drivers or just reboot the system:
$ sudo modprobe -r driverName
# you need to remove all of the above drivers one by one:
$ sudo modprobe -r rt2800usb

OR simply reboot the systems:
$ sudo reboot

Step 2: Install Compilers

Type the following command to install required packages so that you can compile source code:
$ sudo apt-get install build-essential fakeroot dpkg-dev
Finally, install Linux kernel headers so that you can compile kernel device drivers:
$ sudo apt-get install linux-headers-$(uname -r)

Step #3: Download Driver

Visit this page and download USB drivers [RT2870USB(RT2870/RT2770)].

Untar Tarball

Type the following command:
$ tar -jxvf 2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2
$ cd 2010_0709_RT2870_Linux_STA_v2.4.0.1

Compile RT2870 Wireless Lan Linux Driver

First, edit config.mk file as follows so that Network Manager can be used to set WPA2 auth info:
$ vi os/linux/config.mk
Set it as follows:

# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y
# Support Native WpaSupplicant for Network Manger
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y

Save and close the file. To compile the driver, enter:
$ make
Sample outputs:

make -C tools
make[1]: Entering directory `/tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'
/tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools/bin2h
cp -f os/linux/Makefile.6 /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/Makefile
make -C /lib/modules/2.6.32-24-generic-pae/build SUBDIRS=/tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-24-generic-pae'
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/crypt_md5.o
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/crypt_sha2.o
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/crypt_hmac.o
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/crypt_aes.o
...
....
..
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/rtusb_io.o
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/rtusb_bulk.o
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/rtusb_data.o
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/cmm_data_usb.o
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/ee_prom.o
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/rtmp_mcu.o
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/rtusb_dev_id.o
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_usb.o
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_usb_util.o
  CC [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/usb_main_dev.o
  LD [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/rt2870sta.o
  Building modules, stage 2.
  MODPOST 1 modules
  CC      /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/rt2870sta.mod.o
  LD [M]  /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/rt2870sta.ko
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-24-generic-pae'

Note: You may see a LOTs of warnings during the compilation, and this is *normal* so don't panic.

Install Driver

Type the following command:
$ sudo make install
Sample outputs:

make -C /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux -f Makefile.6 install
make[1]: Entering directory `/tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux'
rm -rf /etc/Wireless/RT2870STA
mkdir /etc/Wireless/RT2870STA
cp /tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/RT2870STA.dat /etc/Wireless/RT2870STA/.
install -d /lib/modules/2.6.32-24-generic-pae/kernel/drivers/net/wireless/
install -m 644 -c rt2870sta.ko /lib/modules/2.6.32-24-generic-pae/kernel/drivers/net/wireless/
/sbin/depmod -a 2.6.32-24-generic-pae
make[1]: Leaving directory `/tmp/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux'

Install Latest Firmware

Again visit this page and download "Firmware RT28XX/RT30XX USB series (RT2870/RT2770/RT3572/RT3070)". Unzip and install the firemware:
$ unzip RT2870_Firmware_V22.zip
$ cd RT2870_Firmware_V22/
#### Make a backup of existing old firmware ####
$ mkdir -p $HOME/backup/lib/firmware
$ cp /lib/firmware/rt2870.bin $HOME/backup/lib/firmware
#### Install the firmware (for 64 bit Linux systems, you may have to use /lib64/firmware) #####
$ sudo cp rt2870.bin /lib/firmware/
##### **** backup and move existing driver, do NOT SKIP this STEP ****######
$ sudo mv /lib/modules/$(uname -r)/kernel/drivers/net/wireless/rt2870sta.ko $HOME/backup/

Update usb.ids

Type the following commands:
$ mkdir -p $HOME/backup/var/lib/usbutils
$ cp /var/lib/usbutils/usb.ids $HOME/backup/var/lib/usbutils
$ sudo wget -O /var/lib/usbutils/usb.ids http://www.linux-usb.org/usb.ids

Step #4: Configure Driver

Connect your USB device and type the following command to verify that Wireless USB LAN adapter is detected:
$ lsusb
Sample outputs:

Bus 002 Device 007: ID 0411:00e8 MelCo., Inc. Buffalo WLI-UC-G300N Wireless LAN Adapter
Bus 002 Device 006: ID 05ac:0220 Apple, Inc. Aluminum Keyboard (ANSI)
Bus 002 Device 005: ID 05ac:1006 Apple, Inc. Hub in Aluminum Keyboard
Bus 002 Device 004: ID 413c:2513 Dell Computer Corp.
Bus 002 Device 003: ID 413c:2513 Dell Computer Corp.
Bus 002 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 007: ID 413c:8160 Dell Computer Corp.
Bus 001 Device 006: ID 413c:8162 Dell Computer Corp.
Bus 001 Device 005: ID 413c:8161 Dell Computer Corp.
Bus 001 Device 004: ID 0a5c:4500 Broadcom Corp. BCM2046B1 USB 2.0 Hub (part of BCM2046 Bluetooth)
Bus 001 Device 003: ID 0a5c:5800 Broadcom Corp. BCM5880 Secure Applications Processor
Bus 001 Device 002: ID 8087:0020 Intel Corp. Integrated Rate Matching Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

/etc/Wireless/RT2870STA/RT2870STA.dat Configuration

You need to edit /etc/Wireless/RT2870STA/RT2870STA.dat file, enter:
$ sudo vi /etc/Wireless/RT2870STA/RT2870STA.dat
Set SSID (nixcraft is my SSID):

SSID=nixcraft

Set country (IN = INDIA, US = USA, etc):

CountryCode=IN

Set authentication information (do not skip this if you want WPA2 based authentication):

AuthMode=WPA2
EncrypType=TKIP
WPAPSK=YOUR-PASSWORD-HERE

See README_STA for other detailed information about each field. Save and close the file.

Step #5: Connect To the Internet

Type the ifconfig command and you should see ra0:
$ ifconfig ra0

ra0       Link encap:Ethernet  HWaddr 00:1d:73:bc:e4:6e
          inet6 addr: fe80::21d:73ff:febc:e46e/64 Scope:Link
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:5157 errors:0 dropped:0 overruns:0 frame:0
          TX packets:206 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1093810 (1.0 MB)  TX bytes:16772 (16.7 KB)

You can now connect to the Internet by clicking on Network manager ( The network-manager is the one which is found in the systray. The icon of two computers, one below to the other on the left-side). Clicking on NM-applet will give you the types of connection/hardware you have available > Select Wireless Device > Select nixcraftSSID (or scan of SSID) > Make sure you set "WPA2" as wireless security. Once connected you can browse the Internet or verify IP info:
$ ifconfig ra0
Sample outputs:

ra0       Link encap:Ethernet  HWaddr 00:1d:73:bc:e4:6e
          inet addr:192.168.1.103  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::21d:73ff:febc:e46e/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:6711 errors:0 dropped:0 overruns:0 frame:0
          TX packets:271 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:1420879 (1.4 MB)  TX bytes:22312 (22.3 KB)

Verify gateway or just ping to public ip:
$ route -n
$ ping google.com
$ ping cyberciti.biz

A Note About Kernel Upgrades

You need to reinstall the driver using the above steps.

转载于:https://www.cnblogs.com/tengyft/p/4073165.html

<think>嗯,用户报告说Linux启动失败,提示“unknown chipset”。这个问题看起来和硬件识别有关,特别是主板芯片组。首先,我得回忆一下Linux启动过程中涉及硬件检测的部分,尤其是内核模块的加载。 可能的步骤是先确认错误出现的阶段。是在GRUB阶段,内核启动时,还是系统初始化时?用户看到的提示可能来自内核,无法识别芯片组会导致相关驱动无法加载,进而影响硬件初始化,比如存储控制器、USB控制器等,可能导致无法挂载根文件系统或其他关键组件。 接下来,需要确定具体的芯片组型号。如果用户能进入救援模式或使用Live USB,可以检查lspci命令的输出,找到主板芯片组的信息。例如,运行“lspci -nn | grep -i chipset”来识别厂商和型号。如果芯片组确实比较新或冷门,可能需要更新内核到支持该芯片组的版本。 另外,考虑是否内核配置中缺少对应的模块。某些发行版可能默认不包含所有驱动,尤其是自定义内核或最小化安装时。需要建议用户检查内核配置,或者安装linux-firmware包,确保固件文件齐全。 还有一种可能是ACPI问题,有时内核与主板的ACPI实现不兼容,导致启动失败。可以尝试在内核启动参数中添加“acpi=off”来测试,但这会禁用ACPI,可能影响电源管理等功能,只能作为临时解决方案。 如果用户无法进入系统,使用Live环境备份数据,然后升级内核或安装必要的驱动可能是必要的。同时,查看系统日志(dmesg)中的错误信息,有助于更精确地定位问题。建议用户提供更多硬件细节,或者查看社区和内核邮件列表是否有相关讨论,确认是否已知问题及解决方案。</think>当Linux系统启动失败并提示“unknown chipset”(未知芯片组)时,通常与硬件兼容性或驱动问题相关。以下是逐步分析和解决方案: --- ### **1. 确认错误阶段** - **启动阶段**:该错误可能出现在: 1. **内核加载阶段**:内核无法识别主板芯片组,导致关键驱动(如存储控制器、USB控制器)未加载。 2. **初始化硬件阶段**:系统依赖的硬件(如NVMe、SATA控制器)因驱动缺失无法初始化。 --- ### **2. 原因分析** - **硬件兼容性**:主板芯片组较新或冷门,当前内核版本未内置对应驱动。 - **内核模块缺失**:系统未包含必要的芯片组驱动模块(如Intel/AMD芯片组驱动)。 - **固件缺失**:缺少芯片组所需的微码(firmware),尤其是较新的硬件。 --- ### **3. 临时解决方案** #### **方案1:尝试启用通用驱动** - 在GRUB启动菜单中编辑内核启动参数: 1. 启动时按 `Esc` 或 `Shift` 进入GRUB菜单。 2. 选择启动项后按 `e` 进入编辑模式。 3. 在 `linux` 行末尾添加以下参数: ```bash nomodeset acpi=off ``` 4. 按 `Ctrl+X` 或 `F10` 启动,测试能否进入系统。 #### **方案2:使用Live USB环境** 1. 通过Live USB启动系统。 2. 挂载原系统根分区,更新驱动或内核: ```bash sudo mount /dev/sdXn /mnt # 替换sdXn为根分区 sudo chroot /mnt apt update && apt upgrade linux-image-generic linux-firmware ``` --- ### **4. 长期解决方案** #### **步骤1:更新内核** 较新内核通常包含更多硬件支持: - Ubuntu/Debian: ```bash sudo apt install --install-recommends linux-generic-hwe-22.04 ``` - Fedora: ```bash sudo dnf upgrade kernel ``` #### **步骤2:安装芯片组驱动** - 根据芯片组厂商手动安装驱动: - **Intel芯片组**: ```bash sudo apt install intel-microcode # Debian/Ubuntu sudo dnf install intel-ucode # Fedora ``` - **AMD芯片组**: ```bash sudo apt install amd64-microcode # Debian/Ubuntu sudo dnf install linux-firmware # Fedora ``` #### **步骤3:更新固件** - 安装最新固件包: ```bash sudo apt install linux-firmware # Debian/Ubuntu sudo dnf update linux-firmware # Fedora ``` --- ### **5. 收集硬件信息** 若问题仍未解决,需提供以下信息进一步排查: 1. **芯片组型号**: ```bash lspci -nn | grep -i "chipset" ``` 输出示例: $$00:00.0 Host bridge [0600]: Intel Corporation 12th Gen Core Processor Host Bridge/DRAM Registers [8086:4660]$$ 2. **内核日志**: ```bash dmesg | grep -i "error\|chipset" ``` --- ### **6. 其他可能性** - **主板固件(BIOS/UEFI)过旧**:更新主板固件可能解决兼容性问题。 - **自定义内核问题**:若使用自编译内核,需确保配置中启用了对应芯片组驱动(如 `CONFIG_PCI`、`CONFIG_X86_INTEL_LPSS`)。 --- ### **总结流程** 1. 尝试临时启动参数进入系统。 2. 通过Live USB更新内核和固件。 3. 根据芯片组型号安装驱动。 4. 提供硬件详细信息以进一步排查。 若问题依然存在,建议在社区(如Ask Ubuntu、Reddit)或芯片组厂商支持页面提交详细日志。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值