Archive for the 'Bits & Bytes' Category

Running “Steam for Linux” on Debian Wheezy

December 31st, 2012

Steam for Linux is here! At least in a usable beta version. And quite some games are already available for Linux from Steam.

But still installing steam is a little tricky for Linux. So some repackaging is required to get it running. But there is a good guide available (although a little techie) here:

I had to additionally install the following:

  • libgl1-nvidia-glx:i386
  • libglu1-mesa:i386

If you are seeing conflicts make sure that you are only installing the dependent packages and no recommended ones.

Here a screenshot of running “Waveform” via Steam for Linux in windowed mode on Debian Wheezy with Nvidia 304.48 driver (from debian packages) on a dual screen setup.

debian-wheezy-steam-for-linux-screenshotEnjoy playing!

Convert Linux raid10 to raid1 PV

October 2nd, 2012

To convert a Linux physical volume stored on a softraid with level 10 (a wrong 2 disk setup which accidently uses raid10) to a clean raid1 mirroring setup some simple LVM commands come to the rescue.

  1. Create second md device
  2. Create PV on second md device
  3. Add PV to existing volume group
  4. Move extends to the new PV
  5. Fail and remove devices from old md device
  6. Add device to new md device
  7. Finally rename md device

Renaming the mddevice (see also

  •   Category: Bits & Bytes  
  • Comments Off on Convert Linux raid10 to raid1 PV

WordPress 3.0 upgrade and the white blank screen

June 18th, 2010

When just upgrading this very blog from WordPress 2.9.2 to 3.0 using the automatic upgrade feature the upgrade succeeded at first. Even showing the admin page for that in the new design.

But then, every page either through the frontend or the admin backend simply showed a white blank screen. So it seems when initializing wordpress something goes horrible wrong. As now usful logs where found in the error log of apache it must be something internal.

Reading a nice post in the wordpress forum which refers to the very same problem lead to the conclusion that probably a plugin gone wild. So to resolve this I started to manually move single plugins to a disabled directory in wp-content/plugins. Which revealed wptuner as the plugin causing this issue. To get your blog back online, simply remove the wptuner plugin for now and you will be back in business.

As your blog might use some other plugins that are not compatible yet, your milage my vary here and you may need to disable/remove other plugins too.
Good luck on your journey to a very nice looking WordPress 3.0.

Package your own Perl for CentOS (or RHEL) as RPM

March 28th, 2010

Of course perl is easy to build and you can build your own Perl is nice, but it needs to be managed on the target host where it is deployed. As internet access to CPAN is not available everywhere (we are talking about enterprise and carrier deployments here) updates need to be managable. At least on a basic level.

Excactly this can be done by just packaging up your contents of /opt/perl5 using a quite simple RPM spec file. It’s important to use the AutoReqProv: no flag to avoid rpmbuild thinking too much and trying to find out which modules are packaged here. On the other hand this requires, that you add certain libs that this perl depends on manually. There is a chance that you could just override %__findrequires macro here, but that does not work for me, as setting it on the package level yielded strange errors for me.

Here is an shortened example of how this specfile perl5-custom.spec should look. Your perl is expected to be found in /opt/perl5:

Summary: Perl 5 custom install to /opt/perl5
Name: perl5-custom
Version: 5.10.1
Release: 1
License: Artistic 2.0
Provides: perl5-custom
Group: Languages
BuildRoot: /tmp/%name-root
Requires: MySQL-client-community >= 5.0.18
Requires: shared-mime-info >= 0.19
Requires: libxslt >= 1.1.17
AutoReqProv: no

* Sun Mar 28 2010  5.10.1-1
- Initial packaging of Perl 5.10.1 in /opt/perl5
- Included Modules:
  Task::Moose, Task::KiokuDB, Task::Plack
  EV, AnyEvent, AnyEvent::*
  DateTime, Log4perl, DBI, DBIx::Class, DBD::mysql
  Starman, Starlet, Tatsumaki

Custom Perl 5 with server-specific modules pre-installed



echo "Copy complete perl5 base directry to buildroot"



%attr(755,root,root) /opt/perl5/bin/*
%dir %attr(755, root, root) /opt/perl5/bin
%dir %attr(755, root, root) /opt/perl5/lib
%dir %attr(755, root, root) /opt/perl5/man

Then just run rpmbuild -ba perl5-custom.spec and you get an installable package, which can be updated over time by updating modules on your build host and repackaging it.

  •   Category: Bits & Bytes   A-Tags: ,
  • Comments Off on Package your own Perl for CentOS (or RHEL) as RPM

Build your own (faster) perl

March 27th, 2010

Using the perl that comes with your distribution is usually fine, but it has some limitations. When building a perl for a distribution it needs to be versatile and fit various needs. Therefor ithreads, the perl specific threading implemenation, is enabled there, to allow building modules that require threads to be available.

The downside is, that this threading code adds some quite low-level overhead, which usually means that a perl compiled with threads takes a performance hit of up to about 10%. So it sometimes makes sense to build your own perl, especially if you know it’s going to be used more on the server side, for long-running processes. Saving 10% in CPU cycles means potential for 10% in power saving or giving other processes a chance to run.

Building perl is really straightforward and usually just takes these steps:

  • Download the latest stable Perl from
  • Unpack it to a temporary directory
  • sh Configure -de -Dprefix=/opt/perl5
  • make && make test && make install
  • Perl is now installed in /opt/perl5

Now you can add any additional modules that you like, some recommended ones are:

  • App::cpanminus
  • Task::Kensho
  • Task::Plack
  • Task::KiokuDB
  • Mojolicious
  • Starman
  • Starlet
  • EV
  • AnyEvent
  • AnyEvent::MP
  • DBIx::Class
  • MongoDB
  • Data::FormValidator

Using the newly built perl just requires to update your path before starting your perl programs:

  • export PATH=/opt/perl5/bin:$PATH
  • /usr/local/bin/myperlprog

After setting the PATH just verify with perl -v that your perl include path points to /opt/perl5 (or any other path you chose).

Resolving LVM: Unrecognised LVM device type 259

March 20th, 2010

Trying to create a md raid1 device for 2 phyiscal 1TB disks failed unexpectedly with a strange (and very undescriptive error, that is only revealed when running with the verbose option (-vvv):

Wiping internal VG cache
/dev/md0p2: Skipping: Unrecognised LVM device type 259
Device /dev/md0p2 not found (or ignored by filtering).

The problem seems to be that the type 259 is simply not recognized, although it is defined in /proc/devices and known as blkext there.
So adding this to /etc/lvm/lvm.conf in the devices section:

types = [ "blkext", 64 ]

After adding this the mdadm command to create the md device succeeds:

mdadm --create /dev/md0 --level=1 --raid-disks=2 /dev/sda /dev/sdb

Next »