How to Enable Netgear WG311v2 in Ubuntu 9.10
There is no out of the box support for Netgear WG311V2 wireless PCI card in Ubuntu 9.10 (Karmic Koala). However using Windows drivers and ndiswrapper package it is possible to get it running under Ubuntu.
What is ndiswrapper?
ndiswrapper is a free software driver wrapper written for Linux systems. It enables Linux to access network devices using drivers written for Windows operating system. So to enable NetGear WG311v2 in Ubuntu 9.10 using ndiswrapper you need the Windows driver provided by Netgear. Also note that the technique works on a wide range of network cards.
Getting Netgear WG311v2 Windows driver
You can get the latest WG311v2 Windows driver from here (15.7MB zip file). Download it and then extract the files contained in it. You find a folder named “Windows XP” inside the “driver” folder. This contains drivers required for Windows XP. The files contained are FW1130.BIN, FwRad16.bin, FwRad17.bin, netwg311.cat, netwg311_XP.sys and wg311v2.inf.
Copy all the files mentioned above to a folder under your home directory. In my case I copied them to /home/jayson/wg311v2.
Getting ndiswrapper
If your Ubuntu machine has Internet access you can download ndiswrapper directly from Ubuntu repository.
sudo aptitude install ndiswrapper-common ndiswrapper-modules-1.9 ndiswrapper-utils-1.9
However in my case I was unable to access Internet since the only way to access Internet was to use WG311v2 itself. So the second option is to download ndiswrapper source code and then compile it to create ndiswrapper executable.
Download ndiswrapper source code from here. I downloaded version 1.55 (ndiswrapper-1.55.tar.gz). Extract this to a folder inside your home directory. In my case I had it under /home/jayson/ndiswrapper-1.55.
Now let us compile ndiswrapper to create the executable.
change to the directory containing ndiswrapper source code.
cd /home/jayson/ndiswrapper-1.55
compile ndiswrapper
sudo make install
At this point you may get the following error.
home/jayson/ndiswrapper-1.55/driver/ntoskernel.h: In function ‘PushEntrySList’:
/home/jayson/ndiswrapper-1.55/driver/ntoskernel.h:905: error: implicit declaration of function ‘cmpxchg8b’
This is a bug related to ndiswrapper on latest Ubuntu. The quickest fix is to open ntoskernel.h file inside ndiswrapper-1.55/driver and then change the line 878 as follows (31 is changed to 32),
old line,
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,31)
new line
#if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,32)
Use gedit to edit the file since it shows line numbers at the bottom. Now run sudo make install again to compile ndiswrapper.
Now change to the directory where you stored Windows XP drivers for WG311v2.
cd /home/jayson/Windows XP
Install the driver using ndiswrapper. In this case the main driver configuration file is wg311v2.inf.
sudo ndiswrapper –i wg311v2.inf
Now verify installation using the command,
sudo ndiswrapper –l
If everything does well you should see a message similar to the following,
wg311v2 : driver installed
device (104d: 8088) present
Now click on the network manager on the top panel. You should see a new option “Connect to Hidden Wireless Network” at the bottom. Click on it to connect to your wireless network!
Notes
- Please note that Netgear WG311v2 is different from WG311v1 and WG311v3. WG311v2 contains Texas ACX111 chipset.
How to Enable 3G Modem USB Dongles (EC1260 etc.) in Ubuntu 9.10
Unfortunately Ubuntu 9.10 initial release had a bug which rendered a number of 3G modem based USB dongles useless. The Linux kernel refused to recognize the USB based 3G modems and it affected a wide range of modems including Huwei and ZTE models. For example, Reliance NetConnect Broadband+ service in India uses EC1260 modem which was not recognized by Ubuntu 9.10 (Tata Photon+ also uses a similar device). Even the most recent update (as of 25th Nov 2009) of Ubuntu 9.10 (Karmic Koala) has this bug.
Clearly people who manage Ubuntu distribution has no idea how prevalent USB 3G models are! For example, In India everyone one is switching over to 3G USB modems.
There is a quick fix to this problem. It involves using a patched Linux kernel (2.6.31-16-generic). The patched kernel can be downloaded from this link. You need to download the following patches and install them using package manager. Double click the downloaded files to install them.
Kernel patch – Linux headers (32 bit)
Kernel patch – Linux image (32 bit)
Restart Ubuntu after installation. Now your 3G USB modem will be recognized by Ubuntu! However I was still unable to get it working using the default network manager of Ubuntu. I had to use the command line wvdial ppp dialer and finally EC1260 was up and running.
Configuring your 3G USB Modem using wvdial command
Step 1: Install wvdial package
sudo aptitude install wvdial
Step 2: Configure USB modem using wvdialconf
sudo wvdialconf
This will create wvdial.conf file in /etc/ folder. However the username/password entries will be missing. You need to add them in wvdial.conf. Following is the sample wvdial.conf file for Reliance Netconnect Broadband+ modem EC1260,
[Dialer Defaults]
Modem = /dev/ttyUSB0
Init1 = ATZ
Init2 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
CBaud = 460800
Stupid Mode = 1
Modem Type = Analog Modem
Phone = #777
New PPPD = yes
ISDN = 0
Username = 934xxxxxxx
Password = 934xxxxxxx
Baud = 9600
Step 3: Enter your username/password in wvdial.conf file. I use gedit to edit the file.
sudo gedit /etc/wvdial.conf
Step 4: Start wvdial to connect to Internet
sudo wvdial
If everything goes well you should see output similar to the following,
jayson@jjc:~$ sudo wvdial
[sudo] password for jayson:
–> WvDial: Internet dialer version 1.60
–> Cannot get information for serial port.
–> Initializing modem.
–> Sending: ATZ
ATZ
OK
–> Sending: ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
OK
–> Modem initialized.
–> Sending: ATDT#777
–> Waiting for carrier.
ATDT#777
CONNECT
–> Carrier detected. Starting PPP immediately.
–> Starting pppd at Wed Nov 25 21:32:49 2009
–> Pid of pppd: 4103
–> Using interface ppp0
……………….
Run Multiple Operating Systems in Ubuntu 9.10 Using VirtualBox
VirtualBox is a virtualization software from Sun Microsystems which allows you to run multiple operating systems using virtual machines. In this article I will show you how you can use VirtualBox to run Fedora 12 operating system inside a Ubuntu 9.10 installation. VirtualBox is a cool tool if you want to experiment with a lot of operating systems without installing them in a partition. Best of all, it is free!
How to install VirtualBox in Ubuntu 9.10
- Using Firefox visit VirtualBox download page.
- Click on VirtualBox 3.0.12 for Linux hosts (the version number may be different). Here you will see Ubuntu 9.10 VirtualBox packages for 32-bit/64-bit installations.
- Click on the correct package link to install it (I have a 32-bit system and hence the package installed was – http://download.virtualbox.org/virtualbox/3.0.12/virtualbox-3.0_3.0.12-54655_Ubuntu_karmic_i386.deb)
- The package size is about 40MB and after download, Firefox will invoke Ubuntu package manager as shown below.
- Click on Install Package to complete the installation of VirtualBox. Ubuntu package manager will download additional packages required(if any). After installation, VirtualBox configuration will ask for vboxdrv kernel module compilation. Select the option and click on Forward.
If all goes well, you will find VirtualBox program under Applications –> System Tools –> Sun VirtualBox. Click on the icon to run VirtualBox.
How to install Fedora 12 in a VirtualBox running on Ubuntu 9.10
Now that we have got VirtualBox up and running in Ubuntu, let us try installing Fedora 12 inside VirtualBox.
- Run VirtualBox (Applications –> System Tools – > Sun VirtualBox)
- Click on “New” option
- Select Virtual Machine name and operating system type as shown below,
- In the next screen configure the RAM for the Fedora virtual machine. Ensure that this is less than half of the total RAM you have in your machine. I usually keep this between 512MB and 1024MB for Fedora (I have a 2GB Toshiba laptop)
- Now in the next step create a virtual disk. This disk will appear as a normal file in your Ubuntu installation and will appear as a hard disk to the Fedora installed inside VirtualBox.
- To effectively utilize your disk space I recommend selecting dynamically expanding storage with a default size of 8GB. This ensures that your virtual disk file will grow depending on the space required by Fedora and the maximum size is limited by 8GB.
- After clicking on Next and Finish, you will see your new virtual machine in the VirtualBox (in this case the first option “Fedora”). After selecting your virtual machine, click on “Settings”.
- Select CD/DVD-ROM options from settings. Then click on Mount CD/DVD Drive option and then select ISO Image File. This assumes that you have downloaded Fedora 12 Live CD somewhere in your Ubuntu folders. If you have Fedora in a CD, select the “Host CD/DVD Drive” option.
- Click on OK and then select “Fedora” from the VM list in VirtualBox. Click on the “Start” option to boot the Fedora Live CD inside the Fedora virtual machine. If everything goes well, you will have Fedora 12 up and running in a VirtualBox under Ubuntu (see below).
- You can now click on “Install to Hard Drive” to install Fedora 12 on to the virtual disk. You no longer need the live cd image once you have installed Fedora to the virtual disk.