Fixing a broken Ubuntu upgrade

My main Ubuntu workstation is a desktop computer, but with a nice twist. It has both a wired and a wireless network card. About a year ago, I moved into a new office, far away from a network wall jack, and decided to put the wireless card to work. It was a nice solution that worked well. That is, until I upgraded from Ubuntu 11.04 to 11.10. While the wireless network connection was fine under 11.04, when I rebooted from the operating system upgrade to 11.10, I discovered the wireless card did not function. This article describes how I fixed it.

[ Enter ITworld's drawing to win a copy of Ubuntu Unleashed: 2012 Edition ]

Knowing your hardware

Before I could do anything, I needed to learn a bit about my hardware; specifically, what model wireless network card I had. This is easily accomplished using a few commands in the terminal.

We start with the

command, which is a utility that provides information about NetworkManager, device, and wireless networks.

Note: For all examples, I am logged in as matthew on a computer named seymour (after Seymour Cray) and am issuing the commands shown in bold. Output follows the commands. The output may be abridged for space, but all important details are shown.
matthew@seymour:~$ nm-tool
NetworkManager Tool  
State: disconnected
 - Device: ra0  ---------------------------------------- 
  Type:              802.11 WiFi 
  Driver:            rt2800pci 
  State:             disconnected 
  Default:           no 
  HW Address:        E0:69:95:29:06:FD 
  Wireless Properties 
    WEP Encryption:  yes 
    WPA Encryption:  yes 
    WPA2 Encryption: yes 
  Wireless Access Points (* = current AP) 
  IPv4 Settings: 

Here you can see that the 802.11 WiFi network interface is named

and is disconnected. It is using the
driver. That raises the question as to whether it is the correct driver for the hardware I have on the machine.

We can check the hardware model using the

command, which is a utility to list hardware devices and details about them. We need to use
requires super user privileges. The -C network part of the command limits the output to networking devices.

matthew@seymour:~$ sudo lshw -C network
[sudo] password for matthew:  
       description: Wireless interface 
       product: RT2860 
       vendor: Ralink corp. 
       physical id: 0 
       bus info: pci@0000:01:00.0 
       logical name: ra0 
       version: 00 
       serial: e0:69:95:29:06:fd 
       width: 32 bits 
       clock: 33MHz 
       capabilities: pm msi pciexpress bus_master cap_list ethernet physical wireless 
       configuration: broadcast=yes driver=RALINK WLAN driverversion= ip= latency=0 multicast=yes wireless=Ralink STA 
       resources: irq:16 memory:f7ff0000-f7ffffff

Two devices were found, but I do not include the information from my wired network device in the output above, just to save space.

What we learn above is that my device is an RT2860 from Ralink corp. This is similar, but not identical to the name of the driver from the previous command, rt2800pci. The wrong driver was installed, and this is the cause of my inability to use the wireless network card.

Finding the correct driver

What I did was search the internet using the terms "linux driver rt2860." I found the official Ralink company website and driver download location and downloaded the correct driver -- it is listed as

. The site requires that you enter your name and email address, but the driver download is free of charge. Download the provided tar file and unpack the archive wherever you like (for example, I did it in

matthew@seymour:~$ tar -xvf 2010_07_16_RT2860_Linux_STA_v2.4.0.0.tar

If you download a newer version of the driver, the filename will reflect that and will therefore be a bit different.

Installing the driver

The driver is made available is source form, and it must be compiled and installed. This section lists the steps I needed to take to install and use this driver.

Note: To compile and install the driver, you must have a compiler and kernel headings installed. You may install these by installing the build-essential package from the Ubuntu software repositories, using this command or your favorite alternative method:

matthew@seymour:~$ sudo apt-get install build-essential
1 2 Page 1
Page 1 of 2
ITWorld DealPost: The best in tech deals and discounts.
Shop Tech Products at Amazon