Jimmy's weblog

1/28/2005

Linux vserver on Debian woody

Filed under: — jimmy @ 2:14 am

The last days I spent a lot of time for configuring a virtual Linux server. After some playing I decided to setup a woody server with Software RAID and the Linux vserver kernel patch. This time I tried to use mdadm for creating the degraded array. This should work with a command line, like this:
“mdadm -C /dev/md0 –level raid1 –raid-disks 2 missing /dev/hdc1″ (It is written this way in almost every HowTo that I found). But missing is not a switch to tell mdadm that /dev/hdc1 is missing… missing is a replacement for the missing device, so the command line reads: “Create array with /dev/hdc, the other device is missing”. I found that hint on a page about SATA-RAID and I was very happy that I was not the only one, who was confused ;-)

Now my system was ready to be configured. First, I wanted to apply the kernel patch for linux-vserver but 2.4.19 is too old. I installed the source for 2.4.27 from backports.org and the debian package “kernel-patch-vs”. The patch applied cleanly and after a few minutes of compile time I had a package for my new kernel. There are also debian packages for the userland tools “vr-tools” and “util-vserver”. For woody you have to download backports and unofficial packages, here you will find them all listed.
I had a few problems to create the first virtual server with the vserver tool. I decided to skip this step and downloaded a nice script, called debian-newvserver. It automatically creates a new vserver and downloads all necessary debian packages. It worked perfectly and the vserver was running :-)

1/21/2005

Wake-On-LAN

Filed under: — jimmy @ 8:34 pm

Today I enabled the Wake-On-LAN (WOL) feature on my workstation (Gigabyte nforce2 board). There are a two important things to check, otherwise it won’t work:

  • Enable WOL in the BIOS
  • Check if WOL is enabled on the NIC after booting Linux

My motherboard has an onboard NIC, so I don’t have to use a WOL-cable. But I didn’t know that the BIOS settings for onboard NICs and NICs with attached WOL-cable are different! This page helped me a lot, there’s a lot of information about WOL and how it works. So if you have an onboard NIC you have to enable “Wake on PME”, not “Wake on LAN”!
The next important step is to check the settings of the NIC after Linux has booted and loaded the driver for the NIC. There’s a tool called ethtool to do the job (run as root):

reptile:~# ethtool eth0
Settings for eth0:
        Supports Wake-on: g
        Wake-on: d
        Link detected: yes

“Wake-on: d” means, that WOL is disabled, “Supports Wake-on: g” means, that the NIC supports WOL with magic packets (“man ethtool” for more information about the abbreviations).
So we have to enable WOL, again.

reptile:~# ethtool -s eth0 wol g
reptile:~# ethtool eth0
Settings for eth0:
        Supports Wake-on: g
        Wake-on: g
        Link detected: yes

This change is lost after the next reboot, so we have to make it persistent. I didn’t find any parameter for the forcedeth module to enable WOL, so I just added the command (ethtool -s eth0 wol g) to /etc/init.d/bootmisc.sh.
Now I can start my workstation by executing the following command on another machine:

etherwake -i eth1 00:0D:61:06:EE:DE

To make it a little bit simpler I created the file /etc/ethers, containing this line:

00:0D:61:06:EE:DE reptile

Try “man ethers” for more information.
Now I only have to type:

etherwake -i eth1 reptile

1/20/2005

Some fun during work

Filed under: — jimmy @ 10:59 pm

While I was waiting for mkisofs to finish the iso-image I took some time to read my favorite blogs. I discovered a nerd test and I couldn’t stop myself from finding out my score :-)

I am nerdier than 97% of all people. Are you nerdier? Click here to find out!

Don’t know if I should be proud or depressed ;-)

1/3/2005

Fighting spam with authimage

Filed under: — jimmy @ 8:09 pm

I’ve been very busy the last two months, so there was no time left for my weblog :-( I was very angry about a lot of spam attacking my weblog. I was advised to use authimage. This plugin displays an image with some random text that has to be entered in order for a comment to be accepted. Today I installed the plugin, it only took me about five minutes. I’m confident that things well be better now :-)