Archive for the 'Linux' Category

KDE4.4: Getting rid of Akonadi-MySQL Startup Errors

Since upgrading to KDE4.4 I’ve got startup errors each time Akonadi was started due to some missing MySQL system tables.

It’s easy to fix this:

akonadictl stop
mysql_install_db  --datadir=$HOME/.local/share/akonadi/db_data
akonadictl start

And don’t forget to install akonadi-kde-resource-googledata. Thanks to Trumpton.

Voyage Linux on an ALIX.2D13

I’ve just spent far too much time trying to install voyage linux on my new ALIX.2D13. Everything was fine, the only problem was that I did try to use GRUB and that wasn’t working. After changing to LILO it works like a charm. The problem is probably caused by a huge version gap between etch and sid. Etch has some something like 0.9x and sid 1.9x. I thought that the Voyage installer would use the shipped grub inside a chroot. Anyway, LILO works and this is fine. I have no special requirements for this box’s bootmanager. As soon as everything is set up and tested the box is going to be deployed.

The installation of voyage linux itself is covered in detail in the Getting Started guide.

Very usefull information can be found at networksoul and this chaos wiki.

I recommend picocom to connect to the serial console:

picocom –baud 38400 –flow n –databits 8 /dev/ttyUSB0

If your computer doesn’t have a serial port anymore, like mine, I recommend the LogiLink “USB2.0 to Serial Adapter” (UA0043 v.2.0). It’s cheap and works flawlessly. Another great LogiLink product I can reommend in this context is the LogiLink “USB2.0 Aluminum All-in-one Card Reader” (CR0001B v.2.0). Why I mention these two here? I find it hard to find cheap linux compatible adapters of which I know that they work on linux, so here is the information I would have like had before I bought those. The USB-Serial-Adapter is recognized as “Prolific Technology, Inc. PL2303 Serial Port”. The Card-Reader is shown as four separate drives.

DS18S20: CRC Error

I just got me some DS18S20 (1-wire Temperature sensors) and a DS2940 (1-wire to USB adapter). The first two did work like a charm, but the third one gave me CRC errors.

CRC Failed. CRC is 63 instead of 0×00

The reason was just that, after running the first two for a while, I did just disconnect them and attached the thrid one. My mistake was not to delete/re-initialize the .digitemprc. After moving the .digitemprc out of the way and re-initializing the new one the thrid one did also work.

Show all devices on the 1-wire bus:

digitemp_DS2490 -sUSB -w

Initialize the .digitemprc:

digitemp_DS2490 -sUSB -i

Read all sensors:

digitemp -sUSB -a -r750

Thanks to Marc for the hint.

Some usefull links:

Here are some pictures of my 1-wire bus:

Qt 4.6.2 ready to upload

It looks like Qt 4.6.2 is ready to upload. That means the upload of KDE 4.4 to Debian unstable should be very close.

Moving Root-FS to Crypto-Raid

Have you ever tried to move your Debian root filesystem to a RAID? Ok, no problem so far. What about LVM-on-RAID? Still no trouble? Then what about Root-on-LVM-on-Crypto-on-RAID? Sounds funny. Debian has several helpscripts which are able to create a suitable initrd file for this kind of setup. This is good and bad at the same time. The good thing is that they can detect a correct setup and create an appropriate initrd. The bad about this is that it won’t work if you just moving your system to this kind of setup. Imagine you’re still on an ordinary partition without all this fancy crypto, raid and LVM stuff. If you just execute update-initramfs -k <kernel> -u/-c the initramfs tools and the supplied hook scripts won’t know about your intentions. So you’ll have to create a full equipped chroot, set everything up like it would be on a realy Root-on-LVM-on-Crypto-on-RAID-System and run update-initramfs there. Of course you could build the initrd by hand, but I’m not going this Gentoo way.

So, what do you have to do? First you’ll have to create your RAID, luks Volume and LVM on top of each other. See the Gentoo tutorial above for these steps. This should be pretty straight forward. The interesting part starts as soon as you try to boot from your new root. If you did follow the tutorial you should have a working Grub but it won’t be able to boot your system since it can’t unlock your root fs.

So, after you’re back into your good ol’ system setup the chroot. This includes assembling the RAID, unlocking your luks Volume and mounting the LV. So these are the steps, assuming sane defaults for folders, partitions and device names:

mdadm --assemble /dev/md2 /dev/sdc2 /dev/sdd2
cryptsetup luksOpen /dev/md2 cryptoroot
pvscan
vgchange -ay vg
mount -t ext3 /dev/mapper/vg-root /mnt
mount -t ext2 /dev/sdc1 /mnt/boot
mount -t proc proc /mnt/proc
mount --bind /dev /mnt/dev
LANG=C chroot /mnt /bin/bash

So, now you’re inside your proper chroot. You could just run update-initramfs, but that’ll probably fail. You need to setup mdadm first and create your crypttab.

Your /etc/mdadm/mdadm.conf should at least contain the partitions to scan and your array.

The command mdadm –detail –scan >>  /etc/mdadm/mdadm.conf should do it. But verify the file yourself!

Next you have to tell the mdadm-initramfs-script to start this array on boot. This is set in the file /etc/default/mdadm. Insert the full name of your array (e.g. /dev/md2) into the INITRDSTART variable in this file.

Now define a proper crypttab and you should be ready to create a working initrd. Make your crypttab look something like this:

cryptoroot   /dev/md2  none  luks,tries=3

Just generate a new initramfs, update grub (if necessary) and reboot.

update-initramfs -k all -u
update-grub

In case you encounter any error let me know, I’ll try to help.

KDE 4.4 is ready!

A few minutes ago KDE 4.4 was tagged in the SVN. Soon the package maintainers will start building binary packages and hopefully they will arive in Debian sid soon. I can’t wait to try out the new Akonadi-powered KDE-PIM packages and the improved plasma shell.

Let’s see which other features will be presented in the release notes.

Update: The Announcement on dot.kde.org is out:  KDE Software Compilation 4.4.0 Introduces Netbook Interface, Window Tabbing and Authentication Framework

Groupware with Kontact

Kontact, a part of the Kolab project, has some very nice Groupware features that were presented on the MK09.

Fortunately most of these are very well usable even without a Kolab server.

Unfortunately these are not so well documented (or the documentation is not very easy to find).

When trying out these features in noticed that the groupware features will only work properly (at least with Kontact from KDE 4.3) if you access your mailbox via “Disconnected IMAP”. If you fail to do so you’ll probably get an “Write access denied” error.

Please note, that Kontact is very unstable sometimes, but again, this depends heavily on the version of Kontact/KDE you use. My experience is based on KDE 4.3 from Debian unstable.

Right, it is called unstable for a reason …

IPv6 Revisited

I’ve been following the IPv6 development for a while now and have looked at most IPv6 stuff. Today I did take a look at the Teredo proctoll and I’m impressed how well it works. Really nice. Try out Miredo on Linux or BSD.

Fonic, UMTS and Debian lenny on the EeePC

Recently I’ve got an EeePC 1000HE and lately also an UMTS-Stick, the Fonic Surf-Stick (a Huawei E160). I’ve read before that many people got this UMTS-Stick running on Linux, some even with Fonic, but none of them – it seems – used Debian lenny. Most were using Ubuntu which ships the Network-Manager > 0.7 which is capable of connecting to 3G-Networks. Unfortunately this version of Network-Manager is not available for Debian stable. There are Backports but they are not available for i386 at the time of this writing.

There are several way of getting your Netbook “on-the-air”:

  • pppd / Kppp / wvdial – I didn’t succeed with those. But the best choice seems to be wvdial which almost got me connected. PPPd failed without given any helpful output.
  • UMTSMon – This looks like a great tool, but it didn’t manage to get the connection running. It seemed to PPPd’s fault, though.
  • Network-Manager 0.7 and newer – Many people report to have no Problem whatsoever with this application, but it was not available for my system. Update: I did just verify my assumption: The Stick works flawlessly on Ubuntu with the Network Manager 0.7.0.100. It took less than 30 seconds to get a working connection.
  • Vodafone Mobile Connect – This is very nice tool which works great. Not only is it able to detect the E160 Stick, it also has a very nice UI.

Here is a quick step-by-step instruction how to get online with your “Fonic Surf-Stick” on Debian lenny:

  • Boot your system, don’t connect the Stick yet.
  • When logged in connect the Stick.
  • Start Vodafone Mobile Connect, grab it from betavine before.
  • It will recognize your Stick as an Huawei E220 although it is a E160, but this doesn’t seem to matter.
  • Enter pinternet.interkom.de as APN, Username and Password can be left empty or use “fonic” for both. You should set the preferend connection type to “3G prefered” and use static DNS (195.182.96.28 and 195.182.96.61).
  • Mobile Connect will ask for your PIN it is needed.
  • Get a sufficient connection strength and click “Connect” in the UI. You should be online within a few seconds. If the connection fails, first try to get a better connection (just move the UMTS-Stick a bit around).

Please note that I’m running a custom Kernel (2.6.30) and thus didn’t need to use usb_modeswitch. If you’re running an older Kernel you’ll probably need to install an configure usb_modeswitch to get access to the modem part of the stick.

VMWare on Debian (64bit)

Since VMWare made their Server available at no cost this has risen to be an highly interesting alternative for virtualisation. Anyone can download it from their website and get serials for free. This is highly mature software and is rather easy to install. However, on 64-bit Systems there are a few caveats. If you happen to have the problem that VMWare won’t accept your serials, than you have to install the ia32-libs package. Also see the comments on this howto.

When you did successfully install VMWare, you probably want to provide your VMs with network connecitivity. There are several ways to achieve this and the approach depends on how you use your servers.

Interface Aliases: http://www.derkeiler.com/Mailing-Lists/securityfocus/focus-linux/2002-01/0094.html

Routing: Use Host-only network

1
2
3
4
5
iptables -t nat -A POSTROUTING -s 192.168.2.0/24 -o eth0 -j MASQUERADE
iptables -A INPUT -i vmnet1 -s 192.168.2.0/24 -j ACCEPT
iptables -A FORWARD -i eth0 -o vmnet1 -j ACCEPT
iptables -A FORWARD -o eth0 -i vmnet1 -j ACCEPT
iptables -t nat -I PREROUTING -p tcp -d <external -ip> -i eth0 --dport </external><external -port> -j DNAT --to <internal -ip>:</internal><internal -port></internal></external>