...making Linux just a little more fun!


This month's answers created by:

[ Amit Kumar Saha, Ben Okopnik, Justin Piszcz, Kapil Hari Paranjape, Karl-Heinz Herrmann, René Pfeiffer, MNZ, Neil Youngman, Rick Moen, Suramya Tomar, Mike Orr (Sluggo), Thomas Adam ]
...and you, our readers!

Gazette Matters

Arabic translation

Ben Okopnik [ben at linuxgazette.net]

Sun, 30 Dec 2007 10:50:38 -0500

Hi, all -

We've got somebody that just volunteered to translate bits and pieces of LG into Arabic. Since he's working by himself, and is not a native speaker (and since I can't read Arabic myself), does anyone here have the ability to vet the stuff? It's at 'http://arlinux.110mb.com/lgazet/'.

* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

[ Thread continues here (3 messages/2.22kB) ]


Ben Okopnik [ben at linuxgazette.net]

Mon, 21 Jan 2008 11:59:28 -0500

[[[ I took the liberty of retitling this one. -- Kat ]]]

----- Forwarded message from rahul d <incubus_maddy@yahoo.com> -----

Date: Mon, 21 Jan 2008 00:15:31 -0800 (PST)
From: rahul d <incubus_maddy@yahoo.com>
Subject: None
To: editor@linuxgazette.net
hi, i'm a python noob. Read one of ur articles. just mailed u ppl to tell you guys tht u ppl r doin a nice job... regards Rahul

----- End forwarded message -----

* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

Our Mailbag

32 bit programs on Debian AMD64 - Pointers needed

Neil Youngman [ny at youngman.org.uk]

Sat, 8 Dec 2007 14:29:39 +0000

I've had a badly configured Debian on a Core2 Duo system for a while and I am starting again from scratch. The area where I am having trouble finding guidance is support for 32 bit programs and plugins on the AMD64 architecture.

I have found various recipes for getting specific programs working. Many of them appear to involve maintaining a separate i386 architecture installation in addition to the main AMD64 installation.

I am not keen on on maintaining 2 installations, nor am I keen on piecemeal solutions for each 32 bit program I may need to run. Can anybody point me to a good guide on the issues involved and/or a general solution to the problem of running 32 bit code on AMD64 debian?

Neil Youngman

[ Thread continues here (2 messages/2.50kB) ]

large file server/backup system: technical opinions?

Karl-Heinz Herrmann [kh1 at khherrmann.de]

Sun, 20 Jan 2008 18:09:08 +0100

Hi Tags's,

at work we are suffering from the ever increasing amount of data. This is a Medical Physics Group working with MRI (magnetic resonance imaging) data. In worst case scenarios we can produce something like 20GB of data in an hour scantime. Luckily we are not scanning all the time .-) Data access safety is mostly taken care of by firewalls and access control outside our responsibility. But storing and backups are our responsibility.

Currently we have about 4-6 TB distributed over two "fileservers" (hardware raid5 systems) and two systems are making daily backups of the most essential part of these data (home, original measurement data). The backup machines are taking more than a full night by now and can't handle anything while backuppc is still sorting out the new data. The machine the backup is from is fine by morning.

We will have a total of three number crunching machines over the year and at least these should have speedy access to these data. Approx. 20 hosts are accessing the data as well.

Now we got 10k EU (~15k $US) for new backup/file storage and are thinking about our options:

* Raid system with iSCSI connected to the two (optimally all three)
  number crunchers which are exporting the data to the other hosts via
  NFS. (eSATA any good?)
* an actual machine (2-4 cores, 2-4GB RAM) with hardware raid (~24*1TB)
  serving the files AND doing the backup (e.g. one raid onto another
  raid on these disks) 
* A storage solution using fibre-channel to the two number crunchers.
  But who does the backup then? The oldest number cruncher might be
  able to handle this nightly along with some computing all day. But it hasn't
  got the disk space right now. 
The surrounding systems are all ubuntu desktops, the number crunchers will run ubuntu 64bit and the data sharing would be done by NFS -- mostly because I do not know of a better/faster production solution.

The occasional Win-access can be provided via samba-over-nfs on one of the machines (like it does now).

Now I've no experience with iSCSI or fibre channel under Linux. Will these work without too much of trouble setting things up? Any specific controllers to get/not to get? Would the simultaneous iSCSI access from two machines to the same raid actually work?

I also assume all of the boxes have 2x 1Gbit ethernet so we might be able to set up load balancing -- but the IP and load balancing would also have been tought to our switches I guess -- And these are "outside our control", but we can talk to them. Is a new multi core system (8-16 cores, plenty RAM) able to saturate the 2xGbit? Will something else max out (hypertransport, ... )?

Any ideas -- especially ones I did not yet think of -- or experiences with any of the exotic hardware is very much welcome....


[ Thread continues here (7 messages/33.12kB) ]

[svlug] recommended percentage swap on 400G drive

Rick Moen [rick at linuxmafia.com]

Fri, 28 Dec 2007 16:31:39 -0800

----- Forwarded message from Rick Moen <rick@linuxmafia.com> -----

Date: Thu, 27 Dec 2007 21:16:21 -0800
To: svlug@lists.svlug.org
From: Rick Moen <rick@linuxmafia.com>
Subject: Re: [svlug] recommended percentage swap on 400G drive
Quoting Darlene Wallach (freepalestin@dslextreme.com):

> Is there a percentage of the disk size I should calculate for
> swap?

The amount of desirable swap on your system, and its placement, really isn't directly related to disk size (except in the "you have to have X amount of space in order for allocating Y from it to be reasonable" sense): It's more related to total system physical RAM than anything else, and secondarily to your usage patterns with that RAM (number of active apps, RAM footprint of each of those).

The rule of thumb on all *ixes that you'll see quoted ad nauseam is that total swap space should generally be somewhere from 1.5x to 2 or 3x total physical RAM.[1] If your system has multiple physical hard drives, all of which are roughly similar in overall speediness, then ideally you want to put some swap on each physical drive -- max no. being 32 ;-> -- so that the (fairly intelligent) swapper process can split the necessary seeking[2] activity between them, for best performance through parallelism. By contrast, if any of the drives is markedly slower[3], it's still worth putting some swap on it, but you'd want to specify a lower swap priority to the swapper process. (See "man 2 fstab" or "man 8 swapon" for details.)

Ideally, you would also want to physically place the swap partitions between other partitions in a manner calculated to (you hope) reduce average seek time by keeping the heads in the general vicinity more often than not.

As if all this detail wasn't enough to contend with, it turns out that Linux swap files (as opposed to partitions) are a contender again. They were common in very early Linux days, but fell out of favour when it emerged that swap partitions yielded much better performance. However, it turns out that, with the 2.6.x kernel series, swap files once again have competitive performance, and might be worth using. See: http://lkml.org/lkml/2006/5/29/3

[1] This is an OK rough heuristic, but obviously doesn't fit all usage models. In general terms, you want enough swap so that you're very unlikely to get tasks killed by the out-of-memory killer for lack of virtual memory, even when your system is heavily loaded. Too much swap really only wastes disk space, which is relatively cheap and plentiful, so most people are wise to err slightly on the side of overallocation.

Theoretically, if you had huge gobs of RAM, e.g., 64GB RAM, in relation to your usage, some would argue that you should have no swap (and certainly not 128GB of it!), since you're basically never going to need to swap out files or processes at all. But actually, memory pages managed in virtual memory don't always back files at all, as Martin Pool points out in the page you cited (http://sourcefrog.net/weblog/software/linux-kernel/swap.html).

[ ... ]

[ Thread continues here (1 message/4.15kB) ]

SugarCRM abids by GPLv3 but still forces a badge/notice to be displayed?

Suramya Tomar [security at suramya.com]

Sun, 02 Dec 2007 23:59:16 +0530

Hey Everyone, While surfing the web I found this following site (http://robertogaloppini.net/2007/12/02/open-source-licensing-sugarcrms-original-way-to-abide-the-gpl/) by Roberto Galoppini where he talks about how the SugarCRM has managed to keep almost the same licensing requirements as before even after they started using the GPLv3 license.

Now I am not an expert by any stretch of imagination but from what I understood by reading this page and what I remember from the discussions/postings on TAG it looks like Roberto is making sense... Is that so or am I reading it incorrectly or missing something?

If thats the case then how does the GPLv3 prevent Badgeware programs from claiming to be open source if they use the attribution clause to force users to display their badges?

- Suramya

Name : Suramya Tomar
Homepage URL: http://www.suramya.com
Any errors in spelling, tact, or fact are transmission errors.

Problems with UTF-8 over SMTP

Kat Tanaka Okopnik [kat at linuxgazette.net]

Tue, 22 Jan 2008 12:13:11 -0800

[[[ The originating thread for this discussion is http://linuxgazette.net/147/misc/lg/transliterating_arabic.html -- Kat ]]]

On Tue, Jan 22, 2008 at 02:39:21PM -0500, Benjamin A. Okopnik wrote:

> Latin character set (ISO-8859-1 and such) to Russian, yes.
> Eh... I'll send this example, and hope the 8-bit stuff makes it through
> the mail. 
> ```
> ben@Tyr:~$ tsl2utf8 -h
> Mappings:
> A|<90>     B|<91>     V|<92>     G|<93>     D|<94>     E|<95>     J|<96>     Z|<97>
> I|<98>     Y|<99>     K|<9a>     L|<9b>     M|<9c>     N|<9d>     O|<9e>     P|<9f>
> R|<a0>     S|<a1>     T|<a2>     U|<a3>     F|<a4>     H|<a5>     C|<a6>     X|<a7>
> 1|<a8>     2|<a9>     3|<aa>     4|<ab>     5|<ac>     6|<ad>     7|<ae>     8|<af>
> a|<b0>     b|<b1>     v|<b2>     g|<b3>     d|<b4>     e|<b5>     j|<b6>     z|<b7>
> i|<b8>     y|<b9>     k|<ba>     l|<bb>     m|<bc>     n|<bd>     o|<be>     p|<bf>
> r|<80>     s|<81>     t|<82>     u|<83>     f|<84>     h|<85>     c|<86>     x|<87>
> !|<88>     @|<89>     #|<8a>     $|<8b>     %|<8c>     ^|<8d>     &|<8e>     *|<8f>
> +|<91>
> ben@Tyr:~$ tsl2utf8
> samovar
> <81><b0><bc><be><b2><b0><80>
> babu!ka
> <b1><b0><b1><83><88><ba><b0>
> 7jno-^fiopskiy grax uv+l m$!% za hobot na s#ezd *@eric.
> <ae><b6><bd><be>-<8d><84><b8><be><bf><81><ba><b8><b9> [...]
> '''

Alas, as you may note from the above, it came through as utter mojibake, even though my system is capable of reading (some) Russian.



Hmm. Wikipedia sugests that I call it krakozyabry (крокозя́бры). ;)

This looked like a useful gizmo: http://2cyr.com/decode/?lang=en but it failed to produce anything ungarbled this time.

Kat Tanaka Okopnik
Linux Gazette Mailbag Editor

[ Thread continues here (26 messages/65.29kB) ]


Mike Orr [sluggoster at gmail.com]

Sun, 23 Dec 2007 21:37:37 -0800

Anybody tried the ASUS eee PC (http://en.wikipedia.org/wiki/Eee_pc) ? I'm thinking about getting the 8GB model which costs $500. It's a 2 lb subnotebook with 1 GB RAM, 8 GB flash "memory", and Xandros (based on Debian/Corel), and compatible with the Debian repository. I haven't seen one and they seem hard to find even mail order, though some Best Buys have the 4 GB model. My main concerns are the small keyboard, 800x600 screen, and one-button touchpad. But as a second computer for running Python, Firefox, Kopete, gvim, and maybe the Gimp when traveling, I think it might do OK.

Any opinions on the other Linux (sub)notebooks which have begun appearling? I thought about the Zonbu but it has a nonstandard version of Gentoo tied to their subscription plan.

Mike Orr <sluggoster@gmail.com>

[ Thread continues here (4 messages/5.13kB) ]

rsync options

Martin J Hooper [martinjh at blueyonder.co.uk]

Wed, 05 Dec 2007 08:29:31 +0000

Just a quick question guys...

Backed up my Windows Document directory using rsync in Ubuntu with the following command line:

rsync -Havcx --progress --stats /home/martin/win/My\ Documents/*
(Mounted ntfs drive to mounted smbfs share)

If I run that again a few weeks or so later will it copy all 31000+ files again or will it just copy new and changed files?

[ Thread continues here (17 messages/14.27kB) ]

Transliterating Arabic

Ben Okopnik [ben at linuxgazette.net]

Mon, 21 Jan 2008 15:26:13 -0500

[[[ Discussion of UTF-8 problems in this thread have been split off to http://linuxgazette.net/147/misc/lg/problems_with_utf_8_over_smtp.html -- Kat ]]]

On Fri, Jan 18, 2008 at 08:43:12PM +0200, MNZ wrote:

> On Dec 30, 2007 5:50 PM, Ben Okopnik <ben@linuxgazette.net> wrote:
> > Hi, all -
> >
> > We've got somebody that just volunteered to translate bits and pieces of
> > LG into Arabic. Since he's working by himself, and is not a native
> > speaker (and since I can't read Arabic myself), does anyone here have
> > the ability to vet the stuff? It's at 'http://arlinux.110mb.com/lgazet/'.
> Hi,
> I'm a native Arabic speaker. I can go through the translated text and
> check it but I'm terrible at actually typing Arabic and I'm not that
> good at it anyway. 

A week or two ago, I hacked up a cute little Latin-Russian (UTF8) converter (faking a few bits along the way, since the Russian alphabet is longer than the English one), so I thought "heck, I'll just adjust it so it can do Arabic - that'll give MNZ an easy way to do it." [laugh] I knew that it was written right-to-left - I could handle that bit - but having looked at the character set, as well as the whole initial/medial/final/isolated thing, I've concluded that I'd be crazy to even try.

> I'll help with the translation as much as I can. I'll
> start in a few days though because I have some exams right now.

That's great - just contact the project coordinator, and let me know if you guys need any help. Other than converters, of course. ;)

> PS: Is anyone doing an Esperanto translation? just wondering.....

LG's former editor, Mike Orr, is a one-man walking advert for the language - although he's not translating LG into it, AFAIK. You could always poke him about spreading the idea among his friends.

* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

[ Thread continues here (5 messages/14.11kB) ]

Building a ARM Linux kernel

Amit Kumar Saha [amitsaha.in at gmail.com]

Mon, 7 Jan 2008 20:54:02 +0530

Hi all,

I want to cross-compile a ARM Linux kernel ( using gcc-4.1 on Ubuntu 7.04(i686) ( This will require a 'arm-linux-gcc' cross-compiler. Hence, to build the 'gcc-4.1' I started to build gcc for 'arm' target :

1. ./configure --target=arm
2. make  [the dump is attached]
The build process stops giving:

* Configuration arm-unknown-none not supported

How do I proceed beyond this?

Regards & Thanks, Amit

Amit Kumar Saha
Writer, Programmer, Researcher

[ Thread continues here (7 messages/6.98kB) ]

Version control for /etc

Rick Moen [rick at linuxmafia.com]

Tue, 25 Dec 2007 03:24:57 -0800

[[[ This is a followup to "Version control for /etc" in http://linuxgazette.net/144/lg_mail.html -- Kat ]]]

A promising solution to the exact problem discussed earlier -- put together by my friend Joey Hess. See: http://kitenet.net/~joey/code/etckeeper/ One key ingredient is David H?rdeman's "metastore" (http://david.hardeman.nu/software.php), used to capture metadata that git would otherwise ignore.

----- Forwarded message from Jason White <jason@jasonjgw.net> -----

Date: Tue, 25 Dec 2007 19:07:59 +1100
From: Jason White <jason@jasonjgw.net>
To: luv-main <luv-main@luv.asn.au>
Subject: etckeeper
For those who are running Debian or debian-derived distributions, there is a relatively new package, etckeeper, which I have found rather useful: it maintains a revision history of /etc in a Git repository, including file permissions and other metadata not normally tracked by Git.

It is also invoked by Apt, using standard Apt mechanisms, to commit changes introduced into /etc when packages are installed or removed.

I don't know whether there exist any similar tools for non-Debian distributions.

----- End forwarded message -----

[ Thread continues here (4 messages/8.02kB) ]

The joys of cheap hardware

Neil Youngman [Neil.Youngman at youngman.org.uk]

Sun, 9 Dec 2007 15:07:50 +0000

A little while back I bought a cheap HP desktop and today I decided to put a 2nd hard disk in. This is when I found that, although the spec sheet tells you you have a spare 3.5 in hard disk bay, it doesn't tell you that there are only 2 SATA connectors on the board and they are both in use! The PCB has spaces for 4 SATA connectors, but only 2 have been connected up, although bizarrely they have put in an IDE connector and a floppy connector.

Fortunately, I have a spare SATA controller, so I can still get the disk in. Unfortunately, when I boot Debian the disk order gets swapped, so GRUB sees the original disk as disk 1, but Debian sees it as disk 2. The upshot is that it refuses to boot, as it can not mount the root partition. Interestingly Knoppix still sees them in the expected order.

Using partition labels in /etc/fstab isn't a solution because it can't actually find /etc/fstab.

I have a temporary workaround, as I have swapped the DVD SATA connection to the second hard disk, so both are connected from the motherboard. This has the advantage that they are mounted in a predictable order, but the disadvantage is that I no longer have the option of booting from CDROM, without swapping the cables back.

Does anyone know how the disk order is determined and is there any way to force Debian to put the disks connected from the Motherboard ahead of those connected from the additional SATA controller?

Neil Youngman

[ Thread continues here (8 messages/10.01kB) ]

No Internet from network client

Peter [petercmx at gmail.com]

Wed, 9 Jan 2008 17:02:05 +0700

I have been following "Serving Your Home Network on a Silver Platter with Ubuntu" which is an August article. Just what I needed :) One problem is that I cannot access the Internet from a client. Not sure why and do not know where to look. Any ideas please? There are two NIC's, eth0 which connects only to the router and eth1 which is the local network connected to a hub. This is the route from the server and it appears to work - I can ping and download

> routeKernel IP routing tableDestination     Gateway         Genmask
> Flags Metric Ref    Use Iface10.0.0.0        *
>   U     0      0        0 eth1192.168.1.0    *
>   U     0      0        0 eth0default
>         UG    100    0        0 eth0

This is the route from a client. I can access the server by putty but I cannot reach the Internet.

Kernel IP routeing table
Destination Gateway Genmask Flags Metric Ref Use Iface * U 0 0 0 eth0
link-local * U 1000 0 0 eth0
This is the hosts file on the server
$ cat /etc/hosts127.0.0.1       localhost127.0.1.1       spider
# The following lines are desirable for IPv6 capable hosts::1
ip6-localhost ip6-loopbackfe00::0 ip6-localnetff00::0
ip6-mcastprefixff02::1 ip6-allnodesff02::2 ip6-allroutersff02::3
This is the hosts file on the client (at present I need to switch the cable to get the Internet which is why there are two entries for spider) localhost client-1 spider spider
# The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts
And this is a trace from the client
tracert google.com
google.com: Name or service not known
Cannot handle "host" cmdline arg `google.com' on position 1 (argc 1)
So I know not .... where should I look?


[ Thread continues here (14 messages/20.34kB) ]

Installing on ARCHOS

Douglas Wiley [drwly at yahoo.com]

Wed, 5 Dec 2007 14:28:25 -0800 (PST)

I have downloaded a program for the ARCHOS. It has an IPK extension that ARCHOS does not recognize. I am new to Linux. Can you help me fins out how to install this program?

Thanx -drw-

[ Thread continues here (6 messages/5.24kB) ]

SVN commit_email.pl script support for multiple repositories

Smile Maker [britto_can at yahoo.com]

Wed, 9 Jan 2008 22:45:52 -0800 (PST)


I have got a subversion repository running on /svn

Under that there are different directories /svn/a/aa ,/svn/b/bb like that.

I would like to send a mail to a group of ppl when the checkin happens in only /svn/a/aa this directory and sub dirs

I used post-commit script hook supplied with svn.

in that I added a line like

$REPOS/hooks/commit-email.pl "$REPOS" "$REV"  -m "*aa*" britto@yahoo.com  --diff "n" --from "ppl@mycom.com"
this is not working.

-m makes the support to multiple project and it accepts regex as an argument.

whatever i have provided any thing wrong.........

This is not following link also doesnt help


Thanks in Advance

--- Britto

[ Thread continues here (2 messages/3.01kB) ]

Writeup about using the Kodak V1253 (video) camera with Linux

Peter Knaggs [peter.knaggs at gmail.com]

Sun, 20 Jan 2008 22:24:31 -0800

I put together a bit of a writeup about using the Kodak V1253 (video) camera with Linux: http://www.penlug.org/twiki/bin/view/Main/HardwareInfoKodakV1253 It's one of the inexpensive cameras that does a fair job of capturing 720p video (1280x720), and it works over USB with gphoto2 / gtkam in linux.

Cheers, Peter.

Linux driver for kingston data silo ds100-S1mm

[agarwal_naveen at ongc.co.in]

Thu, 6 Dec 2007 02:49:34 -0800


I am looking for linux driver to install kingston data silo ds100-S1mm tape drive. Can you pl. help me


[ Thread continues here (2 messages/1.33kB) ]

RAID Simulators for Linux

Amit Kumar Saha [amitsaha.in at gmail.com]

Tue, 1 Jan 2008 21:25:22 +0530


Does any one here have experience using a RAID Simulator or know of any? Basically, what I am looking for is 'emulating' RAID on a single computer, single hard disk.

Looking forward to some insights

Regards, Amit

Amit Kumar Saha
Writer, Programmer, Researcher

[ Thread continues here (12 messages/19.60kB) ]

Python question

Ben Okopnik [ben at linuxgazette.net]

Fri, 28 Dec 2007 10:01:07 -0500

Hey, Pythoneers -

I've just installed the "unicode" package after finding out about it from Ren<a9>; it sounds like a very cool gadget, something I can really use... but it appears to be broken:

ben@Tyr:~$ unicode
Traceback (most recent call last):
  File "/usr/bin/unicode", line 159, in ?
    out( "Making directory %s\n" % (HomeDir) )
  File "/usr/bin/unicode", line 33, in out
    sys.stdout.write(i.encode(options.iocharset, 'replace'))
NameError: global name 'options' is not defined
Line 570 says

(options, args) = parser.parse_args()
but even if I give it an arg like "-h", it still gives me the same error. Any suggestions for fixing it before I turn it in to the Ubuntu maintainers?

* Ben Okopnik * Editor-in-Chief, Linux Gazette * http://LinuxGazette.NET *

[ Thread continues here (3 messages/4.38kB) ]

Talkback: Discuss this article with The Answer Gang

Copyright © 2008, . Released under the Open Publication License unless otherwise noted in the body of the article. Linux Gazette is not produced, sponsored, or endorsed by its prior host, SSC, Inc.

Published in Issue 147 of Linux Gazette, February 2008