Saturday 2 February 2008

Realtek 8168B network cards and Ubuntu 7.10

Rather than buying a server off the shelf for the Community Centre I've decided to build a server from scratch.

The motherboard I chose for the server was an MSI P35 Neo2-FR motherboard. The board is based on the Intel P35 chipset, includes two 16x PCI Express slots (although one of them runs at 4x speed) and it's ready for the latest quad core and next generation of Core2 CPUs.

I decided on this board because of the good reviews on Tom's Hardware Guide, plus I have one of these boards in my own PC.

What I didn't realise though was the issues encountered with the on board network and Ubuntu 7.10.

It seems that Ubuntu 7.10 picks the wrong driver (r8169) which works put doesn't perform very well.

So after much searching I found a rather useful post on the Ubuntu Forums here.

Basically what you have to do is download the driver for the card from Realtek's web site here (select the Linux driver for kernel 2.6.x and 2.4.x (support x86 and x64).

I was a bit worried about the driver being some closed source binary blob but I'll give credit to Realtek, the driver is released under the GPL and includes source!

So when you've downloaded the driver, untar it (the filename may change depending on which driver version you download)...

# tar xfvj r8168-8.005.00.tar.bz2

Change to the directory where the driver is...

# cd r8168-8.005.00

Run the following commands to make the driver and test it works...

# make clean modules
# make install
# depmod -a
# insmod ./src/r8168.ko

Check if the driver is loaded...

# lsmod | grep r8168

I get the following output on my machine

r8168 37520 0

# ifconfig -a

This should list the network card (although when I installed the driver I was already running the r8169 driver which was the incorrect driver).

Now you need to install the driver. Rename the r8169 driver so it's not loaded at boot up.

# mv /lib/modules/`uname -r`/kernel/drivers/net/r8169.ko /lib/modules/`uname -r`/kernel/drivers/net/r8169.ko.old

(The above command should be on one line!)

# depmod -a

Now backup the current ram disk image and make a new one.

# mv /boot/initrd.img-`uname -r` /boot/initrd.img-`uname -r`.old
# mkinitramfs -o /boot/initrd.img-`uname -r`

Now reboot the machine, all being well the new driver should load.

You can check this by opening a terminal and entering...

lsmod | grep r8168

It should hopefully display the r8168 module.

If anything goes wrong, just follow these steps to enable the old driver.

# mv /lib/modules/`uname -r`/kernel/drivers/net/r8169.ko.old /lib/modules/`uname -r`/kernel/drivers/net/r8169.ko

# mv /boot/initrd.img-`uname -r`.old /boot/initrd.img-`uname -r`

Hopefully this will help anyone else who's bought a new motherboard which has a Realtek 8168/8111 network card on board.

Rob

Monday 28 January 2008

The project is taking shape

Well after a break over Christmas the project is starting to take shape at the Exwick Community Centre.

We've been brainstorming on how best to install things and what we need. Now all we need to do is get a shopping list together put in the grant application. Hopefully by Friday the final grant application will be ready to post.

Saturday 27 October 2007

New Blog

Hi folks,

Welcome to my new blog. The aim of this blog is to record the progress of a project I am involved with which aims to help bridge the digital divide and get computer suites based on Linux into small Community Centres in the Devon & Cornwall area.

Now some of you reading this may be wondering what Linux is, well rather try and explain what it is, it might be a good idea for you to check out the rather good articles here.

Now there have been a few discussions on the Devon & Cornwall GNU/Linux User Group mailing list about suitable locations where the members can meet up, discuss things to do with Linux and Free Software and optionally hold talks, demonstrations and install days. Now during the discussions ideas have been chucked around about helping provide computers running Linux to local community centres and other organisations. Part of the aims of this is to provide access to the Internet and e-mail to visitors of these centres, promote the use and benefits of Free and Open Source Software and to make use old older machines that normally would end up in land fill.

So, watch this space for more information about the current project which is starting to take shape and further posts about how we got to this point.

Proof of concept testing

Okay, so since my last post a couple of hours ago I've been having a play around with the client machines I have waiting to be deployed.

We're hoping to base the machines on the Linux Terminal Server Project (LTSP). Using LTSP enables us to take old machines which are too old to be used as standalone machines and give them a new lease of life. The old machines act as 'dumb terminals' which relay keyboard and mouse commands to a server and display an output on the screen. The server (or servers) do all the processing and have to be a bit faster. They run the applications such as the web browser, e-mail client and office suite, take commands from the clients, process them and then send the results back to the clients.

The Server

As I didn't have a spare machine which I could use as a server I decided to install the LTSP software on a spare laptop. The laptop is a fairly reasonable machine with a 1.8GHz Pentium M processor and 1GB of ram running Ubuntu Linux 7.04. It would be similar to the sort of laptop you could pick up for about £350.

The Client

The client machine was one of 15 machines which were kindly donated by one of the members of the Devon & Cornwall Linux User Group. The machine appears to be about 7 years old and not really up to the job of running the latest and greatest software. It has an AMD K6/2 processor running at 450MHz (wow, I remember when they were the bees knees) with 256MB memory, a 10GB hard drive and a 100Mbit network card.

Setting it all up and booting up

Since the client runs completely over the network, it's hard drive is fairly redundant. I did however make use of it to boot the machine up. To get it to boot, I downloaded a customised version of Etherboot from the Rom-O-Matic site. Etherboot allows the machine to boot from the network and is really handy if you don't have an up to date machine which supports network booting out of the box. Once Etherboot was installed (on the internal hard drive due to not having any blank floppy disks), it finally started to boot up.

The actual boot process took about 30 seconds. I was greeted with a slightly pale Ubuntu logon screen. I was then able to login and everything from then on was running on the laptop.

Using the client is pretty much like using a normal machine except if it hasn't got any fans it is much quieter. I did find that most tasks like web browsing, e-mail and Open Office worked fine with no major slowdown. I then went on to try something which I didn't expect to work - video playback.

I was actually surprised that video playback did work. It seemed a little bit slower than normal although without any sound I couldn't really confirm that. Now this was one machine attached to another machine so it's possible that with 10 machines all running on the server it might not cope so well.

My last test before shutting down for the evening was Flash. I fired up the Badger Badger Badger website. Unfortunately the client and the server didn't like it one bit. The playback was choppy and fairly unresponsive. The client machine couldn't keep up with re-drawing the screen so quickly and I don't think the server coped too well either.

So, it's a promising start. I've managed to get one client and server running to make sure the machines I have are going to work. The next step will be testing the rest of the machines to make sure they're all okay and seeing if a quicker client machine makes any difference.

Well that's all for now. Check back soon for more.