The Political Hackonomist

ramblings about hacktivism, privacy, in/security and open source stuff. oh, and politics sometimes...

Booting the 'opsi Server VMWare Appliance' on a VirtualBox Host

Posted by Stefan • Wednesday, November 25. 2009 • Category: Open Source
Short abstract:
This post has a double purpose:
1. YES, you can use the opsi VMWare Appliance in VirtualBox (a 10min google search did not yield one hit of somebody who did this before, so: eat this google!)
2. It won't boot without modification, the very easy solution is below :)

Long version:
Wanted to check out opsi without installing it. So i downloaded the VMWare image that is also provided. However, i got rid of VMWare about a year ago in favour of VirtualBox (there were plenty of reasons for that...). The good thing about VirtualBox is also that it allows to use VMWare's vmdk files as virtual harddisks, so i thought it should be easy to check it out. After setting up the new machine in VirtualBox with the downloaded opsiserver.vmdk I booted for the first time and was greeted by:

Waiting for root file system ...


The fix is really easy though, once you understand what the problem is: the underlying system of the appliance is a Debian GNU/Linux with Grub as boot loader. The problem is that the original VMWare installation used virtual SCSI or SATA devices, so the line in /boot/grub/menu.lst contains /dev/sda2. On VirtualBox (at least with the default config) the system uses virtual IDE disks, so you need to simply change /dev/sda2 to /dev/hda2. To do this on every reboot you can use the built-in editor of grub (press "e") and change the device. Once you booted successfully, you can change it permanently by editing /boot/grub/menu.lst.

Now comes the fun part: learning how to use opsi to save me time. But as far as I know / read about it, it's just what I am looking for. I guess it even makes sense in a small environment like ours here (6 Windows clients but loads of common software that needs to be installed on all our machines...). Maybe I will blog about it again after I got to know it better.

Ah, versions used:
VirtualBox 3.0.8 r53138 (equals app-emulation/virtualbox-bin-3.0.8 in Gentoo)
opsi3.4-servervm (2009-09-16)

NetMos PCI 9835 Multi-I/O Controller (2x serial, NO parallel port)

Posted by Stefan • Sunday, January 11. 2009 • Category: Open Source
Since i have moved to India, getting a UPS for my work station was a must - with between 1 and 10 power-cuts a day, working without power backup is simply not possible.

However, having a UPS alone might not be enough, because in case the power is off for more than just a few minutes while your are not there, the battery will run empty and the computer will of course power off without doing a clean shutdown. So, nothing gained...

However, most UPS have either a serial or USB port, so that you can monitor its state and run scripts depending on certain conditions, such as the remaining capacity.

So, to make a long story short, i had to buy a serial-port expansion card for my machine, since the mainboard did not have a serial port bulilt-in. I went to the local computer wallah and bought a PCI card with 2 serial ports on it.

The card is identified by lspci as:
Communication controller: NetMos Technology PCI 9835 Multi-I/O Controller (rev 01)


Googling for it gave me the impression, that the in-kernel serial driver should do the trick. In dmesg i found:

[ 0.636515] serial8250: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A
[ 0.637319] 00:07: ttyS0 at I/O 0x3f8 (irq = 4) is a 16550A


Unfortunately, trying to hook up the UPS two one of the ports, ttyS0 remained dead.

After googling for quite some time, i discovered, that apparently the chip on the card not only provides two serial ports, but also a parallel port. However, since the chip is o cheap, many manufacturers use these chips also for serial-port only cards.

Now, the interesting part is, although the kernel finds some serial port (as dmesg shows), the kernel serial driver does not handle it. Instead, you need to build "parport_serial" either into the kernel or as a module. After I modprobe it, dmesg shows this:
47102.184128] parport_serial 0000:05:01.0: PCI INT A -> GSI 19 (level, low) -> IRQ 19
[47102.184149] parport1: PC-style at 0xd200 [PCSPP(,...)]
[47102.184313] 0000:05:01.0: ttyS1 at I/O 0xd000 (irq = 19) is a 16550A
[47102.184434] 0000:05:01.0: ttyS2 at I/O 0xd100 (irq = 19) is a 16550A


And now i have two working serial ports on ttyS1 and ttyS2.

Just for completeness: Netmos sometimes sells this chip labeled as "NetMost 222N-2" and sometimes as "NetMos 9835". To all my knowledge, it is the same product...

ldap editors

Posted by Stefan • Tuesday, July 15. 2008 • Category: Open Source
This post is meant to be a little overview on different viewers and editors to work with openldap. I tested all of these and just wanna give you my 0.02$... Of course there's nothing like the real thing - which is writing ldif files and adding them with slapadd, but then again...

phpldapadmin



- web app.
- needs php and a httpd
- slowish when browsing large trees
- does not understand non-standard schemas (which makes it totally useless IMO)


directory-assistent



- python / gtk app.
- needs: gtk-2, python, pygtk, python-ldap
- small and lightweight
- not many options
- view sucks somewhat


GQ



- gtk app
needs: >=gtk+-2.6, openldap, openssl, libxml2, >=glib-2.6, pango, cyrus-sasl, gnome-keyring, libglade, libgcrypt"
- many dependencies
- countless options
- supports more than one ldap-server in config
- works with any schema
- best app i've seen to manage your ldap


thunderbird-3.0a1 (addressbook component)

(screenshot obsolete, not much to see there what you haven't seen already)

- read support 'out-of-the-box'
- though there is experimental support for writing to ldap servers (you need to change 1 line in 1 file and compile it yourself)
- seamless integration into thunderbird / emails
- needs mozilla-schema on ldap-server (THIS IS A HUGE MESS! much confusion there; moz-devs: please fix this and write a clear howto on developer.mozilla.org. The one that is currently there is almost useless.)



evolution

Cyrus without unix-accounts?

Posted by Stefan • Tuesday, July 15. 2008 • Category: Open Source
[UPDATE: clarification because of unclear language...]
Is this a bug or a feature?
Postfix cannot deliver mails to cyrus-mailboxes if a user has a cyrus-mailbox but no corresponding unix-account?

I could not find anything in the documentation that says so, but it just doesn't work without...

That really sucks IMHO!

Please leave a comment if you can prove me wrong ;)

Writing addresses to openldap with Thunderbird-3.0a1

Posted by Stefan • Monday, July 14. 2008 • Category: Open Source
[UPDATE: i am currently writing a more detailed guide to using thunderbird and ldap for contacts management. It is not very complicated, but there are certain pitfalls and the documentation is lousy...]

I've been looking for this since ages, finally i found the holy grail of something that comes close to perfect unified contact management.

The idea:
- have an openldap server with all my contacts
- lookup contacts from any of my computers (that includes my Gentoo workstation, my Apple Powerbook and even Windows)
- WRITE / STORE / EDIT contacts from any computer on the ldap server in a CONVENIENT way
- don't fuck up

Previously i had an openldap server running and was able to lookup contacts from most of my addressbook-clients (thunderbird, kmail, sylpheed, OE, etc.), but none of them was able to store / edit contacts on the ldap directly. I had to do this either by feeding it an ldfi-file, or by using phpldapexplorer. The first way sucks badly, and the second is not much better (mostly because it takes too much time writing the ldif by hand, and with phpldapexplorer you'll have to wait and wait and wait for your browser to open up the list - if you have hundrets of contacts)...

So, what was needed was an addressbook application that can store and edit, too. Rumors float around the net that evolution can do so, but on a non-gnome system evolution is much PITA. I also found references that stated kaddressbook (the KDE-Addressbook) was able to do that, but either it is plain untrue, or i did not find the right options...

Anyway, after long search, i found this thread. In a nutshell: Thunderbird-3 has an experimental feature that enables write-support to openldap! w00t!

I compiled it with said option and it really works, here's a brief howto:

- Get openldap up and running
- Get the mozillaAbPersonAlpha.schema from here
- compile thunderbird-3 as described in the link above. More help on compiling can be found here
- Fill in all the info in the configuration - dialogue of the thunderbird addressbook (you need an ldap-account with write-support of course)
- In addressbook, search and edit exisiting contacts, or store new one on your openldap :)

Downside:
Seems that once you edited a contact, phpldapexplorer cannot "handle" this very contact anymore. Have to find out more why that is. But: other addressbook-clients display the newly edited contacts fine and without errors, so in the end i might not need phpldapexplorer anymore anyway...

Opera und libflashplayer

Posted by Stefan • Monday, April 21. 2008 • Category: Open Source
Fnord!

Wenn euer Opera unter Linux keine Flashfilmchen (youtube, googlevideo) abspielt, dann vielleicht deshalb:

Make sure the flash library is not in a directory where any of the path components is "netscape". For some reason, flash detects this case and then video playback doesn't work on youtube nor videos.google. However, in this case the flash should still work, it just does not show any video. [sic!]
Eirik Byrkjeflot Anonsen, Opera Developer. Auf: Google-Groups/opera.linux

Bluediving v0.9 auf Gentoo kompilieren

Posted by Stefan • Monday, March 24. 2008 • Category: Open Source
Bluediving beschwert sich (nach der händischen Installation aller dependencies) über fehlende libxml Header-Dateien die er zum übersetzen von btftp braucht.

Lösung:

ln -s /usr/include/libxml2/libxml/ /usr/include/libxml

Danach sollte es gehen.

Viel Spaß am Gerät!

PS: Abgesehen davon ist Bluediving leider ziemlich buggy und crashed mir gelegentlich, aber is ja auch erst v0.9

Prism2.5 / Intersil WLAN-Adapter and WPA_PSK

Posted by Stefan • Wednesday, April 18. 2007 • Category: Open Source
A couple of weeks ago my Senao 2511 CD PLUS / EXT2 card stopped playing nicely with my own wireless network at home (I use it on a gentoo x86 system). My network is hidden and uses WPA-PSK for encryption, and until some time ago wpa_supplicant was working without problems. However, when trying to associate the card with the network i ran into this problem:

ioctl [PRISM2_IOCTL_PRISM2_PARAM] Operation not supported


After some searching the web, I was quite sure that I needed to upgrade either my hostap-drivers or the firmware on my wireless card.

Continue reading "Prism2.5 / Intersil WLAN-Adapter and WPA_PSK"