Browsing Posts in FOSS

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.

Lately I have been fiddling around with PHPlogcon. I wanted to consolidate logs from our servers on a single machine, which is a breeze to set up using any standard Linux syslog daemon. Furthermore I wanted a graphical front-end (a website is just fine) to enable access to the logs for the not-so-linux-savvy admins. So PHPlogcon fit the bill perfectly. It supports flat-file logs (yay) and even MySQL.

The Windows servers need an additional piece of software to get it to forward the “Eventlog” messages. The default “Windows Eventlog parser” which is shipped with PHPlogcon only works with a proprietary Windows Eventlog forwarders (Adiscon’s EventReporter and MonitorWare Agent), so I wrote my own parser for the Open Source SNARE Eventlog Agent. (sourceforge)

Just put the parser in classes/msgparsers/msgparser.eventlogsnare.class.php and add something like the this to your configuration file and you are done:

$CFG['Sources']['Source5']['ID'] = 'Source5';
$CFG['Sources']['Source5']['Name'] = 'EventLog';
$CFG['Sources']['Source5']['ViewID'] = 'EVTRPT';
$CFG['Sources']['Source5']['SourceType'] = SOURCE_DISK;
$CFG['Sources']['Source5']['MsgParserList'] = "eventlogsnare";
$CFG['Sources']['Source5']['LogLineType'] = 'winsyslog';
$CFG['Sources']['Source5']['DiskFile'] = '/var/log/win_eventlog.log';

Since USB is still ‘all the rage’ I thought I might take the time to show you some of my USB devices, which are compatible with Linux and which I personally find useful.

USB – IDE/SATA

Konig Electronic USB 2.0 to IDE / S-ATA adapter (external, CMP-USBIDESAT2)

Just useful if you have some harddrives around which you need to test, format or fill and then want to put away again (or destroy). It ships with an external power supply, so you are all good to go.

swat@decius:~$ lsusb
 Bus 002 Device 008: ID 152d:2338 JMicron Technology Corp. / JMicron USA Technology Corp. JM20337 Hi-Speed USB to SATA & PATA Combo Bridge

USB – RS-232

Belkin USB RS-232 (F5U103v)

RS-232 is still used when you configure switches or as a back-up interface for a server. Unfortunately netbooks do not tend to have a RS-232 port anymore, so this is the perfect solution.

swat@decius:~$ lsusb
 Bus 005 Device 043: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

USB – Ethernet

Apple USB ethernet

If you need more than your standard (one) ethernet port on your laptop, this is a good solution. It is small and just works. The downside is that it is an Apple product and it’s only 100Mbit/s.

swat@decius:~$ lsusb
 Bus 002 Device 012: ID 05ac:1402 Apple, Inc.

Windows 7 sins

No comments

This is not meant as a Microsoft Windows bash post, but just as a reminder of the new Free Software Foundation campaign. The previous “Bad Vista” campaign was focused on Microsoft Windows Vista and had extremely valid arguments. Just as this “Windows 7 sins” campaign has valid arguments about the newest Microsoft Windows release. Sometimes it is just good to hear (or in this case read) the other side of story and not only what the MarketingMachine(tm) wants you to know. Check it out!