Browsing Posts in FOSS

Several years ago our capital (the city of Amsterdam) funded the Open.Amsterdam project, which had the goal to investigate if it would be feasible to create and use an open front- and back-office for the municipality. I discovered that the former internal wiki, was put online at the NOIV website. Since I was part of one of the involved parties at that time I thought I might share the information with everybody.

Unintended irony

No comments

A couple of days ago I demonstrated how to combine cowsay and fortune and got the following result:

Recently I received my new phone, which is a Samsung Galaxy S GT-I9000 (Europe version, running Android 2.2), and I was looking for a hypothetical way to get root access on it. After reading a lot of howto’s and informational posts/pages (see references at the bottom), which sometimes seemed overly complicated or superfluous, I decided to find an easy way to do it better (and by solely using Linux). This solution “works for me” and will probably void your warranty, so proceed at your own risk.

Root your Samsung Galaxy in 4 easy steps:

  1. Make sure the “3 button combo” is working. Boot your phone once holding “volume button up + home button + power button” and one holding “volume button down + home button + power button” and check if you get into “Recovery mode” and “Download mode”.
  2. Install “CF-root” by using Heimdall, which is a cross-platform open-source tool suite used to flash firmware (aka ROMs) onto Samsung Galaxy S devices. The CF-root archive contains a zImage which can easily be flashed onto your phone (make sure your phone is in “Download mode” – “volume button down + home button + power button”). I had to use the JPM version of CF-root. Note: Heimdall is cross-platform whereas Odin is Windows-only.
    heimdall flash –kernel zImage
  3. Install the ClockWorkMod by putting the update.zip on the phone (from your PC) and applying it using the “Recovery mode”. You do not need a 3rd party tool like “ROM manager” to do this. Note: ROM manager can send out anonymous statistics etc.
  4. Install Darky’s ROM by putting the ZIP file on the phone (from your PC) and applying it using “Recovery mode” (which now is ClockWorkMod) using the “Install ZIP from SD card” option. You will see a strange blue reboot text and the phone will reboot, but do not be alarmed, have patience!

Note: thanks go out to the developers and how to / post writers for providing the necessary required information to make this possible

References:

A few months ago I received my Guruplug server plus, but I only just had time to finish the configuration. Basically it is a small Linux server, equipped with an Marvell 1.2 Ghz (ARM) processor, 512MB of RAM, 512MB of NAND flash, 2 gigabit ethernet ports, wireless, bluetooth, 1x eSATA, 2x USB and 1x microSD. And yes, this is the successor of the Sheevaplug.

Currently my Guruplug is acting as the replacement for my ancient home server (Pentium 450Mhz, 512 MB RAM), which has now been taken offline. I was quite stubborn, since I wanted to do the configuration and installation “my way”. This is what I did:

  1. Build and configure the Debian root filesystem using debootstrap (note: make sure your fstab and partitions are set correctly).
  2. Copy the root filesystem to the microSD (in my case: Transcend 16GB microSD, class 6, with wear-leveling). Test if it works, by using the pre-installed kernel and your custom root filesystem.
  3. Cross-compile a minimal custom kernel (2.6.35-rc3) on another machine (in my case: a quadcore AMD machine). You do not want reboots during your kernel compilation or want to wait a long time before it is finished. Native support for the Guruplug has been added to the kernel since 2.6.35!
  4. Update uBoot, so it will correctly recognize/run the original kernel and the custom kernel.
  5. Test the custom kernel by putting it on a FAT16 partition on a USB stick (or TFTP server), before permanently writing it to the NAND flash. Unfortunately uBoot did not work with the ext filesystem (ext2load) or from the microSD.

Guruplug pros:

  • Low price
  • Low power consumption
  • Silent operation
  • Debian pre-installed
  • Dual gigabit ethernet, dual USB, WLAN, eSATA and bluetooth in one tiny box

Guruplug cons:

  • CPU heat dissipation. The plug suddenly reboots (probably thermal shutdown) when it gets too hot, which is very nasty. There are some creative solutions on the forum, which will void your warranty!
  • WLAN. The wireless chip still is not supported by the kernel, so you will need the Marvell kernel module (uap8xxx.ko) and tool (uaputl) which are shipped with the Guruplug.
  • uBoot. Default uBoot version does not support loading the kernel from ext filesystems or the microsd card (but it works from TFTP, USB and NAND flash), but it can easily be updated.

This week I am teaching the LPI 101 course again and we covered the shadow file today (amongst other topics). I gave the students the exercise to manually edit the shadowfile and let an account expire on 01-01-2011. The manpage of shadow(5) stipulates that the account expiration date has to be “expressed as the number of days since Jan 1, 1970″. One of my students asked me how to calcuate this. I did not immediately know the answer and I did not want to use rely on any online date/time converter, so I went looking for a satisfactory solution.

1. Find the UNIX time / Epoch of the date in question

date -d ’2011-01-01′ +%s

Remember that these are seconds since 01-01-1970.

2. Calculate the number of days since 01-01-1970.

echo `date -d ’2011-01-01′ +%s` / 86400 | bc

A day is 60 * 60 * 24 = 86400 seconds. Notice how ‘bc’ will always be rounding down the number of days.

3. Perform a ‘normal’  round up or down for the number of days

UNIXTIME=`date -d ’2011-01-01′ +%s` ; printf “%.0f\n” `echo “scale=1; $UNIXTIME / 86400″ | bc`

If you use the Zarafa webaccess (6.40, but apparently also 6.30) on Ubuntu 9.10, apache2 will nicely segfault and you will not be able to access your webmail. Upside: the mobile server will keep functioning. Even Fedora has this problem and it was tracked down to an error in PHP. I do not want to compile my own software to work around this issue, since I am lazy and I use a package manager for a reason! I quickly found the least nasty workaround for this issue in this post on the Zarafa forums.I replace /usr/lib/apache2/modules/libphp5.so (from karmic’s 5.2.10) with the libphp5.so from the 5.2.6 libapache2-mod-php5 package. At least the file will still be managed by dpkg and thus updated/upgraded if neccessary. As Ubuntu 10.04 is just around the corner, I will suggest the owner to does not update libapache2-mod-php5 until he upgrades to 10.04.

Just when you think you have seen it all,  you experience something new. This happened when SSH’ing to a server which authenticates against an LDAP server:

The source of the problem was a configuration error in libnss-ldap.conf

When I saw the new name and the new website, my first thought went towards the licensing. After checking the site (and checking with Rainer) I was glad to see that the software remains free and GPL’d. The explanation about the name change on the project site also mentions non-GPL components, which I am not a fan of, and that they will refer to the software as Adiscon LogAnalyzer.

I can understand why they choose to prefix their company name to the software name, since it’s also “free” publicity and it’s clearer that Adiscon is the company behind LogAnalyzer. Adiscon has put a lot of time and effort into this product and they deserve credit for this. If you want or need commercial support, check out their support pack.

A fair heads-up to potential contributors: communication goes through the forums (e.g. no mailinglist). The GIT repository can be found here.