Workaround for the Ubuntu problem with KVM switches
August 26, 2009
It seems that Ubuntu not only Karmic (9.10), but also older versions have a problem with KVM (Keyboard, Video, Mouse) switches. To be exact the problem is the auto-detection of the capabilities of the monitor. If you connect the monitor directly to the computer everything works, if you use a KVM switch you get only 800×600 as the maximum resolution.
The workaround is to tell the xserver the Horizsync and Vertrefresh the monitor really supports. With older Ubuntu versions you could just add following lines (for a 1280×1024 LCD) to your /etc/X11/xorg.conf
in the monitor section:
Section "Monitor"
.....
Option "DPMS"
Horizsync 31.5-64.0
Vertrefresh 56.0 - 65.0
.....
EndSection
But starting with Karmic Ubuntu has no /etc/X11/xorg.conf
file by default anymore. So what we need is a complete minimal xorg.conf
file so we can include our 3 lines, but we don’t want to mess anything else up. This is the minimal config I came up with.
Section "InputDevice"
Identifier "Generic Keyboard"
Driver "kbd"
Option "XkbRules" "xorg"
Option "XkbModel" "pc105"
Option "XkbLayout" "de"
Option "XkbVariant" "nodeadkeys"
EndSection
Section "InputDevice"
Identifier "Configured Mouse"
Driver "mouse"
EndSection
Section "Device"
Identifier "Configured Video Device"
EndSection
Section "Monitor"
Identifier "Configured Monitor"
Option "DPMS"
Horizsync 31.5-64.0
Vertrefresh 56.0 - 65.0
EndSection
Section "Screen"
Identifier "Default Screen"
Monitor "Configured Monitor"
Device "Configured Video Device"
SubSection "Display"
Depth 24
Modes "1280x1024" "1024x768"
EndSubSection
EndSection
Section "ServerLayout"
Identifier "Default Layout"
Screen "Default Screen"
InputDevice "Generic Keyboard"
InputDevice "Configured Mouse"
EndSection
Except the Keyboard stuff the should be nothing thats not minimal. Maybe it is also possible to remove some lines there, but I didn’t test it. I was happy that it worked this way ;-). If you’ve an even more minimal config write a comment please!
Fast test if local mail works on a server
August 25, 2009
I just helped a friend whose server did not send cron mails to his mail server, which is this case led almost to data loss as the backup didn’t work correctly. I looked at the setup and I though I found the problem and correct it, but now I wanted to test it as easily as possible. Therefore I typed following command:
echo "Subject: test" | sendmail -v root
Then I looked if the lokal MTA, in this cache ssmtp delivered the mail to mail server. I though at least I find this line again if I search my blog and maybe it helps someone else too.
The Search for reduced SPAM load – Part 3
July 29, 2009
Take a look at
to understand purpose of this series and what I’m looking for. As only firewalling spammers which are in a DNS RBL after they got a 5xx didn’t worked as hoped I had an other idea.
Instead of only firewalling the spammer I thought as there will be no packet from the spammer within the 30sec timeout why not just terminate the process which handles the connection. This leads to a reduced process number at once and makes space for a new one. A clean solution would implement my complete script in the mta itself – basically adding the IP to the firewall and terminating the smtp handling process. But for a mere test it would be easy to extend my script to kill the current process.
This python script (watchForSpammers2.py) does exactly that – It extends the old script by searching through the process list for a submit
progress which handles the spammer connection. It follows the ppid and kills with a SIGTERM
the parent courieresmtpd
process.
You say thats a hard method? And you asked yourself if it works – yes it does.
After some testing I implemented it on the productive server and I’ve it running for a few days now and I didn’t reach the maximum of 300 connections since.
e.g. take a look at this spam wave
Tue Jul 28 08:30:51 CEST 2009 5
Tue Jul 28 08:30:56 CEST 2009 8
Tue Jul 28 08:31:01 CEST 2009 7
Tue Jul 28 08:31:06 CEST 2009 2
Tue Jul 28 08:31:11 CEST 2009 3
Tue Jul 28 08:31:16 CEST 2009 4
Tue Jul 28 08:31:21 CEST 2009 13
Tue Jul 28 08:31:26 CEST 2009 100
Tue Jul 28 08:31:31 CEST 2009 77
Tue Jul 28 08:31:36 CEST 2009 48
Tue Jul 28 08:31:41 CEST 2009 31
Tue Jul 28 08:31:46 CEST 2009 32
Tue Jul 28 08:31:51 CEST 2009 39
Tue Jul 28 08:31:56 CEST 2009 34
Tue Jul 28 08:32:01 CEST 2009 19
Tue Jul 28 08:32:06 CEST 2009 19
Tue Jul 28 08:32:11 CEST 2009 18
Tue Jul 28 08:32:16 CEST 2009 18
Tue Jul 28 08:32:21 CEST 2009 16
Tue Jul 28 08:32:26 CEST 2009 15
Tue Jul 28 08:32:31 CEST 2009 13
Tue Jul 28 08:32:36 CEST 2009 14
Tue Jul 28 08:32:41 CEST 2009 19
Tue Jul 28 08:32:46 CEST 2009 53
Tue Jul 28 08:32:51 CEST 2009 58
Tue Jul 28 08:32:56 CEST 2009 38
Tue Jul 28 08:33:01 CEST 2009 30
Tue Jul 28 08:33:06 CEST 2009 28
or the biggest in the last days
Tue Jul 28 14:36:19 CEST 2009 3
Tue Jul 28 14:36:24 CEST 2009 4
Tue Jul 28 14:36:29 CEST 2009 2
Tue Jul 28 14:36:34 CEST 2009 1
Tue Jul 28 14:36:39 CEST 2009 3
Tue Jul 28 14:36:44 CEST 2009 1
Tue Jul 28 14:36:49 CEST 2009 1
Tue Jul 28 14:36:54 CEST 2009 34
Tue Jul 28 14:36:59 CEST 2009 56
Tue Jul 28 14:37:04 CEST 2009 52
Tue Jul 28 14:37:09 CEST 2009 60
Tue Jul 28 14:37:14 CEST 2009 87
Tue Jul 28 14:37:19 CEST 2009 126
Tue Jul 28 14:37:24 CEST 2009 128
Tue Jul 28 14:37:29 CEST 2009 140
Tue Jul 28 14:37:34 CEST 2009 138
Tue Jul 28 14:37:39 CEST 2009 143
Tue Jul 28 14:37:44 CEST 2009 161
Tue Jul 28 14:37:49 CEST 2009 198
Tue Jul 28 14:37:54 CEST 2009 208
Tue Jul 28 14:37:59 CEST 2009 187
Tue Jul 28 14:38:04 CEST 2009 175
Tue Jul 28 14:38:09 CEST 2009 140
Tue Jul 28 14:38:15 CEST 2009 144
Tue Jul 28 14:38:20 CEST 2009 150
Tue Jul 28 14:38:25 CEST 2009 190
Tue Jul 28 14:38:30 CEST 2009 182
Tue Jul 28 14:38:35 CEST 2009 167
Tue Jul 28 14:38:40 CEST 2009 176
Tue Jul 28 14:38:45 CEST 2009 190
Tue Jul 28 14:38:50 CEST 2009 206
Tue Jul 28 14:38:55 CEST 2009 199
Tue Jul 28 14:39:00 CEST 2009 197
Tue Jul 28 14:39:05 CEST 2009 199
Tue Jul 28 14:39:10 CEST 2009 168
Tue Jul 28 14:39:15 CEST 2009 199
Tue Jul 28 14:39:20 CEST 2009 210
Tue Jul 28 14:39:25 CEST 2009 201
Tue Jul 28 14:39:30 CEST 2009 195
Tue Jul 28 14:39:35 CEST 2009 216
Tue Jul 28 14:39:40 CEST 2009 203
Tue Jul 28 14:39:45 CEST 2009 200
Tue Jul 28 14:39:50 CEST 2009 196
Tue Jul 28 14:39:56 CEST 2009 189
Tue Jul 28 14:40:01 CEST 2009 180
Tue Jul 28 14:40:06 CEST 2009 176
Tue Jul 28 14:40:11 CEST 2009 173
Tue Jul 28 14:40:16 CEST 2009 177
Tue Jul 28 14:40:21 CEST 2009 165
Tue Jul 28 14:40:26 CEST 2009 170
Tue Jul 28 14:40:31 CEST 2009 164
Tue Jul 28 14:40:36 CEST 2009 167
Tue Jul 28 14:40:41 CEST 2009 151
Tue Jul 28 14:40:46 CEST 2009 147
Tue Jul 28 14:40:51 CEST 2009 139
Tue Jul 28 14:40:56 CEST 2009 140
Tue Jul 28 14:41:01 CEST 2009 136
Tue Jul 28 14:41:06 CEST 2009 131
Tue Jul 28 14:41:11 CEST 2009 131
Tue Jul 28 14:41:16 CEST 2009 147
Tue Jul 28 14:41:21 CEST 2009 134
Tue Jul 28 14:41:26 CEST 2009 133
Tue Jul 28 14:41:31 CEST 2009 128
Tue Jul 28 14:41:36 CEST 2009 103
Tue Jul 28 14:41:41 CEST 2009 74
Tue Jul 28 14:41:47 CEST 2009 98
Tue Jul 28 14:41:52 CEST 2009 91
Tue Jul 28 14:41:57 CEST 2009 75
Tue Jul 28 14:42:02 CEST 2009 75
Tue Jul 28 14:42:07 CEST 2009 88
Tue Jul 28 14:42:12 CEST 2009 89
Tue Jul 28 14:42:17 CEST 2009 83
Tue Jul 28 14:42:22 CEST 2009 81
Tue Jul 28 14:42:27 CEST 2009 64
Tue Jul 28 14:42:32 CEST 2009 55
Tue Jul 28 14:42:37 CEST 2009 71
Tue Jul 28 14:42:42 CEST 2009 52
Tue Jul 28 14:42:47 CEST 2009 45
Tue Jul 28 14:42:52 CEST 2009 40
Tue Jul 28 14:42:57 CEST 2009 41
Tue Jul 28 14:43:02 CEST 2009 40
Tue Jul 28 14:43:07 CEST 2009 36
Tue Jul 28 14:43:12 CEST 2009 35
Tue Jul 28 14:43:17 CEST 2009 32
Tue Jul 28 14:43:22 CEST 2009 32
Tue Jul 28 14:43:27 CEST 2009 28
Tue Jul 28 14:43:32 CEST 2009 26
Tue Jul 28 14:43:37 CEST 2009 20
Tue Jul 28 14:43:42 CEST 2009 15
Tue Jul 28 14:43:47 CEST 2009 14
Tue Jul 28 14:43:52 CEST 2009 14
Tue Jul 28 14:43:57 CEST 2009 15
Tue Jul 28 14:44:02 CEST 2009 11
Tue Jul 28 14:44:07 CEST 2009 6
Tue Jul 28 14:44:12 CEST 2009 9
Tue Jul 28 14:44:17 CEST 2009 7
Tue Jul 28 14:44:22 CEST 2009 7
Tue Jul 28 14:44:27 CEST 2009 11
Tue Jul 28 14:44:32 CEST 2009 14
Tue Jul 28 14:44:37 CEST 2009 11
Tue Jul 28 14:44:42 CEST 2009 9
Tue Jul 28 14:44:47 CEST 2009 9
Tue Jul 28 14:44:52 CEST 2009 2
Tue Jul 28 14:44:58 CEST 2009 3
If you compare that to the values from my first post you see that it really works. Currently it is only a test script which is not tuned for performance, on a big wave I’ve problems to kill the processes as fast as they are forked but a better algorithm would help here. And I will look also into the possibility of limiting the amount of new connections per seconds I can handle per iptables.
But the biggest advantage would be if courier would be extended in a way that the smtp handle process adds the IP to iptables and terminates itself.
Anyway, I’ll try to make my code more than only a test script, but one that I can run in production 24/7. I’ll keep you posted – any ideas on your part?
Mini-howto on How to get the onboard UMTS card (Wireless 5530 HSDPA Minicard) of a Dell E6500 running on (K)Ubuntu 9.04 (Jaunty)
June 18, 2009
I got this week my new company notebook, a Dell E6500 with an internal UMTS card. As you know me I did at once a dual boot install on it. And the Linux in this case is Kubuntu 9.04 (Jaunty). The installation of the 64bit version (as the notebook has 4GB of RAM) went smooth. So I put an UMTS SIM card into it and went on a trip, as I thought it is easy to setup on the fly. Guess? I was wrong. Surely I got an /dev/ttyACM0 device and I was able to set the PIN but as soon as I send the ATZ command I got an “ERROR” returned.
What you will also recognize is that the UMTS LED (right to the bluetooth LED) stays dark even after sending the PIN. So we’re missing here something. The solution is AT+CFUN=1
which turns the RF Circuit Power on (and lets the LED light 😉 ). I got it running before I went home from the trip, to be exactly I’m on the trip and writing this howto.
Following is the full solution for the problem.
- wvdial install: I use wvdial to get into the internet via UMTS. Install the package wvdial like this
apt-get install wvdial
- wvdial config: Put following into
/etc/wvdial.conf
and change the APN (“A1.net” in my example) ,PIN (1234), username and password. My example is for the Austrian Provider A1 which I use.
[Dialer Defaults]
New PPPD = yes
Stupid Mode = 1
[Dialer pin]
Modem = /dev/ttyACM0
Init1 = AT+CPIN="1234"
[Dialer On]
Modem = /dev/ttyACM0
Init1 = AT+CFUN=1
[Dialer Off]
Modem = /dev/ttyACM0
Init1 = AT+CFUN=4
[Dialer a1]
Init1 = ATQ0 V1 E1 S0=0 &C1 &D2 +FCLASS=0
Init2 = AT+CGDCONT=1,"IP","A1.net"
Modem = /dev/ttyACM0
Baud = 460800
ISDN = 0
Phone = *99***1#
Password = www
Username = [email protected]
- PIN: Run
wvdial pin
to unlock the SIM card with the PIN. - Power: Run
wvdial on
to activate the power and if you’re finished callwvdial off
to save battery life. - get online: Wait some seconds after you switched the power on so the card has time to find a base station to connect to. Now type
wvdial a1
(replace a1 with your provider name (it needs to the same one as in the config file). If everthing worked and you’re online you get following:
--> Carrier detected. Starting PPP immediately.
--> Starting pppd at Thu Jun 18 21:03:46 2009
--> Pid of pppd: 3993
--> Using interface ppp0
--> local IP address xxx.xxx.xxx.xxx
--> remote IP address xxx.xxx.xxx.xxx
--> primary DNS address xxx.xxx.xxx.xxx
--> secondary DNS address xxx.xxx.xxx.xxx
If you want disconnect just pressCRTL-C
.
Howto backup your “dedicated server” to a foreign FTP server
June 11, 2009
In my last post I’ve written a howto on installing Xen and OpenVZ on a dedicated root server at a locally well know server ISP. This post is now about the method I use to backup this server on the ISP provided FTP space. The backup solution I use provides following:
- Full backup and restore of the whole server or single files
- GnuPG encryption of the data on the FTP server
- full and incremental backup
- open source and free
- simple setup and usage
The base of the backup system is duplicity, but I use ftplicity as front-end which makes the interface easier to handle in this special case. As the hardware node of the server is running under CentOS 5, this howto is centered around it, but the basic idea is the same for any distribution.
- Repository: We need to add the EPEL5 repository by calling
rpm -Uvh http://download.fedora.redhat.com/pub/epel/5/x86_64/epel-release-5-3.noarch.rpm
Info: Replace x86_64 with i386 if you’ve a 32bit system. - Packages: I did following to update and install the required packages:
yum update
yum install duplicity python-GnuPGInterface
- Bug fixing: There is a small bug in the duplicity package (duplicity-0.5.06-1.el5) which leads to some unlovely error messages. You can and should correct them like this:
wget http://savannah.nongnu.org/bugs/download.php?file_id=17304
patch /usr/bin/duplicity duplicity-sys-exit.patch
If the patching worked you should get a output like this:
patching file /usr/bin/duplicity
Hunk #1 succeeded at 589 (offset 2 lines).
- ftplicity install: There is currently no package for ftplicity, but as it consists basically only of one bash script that doesn’t really matter. Just use following commands
mkdir ftplicity
cd ftplicity/
wget http://surfnet.dl.sourceforge.net/sourceforge/ftplicity/ftplicity_1.4.2.1.tgz
tar xzf ftplicity_1.4.2.1.tgz
cp ftplicity_1.4.2.1/ftplicity /usr/local/sbin/
to install it. - ftplicity configuration:Everything is now installed and we only need to configure it. The shell script creates its own default config if called like this:
ftplicity [profilename] create
. Choose a profile name, as ftplicity allows you to use more than one profile (e.g. to backup different stuff to different ftp servers). Now change into the directory/root/.ftplicity/[profilename]
.
You need now to create a gpg key withgpg --gen-key
– use the default options and a complicated pass-phrase. Continue with editing the fileconf
, by at least setting following variables:
GPG_KEY= to the ID of the key just generated
GPG_PW= to the pass-phrase you just entered
TARGET= to your backup server, use a subdirectory and not / as you may want to backup a second profile or server later and create that subdirectory
TARGET_PW= to the ftp password
SOURCE='/' # as we backup everything
Take also a look at the other parameters but you’re not required to change them. As we’re backing up the whole server it is necessary to exclude some directories. To accomplish this you need to create a fileexclude
in the profile directory which contains at least following lines.
/dev
/proc
/sys
/tmp
/var/cache
/var/tmp
/var/run
As we’re using the server with OpenVZ we also add following lines:
/var/spool
/vz/root
/vz/private/*/proc
/vz/private/*/sys
/vz/private/*/dev
/vz/private/*/var/cache/apt/archives
/vz/private/*/var/lib/courier/allfilters
/vz/private/*/var/lib/dcc
/vz/private/*/var/lib/apache2/fastcgi
/vz/private/*/tmp
- first backup: Type
ftplicity profilename backup
to make your first (=full) backup. You should not get any exceptions or error message if you’ve configured every correctly. - automatic backup As you see at the first backup, ftplicity is verbosely – this is good if an error occurs but I don’t like an email every day if all worked. Therefore I’ve written the python script ftplicity.py, which parses the output of the shell script and only sends (but than the full verbose output) an email (via cron) to me if something went wrong. Copy the script to
/usr/local/sbin
and set the execute flag.Now you only need to edit the crontab with following command:crontab -e
and place some lines like this there.
5 9 * * * /usr/local/sbin/ftplicity.py profilename backup
6 17 1 * * /usr/local/sbin/ftplicity.py profilename full && /usr/local/sbin/ftplicity.py profilename purge --force && /usr/local/sbin/ftplicity.py hetzner purge-full
That’s it – quite easy? Anyway take a look at ftplicity usage
which shows you these usage examples:
- create profile ‘humbug’:
ftplicity humbug create
(now edit the resulting conf file) - backup ‘humbug’ now:
ftplicity humbug backup
- list available backup sets of profile ‘humbug’:
ftplicity humbug status
- list and delete obsolete backup archives of ‘humbug’:
ftplicity humbug purge --force
- restore latest backup of ‘humbug’ to /mnt/restore:
ftplicity humbug restore /mnt/restore
- restore /etc/passwd of ‘humbug’ from 4 days ago to /root/pw:
ftplicity humbug fetch etc/passwd /root/pw 4D
(see “man duplicity”, section TIME FORMATS)
Howto Install Xen and OpenVZ on a Hetzner server (EQ4) [Update]
June 9, 2009
I just got my new Hetzner server, an EQ4 with 8GB RAM, Core i7-920 Quad-Core, 2x750GB HD. As my old server is running OpenVZ and I’m quite happy with it I wanted to use also OpenVZ for this one. Additionally a XEN could use the Hardware virtualization this CPU provides, if I at some point need a Linux with a special kernel or a Windows for testing it would come handy. To be able to keep the hardware node running as long as possible without upgrade, I chose CentOS 5.3 as distribution.
This Howto describes how I did the setup and stops at the moment I could start installing/migrating VEs or domU instances. Surely a hardware node needs more setup like backup, firewall, … but this is out of scope for this howto.
- Base Install: Boot the 64Bit rescue system from the Hetzner Robot. Enter
installimage
and choose Centos 5.3 64Bit minimal. If you’re using a software raid you can keep the settings with the exception of the hostname. 😉 - Kernel: After the boot into the new system we need an OpenVZ and XEN kernel. To achieve this you need to enter following first:
yum install wget
cd /etc/yum.repos.d
wget http://download.openvz.org/openvz.repo
rpm --import http://download.openvz.org/RPM-GPG-Key-OpenVZ
Now you can check with
yum list | grep ovzkernel
which kernel to use. You get something like this:
ovzkernel.i686 2.6.18-128.1.1.el5.028stab062.3
ovzkernel.x86_64 2.6.18-128.1.1.el5.028stab062.3
ovzkernel PAE.i686 2.6.18-128.1.1.el5.028stab062.3
ovzkernel-PAE-devel.i686 2.6.18-128.1.1.el5.028stab062.3
ovzkernel-devel.i686 2.6.18-128.1.1.el5.028stab062.3
ovzkernel-devel.x86_64 2.6.18-128.1.1.el5.028stab062.3
ovzkernel-ent.i686 2.6.18-128.1.1.el5.028stab062.3
ovzkernel-ent-devel.i686 2.6.18-128.1.1.el5.028stab062.3
ovzkernel-xen.i686 2.6.18-128.1.1.el5.028stab062.3
ovzkernel-xen.x86_64 2.6.18-128.1.1.el5.028stab062.3
ovzkernel-xen-devel.i686 2.6.18-128.1.1.el5.028stab062.3
ovzkernel-xen-devel.x86_64 2.6.18-128.1.1.el5.028stab062.3
As I’ve a 64 Bit distribution and want the option for XEN I use following command:
yum install ovzkernel-xen.x86_64
- Grub: Verify and tune the grub configuration. As we will update the Kernel every once a while we want a setup which switches back to a working kernel in case of a kernel panic during boot. Compare your grub configuration with this one. The lines with comments are added/changed by me to provide the wished functionality.
default saved ### changed
timeout 5
title CentOS (2.6.18-128.1.1.el5.028stab062.3xen)
root (hd0,1)
kernel /xen.gz-2.6.18-128.1.1.el5.028stab062.3
module /vmlinuz-2.6.18-128.1.1.el5.028stab062.3xen ro root=/dev/md2 vga=0x317 panic=5 ### last option added
module /initrd-2.6.18-128.1.1.el5.028stab062.3xen.img
savedefault 1 ### added
title CentOS Linux (2.6.18-128.el5)
root (hd0,1)
kernel /boot/vmlinuz-2.6.18-128.el5 ro root=/dev/md2 vga=0x317
initrd /boot/initrd-2.6.18-128.el5.img
savedefault ### added
This setup will boot the first kernel once, so we need to following to reset the counter after every successful boot.
echo "savedefault --default=0 --once" | grub --batch
- Network: Configure
/etc/sysctl.conf
corrently for OpenVZ. It should look like this.
# On Hardware Node we generally need
# packet forwarding enabled and proxy arp disabled
net.ipv4.ip_forward = 1
net.ipv6.conf.default.forwarding = 1
net.ipv6.conf.all.forwarding = 1
net.ipv4.conf.default.proxy_arp = 0
# Enables source route verification
net.ipv4.conf.all.rp_filter = 1
# Enables the magic-sysrq key
kernel.sysrq = 1
# We do not want all our interfaces to send redirects
net.ipv4.conf.default.send_redirects = 1
net.ipv4.conf.all.send_redirects = 0
# normally a good idea
net.ipv4.icmp_echo_ignore_broadcasts=1
- Some Checks: Take a look at
/etc/sysconfig/selinux
and make sure thatSELINUX=disabled
is set. (This should be default with the Hetzner minimal image). Now take a look atcat /proc/mdstat
to make sure your raid is rebuilt or at least at the beginning so you don’t loose to much rebuilding work. A rebuild under way looks like this:
Personalities : [raid1] [raid0] [raid6] [raid5] [raid4]
md0 : active raid1 sdb1[1] sda1[0]
4200896 blocks [2/2] [UU]
md1 : active raid1 sdb2[1] sda2[0]
2104448 blocks [2/2] [UU]
resync=DELAYED
md2 : active raid1 sdb3[1] sda3[0]
726266432 blocks [2/2] [UU]
[==>..................] resync = 10.4% (75563776/726266432) finish=132.6min speed=81773K/sec
- Reboot and hope!
- Kernel Check: Check with
uname -a
that you got the correct kernel booted. It should be something like this:
Linux yourserver 2.6.18-128.1.1.el5.028stab062.3xen #1 SMP Sun May 10 19:25:45 MSD 2009 x86_64 x86_64 x86_64 GNU/Linux
- OpenVZ: Now we can install and configure the OpenVZ user space tools. With
yum install vzctl.x86_64 vzquota.x86_64
you get the management tools install andchkconfig --add vz
is needed so that you don’t need to type the next command after every boot by hand:/etc/init.d/vz start
. Now you should be able to callvzlist
which reports onlyContainer(s) not found
which is correct. The OpenVZ install is done now. - XEN: At last we install the XEN user space stuff with following command:
yum install xen
and add xend to the runlevels withchkconfig --add xend
. After we launched it by hand this time with/etc/init.d/xend start
you can usexm list
to get following:
Name ID Mem(MiB) VCPUs State Time(s)
Domain-0 0 7647 8 r----- 202.4
We’re done. Hope this Howto helps you.
Update:
- You should add following line
exclude=kernel
to the file/etc/yum.conf
, which keeps the standard kernel from being updated. I don’t recommend uninstalling the standard kernel package but updating is not necessary as we won’t use it normally.
ATI Radeon HD 3650 under Jaunty
June 2, 2009
This entry is more a note to myself than a post for others. I just installed Kubuntu Jaunty on my Desktop. It was not easy. I think it is the first time in years that a Kubuntu install (Desktop CD version) was not abled to get anything than blank screen instead of the install mananger. I’ve a Radeon HD 3650 in this machine. What I did to solve this was to downloaded the alternative CD version and install it. Surely it booted also in a blank screeen but I was able to switch to the console with ALT-CRTL-F1. I installed than the openssh server which I used to follow this howto to install the ATI own drivers. After this all works again. Maybe this post helps also someone else except me.
On the cutting egde with the Ubuntu Graphic Drivers Repository
May 13, 2009
You want to be on the cutting egde with your system but you still want to be able to work with it? So basically you install or upgrade every 6 month your system to the next Ubuntu release. But you want to have the newest graphic card drivers, still you don’t want to compile them by yourself. If so, take a look at this post. It shows how to add the new Ubuntu Graphic Drivers Respository, which is one step further in supporting graphic cards which where released after the distribution release.
Tips for running Kubuntu 9.04 (Jaunty) on an EeePC 901go [update3]
April 23, 2009
It has been a long time since my last post, but with my house building project time is short. But I found time to upgrade my Netbook from Kubuntu 8.10 to Kubuntu 9.04. The reason I was so eager to get the new version up and running are the graphics problems with 8.10 (poor graphics performance and rendering errors). Please take a look at my Post about Kubuntu 8.10 on my EeePC, as most of the stuff is still valid. I’ll write in this post only what I did differently.
- At the time of writing this (23.4.2009) it is necessary to install a custom kernel to activate UXA for your netbook. I used following howto to install the latest testing kernel 2.6.30-rc2 and updated drm and xserver packages. With these changes I don’t have rendering errors and the performace for the KDE 3D effects is ok. A short look at flash videos also shows that they are also ok, but I’ll take a closer look at videos in the next days and at it to this post.
- I did not install a special EeePC kernel so far as with Kubuntu 8.10. At the time of writing there seems to be also no Update to the Array Kernels and packages for Jaunty anyway. [Update] There is now but I’ll stay with the 2.6.30-rc2 for the time being. [/Update]
- I’v upgraded my script for installing additional packages for Kubuntu. Here is the file.
- I installed
eee-applet
which comes as Jaunty packages, but it didn’t work. [Update] I searched further and installed the Jaunty package from here. You need to install these packages (apt-get install python-gconf python-notify python-pyorbit) before installing the package like this: dpkg -i eee-control_0.9.0_all~jaunty.deb [/Update]
Sofar everything seems to run nicely. Anyway I’ll update this blog post if I find a problem or come up with an solution.
[Update]
- The WLAN stuff does do seem to have the same performance problems (=hangs) as with the Kubuntu 8.10 kernel. I’ll take a look at the way I solved the problem with the old kernel and try to do the same here. I’ll keep you posted.
[Update2]
- The problem with the Wifi is not as bad as with intrepid, as I don’t have packet loss. Maybe it is also a compatibility problem with my access point.
- I did forget to post the MRRT stuff I changed or better not changed according to the howto. Here is it:
lspci -vvnn
00:02.0 VGA compatible controller [0300]: Intel Corporation Mobile 945GME Express Integrated Graphics Controller [8086:27ae] (rev 03)
Subsystem: ASUSTeK Computer Inc. Device [1043:830f]
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx-
Status: Cap+ 66MHz- UDF- FastB2B+ ParErr- DEVSEL=fast >TAbort- SERR-
Latency: 0
Interrupt: pin A routed to IRQ 16
Region 0: Memory at f7f00000 (32-bit, non-prefetchable) [size=512K]
Region 1: I/O ports at dc80 [size=8]
Region 2: Memory at d0000000 (32-bit, prefetchable) [size=256M]
Region 3: Memory at f7ec0000 (32-bit, non-prefetchable) [size=256K]
Capabilities:
Kernel modules: intelfb
cat /proc/mtrr
reg00: base=0x000000000 ( 0MB), size= 2048MB, count=1: write-back
reg01: base=0x07f800000 ( 2040MB), size= 8MB, count=1: uncachable
reg02: base=0x0d0000000 ( 3328MB), size= 256MB, count=1: write-combining
You see that the prefetchable memory is at d0000000 and with an size of 256 MByte. (As Info: 256MB = 0x10000000). Therefore our MTRR line is
echo "base=0xd0000000 size=0x10000000 type=write-combining" >| /proc/mtrr
As you see I’ve this line already, so no need for me to add it.
[Update3]
- As it seems the ath5k driver for the WLAN is still not as good as the madwifi driver. I installed it like this. Go do
http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6/
and download the newest version there. In my case I did following:wget http://snapshots.madwifi-project.org/madwifi-hal-0.10.5.6/madwifi-hal-0.10.5.6-r4016-20090429.tar.gz
Now extract it:
$ tar xzfmadwifi-hal-0.10.5.6-r4016-20090429.tar.gz
$ cd madwifi-hal-0.10.5.6-r4016-20090429
Now we need some packages installed:
sudo apt-get install build-essential
And now the actual compiling and installation
cd scripts
sudo ./madwifi-unload
sudo ./find-madwifi-modules.sh $(uname -r)
cd ..
sudo make
sudo make install
At last we need to add
blacklist ath5k
to/etc/modprobe.d/blacklist-eeepc
and appendath_pci
to/etc/modules
. After a reboot you should have a better working WLAN. - As of now I’ve an idle power consumption under 11 Watt, most of the time at 10.4 Watt. I’ve changed following in addition to the above stuff. I’m using powertop (apt-get install powertop) to take a look what could be improved.:
- echo 1500 > /proc/sys/vm/dirty_writeback_centisecs
- Enable USB Suspend
- disable HAL polling
Howto re-read a partition table on Linux?
January 29, 2009
Today I needed to partition an additional hard disk and format the partitions. I used cfdisk
which is installed by default on Ubuntu to have a nice text GUI and not the plain old fdisk
. But after changing the partition table and exiting cfdisk you’ll see that the entries in /dev/
are still missing for the new partitions. Sure you can reboot or reconnect hot plug devices like the onces connected via USB. But thats not elegant nor in the best Unix tradition. 😉
I use partprobe
for discovering new partitions, just enter it as user with root privileges and the devices will be created and you can use mkfs.[ext3|vfat|..]
to format the partitions. If your system is missing it you can easily install it (on Ubuntu/Debian) like this: apt-get install parted
. I’ll guess the package is named similar on other distributions.
Powered by WordPress
Entries and comments feeds.
Valid XHTML and CSS.
33 queries. 0.059 seconds.