September 4, 2006

Linux and Counter Strike: Source

Posted in Gaming, Geeky at 20:36 by djn

My brother is in a CS clan called DV. They wanted to host their own CS servers. With hardware for about 15.000kr and a dedicated line at jay.net they thought they had what they needed. The server is installed with Ubuntu 6.06 server.

However, it would only provide about 50fps no matter how the CS server was configured. Scouring the net, they discovered that they needed to recompile the kernel with 1000hz support instead of 100hz (default). But they did not have the needed Mad Linux Skillz. So my brother asked me if I would do it. And so I did. Read more for a tale of Counter Strike and linux!

So, gaining root access to the server, the following packages needs to be installed, via apt-get:


apt-get install linux-source-2.6.15 build-essentials libncurses5-dev

After installing these, untar the kernel code:


root@dv:/# cd /usr/src/
root@dv:/usr/src# tar xvjf linux-source-2.6.15.tar.bz2

Change to the kernel directory and copy the running kernel configuration for modification:


root@dv:/usr/src# cd linux-source-2.6.15
root@dv:/usr/src/linux-source-2.6.15# cp /boot/config-2.6.15-26-server .config
root@dv:/usr/src/linux-source-2.6.15# make menuconfig

In the menu provided by that last command select processor type and features and about 30 lines down, select the Timer frequency and set that to 1000hz. Save and quit the configuration tool. Also, to avoid a kernel compilation failure, I had to deselect a USB network driver. Do so by, from the first menu shown, select device drivers -> Usb Support -> Usb Network Adapters and make sure the USB ZD1211 adapter is not compiled. I just deselected them all. Save and quit again.

Now, to build the kernel issue the following command (on one line):


root@dv:/usr/src/linux-source-2.6.15# make-kpkg --initrd --revision 1 \
--append-to-version djn  kernel_image kernel_headers

And wait until the compile completes. Can take awhile. To actually install the kernel do this:


root@dv:/usr/src/linux-source-2.6.15# cd ..
root@dv:/usr/src# dpkg -i kernel-image-2.6.15.7-ubuntu1djn_1_i386.deb

Now to actually use the kernel, all that is needed is a reboot and then select the kernel from your favourite bootloader šŸ™‚

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: