...making Linux just a little more fun!

next -->

The Mailbag


HELP WANTED : Article Ideas
Submit comments about articles, or articles themselves (after reading our guidelines) to The Editors of Linux Gazette, and technical answers and tips about Linux to The Answer Gang.


Hello kid ..etc

Sat, 14 May 2005 12:32:23 +0100
Philip O Brien (philip.obrien from gmail.com)
A pal of Jimmy's writes him personally - here's just the techie part... -- Heather

so every thing is up in the air.. but heh thats life... As Douglas Adams said "I love deadlines.. I love the wooshing noise they make as they fly by".

If you could get me an answer on that by any means necissary I would be grateful.

Forgive any mistooks as I only stopped drinking abot 6 hours ago...

So how you been keeping.....

[Jimmy] Not too bad. Much better if my PC'd stop crashing every time I try to send an email.

One quick question before before we get into all that lot though....

I need help with grub / booting a linux kernel.. I will describe it to you..

  1. Grub boot loader.
  2. Fedora Core 3 with 2.6 Kernel installed.
  3. 1 IDE 250 Gig hdd. / is on hda2 and is 10gigs.
  4. /home is on hda4 and is 230 ish gigs.
  5. Both are ext3 partitions.
  6. I am trying to boot another kernel.
  7. Its the NASA enhanced loopback kernel (2.4)
  8. It either panics or stalls stating it cannot open an initial console.
  9. The server is a dell one with no agp, P4 2.6, 512mb paired ram and pci mach64 gfx.
  10. Help :-) I need it for my forensics workstation. I need to mount entire disks on /dev/loop

See attached philip_obrien.grub.conf.txt

[Jimmy] First off, I've never had to mess with grub before, and I'm only guessing here, but I'd say the problem is that you're trying to run an older kernel version from the same partition as a newer version. Sure, modules from the different versions will live happily together, but do you have a version of modprobe for both 2.4 and 2.6? Does your modules.conf have settings for 2.6 that don't work for 2.4?
If you want, I can forward this to the Answer Gang, where you're much more likely to get a knowledgeable answer, that is, if you don't mind seeing your question published.

Now back to the happy stuff....

And that, dear readers, brings us to you. Anyone interested in taking a shot at the question, submit your note to The Answer Gang in however long or short a fashion you'd like. -- Heather


Problems with tcsh scripting

Mon, 27 Jun 2005 09:38:28 +0100
ventolin (ventolin from gmail.com)

Hi,

I have a number of issues with tcsh (not my choice..) shell scripting I need help with.

Basically I'm writing a shell script that automates a long setup procedure. This top-level script is in bash, however the bulk of it is comprised of commands that are fed to a program which is, in essence, a tcsh shell. I've achieved this by using the << redirector. I need help on two points:

1) Is there any way of suspending input redirection, taking input from the keyboard, and then resuming input from the tcsh script?

[Ben] There is, but it is Fraught With Large Problems. I'm not that familiar with TCSH, but I've just had to do that in Perl - essentially, I was writing a Perl version of 'more' and had to answer the question of 'how do you take user input from STDIN when the stream being paged is STDIN?' It requires duplicating the STDIN filehandle... but before you start even trying to do it, let me point you to "CSH Programming Considered Harmful" - Tom Christiansen's famous essay on Why You Shouldn't Do That. If it's not your choice, then tell the people whose choice it is that They Shouldn't Do That. The task is complex enough, and has enough touchy problems of its own, that introducing CSH into the equation is like the Roadrunner handing an anvil to the Coyote when he's already standing on shaky ground over a cliff.

To give you some useful direction, however - the answer lies in using 'stty'.

2) There comes a point towards the end of the script when two shell scripts are run simultaneously. These shell scripts open up individual xterm windows to run inside. I'm wondering, is there anyway of having the tcsh script monitor stdout of one xterm, and upon the output of a certain piece of text, echoing a command into the stdin of the other xterm?

[Ben] Why not 'tee' the output of the script - one 'branch' into the xterm and the other into a pipemill (or whatever you want to run 'grep' in)?

Any insight or knowledge on the matter would be very much appreciated. I hope I have provided sufficient details.

Aengus Walton

[Ben] You have - from my perspective, anyway.

If someone would like to write an article on interesting shell tricks with tcsh specifically, check out the Author Guidelines, then drop a line to our articles@ staff. -- Heather


PyGtk Deprecation error

Mon Aug 15 07:20:47 2005
J.Bakshi (hizibizi at spymac.com)

Hi,

could any one kindly tell me what is PyGtk Deprecation error ? I see the error when ever I try to compile IceWMCP which is based on PyGtk. thanks for your time.


Disappearing USB printer

Wed Jul 20 10:28:38 2005
Bob van der Poel (bvdp at uniserve.com)
Answered By Karl-Heinz Herrmann, Ben Okopnik, Jimmy O'Regan
Our readers are welcome to chime in on this thread :) -- Heather

Okay guys (and gals) ... I've been lurking for too long and have to ask a question :)

I've got a HP Laser 2550 connected via USB. Using Mandrake 2005LE which has a 2.6.11 kernel. Using CUPS for the printer.

[Karl-Heinz] I've some networked lasers and one on the parallel port here...

The printer works fine ... but, sometimes (after a fairly long uptime) printer commands just hang. Of course, this usually happens when my wife is the room and I'm trying to impress her with the power of Linux, etc.

[Karl-Heinz] ...and see occasionally the same. In our case the printer get's into some error state and cups automatically disables the queue but still accepts new jobs. Usually it's enough to to restart/reenable the cups queue by going to the web-configuration http://localhost:631/ and disable/enable the printer or on commandline (maybe as root) with /usr/bin/enable printername . You can't use just "enable" as that's a bash builtin which will not affect your printer at all (great command naming that!).
[Ben] I always have to remind my students in the shell scripting classes that "/usr/lib/rsh" is the correct invocation for the restricted shell in Solaris; plain "rsh" is the "remote shell" from the "r" utilities.
Back in those early days, all good *nix program names were four characters long; assuming the standard naming convention, in which only lower-case letters, numbers, and the underscore character are valid, you were restricted to 37^4 possibilities (gosh, only 1874161 possible programs - THAT must have been an incredible disappointment to new programmers trying to break into this highly restrictive field!) Now, however, with 255 characters for length and almost everything except '/' usable (although not necessarily a good idea!), when you could have program names like
This is the gadget that I use to write letters and send them to my Grandma
I find that kind of behavior somewhat boggling.

Was this a *nix restriction, or just a convention for lazy people who really didn't want to use ANY extra keystrokes?

[Ben] Y'know... I'm not sure. I think it was a sort of a generally agreed-upon convention, like "thou shalt name all your resource configuration files with a name ending in 'rc'" rather than a technical restriction. Anyone have input on this?
[Jimmy] From "A Brief History of the 'ls' command" (http://linuxgazette.net/issue48/fischer.html)

...............

When CTSS was superseded by Multics, the listf command was renamed to list, which could optionally be abbreviated to ls.

...............

Presumably the Bell Labs folks tended to use only the abbreviated versions and the naming convention stuck.
Also, according to Wikipedia's article (http://en.wikipedia.org/wiki/Bourne_shell), versions of Unix prior to V7 had a 127 byte limit for 'parameter lists'.

The files do end up in the cups spool directory. But, just sit there. The 3 or 4 times this has happened I've just rebooted and all is fine. But, that's a pretty dirty way to do this.

[Karl-Heinz] Could you check if it's just cups or the actual USB layer? What's in /var/log/messages, /var/log/cups/* ?

I do use a camera and mp3 player as well. But I really haven't seen a correlation between the printer problem and other USB usage. I sort of suspect that USB ports are being reassigned behind my back, but the printer is always powered on ... so that doesn't make sense.

Any ideas?

[Karl-Heinz] If it's really the USB layer you should find some hints in the logfiles.

GENERAL MAIL


Norwegian Minister: Proprietary Formats No Longer Acceptable

Mon, 27 Jun 2005 21:34:24 +0100
Jimmy O'Regan (The LG Answer Gang)
We had a note in News Bytes a couple months ago on this, and I suppose we could have commented then, but it's worth noting: governments are getting tired of being tied up by their own documents, there's better uses for red tape than that :) -- Heather

Full story at http://www.andwest.com/blojsom/blog/tatle/agenda/2005/06/27/Norwegian_
Minister_Proprietary_Standards_No_Longer_Acceptable_in_Communication_with_Government.html

(also available at http://tinyurl.com/axgga)


Home Folder Server tweaks

Mon Aug 1 09:45:29 2005
Dimitri Yioulos (dyioulos at firstbhph.com)

In issue 101, Avinoam Levkovitch published an article entitled "Home Folder Server For WIndows Clients". Unless there's another way, his script looks like a good solution for me, as I'm trying to automatically create users on a sendmail server from entries in a Windows 2003 Active Directory. I can't locate the author, am by no means a coder, have a couple of questions, and so thought I'd ask.

First, Avinoam's script:

See attached home-folder.sh.txt

Now, my questions:

1. My windbind separator is "\". However, I don't want that (that is, the domainname, as in "domainname\username") to be the home folder name. I just want it to be the username. Does the script strip out the domainname, or must I tweak it? If so, how?

2. There are certain users for whom I don't want to create home directories. These include all system accounts and those ending in $. How can I accomplish that?

Thanks!

Diggy


Booting Knoppix from a USB Pendrive via Floppy (obsolete!)

Mon, 22 Aug 2005 18:45:54 -0400
Jean-Luc Delatre (ben from linuxgazette.net)
Answered By Ben Okopnik, Mike Orr, Brian Bilbrey, Peter Knaggs, Jason Creighton, John Karns
[Ben] [ forwarded from off-list, with Jean-Luc's permission ]

Ahem, well...

Sorry if this bothers you but the whole trick you describe in

http://linuxgazette.net/116/okopnik1.html

does not work anymore since 3.8 (you did this in March with 3.7 didn't you?) because the kernel image alone is now larger than the whole floppy capacity.

[Ben] That's what I understood; one of our authors, Edgar Howell, was trying to do what I described, and reported exactly that.

In 3.9 there is not even a choice between 2.4 and 2.6 within the /boot/isolinux/ directory there is only one minirt.gz and one linux kernel image, no minirt24.gz/linux24

Anyway this trick was just more or less a duplicate of the mkbootfloppy script from Klaus Knopper which created TWO boot disks (one for primary booting, one for rebooting from a CD or CD image via an initrd). Given that the floppy space is now too short he didn't even bother to port it since 3.8

[Ben] I wonder if it's possible to make up a boot floppy that just fires up some minimal kernel with a USB module, then does a pivot_root() to the first detected USB device? I don't have the time to experiment with it these days, but sometime soon I'd like to play around with the idea.

Some REALLY SHARP hackery is now needed to boot from a non El Torito environment but if Klaus himself didn't bother or found out...

The cheapest trick is probably to buy a $15 ATAPI CD just for booting :-)

[Ben] It's about 10X - 20X that amount for a laptop CD-ROM, though. :)
[Sluggo] You got the frowny the wrong direction. :(
So desktop CD-ROM drives are now as cheap as floppy drives? That's one more nail in the coffin for boot floppies.
[Brian] Yes, and every time that I build a system, and think I can get away without installing that "legacy" floppy drive, I remind myself that I have always, always, always found a need, so I install it anyway.
[Sluggo] My current computer has a micro-ATX case with no room for a floppy drive. That has weaned me off it.
[Brian] So how do you handle BIOS updates?
[Sluggo] I've never updated my BIOS. I get a new motherboard every few years to go with a faster chip. I've only had a floppyless computer since December, when I upgraded from 450 MHz to 2.88 GHz. Now that I can compile Gentoo in a few days, run KDE with reasonable speed, and boot any distro I want, I don't know what would induce me to upgrade again. Especially now that the power consumption/heat rates have begun to catch up with the CPU speeds. I don't get peripherals until a couple years after the technology comes out (and often much longer), so who knows when I'll need something my motherboard can't handle. There are two annoyances with this motherboard:
  1. I had to jumper my 40 GB hard drive to a compatibility size to get the BIOS to recognize it. This was surprising given how new the motherboard is. I resigned myself to live with it, then happily discovered that Linux sees the whole 40 GB anyway.
  2. It won't boot with GRUB. But that's the case with a lot of motherboards, and LILO still works fine even if it's not as cool.
[Jason] Hmmm...what is a case where you'd want to update your BIOS? What is the BIOS used for these days other than bootstrapping?
[John] You might be surprised. It's tied into the chipset of the mobo, so affects things like apic, and a host of other things that aren't necessarily configurable in the BIOS setup. After flashing the BIOS on my laptop, both fans became functional, instead of just one.
[Sluggo] Bootable CDs have been enough to install/rescue Linux distributions. I bought a USB stick for transporting files, then gave it to my mom for backups and used my camera instead. The main problem is you can't just make somebody a floppy and let them keep it; USB sticks are too expensive for that. You can burn a CD but it's less convenient than mount/cp/umount -- plus they have to throw it in a landfill when they're through. Hmm, maybe I should give them a CD-RW so they can reuse it.
[Brian] The usual culprit is a flash BIOS update that runs either as a windows executable (sorry, I'm not going to entrust a BIOS update to Wine), or as a DOS-based app from a custom boot floppy. Now I could go to the trouble to get the image booted off of a CDROM, but if I do that ONCE per system, it costs me more (in my time) than buying and installing the floppy to begin with. The day I have to buy a motherboard without a floppy ... Well, I'll probably end up with a USB floppy drive that I can shuttle system-to-system, and do it that way. Or I suppose that an ELF executable wouldn't be out of the realm of possibility, eh?
[Peter] I have some across some USB floppy drives, and it turns out they're not so useful in the linux context, given that they show up as /dev/sda rather than /dev/fd0. I guess a similar problem might affect Microsoft software which hasn't been updated to cope.

Cheers,

Jean-Luc Delatre

P.S. I didn't have the problem with USB but with a SCSI CD not supported by my BIOS

Anyone with either: 1. more answers regarding knoppix (or maybe other live CDs) when your machine has no choice but to boot from floppy, or 2. notes about success using usb floppies as a boot device, feel free to chime in with mail to The Answer Gang :) -- Heather


using public nameservers for staying connected

Thu Aug 18 06:30:52 2005
Raj shekhar (The LG Answer Gang)
Answered By Ben Okopnik

This is a small addition to Ben's article "Staying Connected" (http://linuxgazette.net/115/okopnik.html ). He has a nice script for finding a working a working dns server. OpenNIC has a list of public dns servers (which honour requests from any client) available here http://www.opennic.unrated.net/personal.html or at the end of the page here http://www.opennic.unrated.net/public_servers.html .

Hope this is useful. Cheers

[Ben] Well, let's see -
# Print only the last set of servers
ben@Fenrir:~$ GET http://www.opennic.unrated.net/public_servers.html|perl -wlne'
if(/\bns[^\s]+/){@a=()if$f;@a=(@a,$&);$f=0}else{$f=1}END{print for@a}'
ns1.de.opennic.glue
ns1.jp.opennic.glue
ns2.jp.opennic.glue
ns1.nz.opennic.glue
ns1.uk.opennic.glue
ns1.la.us.opennic.glue
ns1.phx.us.opennic.glue
ns1.sfo.us.opennic.glue
ns1.co.us.opennic.glue
So far so good - BUT:
# I've saved the above list in "$list"
ben@Fenrir:~$ for n in $list; do host linuxgazette.net $n; done
ns1.de.opennic.glue does not exist (Authoritative answer)
Error in looking up server name
ns1.jp.opennic.glue does not exist (Authoritative answer)
Error in looking up server name
ns2.jp.opennic.glue does not exist (Authoritative answer)
Error in looking up server name
ns1.nz.opennic.glue does not exist (Authoritative answer)
Error in looking up server name
ns1.uk.opennic.glue does not exist (Authoritative answer)
Error in looking up server name
ns1.la.us.opennic.glue does not exist (Authoritative answer)
Error in looking up server name
ns1.phx.us.opennic.glue does not exist (Authoritative answer)
Error in looking up server name
ns1.sfo.us.opennic.glue does not exist (Authoritative answer)
Error in looking up server name
ns1.co.us.opennic.glue does not exist (Authoritative answer)
Error in looking up server name
So - after reading the site a bit more, it turns out that these are Not Just Plain DNS servers; you've got to be running BIND in order to use them, unless I missed something. Makes them less than useful to a fellow who's just looking for name resolution...

Duh!

Sorry about the half-researched tip. :-(

[Ben] Hey, man - that's what we do here, backstop each other. If I mistype some critical $thing, it's nice to know that (chances are) somebody here will catch it. 'Sall good - thanks for giving it a shot.

GAZETTE MATTERS


Subversion backends

Tue, 24 May 2005 13:39:05 -0700 (MST)
Mike Orr (LG Contributing Editor)

As is all too common with Subversion, LG's repository got wedged with a stale lock for the upteenth time.

% svn update
svn: Berkeley DB error while opening environment for filesystem
/var/svn/linuxgazette.net/db:
DB_RUNRECOVERY: Fatal error, run database recovery
svn: bdb: fatal region error detected; run recovery
[Ben] Due to the odd perms (particularly the 'group' settings), you can delete the files, but can't "chmod" them. In the above case, there's usually one file with the wrong UID or GID ('ls -l' shows the odd one); I just copy it to my ~, then copy it back (overwriting the original), then run 'svnadmin recover'. I used to have a script to automate this somewhere...
Our host runs a cron job that tries to fix these things. -- Heather

Subversion 1.1 has a new file-based storage backend that's immune to the BDB wedging problem. Another site I use switched to it, and said it was easy to dump the repository from the old system and restore it in the new one with history. Have TAGgers had any good/bad experiences with the new FSFS? Is it worth switching LG to it?

http://svnbook.red-bean.com/en/1.1/ch05.html#svn-ch-5-sect-1.3

[Ben] Might be nice; right now, it requires me to be available (or someone else who is familiar with SVN's quirks) if anything breaks, and minimizing SPOFs is always a good idea.
(!) [Heather] On the cheerful recommendation of our host (more notably, the lack of complaints from otherwise noisy clients of his that have switched) we will be switching to this backend midmonth, after we publish.


TAG blogroll

Tue, 30 Aug 2005 14:59:07 +0100
Jimmy O'Regan (joregan from gmail.com)

TAG members' blogs are getting more and more mentions, so I rolled up an OPML file (blogroll, whatever) for possible inclusion in this month's 'Gazette Matters' section. (It'd probably be nice to have some sort of static location for an updateable file, but I'll worry about that next month).

Comments?

If anyone wants in, fill out the template:

<outline title="" description="" xmlUrl="" htmlUtl=""/>

If anyone wants out, just say so.

See attached tag.opml.xml

(!) [Heather] I don't 'blog, I just occasionally pipe in on the TAG blurb about what's going on in the rest of things. But I do read them. Thanks, Jimmy!


*sigh* another disaster, another nose count...

Tue, 30 Aug 2005 20:19:31 -0700
Heather Stern (The Answer Gang's Editor Gal)

As an editor I have to say, this is not the kind of message I enjoy having to send out, much less that we've had to send out what seems like so many times in the last year.

[Ben] [sigh] Yeah. Dammit.

Nonetheless we cannot in good conscience fail to say it.

Could those among our scattered crew who live in the waterlogged zones under or near the hurricane's path please report on your successful escape? Thanks, and our hopes go out to you - and everyone out there.

[Ben] The bad part of it is that we don't have any location information on people other than country (at best.) Those who are in trouble are not likely to respond; those who can respond - and I don't mean to minimize them, but net access isn't a survival necessity - are probably in a lot less trouble than they could be. Perhaps we should start collecting people's missile addresses, for future use...
[Jimmy] I published mine already:
<foaf:based_near>
  <geo:Point>
    <geo:lat>52.6796</geo:lat>
    <geo:long>-7.8221</geo:long>
  </geo:Point>
</foaf:based_near>
Google Maps is a great way to find out your own location.
[Ben] One of our mirror maintainers, Jim Pierce (who also happens to be a net.friend from a long time ago) has reported in; he's safe, 400 miles inland at his sister's house... but his house is most likely destroyed.
My heart and my best wishes go out to those who are suffering. Kat and I are looking at charities to which best to contribute; for the moment, we seem to be zeroing in on Red Cross.

I saw this on one of the freenode channels I hang out in; my clock's set to Pacific.

16:57 <@dangle> "****ALL RESIDENTS ON THE EAST BANK OF ORLEANS AND JEFFERSON
                REMAINING IN THE METRO AREA ARE BEING TOLD TO EVACUATE AS
                EFFORTS TO SANDBAG THE LEVEE BREAK HAVE ENDED. THE PUMPS IN THAT
                AREA ARE EXPECTED TO FAIL SOON AND 9 FEET OF WATER IS EXPECTED
                IN THE ENTIRE EAST BANK. WITHIN THE NEXT 12-15 HOURS****
16:57 <@dangle>  Jeff Parish President.  Residents will probably be allowed back
                in town in a week, with identification only, but only to get
                essentials and clothing. You will then be asked to leave and not
                come back for one month."
16:57 <@dangle> that's rough
16:57 < klasikahl> jesus
16:58 <@dangle> that's from WWL
16:58 < klasikahl> they're under martial law to
16:58 < klasikahl> too

Roughly translated: when (not if) the pumps fail, a 9 foot wall of water will sweep down, expected within the next 12 to 15 hours... as of about 3 hours ago.

In yet another channel, a TV studio was reported as signing off planning to flee, when it started filling with water.

[Sluggo] On "The World Today 0200GMT" there's an interview with a WWL radio broadcaster in New Orleans, minutes before he left to seek refuge at their transmitter. http://www.bbc.co.uk/radio/aod/genres/news/aod.shtml?wservice/twt0300 (Aug/31/05, starting at 7:11 in the program)
One of the stranger twists of modern technology is that people in Louisiana were listening to this program (broadcast from London), and e-mailing in reports which were read on the program a few minutes later.
Who in the southeast are we missing? Ben checked in today.
[Ben] I'm in northern Florida. Jay, however, is in the south somewhere, IIRC, and this 'cane - not nearly at that intensity, but still - went over the south part of this state. Has anybody heard from him since? Jay, you out there?
[Breen] He posted this morning on NANOG.
[Ben] Thanks much, Breen; I'm glad to know it.

I've been hearing about cool things like soda pop plants turning off half the equipment so they can churn out cans of plain tap water, unpainted, to be sent into the rescue areas by the truckload.

The discussion on this topic turned to politics - things done, or not done, that led to things getting so drastic - more on that next month. -- Heather

This page edited and maintained by the Editors of Linux Gazette
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/

 

Copyright © 2005, . 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 118 of Linux Gazette, September 2005

next -->
Tux