Fix Dell Vostro v130 Gigabit Ethernet in Ubuntu 10.10

If you, like me, have experienced some issues with the internal network interface shipped with the Dell Vostro v130 notebook, you should take a look at this post.

I noticed that my v130 seems to hang as network traffic on the internal gigabit ethernet interface increased. It seems that others were having the same issue.

I first tried updating the BIOS from version 3 to 4 (v4), and now I was able to do a PXE install from a local mirror. But when running a large file copy operation through the interface, the kernel locked up again.

I went on the web and found a new driver from the network card manufacturer, and tried installing this. This did not immediately fix the problem due to an error in the kernel shipped with Ubuntu 10.10, the kernel selects the wrong module while booting the OS. The kernel loads the r8169 module while the interface module from RealTek are named r8168.

What seems to have fixed the problem was to blacklist the r8169 module and tell the operating system to load the r8168 module instead.

If you need a detailed walk through, read on, if you have another solution, please post a comment for me to read.

— walk through —

Fetch the driver from RealTek on this (choose Linux driver in the UNIT section) page, and save it to a local folder.

Unpack the file

$ tar vjxf
$ cd
$ sudo ./

The driver will now compile and install itself onto your system.

Next, we will blacklist the r8169 module so it doesn’t load during system boot. Edit /etc/modprobe.d/blacklist.conf and add the following line to the end of the file:

blacklist r8169

Now, to load the correct module during boot, edit the /etc/modules file and add the following to the end of the file:


Now, reboot your computer and when up, do a lsmod and check that the r8168 module is loaded.

If it is, you should be able to ifup eth0 and use your network interface without hangs or crashes – ENJOY!

Add cakephp .ctp filetype to vim

Vim currently does not know that a .ctp file used for cakePHP’s view files are really just php files, so we need to tell it.

The solution is very simple and goes like this:

  • Open your .vimrc file (~/.vimrc), and add the following
syntax on
filetype on
au BufNewFile,BufRead *.ctp set filetype=php

And you are done ūüėÄ

This will work for every special filetype you’d like, just change the *.ctp and =php definition from above to match your preferences.

Sygard.nos new server!

Sygard.nos new server!

I’m happy to¬†announce¬†that is running on a new server! has previously been hosted on a Virtual Machine in a hosting center in Germany. This machine had limited amount of available processing power and disk-space, but it was the small amount of memory which was the  most limiting factor (300MB). The virtual machine was running the standard LAMP applications (Apache2, MySQL and PHP), in conjunction with Bind9, Postfix, Dovecot and some other small programs, which left minimal available memory for other tasks. From a fresh reboot, the available amount of memory was around 20 Р30 MB. Mind you, both Apache2 and MySQL were tweaked to get a smaller memory footprint, but still, the amount of used memory was too much, especially since it did not have a swap-partition.

As a programmer, I enjoy creating applications over several different platforms, all communicating with¬†each other¬†over a common protocol. While writing a server¬†back end in C probably gives you one of the fastest implementations of a server (fastest as in best CPU/memory utilization), the process can be long and demanding compared to higher level languages such as Java and Python. While Python is great for small tasks, I prefer Java for the more complex applications. Running Java programs requires the Java Runtime Environment and the Java Virtual Machine to be installed and working on the target platform, and this is where the Virtual Machine started to give up. Just starting the JVM requires about 80ish MB of memory, and that’s just for writing “Hello World!” to the standard output, which was more memory than I had available. I successfully started JVM a few times, but that¬†meant¬†stopping the Apache2 and MySQL daemons, which was unacceptable. I only tried Suns version of the JVM (version 6) though, maybe other implementations doesn’t require that much memory? In any case, I needed more.

I could, of course, upgrade my Virtual Machine to a more powerful one, but the prices quickly became quite large compared to the power they provide. So, after some consideration, I decided to get me my own physical server.

I am a big fan of virtual machines, and as long as they have a reasonable amount of system resources, I gladly use it for my services. It was important to me to be able to run one or more virtual machines on the server, so the main hardware requirements was memory and a CPU able to run some sort of virtualization, like the Intel Virtualization Technology. I also wanted some hard disk redundancy, so two or more harddisks in a RAID configuration was high on the list of requirements.

I started looking for servers from and other resellers of used hardware, but quickly discovered that the prices was a little over my budget. I got a suggestion to look for new middle-ranged server hardware at, but with the same result. I had almost given up on my dream of having my own server until I remembered that there was something called After browsing through almost 30 pages of items, I had discovered three sellers selling the type of hardware I wanted, more or less.. I sent them an email and luckily, one of them was still for sale. I did some research and found out it had almost everything I wanted!

  • Supermicro SYS-6015V-TB Dual Dual-Core Xeon 2xSATA (hot-swap)
  • 2 x Intel Dual-Core Xeon processor 5060 3.20Ghz
  • 2 x STT 2GB FBDIMM 667MHz ECC (total of 4Gb RAM)
  • WD Caviar 320GB 7200RPM 16MB SATA 3Gb/s
  • 3ware Escalade 8006 2-port SATA/150 RAID Controller – PCI-X, SATA

As you can see, the hardware is quite good (for a 3+ year old machine), although, the amount of memory is a little too low for my needs, I decided it would be enough and went for it. A day later, the server was sitting in my living room! I started it up, and everything worked perfectly!

I installed Xen Server 5.5, which installed without any troubles and started testing. I did consider VMWare ESXi, but felt Citrix Xen Server had more to offer then the free version of VMWare ESX. I quickly found out though, that the amount of memory was a little low, so I went and bough an additional 4GBs and installed it into the available slots giving a total of 8GBs of RAM.

After configuring the server for a few days (yes, I’m new to Xen Server…), I felt it was time to move it to a more permanent location.

I friend of mine runs his own hosting firm here in Oslo,, and offered to host my server in one of his hosting locations, which I gladly did! The server was installed and hooked up to the interned through a 100Mbit link with with direct connection to the Norwegian Internet eXchange (NIX)¬†network ūüėÄ

The server is currently running 4 virtual machines, one Windows Server 2003, and three Debian Lenny GNU/Linux. It does this with ease, and I would think it could run in¬†excess¬†of 10+ virtual machines, as long as they are running Linux. The windows machine is there mainly to run Xen Center, and I must say, I don’t feel good about having a Windows machine directly connected to the internet… Don’t exactly know why, I just don’t trust it…

All in all, I’m very happy with the result, and hope it will deliver services for years to come!

I’ve added some images of the server if anyone is¬†interested¬†ūüėÄ

Distance to horizon

The past weekend, being on a cruise ship with the family – the discussion of “how far out is the horizon?” eventually came up. We were sitting in one of the ships dining halls in deck 6 guessing the distance, and the ranges went from 1km upwards.

After arriving home that sunday, I just had to find out which one had the correct distance.

When I examined the facts, my initial thought were confirmed. The horizon is actually quite near when you find yourself close to the sea level with no obstacles, just water.Distance to horizon

I calculated that sitting on deck 6, we would be approximately 20 meters above sea level and used this in my calculations.

Google kindly provided me with the earth radius R = 6378137m and with some simple Pythagoras I came up with this ( x is meters above sea level):

distance = sqrt ( pow ( R + x, 2 ) – pow ( R, 2 ) )

So from our dining table window, the distance to the horizon were approximately 16km out.

I even made a little python script calculation the distance given the height above sea level as an argument – Distance to horizon

Other values of x ( meters above sea level )  gives the following distances.

1m = 3.5km

2m = 5km

10m = 11.2km

50m = 25km

100m = 35.7km

1km = 112km

10km = 357km

100km = 1133km

Keep in mind that these distances will be from the height you specify down to the horizon in a straight line, which means that the distance will keep incrementing as you go higher. At a given point, you will actually not be able to see further, as you cannot see around the globe in a curved line. The maximum length of which you can actually see is 1/4 of the earth circumference, which is about 10,000km.