...making Linux just a little more fun!

January 2006 (#122):


The Front Page

By Heather Stern

Herds of wildelaptops roaming free across the African plains

[BIO]

Ubuntu Linux is a Debian derivative distribution of Linux aimed at being fairly easy for someone new to the Linux environment - the ordinary user - and having a somewhat different and thereby hopefully faster version release process. Their motto is "Linux for Human Beings", and Canonical Ltd. in the UK supports them professionally.

This image was inspired by the IRC chat clients found in the Ubuntu default installation (or perhaps their live CD) whose quitline proclaims "set your system free with Ubuntu!" or something like that. It led an IRC friend to joke about herds of wildelaptops wandering free across the African plains...


[BIO]

Did you know that the word "wildebeest" refers to a gnu? Or that the GNU project's sourceforge equivalent is named Savannah? I found the opportunity to wish everyone a visual "Happy GNU Year" too good to pass up.


The African herd that this image describes consists of an image from Dr. Steve Barrett's safari photos (I hope he doesn't mind) and some pictures of various laptops.

Specifically, this shows an Asus 3300, a Toshiba Tecra 8200, and clipart of a Powerbook and something more generic. That's right, kids; Ubuntu has a PPC edition that runs quite nicely on Powerbooks. I've found that the more generic a laptop, the better Linux's chances seem to be... but don't hold your breath about any softmodems. The Blue Wildebeest is a common breed, but the IBM imagery I found didn't seem to suit the angles I needed.

May your gnu year be just a little more fun than last year...


Heather is Linux Gazette's Technical Editor and The Answer Gang's Editor Gal.


[BIO] Heather got started in computing before she quite got started learning English. By 8 she was a happy programmer, by 15 the system administrator for the home... Dad had finally broken down and gotten one of those personal computers, only to find it needed regular care and feeding like any other pet. Except it wasn't a Pet: it was one of those brands we find most everywhere today...

Heather is a hardware agnostic, but has spent more hours as a tech in Windows related tech support than most people have spent with their computers. (Got the pin, got the Jacket, got about a zillion T-shirts.) When she discovered Linux in 1993, it wasn't long before the home systems ran Linux regardless of what was in use at work.

By 1995 she was training others in using Linux - and in charge of all the "strange systems" at a (then) 90 million dollar company. Moving onwards, it's safe to say, Linux has been an excellent companion and breadwinner... She took over the HTML editing for "The Answer Guy" in issue 28, and has been slowly improving the preprocessing scripts she uses ever since.

Here's an autobiographical filksong she wrote called The Programmer's Daughter.

Copyright © 2006, Heather Stern. 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 122 of Linux Gazette, January 2006

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.


AOL emulator

Sat, 31 Dec 2005 00:59:27 -0500 (EST)
MXRADAR (MXRADAR from aol.com)
Question by tag (tag from lists.linuxgazette.net)
Answered By Mike Orr, Jimmy O'Regan, Pedro Fraile Pé, Jay R. Ashworth

I recently set up a machine with Suse 9.2 and would like to go online with it. I purchased a Creative Labs Model DE-5621 Serial Modem to use with it but am in need of some kind of AOL emulator to be able to tie in to the AOL servers. In experimenting with the machine, I can hear it dial out and attempt connection but that's about it. Any suggestions/souce for this emulation software. Thanks.

[Sluggo] I haven't heard of any AOL client software for Linux. If it doesn't work with the standard 'ppp' package, you may have to try another dialup ISP and access AOL through its website. If you're having trouble with your ppp configuration, post what configuration you have and what exactly you hear from the modem. You should hear a steady tone from both sides, then it will go up and down in pitch, then turn into a hissing sound. But the speaker may be configured to shut off at an earlier point.
I think ppp also has a debug mode that will show all the communication with the server. That may provide a clue where it's blocking.
[Jimmy] I don't think AOL works with straight ppp. Heather mentioned a package that did what the querent is looking for a while back, but the closest I can find is this comment from Ben: "I have not yet run into an ISP to which I couldn't connect (AOL is neither an ISP nor anything that I want to connect to; I'd hate to wash my modem out with soap...)"
The best I can remember is that the site was mostly in French, and the name (shockingly) had something to do with penguins.
[Pedro] Looking into the Ubuntu repositories for something related to AOL, I have found "penggy". The package page shows
connects to AOL via modem or TCP/IP

The project aims to be a full AOL client including all known access
methods like DSL, cable, TCP/IP or modem (with the modem-emulation of
linux via /dev/ttyI* ISDN, too).

Currently, only TCP/IP and modem is supported.
Please bear in mind I have never tried it, nor know really anything about AOL ...
[Jimmy] That's it! The project's website is here: http://savannah.nongnu.org/projects/pengfork
[Jay] AOL connectivity uses PPPoE. If you're stuck behind one with a Linux box, get a compatible router and use that to provide (NATted) IP over Ethernet.
If you want an AOL client for Linux...
well, a version of AOL 5 ported to Linux leaked out the door, and I have a copy once, but I can't find it now, and I can't remember what it was called.
(!) [Jimmy] Does anyone out there have experience with penggy, or the version of AOL 5 Jay mentioned?


wav files from MR8 recorder

Tue, 15 Nov 2005 17:21:29 -0700
Bob van der Poel (bvdp from uniserve.com)
Question by The Answer Gang (tag from lists.linuxgazette.net)
Answered By Jimmy O'Regan

Hi all. A bit of a "forgot my thinking hat" problem here....

I recently purchased a Fostex MR8 digital recorder. I'd not try to go into the recording business with this toy, but for playing around a home with multitrack recording it's a fair bit of fun.

This unit records onto compactflash cards, which I can load onto my linux box from a card reader. No problems here.

And, a program like audacity can read, modify and mix them. Again no problem.

Unless the track is just a partial track with an offset. For example (see the adl file below), I have recorded some tracks from the start of the song. But, 2 tracks are just a little segment in the middle of the song.

See attached rainbow.adl.txt

I know that wav files can have offsets in them (I think), but it seems from looking the the wav file headers that this isn't so here. And, audacity certainly doesn't find the offset.

So, when I load all 5 tracks into audacity tracks 1 and 2 are aligned to the start of the song. They should really start about 40 seconds in. I can move the tracks in the program, but I'll never get them aligned.

[Jimmy] About 42 seconds in? Look at the end of the entries:
00.00.42.05L0244        00.01.26.08L0254        _
      ^^^^^
My guess is the second time field is the length of the track.

Yes, I think that is correct. I have no idea what the stuff after the "L" is.

[Jimmy] Pan settings, maybe, or volume?

Thanks for offering to look up the wav stuff. I'm thinking that if I can get this figured out it'd be easy enuf to write a little program to "fix" the files as they are copied from the CF card. Right now I'm copying all the files, including some junk files. But, it'd be easy to read the text file for the filenames, etc.

[Jimmy] Ecasound would probably be better than Audacity for this: it's a command-line based multitrack editor: http://eca.cx/ecasound

But, wait, the MR8 seems to keep track of stuff in a file. I think that the data in the <EVENT_LIST> section is what I need to look at. But, I'm not sure just what the different fields mean. Anyone with some experience here?

I do know that the files MR80009.WAV, MR80003.WAV and MR80004.WAV are recording of the complete song and MR80011.WAV and MR800012.WAV are partials.

Guess what I'm asking is help in modifying the 2 files to push them into the correct position.

[Jimmy] I'll get back to you on that. I can't think of it off the top of my head, and it's too late to look now, but I'll look at it tomorrow.
[Jimmy] Doh! Use the time shift tool (the one that looks like this: <-> ;) and drag the tracks into place. IIRC, if you set a mark on the timeline before you import the tracks it'll put them at that time.

Yes, I tried that but was unable to align the 2 to the point of making it sound okay. One track was just a bit late or early. Maybe my mouse is to shakey. Unfortunately there doesn't appear to be anything to "align" to. And, even if I got this working once, I'd have to have to do a 2nd time :)

[Jimmy] There is a zoom tool...


Linux as a Windows screensaver

Thu, 22 Dec 2005 21:16:14 +0000
Jimmy O'Regan (The LG Answer Gang)
Question by The Answer Gang (tag from lists.linuxgazette.net)

http://www-128.ibm.com/developerworks/linux/library/l-scrnsave

It uses qemu to boot Linux on a Windows machine. Spiffy.

(!) [Jimmy] Something I've wanted to see ever since I first saw coLinux is a screensaver activated configuration of a cluster-enabled coLinux.
Does anyone care to try their hand at writing an article about this, or some other unusual way of getting Linux running under Windows?


USB MIDI

Thu, 08 Dec 2005 16:56:08 -0700
Bob van der Poel (bvdp from uniserve.com)
Question by The Answer Gang (tag from lists.linuxgazette.net)
Answered By Thomas Adam

Hey, I was going to send a message about how pleased I was with my newest toy that "just worked" ...

Got a MIDIsport UNO midi interface. This plugs into a USB port and drives a MIDI keyboard. Got it and plugged it in and (to someone really expecting to do a bunch of manual editing of config files) I found that the alsa drivers found it, registered, etc.

Cool! Now I have a 2nd midi port.

Then I decided to clean up some cable runs and powered off the computer.

When I rebooted, the new MIDI port was gone. Huh??? Checked the cables...and listed /proc/bus/usb/devices ... yes, all there. But, ALSA doesn't know about it.

So, I plugged the MIDIsport in and out ... and it works again.

So, ALSA finds it on hotplug, but not boot. What's going on?

BTW, to this point I have not edited any config files :)

[Thomas] Order of operations, most likely. It's likely that ALSA is loading after hotplug has finished, which means it might not be aware of the device. You can restructure your init sequence, or simply recall /etc/init.d/hotplug to rerun at the end of init, assuming this really is the reason.

That was my first guess. And I've done a bit of testing, etc. and have discovered that the device is found and registered at boot. The interesting part is that if I use alsamixer right after boot it shows the MIDI-Uno-USB device (alsamixer is just grabbing info from /proc/asound/cards). But, the device is NOT there to use. Trying to use it generates an error; and 'aconnect' doesn't show it.

[Thomas] What error?
bob$ aplaymidi -p72 midifile.mid
Cannot connect to port 72:0 - Invalid argument

Not the most helpful :( But, the port isn't there, so it makes sense.

However, plugging the unit in/out again shows it up.

I'm wondering if a modprobe to something might force a registration. I did try 'modprobe usb-midi' but no results there.

[Thomas] No results where? modprobe, if it is successful won't return any output. It's 'lsmod' that will help you here.

I was hoping that modprobe might reset something?

Okay, doing a lsmod before and after the little guy is working does show up something which might point to the problem:

Before a plugin/out (after boot) we have:

soundcore               7008  2 snd,usb_midi
usbcore               108348  7
         snd_usb_audio,snd_usb_lib,usb_midi,usblp,ehci_hcd,uhci_hcd

Afterwards, there is an additional line:

audio                  44032  0

And the others have changed to:

soundcore               7008  3 audio,snd,usb_midi
usbcore               108348  8
        audio,snd_usb_audio,snd_usb_lib,usb_midi,usblp,ehci_hcd,uhci_hcd

Really, just the difference in all this is that the 'audio' module has been added.

Also, there is a file /proc/asound/cards which does not change between no-work and work:

cat /proc/asound/cards
0 [AudioPCI       ]: ENS1371 - Ensoniq AudioPCI
                     Ensoniq AudioPCI ENS1371 at 0xec00, irq 10
1 [Interface      ]: USB-Audio - USB Uno MIDI Interface
                     M-Audio USB Uno MIDI Interface at
   usb-0000:00:10.1-1, full speed

Finally, the file /proc/asound/card1/midi0 has changed from being an empty file to:

bob$ cat midi0
USB Uno MIDI Interface

Output 0
  Tx bytes     : 197
Input 0
  Rx bytes     : 0

More thoughts?

BTW, on Mandriva 2006 there is NO /etc/init.d/hotplug :) I have no idea when this stuff is being done. I think there might be some clues in /etc/hal/device.d


GENERAL MAIL


H/W requirement for KDE 3.5 ?

Tue, 03 Jan 2006 14:58:11 +0530
J.Bakshi (hizibizi from spymac.com)
Question by tag (tag from lists.linuxgazette.net)
Answered By Rick Moen, Thomas Adam

Hi list,

does any one of you have the information about the H/W requirement of recently released KDE 3.5 ??

[Rick] Mu. (http://www.catb.org/~esr/jargon/html/M/mu.html)
It makes no sense speaking of KDE 3.5 having particular hardware requirements, since it is a suite of software running at a level far above the level of hardware drivers. If you mean "What's a reasonable minimum amount of RAM to have, so that a default configuration of KDE on Linux will seem OK?", then the answer is probably around 256MB, which is based on experience with earlier releases, but with the knowledge that it doesn't seem to change a lot between releases.
[Thomas] Not to mention that this was answered in a thread on TAG a few issues ago -- asked by Mr. Bakshi himself. :|
(!) [Jimmy] I believe "please share your experiences" in LG #119 is the thread Thomas is referring to.
If it helps, the KDE website does have a requirements page but this refers to compilation requirements.


response to article on scanning

Thu, 29 Dec 2005 05:10:55 +0100
Edgar Howell (Edgar_Howell from web.de)
Question by editor at Linux Gazette (editor from linuxgazette.net)

My article on scanning drew responses from a couple of readers, one, Emil Gorter, who copied you and whose suggestion I find well-done and certainly worth making available for those wanting to archive scans.

And Juhan Leemet politely pointed out that XSANE does, indeed, have the function that I really wanted for use as a copier. He had a problem with it that he hadn't had time to resolve and I then had the same for which I did find a work-around. It is tantamount to using your brakes instead of taking your foot off the gas, so I don't want to suggest it to anyone.

But the bottom line is that using XSANE to copy directly from scanner to printer can work quite nicely.

ech


Scanning and file-size

Fri, 16 Dec 2005 19:15:45 +0100
Emil Gorter (emil from ripe.net)
Question by lg (lg from howell.de)

Hi Edgar,

I read your article http://linuxgazette.net/121/howell.html and it reminded me of a problem I had faced. For my work I had to figure out a way to scan and store contracts digitally. The file-size issue was quite interesting with ++6000 pages to go :-)

I found that creating PDFs is quite easy, and gives very good results. Nice quality, great reduction in size. Example:

 $ tiff2ps -2 -a Scan0001.tif | ps2pdf -sPAPERSIZE=a4 - > Scan0001.pdf
 $ ls -1 --size -h Scan0001.*
 1.1M Scan0001.pdf
  25M Scan0001.tif

By the way, for practical reasons the scans were made with a Windows machine.. Still have to try SANE myself someday.

I hope this helps!

Emil Gorter


"Summer of Code" projects list updates

Tue, 08 Nov 2005 06:39:48 +0000
Jimmy O'Regan (The LG Answer Gang)
Question by ()

First of all, I would like to offer my most sincere apologies for the negative way I portrayed the WinLibre installer projects. What I took to be a duplication of effort was in fact three separate parts of a larger system. Thanks to Noemi Tojzan for providing this corrected project list:

     Finished projects:
         - installer (2 students)
         - updater (1 student)
         - control centre (1 student)
         - MacLibre (1 student)
         - 3 -original- games (3 students, 1 per game)
         - Final Touch (or Image Manipulation Tool) (1 student)

     Failed projects:
         - CDRoast GUI (1 student)

There were also inaccuracies in my list of Wine's projects. Thanks to Kai Blin for providing a corrected list:

Thanks to Patrick Walton for a list of LiveJournal projects:

Thanks to Meredith Patterson for pointing out that I had (originally) listed Charun mistakenly instead of QBE (http://pgfoundry.org/projects/qbe), to Ivan Beschastnikh for providing the correct title to the Internet2 project I had listed as "User-space transport": FB-FR-CCCP (http://fb-fr-cccp.sourceforge.net), to Jimmy Cerra for pointing out two Semedia projects: SWAPI (http://swapi.ourproject.org) and SPARQL for various RDF databases (http://sourceforge.net/projects/sparql), and to Anil Ramnanan for pointing out an Apache project: an Eclipse plugin for Apache Forrest.

Thanks to Ross Shannon for pointing out these Gallery projects:

I owe a rather sheepish apology to Oleg Paraschenko, one of the Google-mentored students: I had found XSieve, but lost the details when it came time to write my article. Oleg has more than made up for this:

I later found a complete list (http://development.openoffice.org/summerprojects.html) of Open Office projects:

I would encourage anyone interested in "Summer of Code" to have a look at Google's list of projects (http://code.google.com/soc-results.html)


NetPBM equivalent for vector graphics

Sun, 16 Oct 2005 20:55:25 +0100
Jimmy O'Regan (The LG Answer Gang)
Question by The Answer Gang (tag from lists.linuxgazette.net)

http://scratchcomputing.com/projects/uber-converter

Mentioned in a Newsforge story about Xara open sourcing Xara Extreme:
http://trends.newsforge.com/article.pl?sid=05/10/13/1941236&from=rss

Also in Newsforge today: Finding voice codecs for free software
http://software.newsforge.com/article.pl?sid=05/09/28/1646243&from=rss


GAZETTE MATTERS


found something in the attic...

Wed, 28 Dec 2005 17:43:27 +0100
Karl-Heinz Herrmann (khh from khherrmann.de)
Question by The Answer Gang (tag from lists.linuxgazette.net)

Hi I'm working on my Laptop again after a long while during which it was just sitting in the corner. I found something in the old draft folder -- And I've no idea if that ever got sent. So here you go....

Oh and a happy new year to everybody.

K.-H.

On Tue, 25 May 2004 09:38:38 -0400
Ben Okopnik <ben@callahans.org> wrote:

> I'm writing to you because you're the "quiet bunch" :)

thanks ;-) I was following the "linuxgazette.net down" thread with half an eye.

> Right at the moment, we've got a TAG discussion going on where I've
> asked for input from everybody on the above topic. To restate it,
> I'm looking at ways to bring LG onto a parallel course with Linux
> itself: the OS is booming, but we're lagging. From my own perspective,
> I see a need to modernize a bit; to consider the types of people now
> entering the world of Linux (corporate and business users) and to
> address their needs. "Amateur Linux user" does not, these days, mean
> "amateur computer user".

lets start with history: I started out in TAG when many questions came it on general install questions like partition setup, lilo tricks to make it work, lost root passwords. As TAG is no newsgroups with expiring articles after some time we had perfect in depth solutions to everything in this category of FAQ. The level of discussion in TAG was slowly moving up in complexity and/or detail of a particular problem. I got the feeling even before the com->net switch that there is a little stagnation in worthwhile topics and things I/we can answer. At the beginning there were questions e.g. on network setup on a level I could join in at least answering in part. It's quite a while that I've seen a question I had any chance answering.

Others have suggested finding out wher new and current Linux users and LG readers are and pick them up at their level and target their interests. Pretty good idea, but I rarely use a GUI so I can not speak of first hand experience. I just installed the brand new SuSE 9.1 which came along with a collection of spiffy K* applications from Mind mapper to notes keeping and e.g. GTKtalog to catalog CD contents. Important to me right now as I've a growing CD collection in CD storage bags and I spend more and more time searching for a particular one. Well -- I read in a bunch of CD's, program crashed twice so I pressed the save button frequently. GUI interface is nice, pop in CD press a button, CD content is archived. Next CD. A few days later I tried to open the archive -- program segfaults. I've still the XML export of the data.... rather unreadable without a conversion program/frontend. My next try will certainly be a bunch of "ls -R" files which I can grep. But it seems this kind of solution is nothing we can sale to "the new TAG reader" as they want "aesthetic solutions" as sombeody put it.

I agree with that analysis BTW: from talking to people either having a Linux on some second partition to considering installing one, they want the perfect solution, GUI, everything away only a few mouse clicks. And they want pretty looking neat applications for everything.

My problem with that is: I don't have the answers, as the "nice neat applictions" might not be there or at least I don't know of them. There might be a need of new TAG/article writers for a new type of readers.

So the task at hand might be to attract new members to LG writing for these new readers.

Many topics I was concerned with lately (Wlan, AMD64) are highly specific, involve kernel patches and or/special distributions which are not suitable for new comers to Linux.

Which leads me to a little question anyway: Is LG to be for newbies?

An idea anyway: By talking to people (here in Germany that is) more and more are annoyed about the spam flood. It might hit here slightly delayed compared to US, or maybe not. Well I was searching a bit for Win solutions as all of them run WinXX. No luck with freeware or even open source (portable, cygwin) solutions. So my standard answer is getting "well, since you won't consider Linux pay up for a commercial spam filter".

An article on how to use a Pentium classic PC from the attic and turn it into a Spamfilter-firewall in a recipe (starting out at the point where you insert a knoppix or install CD) might be interesting to some people.


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/

Published in Issue 122 of Linux Gazette, January 2006

More 2 Cent Tips!

See also: The Answer Gang's Knowledge Base and the LG Search Engine


Just Bad and Wrong... yet cool

Rick Moen (LG Contributing Editor)
Question by ()
Answered By Jimmy O'Regan, Ben Okopnik

"bash is terrifying me again":
http://www.livejournal.com/users/mendel/128965.html

Bash pseudo-sockets: Oh my!

followed by: "Dude, you've got a smiley in your prompt."

[Jimmy] Followed by:
:) fishsticks$ false
:( fishsticks$

[Raj] How did he do that. I want something like that too. If anyone knows, do tell.

[Jimmy]
jimregan@jimmy ~
$ echo $PS1
\[\033]0;\w\007 \033[32m\]\u@\h \[\033[33m\w\033[0m\] $

jimregan@jimmy ~
$ smiley () { if [ $? == 0 ]; then echo ':)';else echo ':(';fi; }

jimregan@jimmy ~
$ PS1="\$(smiley) \h$ "
:) jimmy$ false
:( jimmy$ true
:) jimmy$
Um... I should probably explain that.
$? holds the exit status of the last process: zero for success, non-zero for failure; $PS1 is the primary prompt.
It's \$(smiley) because you want bash to evaluate it every time: $(smiley) would just evaluate it at the time you set the variable, as would putting the contents of the smiley function into PS1
\h is the shorthand for \$(hostname)
[Ben] Darn it, Jimmy, you always beat me. What, you have a fast connection or something? :)
[Jimmy] My connection, in "the cheque is in the mail" speed is 115.2 Kbps, so no.
[Ben] My way was just slightly different:
# More-or-less undocumented Bash-ism - a C-style trinary operator
smiley () { echo -e ":\\$(($??50:51))"; }


BSS and Data Segment

Mike Zheng (mail2mz from gmail.com)
Question by tag (tag from lists.linuxgazette.net)
Answered By Lew Pitcher

Hi All,

For a program, the BSS contains un-initialized variables, Data contains initialized variables. Why do we want to separated these two categories of variables?

[Lew] It's an optimization thing. If each binary contained an image of 'data' that included the uninitialized variables, then the binary would be larger in size than if the image did not include uninitialized variables. If you don't map these variables to your 'load image' (the contents of the binary), but instead, map them to memory at execution time, your binaries can be smaller without a loss of functionality.
The 'typical' (conceptual) memory map (once a program has been loaded into memory) looks something like this...
          +----------------+
          |  stack space   |
          |       :        |
          |       v        |
          |                |
          |                |
          |                |
          |       ^        |
          |       :        |
          |   heap space   |
          | .. .. .. .. .. |
          |      BSS       |
          +----------------+
          |      DATA      |
          |                |
          +----------------+
          |     (CODE)     |
          |                |
          +----------------+
(on most implementations, CODE is kept in a separate address space from DATA/BSS/heap/stack)
Heap 'grows' up from the end of BSS towards the highest address Stack 'grows' down from the highest address towards the end of the BSS Heap allocation code keeps a boundary between the top end of the heap and the bottom end of the stack.
The 'loadable' part of the binary is the CODE and DATA part. BSS is how the loader accounts for the room needed to hold the uninitialized data.

Some program clear the BSS by itself, is it necessary?

[Lew] A mere convenience, nothing more.
HTH


email issue

J.Bakshi (hizibizi from spymac.com)
Question by tag (tag from lists.linuxgazette.net)
Answered By Jimmy O'Regan, Rick Moen

Hi list,

At first I wish you all a very ******HAPPY NEW YEAR******.

Here is a technical query. Frequently I get some advertisement-emails with EMPTY "form" header & EMPTY "to" header. Even the "detail-header-view" of sylpheed-claws can't show any header information. What is the technology which makes this possible and how can we prevent such emails ?

[Jimmy] The technology that makes this possible is called [drumroll]... SMTP!
To see how it works, use telnet:
$ telnet smtp.o2.ie 25
220 smtp1.o2.ie -- Server ESMTP (Sun ONE Messaging Server)
MAIL FROM: test@example.com
250 2.5.0 Address Ok.
RCPT TO: jimregan@o2.ie
250 2.1.5 jimregan@o2.ie OK.
DATA
354 Enter mail, end with a single ".".
From:
To:
Subject: Test

A test
.
250 2.5.0 Ok.
QUIT
221 2.3.0 Bye received. Goodbye.
Now, I check my mail. In Mozilla Mail, it shows up as this:
Subject: Test
Date: 11:45

A test
View->Message Source:

See attached mbox.txt

What'll be interesting now will be to see how many mail apps that use mboxes are broken by that } :)
[Rick] J.Bakshi's other question was:
...how can we prevent such emails ?
The answer is [drumroll]... don't use SMTP e-mail.
Or alter your receiving SMTP server's filtering rulesets to reject or drop incoming mails not meeting certain technical requirements, including possession of key header lines. Generally, this requires running your own SMTP host (mail tranfer agent) -- rather like A.J. Liebling's dictum that freedom of the press is limited to those who own one.

Thanks to both Rick Moen and Jimmy O'Regan for their explanation. Jimmy's answer is a bonus as he explained through a good practical example. I have just come to know mixmaster. Though haven't gone through its documentation yet, but aptitude show mixmaster shows that it can prevent the recipient knowing your email address.

[Rick] Er, you might have a use for mixmaster, but the preceding discussion didn't seem to suggest that, and I fear that you might be misunderstanding its intended purpose.
Mixmaster is a client-server software tool for people running MTAs (SMTP machines), and their users, with the client piece allowing the users to issue pseudonymous e-mails, which the mixmaster daemon (server) piece then remails on their behalf.
It would be very strange to send your routine, normal outgoing mail through Mixmaster, specifically because it would greatly obscure the identity of the sender. Further, and more to your original point, it would do nothing to prevent you from also receiving spammer-and-malware generated junkmails at your real e-mail address, such as the garbage mail you cited that had a couple of null interior headers.
As Ben knows, I've long been of the opinion that pretty much all "hide from spammers" strategies (including, well, "preventing the recipient knowing your address") are a dumb idea, really don't work worth a damn, and interfere with legitimate Internet usage to a degree I find unacceptable. At least for those of us who control our own MTAs, there are effective countermeasures, that don't involve self-concealment in any way.

Thanks Rick. You have provided a short as well as good article on Mixmaster & its application ( I may be permitted to say for beginners ). Now I can under stand that as a Workstation owner ( and not an MTA) I don't need Mixmaster. Thanks again.


Running isoLINUX from a REALLY old machine

R.M.Deal (deal from kzoo.edu)
Question by tag (tag from lists.linuxgazette.net)
Answered By Ben Okopnik

I just read the enlightening article Booting Knoppix from a USB Pendrive via Floppy by Ben Okopnik from the #116 issue of the LINUX gazette.

[Ben] Well, thank you for the compliment - and I'm glad you enjoyed the article.

I have a similar problem but with an older machine, a Toshiba Satelite Pro 410 CDT, for which I have an external floppy drive. My problem is that the BIOS does not give me the option of booting from a CD. I can boot from either the hard disk or from the floppy.

[Ben] Have you looked for a BIOS update? I'm not saying that one is definitely available, but if it is, then that would be the simplest solution. Take a look at Toshiba's site and see if there's a download available.

Great suggestion. I shall do that.

Now while I found one article on booting Knoppix from floppies, I wonder if it would be a big deal to modify the script developed by Ben to produce a Knoppix boot, not for a USB pen drive (this portable has NO USB port) but from a floppy. By the way, the Toshiba has installed as an operating system Windows 95 and has only 16 M of RAM so running even KNOPPIX may be a challenge.

[Ben] The problem is that, shortly after I wrote the article, the information in it became outdated: the next release of Knoppix had a minimum size for the kernel/modules/etc. that was much too large to fit on a floppy. However, for your application, there's an easy answer - or at least used to be (I don't have a Knoppix CD handy to check): just fire up your Wind0ws, look at the Knoppix CD, and there should be a batch file there called "mkfloppy.bat". Run it; after it writes a boot floppy for you, simply reboot, leaving both the floppy and the CD in the machine.

Well, almost. I could not get anything under my Windows boot on the portable (a laptop only if you have strong quadriceps) so I booted my LINUX system (suse 9.3) with KNOPPIX and couldn't find a mkfloppy.bat there.

[Ben] That wouldn't have helped anyway, since all the commands in the batch file are DOS programs.

Right, but I could not find the batch file from W95 or suse.

However, in a file knoppix-cheatcodes.txt, the procedure to handle floppy boot only is described, using a LINUX command in KNOPPIX named mkbootfloppy. However, when I boot with KNOPPIX, I can find no such file, only a mkboot. That mkboot command looks right but when I run it with an installed blank floppy, after writing on the floppy drive, I get an error message, in German. Now I am living now in Germany (Weimar) and am taking a course in German but I do not have the resources to fully translate technical German.

[Ben] Whoops... Perhaps you could post that error? My technical German has risen above zero (in part, due to Knoppix :), and there are several German-speaking folks here who could help.

OK. Attached is a script of what happened when I tried to produce the boot floppy. It was interesting making the script in KNOPPIX and transferring it to /mnt/hda2/home/ralph/ after mounting /mnt/hda2. Please note that I am working with Knoppix V3.8.1 (2005/04/0 8). I am not updating right now because I cannot get DSL in Weimar despite having it in Munich and so am having to use ISDN (hence my switch from Fedora to Suse) in which I can get no flat rate! Once DSL is available ("tomorrow"), I'll update my version.

Script wurde gestartet: Mo 21 Nov 2005 10:21:56 CET
root@4[~]# mkboot

Insert a floppy diskette into your boot drive, and press <Return>.

Creating a lilo bootdisk...
cp: Schreiben von ,,/tmp/boot15663/vmlinuz": Auf dem Gerät ist kein Speicherplatz mehr verfügbar
root@4[~]# exit

Script beendet: Mo 21 Nov 2005 10:23:11 CET
[Ben] "No space left on device". At least the version with the umlauts, etc. - "Auf dem Gerät ist kein Speicherplatz mehr verfügbar" - means that. Seems that it's not all that uncommon: searching the Net produces a number of hits. It seems that in some cases, this is produced by bad floppies - but in other cases, it's a result of bad communication with an external floppy drive.
I'd suggest making the floppy from your Wind0ws, just to see if it works. Having two OSes can be handy for resolving "is it hardware or software?" questions.

I plan on working on deciphering that error message but meanwhile I took the floppy that resulted from that action and tried to boot my portable with it. Unfortunately, it only booted into W95; it seems the boot floppy is faulty. You referred to two floppy disks and so did the cheatcodes.txt file but there was no prompt to put in a second floppy. It may be time for me to contact the programmer of KNOPPIX directly to see what the problem is. I'm guessing that the cheatcodes.txt file was written for an earlier version of KNOPPIX and doesn't describe the procedure correctly for the new version. Did I say LINUX was fun??

[Ben] Sure. Part of the fun is the ability to make things happen that aren't the norm. :)

Second, related, question: does anyone recommend a version (old if necessary) of LINUX that would work well as the operating system on the Toshiba?

If these are in some FAQ, I'd appreciate a link.

[Ben] I find that Puppy Linux (http://www.goosee.com/puppy) works well on older machines, although I haven't done a broad range of experimentation with it; it has a nice desktop and a sufficient range of installed applications that I don't find it restrictive. Other folks here may have other suggestions.

Ain't LINUX fun, Ralph

[Ben] [grin] Actually, yeah. I like it, m'self.


Tuppence Tip: URL scraper.

Thomas Adam (thomas from edulinux.homeunix.org)
Question by TAG (tag from lists.linuxgazette.net)

Hello --

This is really an on-going issue from my post regarding urlview and the logging of URLs. I've since decided to take a different approach, and thus far this method works quite nicely. I'm now using 'multi-gnome-terminal' (MGT), 'multitail', 'gmrun', plus a helper script. The overall aim of all of this, was to be able to:

You might wonder what's so hard with this -- the problem is that X11-forwarding on my server takes forever -- it is only a poor P166 with 64MB of RAM, after all. The irssi session resides on the server, so I needed a way of pseudo-opening the URLs as though the request originated on my workstation.

It's unfortunate that I have to use MGT, since it is a memory hog, but needs must. I use it because that has the ability to automatically hotlink URLs -- so that actions can be assigned to it when they're clicked on. Based on this premise, filling in the gaps was easy.

I mount my server's filesystem via 'shfs' -- which I'm now using as a replacement for NFS. I really like it (and a lot less buggy than lufs, and its ilk). This way, I can use multitail to keep an eye on that file. The url logging script that I use from irssi, is "url_log.pl" [1]. All of the logged entries are in the format:

Sat 10 Dec 2005 00:57:08 GMT nick #chan URL

... and I wanted multitail to colourise the output, as it does for other files. That was easy -- just create a new colourscheme for it in /etc/multitail.conf:

###URLlog
colorscheme:urllog
cs_re:green:^... .. ... ....
cs_re:magenta:..:..:.. ...
cs_re:red:.* \#fvwm (http|https|ftp)://.*$
cs_re:blue:.* \#bash (http|https|ftp)://.*$
cs_re:cyan:.* \#elinks (http|https|ftp)://.*$
cs_re:yellow:.* \#hug (http|https|ftp)://.*$
scheme:urllog:/mnt/home/n6tadam/.irssi/urls/url

So to break this down a bit, remember a typical entry from this file will look like:

Sat 10 Dec 2005 00:57:08 GMT nick #chan http://myfoo.com

Hence: "Sat 10 Dec 2005" will appear in green. "00:57:08 GMT" in magenta, and the rest of the line will appear in whichever colour is matched by the channel the URL was quoted in. So, it looks pretty. :)

scheme:urllog:/mnt/home/n6tadam/.irssi/urls/url

... should obviously be changed to match whichever file is going to hold the urls from the url_log,pl script.

The next stage was to determine what happens when I clicked on a URL (I say click -- the shortcut to opening a URL via MGT is 'CTRL + middleclick'). I didn't want everything to be sent to my browswer. This is where the "gmrun" utility comes in useful [2]. For those of you that have never used it, it's a very handy, and customisable tool. One of the features it has, is pre-defining prefixes for certain applications. So for instance, I could enter into gmrun:

man:bash

... and depending on what I had told gmrun to do with the 'man' prefix, it would open up the bash man page. Neat, eh? So I wanted to have a separate program to open up images, and URLs (it's quite often the case that people post links to screenshots, that I don't want to open in a browser, but would just rather 'see'). I needed to use a helper script to do this, as gmrun accepts no command-line options. The trick I used (in order to make it appear directly in the gmrun window, as though I had typed it), was to append it to gmrun's history file --- if set correctly, gmrun will display the last entered command. No biggie, here it is:

See attached runvia.sh.txt

(Saved as ~/bin/runvia.sh -- and chmod 700 ~/bin/runvia.sh)

So, I'm able to flag to gmrun that if the URL I am clicking on is an image, then tell it so, else, flag it to open up in elinks (this is my primary browser -- although I wanted a specific handler for it.) But in order for that script to process the URL that we clicked on from MGT, we need to tell MGT to perform that action. This is easier than you'd think, and involves editing the file: $HOME/.gnome/Gnome, such that:

default-show=runvia.sh "%s"

Going back to gmrun, we lastly need to tell it what acrtion to take for the 'elinks:' and 'image:' prefixes. That information is stored in /etc/gmrunrc, although I copy this to ~/.gmrunrc, personally, and edit it, so that for the image handler:

URL_image = sh -c 'feh %s'

('feh' has the ability to read images via http).

And for the elinks handler:

URL_elinks = sh -c '${TermExec} elinks -remote "%s" && FvwmCommand "All (*ELinks*) FlipFocus"'

"${TermExec}" is a variable defined further up in the file that looks like this:

Terminal = rxvt
TermExec = ${Terminal} +sb -ls -e

... and that's it. It seems to be working really well.

Since I use FVWM, I wanted to (when I had decided to click on a URL) to focus the webbrowser -- hence the reason why I'm using FvwmCommand. This is optional of course. Although to continue on a similar theme, the style of the "gmrun" dialogue window is set to the following:

Style Gmrun GrabFocus

.. so that when it pops up, I can hit enter, knowing that the Gmrun window will always have the focus, to execute whatever is inside it.

You can see a screenshot[3] of the url-logger in action.

Hope someone finds this useful, or can derive other ideas from it.

[1] http://www.irssi.org/scripts/html/url_log.pl.html

[2] http://www.bazon.net/mishoo/gmrun.epl

[3] http://edulinux.homeunix.org/~n6tadam/fvwm/ss/url-logger.png


Global home movies with cron and Imagemagick

Karsten M. Self (karsten from linuxmafia.com)
Question by tag (tag from lists.linuxgazette.net)

I was just showing this to Heather. I've been trying to figure out what's going on with our strange California weather (tropical rainstorms for the past two weeks) and decided that moving satellite images were more interesting than static ones. Among other discoveries, we've been getting a tropical express mainlined to us over the Pacific for the past several weeks, and the movies make this very apparent.

There are two parts to this tip: first, you want to start grabbing satellite images as they're available, then you want to string them together to view them. Updates are 30 minutes and 3 hours for regional and hemispheric views, respectively.

For the fetch, I use cron to schedule downloads, storing them in a large local area, 'data/weather', with a timestamp added to the filename. Recipie, add to your personal crontab:

See attached crontab.txt

To animate images, say, from the past five days, you can animate 'find' results. To look at west-coast infraread images:

animate -pause 2 -delay 25 $( find . -mtime -5 -name WCIR\*  | sort)

There's some cleanup you may need to do as the download images occasionally get out of order. I've found deleting duplicates seems to fix this pretty readily.

You can also experiment with image enhancements via ImageMagick, such as increasing size and contrast, and reducing noise, in the downloaded images.


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/

Published in Issue 122 of Linux Gazette, January 2006

The Answer Gang

Linux Gazette 122: The Answer Gang (TWDT)
LINUX GAZETTE
...making Linux just a little more fun!
(?) The Answer Gang (!)
By Jim Dennis, Jason Creighton, Chris G, Karl-Heinz, and... (meet the Gang) ... the Editors of Linux Gazette... and You!

We have guidelines for asking and answering questions. Linux questions only, please.
We make no guarantees about answers, but you can be anonymous on request.
See also: The Answer Gang's Knowledge Base and the LG Search Engine


Contents:

¶: Greetings From Heather Stern
(?)DirectPad Joystick
(?)LN -- have I gone brain dead?
(?)System V or BSD?
(?)Yikes. --or--
Missing libraries
...and how to find them

(¶) Greetings from Heather Stern


(?) DirectPad Joystick

From Triyan W. Nugroho

Answered By: Peter Knaggs

Hello Gang,

Here in Indonesia we have very cheap joystick using DirectPad Pro driver (it's actually just a modified Playstation joystick).

(!) [Peter] Does it connect to the parallel port of your Linux machine? If so, you might find the README and README-parport in the following are helpful to get an understanding: ftp://atrey.karlin.mff.cuni.cz/pub/linux/joystick/joystick-1.2.15.tar.gz
If on the other hand, it connects to the game port of your sound card, don't use the parallel port driver, of course :)

(?) Yes, it does connect to parallel port.

(?) I have use it for a long time in Windows, but still have no idea how to use it with Linux.

(!) [Peter] Did you read these pages? http://atrey.karlin.mff.cuni.cz/~vojtech/input http://www.linuxgames.com/joystick

(?) Yes. But the documentation in the Linux kernel says that the kernel has support for DirectPad joysticks, using gamecon module.

(!) [Peter] Yes, "gamecon" is likely the right module to use.

(?) So I think I don't have to compile the package provided in the abovementioned pages..

(!) [Peter] True. Still, they're useful in that they combine the userland tools and the kernel drivers all in one place with some guides and FAQ and other such. It gives a good starting point, and from there you can work on the specific issues of the 2.6 kernel, once you know how to get the device to work correctly in a plain 2.4 kernel.

(?) And I'm still confused, because the package in these pages use different filename.

(!) [Peter] Yes, well filenames change over time, code hardly changes all that much.

(?) For example, Linux kernel uses joydev.c, but in these pages it is joystick.c. And for DirectPad joysticks, Linux kernel uses gamecon.c, while in these pages it is joy-console.c.

(!) [Peter] Those would have been the names during the 2.4 series kernel.

(?) I have been Googling and found that the Linux kernel actually have support on it. And then I found several documentation in the Linux kernel, but I always fail :(

(!) [Peter] What did you try, and how did it fail, specifically?

(?)

cd /dev
rm js*
mkdir input
mknod input/js0 c 13 0
mknod input/js1 c 13 1
mknod input/js2 c 13 2
mknod input/js3 c 13 3
ln -s input/js0 js0
ln -s input/js1 js1
ln -s input/js2 js2
ln -s input/js3 js3
(!) [Peter] Well, those entries would be created by udev if you were using a 2.6.12 or later kernel, once the module was loaded correctly.
It seems, though, that the module "gamecon" isn't loading for some reason. Perhaps because it isn't finding the parallel port device? Or because the parallel port is being used by another module (have you checked that "lp" module isn't loaded)?
Are you sure the parallel port is enabled in the BIOS? Do you happen to have a parallel port printer and test that printing works OK, or some other way to know if the parallel port is actually enabled? You mentioned the joystick worked in Microsoft but it wasn't clear if it was on the same machine.

(?) But every reboot, my js* is always gone  :( How can I fix it?

(!) [Peter] Not sure about that, could be many reasons. It's no harm to create the devices manually, but unless the module is loaded successfully they will just give ENODEV when you try to use them.

(?)

root@devel:/home/i2c# modprobe joydev
root@devel:/home/i2c# modprobe gamecon
FATAL: Error inserting gamecon
(/lib/modules/2.6.8-2-386/kernel/drivers/input/joystick/gamecon.ko): No such
device
(!) [Peter] Have a look in "dmesg" to see if there's any other messages. Also, can you see anything mentioning "parport" in your boot messages, if so can you send it, e.g.:
parport: PnPBIOS parport detected.
parport0: PC-style at 0x378 (0x778), irq 7, using FIFO
[PCSPP,TRISTATE,COMPAT,ECP]
That would tell you the IRQ line to look for in /proc/interrupts corresponding to the parallel port.

(?) I've tested on 2.4 and 2.6 series, but no difference...

(!) [Peter] Hmm, so it looks like more debugging will be needed. Have a look in the sources, you can add in some printk(KERN_INFO along the path from module_init(gc_init); so add in some tracing of gc_init and see why the gc_probe function isn't happy. You should see your debug additions come out in "dmesg" when you modprobe gamecon and you can keep adding more debug tracing and doing rmmod gamecon and modprobe gamecon to try again. Be careful though with your code, as you're likely to crash your kernel sometimes doing this sort of thing.

(?) Can you explain step-by-step how to configure the kernel to work with this joystick? I use Debian 3.1 and kernel 2.6.18.

(!) [Peter] I wouldn't have the same hardware as you, so I couldn't provide a step-by-step guide. My guess woiuld be that the joystick stuff might be easier to get to work using a 2.4 series kernel rather than 2.6 series. I haven't been following the development in the 2.6 series much on joysticks.

(?) My sound card (Intel i810 onboard) doesn't work on 2.4, so I have to use the 2.6 series :(

(!) [Peter] Well, it is still worthwhile to learn how (or even if) the device will work with the 2.4 kernel driver, even if you can't listen to music while you're doing the investigation :) But sounds like it doesn't work in 2.4 as you say, so easiest to debug what's going on using 2.6 for now.
(!) [Peter] Could you try instead:
modprobe gamecon map=0,1
Looking in ./drivers/input/joystick/gamecon.c it seems it needs the parallel port number and the pad number. I'm guessing that would be counting from 1, but maybe it should be map=0,0
module_param_array_named(map, gc, int, &gc_nargs, 0);
MODULE_PARM_DESC(map, "Describers first set of devices
(<parport#>,<pad1>,<pad2>,..<pad5>)");

(?) Solved!

First I had to remove lp module. I also stopped CUPS services because my printer is connected via parallel port.

(!) [Peter] Thanks, I didn't think of stopping CUPS :)

(?) In 2.4 kernel, I try:

#modprobe gamecon gc=0,7

where 0 means parallel port 0, and 7 means that it is a Playstation joystick.

(!) [Peter] the "map=0,7" would be what to use for 2.6, judging from the sources they mention that the "gc=" parameter is deprecated.

(?) When I tried to play xgalaga using my joystick, the ships did some strange movement.

(!) [Peter] Instead of tying a game directly, could you try to build the "jstest" and "jcal" programs if you don't have them already. From the README in the download mentioned before:

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

2.5 Verifying that it works
For testing the joystick driver functionality, there is the jstest program. You run it by typing:
       jstest /dev/js0
And it should show a line with the joystick values, which update as you move the stick, and press its buttons. The axes should all be zero when the joystick is in the center position. They should not jitter by themselves to other close values, and they also should be steady in any other position of the stick. They should have the full range from -32767 to 32767. If all this is met, then it's all fine, and you can play the games. :)
If it's not, then there might be a problem. Try to calibrate the joystick, and if it still doesn't work, read the drivers section of this file, the troubleshooting section, and the FAQ.
2.6. Calibration
For most joysticks you won't need any manual calibration, since the joystick should be autocalibrated by the driver automagically. However, with some analog joysticks, that either do not use linear resistors, or if you want better precision, you can use the jscal program
       jscal -c /dev/js0

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

(?) Maybe it still need some configuration or it's a bug in the kernel (the documentation in 2.4 kernel says that support for Playstation joystick is still under development).

(!) [Peter] Well, to debug we'd need a better description of the symptoms than "ships did some strange movement in xgalaga", I mean any kernel developer would probably find that quite insuffuicient :)

(?) But I'm quite happy to see that my Linux box is now more fun with joystick support :)

I haven't had time to try this on 2.6 kernel. Anyway thanks very much for the help :)

(!) [Peter] Could be that in 2.6 the driver would read more frequently from the parport than in 2.4, resulting in a more responsive joystick, so it could be worth a try. Especially to get sound to work at the same time, as you mentioned.

(?) LN -- have I gone brain dead?

From Bob van der Poel

Answered By: Breen Mullins, Thomas Adam, Ben Okopnik

I'm trying to do something pretty simple, I thought, and am near the "tear out my hair" stage ... All I want to do is to create a symbolic link to an existing directory:

bob$ ln -s tmp foo
bob$ ls -l foo
lrwxrwxrwx  1 bob bob 3 Dec  1 15:21 foo -> tmp/

No, foo is not a link to tmp. Well, it sort of is

bob$ file foo
foo: symbolic link to `tmp'

But,

bob$ ls foo
foo@
(!) [Breen] It looks like you're somehow passing -F -d to the ls command. What does 'alias ls' tell you?

(?) Oh, that was easy! Here I've been struggling trying to get the *&*(^ ln command to work and it was working all along! Yup, ls was aliased:

alias ls
alias ls='ls -F --color=auto'

Guess how quickly I'm going to fix that! Dumb, dumb, dumb. Don't know who .. the packager who snuck in the -F or me :)

(!) [Breen] Moral: always check for aliases.
(!) [Ben] For some of us - those who have their "mv", "cp", and "rm" aliased to automatically use "-i", for example - it's the automatic response (sticking, say, 'rm' into a 'for' loop doesn't work too well if you're going to get asked "Are you sure?" for a couple hundred files.) However, there's other stuff of this ilk in shells that can really drive you nuts. In the past, I've been tripped up by looking for programs that didn't exist (they turned out to be functions that the sysadmin put in /etc/profile), have been driven almost insane by CDPATH ('cd foo' would go to '/usr/local/foo/bar/zotz/qux/argle/bargle/will/this/never/end/foo' instead of ./foo), and have become Quite Annoyed by per-directory source files - although '.exrc' isn't really a shell-related gadget. But still. :)
The Daemons of Unix are wily, subtle, and enjoy sucking out your brains through your ears if you let them. They're also a very strange shade of mauve with green dots, so avoid the psychedelic drugs and all will be well. Intoxicants and computing do NOT mix well... remember, never drink and derive.
(!) [Breen] Fedora Core 3 (in a fit of complete brain-death) shipped with vi unconditionally aliased to /usr/bin/vim.
(!) [Ben] Gaah! I've run into similar idiot's handiwork on a Solaris system - although, to be fair, it was the local sysadmin who perpetrated this one. He had set root's $SHELL to "/usr/bin/bash" - 'cause, y'know, "sh" is just so annoying (and .profile is just some stupid thing that nobody ever uses anyway, right?) The, one fine morning, the "/usr" slice failed to mount...
(!) [Breen] I've just taken another look at this -- at some point Fedora fixed the bug. /etc/profile.d/vim.sh now looks like this:
if [ -n "$BASH_VERSION" -o -n "$KSH_VERSION" -o -n "$ZSH_VERSION" ];
then
 [ -x /usr/bin/id ] || return
 [ `/usr/bin/id -u` -le 100 ] && return
 # for bash and zsh, only if no alias is already set
 alias vi >/dev/null 2>&1 || alias vi=vim
fi
which is much more reasonable behavior. As originally shipped the two tests after then were missing.
(!) [Breen] Which doesn't matter much until you're trying to repair a system which doesn't have /usr/ mounted (because you borked /etc/fstab when tweaking your partitioning scheme).
Remembering to type /bin/vi is easier when you're not sweating bullets.

(?) doesn't give me a listing of the contents of tmp. Ummm, what am I doing wrong here?????

(!) [Thomas] Nothing. Although you should qualify which directory you created the link in. Indeed, what does:
ls -l ./foo
produce as output? Indeed, did you do that the right way around?
% ln -s /tmp foo && ls ./foo

(?) System V or BSD?

From Adam S Engel

Answered By: Thomas Adam, Rick Moen, Mike Orr

I was hunting down a "fugitive" process and accidently hit the BSD command ps aux (thinking it was an accident because I'm using Mandriva, which I thought was based on System V)

(!) [Thomas] In terms of Init level structures then it is, yes.

(?) and received something like this:

~ 495 --> ps aux | head -5
USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root         1  0.0  0.0   1560   476 ?        S    Nov30   0:00 init [5]
root         2  0.0  0.0      0     0 ?        SN   Nov30   0:00
[ksoftirqd/0]
root         3  0.0  0.0      0     0 ?        S<   Nov30   0:00 [events/0]
root         4  0.0  0.0      0     0 ?        S<   Nov30   0:00 [khelper]

But then, just for the hell of it, I hit the System V command, ps -ef and got this:

~ 494 --> ps -ef | head -5
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 Nov30 ?        00:00:00 init [5]
root         2     1  0 Nov30 ?        00:00:00 [ksoftirqd/0]
root         3     1  0 Nov30 ?        00:00:00 [events/0]
root         4     1  0 Nov30 ?        00:00:00 [khelper]

I thought most Linuxes, particularly the "big ones" like Fedore, Debian, SuSE, Mandriva, were based on System V.

(!) [Thomas] They are, but the ps command is an oddity in that sense. Still useful, though.

(?) Even so, my MacOSX, based loosely on BSD, will not accept the ps -ef command. Can a system (Mandriva in this case) be comprised of both?

(!) [Rick] All modern Unixes (except *BSD, which are holdouts) are the result of (or inspired by) a shotgun marriage of those two cultures (plus SunOS), called System V R4, released by AT&T in 1988. Quoting from the Unix FAQ:
Even prior to that, retrofitting "BSD enhancements" onto System V-based systems was a nearly ubiquitous customisation: Sys V R4 simply acknowledged that reality, bowing to the technical community's mandate.
The general architectural description of Sys V R4 got abstracted out as the POSIX.1 specification, which served as the blueprint from much of what Torvalds and co. (and FSF, and others) then performed in building up what today we call GNU/Linux systems: Linux distributions generally are an independent implementation of (most of) the POSIX spec, which in turn was based largely on Sys V R4. And so, here we are.

(?) The rc.init files seem, from what I recall from Redhat, to be System V.

(!) [Sluggo] See "man ps". The 'ps' Linux uses has two sets of command-line options to please everybody. There are also verbose long options, and two sets of output formats.
Linux generally follows the System V "style" but deviates whenever it feels like it.
(!) [Rick] And System V wasn't exactly System V, any more, after SysV R3. ;-> SysV R4 was, after all, one of computing biggest exercises in syncretism.[1]
(!) [Jimmy] The footnote is missing, but I assume it was to contain a definition of syncretism:
Attempted union of principles or parties irreconcilably at variance with each other.
(dict.org)
(!) [Sluggo] The network stack is closer to BSD's.
(!) [Rick] Amen to that. Back when there was a Caldera Systems, Inc. (remember them?), they kept trying to get Torvalds to accept a huge patch to add the System V "STREAMS" interproces I/O system. Torvalds turned them down flat, repeatedly, saying (and I paraphrase): "Why would we need that bloatware in our kernel, when Berkeley sockets already do that same job at least as well?"
(!) [Sluggo] The init system is not part of "Linux" (the kernel) but is chosen by each distribution. Most distros use System V style, and even those that don't like Slackware have compatibility directories so that vendor-compiled commercial programs can be installed without too much hassle. However, the init strategy is one of the most varying things between distributions.

(?) I just got a new Dell Dimension basic "cheap" no-frills computer, but still, it's 80 gigs of hard-drive space are far more than i need, so I'm installing SuSE, Mandriva, and a third. It was going to be Debian, but now I'm thinking of FreeBSD. Can anyone tell me the major difference between FreeBSD and Linux?

(!) [Rick] Speaking in very broad terms, FreeBSD was designed and is maintained by people who never liked AT&T Unix or any of its derivatives and independent reimplementations at all, and who thus were unsatisfied by the System V R4 compromise. Of course, that's hardly all there is to it: If you'd been sued, more or less baselessly, by a Fortune 500 corporation for copyright infringement, you'd probably develop an attitude problem, too.
The difference in init scripts, you know about. A minority of Linux distributions have offered BSD init scripts, too, all along, e.g., Slackware, for those who like them.
Additionally, there are such a large number of other small but significant architectural differences that I cannot hope to remember them all.
The BSDs tend to favour a "BSD slice"-type partition map, as opposed to the IBM/Microsoft-style partition map more typical of Linux systems (at least on IA32/x86-64). Their directory layout is a bit different, not very close to the Filesystem Hierarchy Standard promoted by the Linux community. They tend to use variants on UFS as their main filesystem. (FreeBSD favours a variant called FFS = Fast Filesystem, incorporating Marshall Kirk McKusick's softupdates instead of journaling. Softupdates are a clever and effective way to get most of journaling's advantages in protecting metadata following crashes or power loss -- but sadly does nothing about the problem of long fsck times after such events.)
They tend not to have anything resembling /proc. They favour csh over Bourne variants such as bash. They favour nvi over vim. They default to use of the wheel group (which Linuxes usually lack mostly because Stallman at FSF doesn't like the concept). In general, their prejudices tend to come across to Linux users as a bit old-fogey-ish.
They offer both binary packages plus a very successful build-from-source architecture called the "ports" system. The closest thing to the latter on Linux would be Gentoo's portage and the GAR build system (and similar things in other build-from-source Linux distros).
They have their own libc (not based on GNU's, as Linux always has been) and their own implementation of make. Otherwise, a lot of the userspace toolsets are literally exactly the same (except compiled to a different ELF binary format).
Spend some time reading "The FreeBSD Handbook", online: It's a landmark in clarity for technical documentation, and worth reading on that basis alone.

(?) I've heard that FreeBSD is known for its security and other network capabilities.

(!) [Rick] FreeBSD is not especially known for security. (You might be thinking of OpenBSD.) I would say that it best known for scalable network performance under heavy load, and for stability. It's also known for having relatively narrow scope of hardware compatibility (i.e., driver selection), compared to Linux, and for relatively slow and conservative development: You may or may not find FreeBSD 6.0-STABLE's driver support for your new Dell Dimension's chipsets to be adequate.
Specific comparisons of FreeBSD with typical Linux systems have been done repeatedly, but tend to have the problem of being out of date (which doesn't stop people from alluding to them, out of ignorance). E.g., often-heard claims about better FreeBSD VM performance rely on Linux 2.4.x results, back when Linux had a real problem, there. For that matter, Linux's entire TCP/IP stack has been thrown out and rewritten four or five times during the kernel's history, so you can imagine the large opportunity for outdated comparisons, there.
It used to be the case that FreeBSD's SCSI subsystem gave significantly better performance than that of the Linux kernels, but I suspect that difference, too, has been eliminated. What probably does remain is the matter of NFS/autofs/amd: If you're a heavy NFS user, you'll find that FreeBSD's NFSv3 implementation still has fewer bugs than Linux's, though the gap is pretty small by now.
(!) [Sluggo] Some people say BSD's network stack can handle a higher load.
(!) [Rick] That's largely on the basis of data like this 1999 event: http://www.bafug.org/news/NewRecord.html
At that time, Walnut Creek CD-ROM set the world record for most bytes of network traffic processed in 24 hours by a single host: One single-processor PII box (a then-famous FreeBSD ftp server) handled 1.39 terabytes. (This burst of traffic was, ironically, occasioned by the release on that machine of Slackware 4.0.)
Fast-forward: About a year ago, I helped build what became the second-fastest computational cluster in the world, "Thunder", a set of 1024 quad-Itanium2 Linux boxes. The interconnects for node-to-node data passing used Quadrics cards, and I don't have figures handy but it was a stupendous level of network traffic.
(!) [Sluggo] But both systems are widely used in high-performance mission-critical situations, so the difference is a bit academic. Isn't Linux being used for rocket control somewhere?
Linux comes in a wide variety of flavors from user-compiled hacker systems (Gentoo) to turnkey Windows clones (Linspire), with RPM/DEB distros in between. BSD sticks to the user-compiled route.
(!) [Rick] Misconception. It's actually probably more common, in practice, to install software from the binary packages than to build it from ports. I can tell you that BSD admins will often resource to packages when there are local build problems, if nothing else.
(!) [Sluggo] BSD also tends to have less support for new hardware, and last time I checked it had an incompatible disk-partitioning scheme, making dual booting a problem.
(!) [Rick] FYI: FreeBSD (at least) is perfectly happy booting from an IBM/Microsoft-style partition table. For that matter, you can boot Linux (but not MS-Windows) from a BSD "slice"-style disklabel.
(!) [Sluggo] But if a user-compiled distro appeals to you and you like the BSD traditions, FreeBSD would be worth looking into. That seems to be the most popular one for new users, although NetBSD and OpenBSD are also free and would be worth comparing.
(!) [Rick] Don't overlook DragonFly BSD. http://linuxmafia.com/pipermail/conspire/2005-October/001504.html

(?) Missing libraries

...and how to find them

From Benjamin A. Okopnik

Answered By: Jimmy O'Regan, Neil Youngman, Peter Knaggs

All of a sudden, lots and lots of stuff - including 'vi' - is crashing when I try to bring it up. The error message I get is "error while loading shared libraries: libpangocairo-1.0.so.0: cannot open shared object file: No such file or directory".

Worst of all, grepping the Debian ls-lR doesn't show any such thing - and searching the Net has lots of people having the same problem and not being able to find a package that contains it. This is not sounding good.

Folks, if any of you could take a look in your /usr/lib (that's where 'strace' tells me these progs are looking for it) and send me a copy of your libpangocairo-1.0.so.0 - assuming that somebody somewhere has it - I'd be very grateful. Meanwhile, I'm quite annoyed and puzzled - how the heck can so much stuff depend on a lib that's not available???

Sigh. I hope I don't end up having to reinstall my entire system. That would be a really, really big problem while I'm on the road.

(?) Update: I've found an RPM that contains libpangocairo - presumably, it's something near what I need. Converting it wasn't useful, since it was going to put the files into a different directory - so I just copied out the files and put'em into /usr/lib.

Result: well, I've got Vim, Mozilla, and Firefox back. On the other hand, "mdh" (my MailDoHickey from Freshmeat that I've been using for a year or more) segfaults; so does "gqview".

My best guess as to the cause of this: earlier, I did an "apt-get update" and "apt-get dist-upgrade", and I recall seeing "libc" (and a few other libs) go flying by in the list of installed packages. If that's what it is, then I'm a bit shocked: I've never had Debian break my install before, simply via an update.

More tomorrow, since it's almost 2a.m. here.

(!) [Jimmy] New version of gvim? Pango is Gnome's framework for internationalised text (bidi, strange fonts, etc.), Cairo is a vector drawing library (like DPS or Apple's Display PDF (Quartz?)). All text in Gtk is now rendered through Pango, so everything that depends on Gtk in any way is going to depend on it.
It doesn't seem to be in Debian yet.

(?) Ah. I see.

A few days ago, the maintainer of Jpilot got back to me about a bug that I'd filed, and asked me to recompile Jpilot from source with the latest libpisock library. However, Debian's "official" method of creating a package from source is this nightmarish chase of dependencies, all alike... and Gtk+, Cairo, Pango, and a few other things (all from pretty much the same place - the gtk.org FTP server.)

However, everything worked OK back then - including the new version of JPilot. Something in the recent update must be conflicting with the "cutting edge" libs.

It still isn't looking good. I've tested a few other GTK-based apps - gtkpool, gtksee, gtop - and they work, although gtop throws out a cryptic warning:

glibtop: glibtop_get_swap (): Client requested field mask 0001f, but
only have 00007.

I have no idea what all those libs may have overwritten. Fixing it is going to take some thought. :|

(!) [Jimmy] Um... specifically, the Cairo backend for Pango doesn't seem to be in Debian yet, though Pango is.

(?) So, now that I'm actually awake, and possess a functioning brain - in contrast to last night - I have a plan of attack that should let me get past all this bull with the grace of a matador (and without using OLE even once.)

1) Pick a bunch of GTK-based apps and run each one. Add those that fail to a list. Then:

for app in $list
do
       ldd `which $app` |perl -wlne's/^.* => (\S+) .*/$1/;/gtk|pango|cairo/&&print'>>list.txt
       sort -uo list.txt list.txt
done

while read n; do readlink $n; done < list.txt

This should give me a list of all the relevant libs - running this for 'mdh' and 'gtk-gnutella' already shows some promise - that may need to be reinstalled. It may require that I manually remove the offending lib (sometimes, installing the right version doesn't do anything unless the old lib is removed), but that shouldn't be too difficult; the list won't be all that long.

Running the above for 'mdh' and 'gtk-gnutella' shows:

/usr/lib/libcairo.so.1
/usr/lib/libcairo.so.2
/usr/lib/libgtk-x11-2.0.so.0
/usr/lib/libpango-1.0.so.0
/usr/lib/libpangocairo-1.0.so.0
/usr/lib/libpangoft2-1.0.so.0
/usr/lib/libpangox-1.0.so.0
/usr/lib/libpangoxft-1.0.so.0

I'm betting that one of those - libgtk-x11-2.0.so.0, anybody? - is the bugger that's busting my chops. More tests later; gotta run to work NOW.

(?) Update: got it fixed. Most likely.  :) At least, GTK apps now run without complaining.

I looked at the list that I got as a result, and ran "dlocate" over the "root name" bits (everything up to the first '.'); other than the obvious, most of the rest pointed to libglib2.0-0. I reinstalled it and removed the newer versions - i.e., the current lib names mostly look like "libpangoft2-1.0.so.0.801.1", while the newer (broken) ones look like "libpangoft2-1.0.so.0.1001.0" - and life is good again. Whew.

I'm going to be doing more testing - i.e., by removing "libpangocairo", which should not be getting pulled in by anything - but it seems all right now.

(!) [Neil] There was a neat tip on TAG a while back about the LD_DEBUG environment variable. I think it could be useful in identifying the exact problem.
neil ~ 15:08:12 501 > LD_DEBUG=help ls
Valid options for the LD_DEBUG environment variable are:

 libs        display library search paths
 reloc       display relocation processing
 files       display progress for input file
 symbols     display symbol table processing
 bindings    display information about symbol binding
 versions    display version dependencies
 all         all previous options combined
 statistics  display relocation statistics
 unused      determined unused DSOs
 help        display this help message and exit

To direct the debugging output into a file instead of standard output
a filename can be specified using the LD_DEBUG_OUTPUT environment variable.
neil ~ 15:50:43 502 >

(?) Oh, good one! I wish I'd remembered it. I used 'strace' to see what was going on; unfortunately, it didn't show enough detail to be of use. The above may well do that; I'll use it to do a little troubleshooting, just to make sure that this is resolved. Thanks, Neil!

(!) [Peter] Ulrich Drepper has a quite readable guide to writing shared libraries, he's been maintaining it for quite a while now and in Jan 2005 put out this: http://people.redhat.com/drepper/dsohowto.pdf It's probably more intended for folks actually writing shared libs in the first place, but it's a good one for debugging

This page edited and maintained by the Editors of Linux Gazette
Copyright © its authors, 2006
Published in issue 122 of Linux Gazette January 2006
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/

Published in Issue 122 of Linux Gazette, January 2006

A New Windoze Notebook — Now What? Knoppix!

By Edgar Howell

Introduction

For a brief period of time this office had been Windows-free, in theory at least. The combo printer requiring '95 had stopped using black ink and '95 had stopped booting, making both obsolete. And '98 on the old notebook doesn't shutdown properly, which turns booting into an adventure. Just hadn't quite got around to dumping all this junk.

Then fate sent a project my way that required some variety of Windows. The one tool I absolutely need I got familiar with many years ago under OS/2. Unfortunately it no longer exists in any such incarnation. So it was time to clench my teeth, say good-bye to dreams of a notebook completely unexposed to Windows and order a Dell with whatever is current from Redmond now-a-days.

The Plan

We ordered the Dell with twice the hard-drive and 4 times the memory advertised, so we just reduce the partition a bit and put SuSE 10.0 on there and be up and running in nothing flat.

This is something I've done for years. One of my favorite commercial tools had been Partition Magic. Pretty easy to reduce a partition in size and use the free space for some other purpose.

But as Robert Burns put it: The best laid schemes o' Mice an' Men, Gang aft agley.

The Problem

If in the past I have ever said anything nice about products from Redmond, I really do regret it. If anything, I have certainly been far too polite in just using words like "junk". There are other 4-letter and longer words far more suitable.

Consider: you buy a machine with one pre-installed operating system on an 80GB drive and cfdisk reports:

              First       Last
 # Type       Sector      Sector   Offset    Length  File System Type (ID) Flags
-- ------- ----------- ----------- ------ ----------- -------------------- -----
 1 Primary           0      176714     63      176715 Dell Utility (DE)    none
 2 Primary      176715   146544929      0   146368215 HPFS/NTFS (07)       Boot
   Pri/Log   146544930   146560994      0       16065 free                 none
 3 Primary   146560995   156296384      0     9735390 CP/M / CTOS / . (DB) none

Mount the 3 primary partitions and df shows:

Filesystem           1K-blocks      Used Available Use% Mounted on
[...]
/UNIONFS/dev/sda1        88136      6654     81482   8% /mnt/sda1
/UNIONFS/dev/sda2     73184104   7132524  66051580  10% /mnt/sda2
/UNIONFS/dev/sda3      4858184   3167052   1691132  66% /mnt/sda3

Why is there more than one primary partition? The hardware architecture only supports 4, they're valuable! None is particularly full. And that gap in the middle?! Can we spell "fragmentation"? Define it?

Maybe people living in the wild and wooly world of Windows are used to things like this and don't consider it fraudulent when deprived of about 14GB out of 80. But to have that much real estate taken away without even asking!? Consider the percentage if I hadn't chosen a drive twice the size of normal.

Is there any need to point out the bizarre file system types? And I don't do NTFS!

Tabula Rasa

But it gets better, or worse. Back in '95 days, you got a CD with the operating system, probably also pre-installed on the machine.

With '98 the system was pre-installed and you got a so-called "Recovery CD" along with it. At some point in time you were forced to use the infernal thing and that was when you learned that it wouldn't just restore the operating system but would return the entire partition to the status it had originally had when the machine left the manufacturer.

Like good-bye data if you don't have adequate back-ups and/or another bootable partition (this was long before Knoppix). But if you modified the partition size in order to install something else as well, the "Recovery CD" fails — after it has formatted the partition it can't use! And the last Partition Magic I bought couldn't help because instead of running under DOS it required Windows. A perverse Catch-22. Been there, done that, wore out the T-shirt.

But at least you had a CD with the system software on it.

Dell/Microsoft didn't even provide one! Just how expensive are CD-ROMs today? In bulk?

That's what those other partitions are all about. In other words it is impossible to do something simple like format the drive, allocate partitions, and install software. So now what?!

Tools and Toolboxes

In spite of having used other fine tools in the past to work through problems, Knoppix has become my toolbox of choice because it gives me an environment I am familiar with, GNU/Linux, and lots and lots of tools.

Of course the first thing I did — after minimal setup, as little as possible — was to change the boot sequence on the notebook to enable using Knoppix. I had to know how to do this (F2, DEL early in the boot process are good candidates): other than one large piece of paper (roughly 2-times legal-size) describing the external features of the hardware, Dell included no significant printed documentation. It's all on the hard-drive.

Above, you have already seen some of the information available from use of the tools on the Knoppix CD/DVD. By the way, here I am using a DVD with Knoppix 4.0.

So far all we have been able to do is to confirm that we have a major problem. Bizarre HD configuration. Unfamiliar file system.

So let's see what tools Klaus Knopper included in his toolbox:

knoppix@3[knoppix]$ apropos NTFS
libntfs-gnomevfs (8) - Module for GNOME VFS that allows access to NTFS filesystems.
mkntfs (8)           - create a NTFS 1.2 (Windows NT/2000/XP) file system
ntfscat (8)          - concatenate files and print them on the standard output
ntfsclone (8)        - Efficiently clone, image or restore an NTFS filesystem
ntfscluster (8)      - identify files in a specified region of an NTFS volume.
ntfsfix (8)          - tool for fixing NTFS partitions altered by the Linux kernel NTFS driver.
ntfsinfo (8)         - dump a file's attributes
ntfslabel (8)        - display/change the label on an ntfs file system
ntfsls (8)           - list directory contents on an NTFS filesystem
ntfsprogs (8)        - several tools for doing neat things with NTFS partitions
ntfsresize (8)       - resize an NTFS filesystem without data loss
ntfsundelete (8)     - recover a deleted file from an NTFS volume.
smbcquotas (1)       - Set or get QUOTAs of NTFS 5 shares
knoppix@3[knoppix]$  

Plan B

From looking at a couple of the man pages it would seem that this collection of tools has been around for 10 years or so, well beyond release 0.0 by now.

So let's use ntfsclone to push an image of the bootable partition over the LAN onto another machine. Once we have that as back-up we can use ntfsresize to shrink the partition down to something reasonable. After that it should be easy enough to create an extended partition with a couple of logical partitions for Linux.

I'm not at all familiar with these tools but it is always fun to learn something new. And the time is right.

Backing Up

Again, nothing ever quite works the way one expects. Making the image was no exception. Here is one of the unsuccessful attempts:

knoppix@3[knoppix]$ su
root@3[knoppix]# ntfsclone --save-image --output - /dev/sda2 | gzip -c | \
ssh -l web lohgopc2 'cat > /DATA/NO_BACKUP/DELL/sda2.img.gz'
ntfsclone v1.9.4
The authenticity of host 'lohgopc2 (192.168.0.102)' can't be established.
RSA key fingerprint is 65:32:cc:81:8f:eb:73:24:7b:b3:18:a8:66:fa:7c:ae.
Are you sure you want to continue connecting (yes/no)? NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 74940522496 bytes (74941 MB)
Current device size: 74940526080 bytes (74941 MB)
Scanning volume ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7304 MB (9,7%)
Saving NTFS to image ...

root@3[knoppix]#

After "Saving NTFS to image ..." nothing further happened and I had to cancel with CTRL-C.

Here is what finally worked:

knoppix@1[knoppix]$ su
sudo: unable to lookup Knoppix via gethostbyname()
root@1[knoppix]# ntfsclone --save-image --output - /dev/sda2 | gzip -c | \
ssh -l web lohgopc2 'cat > /DATA/NO_BACKUP/DELL/sda2.img.gz'
ntfsclone v1.9.4
Password: NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 74940522496 bytes (74941 MB)
Current device size: 74940526080 bytes (74941 MB)
Scanning volume ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7304 MB (9,7%)
Saving NTFS to image ...

Warning: No xauth data; using fake authentication data for X11 forwarding.
100.00 percent completed
Syncing ...
root@1[knoppix]#

Other than the obvious difference between success and failure, from a quick glance at the output it isn't clear why one worked and one didn't. But look at the lines ending in "NTFS volume version: 3.1".

On the unsuccessful attempt I had failed to note that ssh wanted confirmation that it was OK to establish a connection with the other machine. It was patiently waiting for me to enter "yes" while I was scratching my head trying to figure out why nothing was happening!

Success the next morning — a good night's sleep can do a world of good — didn't include that question because I had already told ssh that it was OK and it had "permanently" (until next boot with Knoppix) recorded this fact. Refreshed and thinking clearly, I remembered that the password was needed and saw the request from ssh.

Resizing

Now that our safety-net was in place the first thing to do was to check out the partition:

knoppix@4[knoppix]$ sudo ntfsresize --info /dev/sda2
sudo: unable to lookup Knoppix via gethostbyname()
ntfsresize v1.9.4
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 74940523008 bytes (74941 MB)
Current device size: 74940526080 bytes (74941 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7304 MB (9,7%)
Collecting shrinkage constrains ...
Estimating smallest shrunken size supported ...
File feature         Last used at      By inode
$MFT               :     16790 MB             0
Multi-Record       :      8393 MB             9
You might resize at 7303708672 bytes or 7304 MB (freeing 67637 MB).
Please make a test run using both the -n and -s options before real resizing!
knoppix@4[knoppix]$

Rather than reducing the partition as far as possible, let's follow that advice and see what it looks like if we leave some room for data and the tool that has yet to be installed:

root@0[knoppix]# ntfsresize --no-action --size 10G /dev/sda2
ntfsresize v1.9.4
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 74940523008 bytes (74941 MB)
Current device size: 74940526080 bytes (74941 MB)
New volume size    : 9999995392 bytes (10000 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7304 MB (9,7%)
Collecting shrinkage constrains ...
Needed relocations : 395906 (1622 MB)
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
100.00 percent completed
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
The read-only test run ended successfully.

OK, go for it.

root@0[knoppix]# ntfsresize --size 10G /dev/sda2
ntfsresize v1.9.4
NTFS volume version: 3.1
Cluster size       : 4096 bytes
Current volume size: 74940523008 bytes (74941 MB)
Current device size: 74940526080 bytes (74941 MB)
New volume size    : 9999995392 bytes (10000 MB)
Checking filesystem consistency ...
100.00 percent completed
Accounting clusters ...
Space in use       : 7304 MB (9,7%)
Collecting shrinkage constrains ...
Needed relocations : 395906 (1622 MB)
WARNING: Every sanity check passed and only the DANGEROUS operations left.
Please make sure all your important data had been backed up in case of an
unexpected failure!
Are you sure you want to proceed (y/[n])? y
Schedule chkdsk for NTFS consistency check at Windows boot time ...
Resetting $LogFile ... (this might take a while)
Relocating needed data ...
100.00 percent completed
Updating $BadClust file ...
Updating $Bitmap file ...
Updating Boot record ...
Syncing device ...
Successfully resized NTFS on device '/dev/sda2'.
You can go on to shrink the device e.g. with 'fdisk'.
IMPORTANT: When recreating the partition, make sure you
  1)  create it with the same starting disk cylinder
  2)  create it with the same partition type (usually 7, HPFS/NTFS)
  3)  do not make it smaller than the new NTFS filesystem size
  4)  set the bootable flag for the partition if it existed before
Otherwise you may lose your data or can't boot your computer from the disk!
root@0[knoppix]#   

Now that we have reduced the size of the area used within the physical partition (comparable to de-frag under Windows, maybe) it is safe to use cfdisk /dev/sda

                                  Festplatte: /dev/sda
                            Größe: 80026361856 Bytes, 80,0 GB
                   Köpfe: 255   Sektoren pro Spur: 63   Zylinder: 9729

    Name         Flags        Part. Typ   Dateisystemtyp     [Bezeichner]   Größe (MB)
 ---------------------------------------------------------------------------------------
    sda1                       Primäre    Dell Utility                           90,48
    sda2         Boot          Primäre    NTFS               []               10001,95
    sda5                       Logische   Linux ext2                          10010,17
    sda6                       Logische   Linux                               10001,95
                               Logische   Freier Bereich                      14928,89
    sda7                       Logische   FAT16                               10001,95
    sda8                       Logische   Linux swap / Solaris                20003,89
    sda3                       Primäre    CP/M / CTOS / ...                    4984,52

     [ Bootbar]  [Löschen ]  [ Hilfe  ]  [ Maxim. ]  [Ausgabe ]  [  Ende  ]
     [  Typ   ]  [Einheit.]  [Schreib.]

This was the step where extreme care was called for. A mistake with ntfsresize produces an error message or warning. To me the partition table is comparable to the base register in some assembler languages: something that cannot be verified, a promise, not a guarantee. Mess it up and you may never be able to recover. Pay very close attention to the changes you make and back out if there is anything at all that you don't fully understand!

Finishing Touches

Once again, in the white hat, Linux wins! The backup was unneeded, although I never would have continued without one.

When booted into Windows, it did whatever it is that it does while it is doing what it does when one doesn't know what it is doing. So that worked. I guess.

Creating the extended partition and a couple of logical partitions inside it is quite straight-forward and doesn't deserve further discussion here. Although I grew up with fdisk, I will repeat the recommendation in the documentation to use cfdisk instead. Interactive and keeping one apprised of current status, it was very easy to get used to.

Postscript

In retrospect it wasn't necessary to jump back and forth between normal user and root as in the cut-and-paste from screens, above. But there is a time and place for each. On more than one occasion I have failed to notice that I had returned to a virtual terminal with root privileges. Bad! The preferred idiom with Knoppix is "sudo". You won't need a root password but it keeps you aware of where you are and what you are doing.

After having gone through this exercise it occurred to me that a better long-term solution might be to back up the Windows partition as described after major changes, i.e. installation of the tool I need. The other two as well of course, just in case something goes wrong. And then when the time comes that the Windows partition becomes unusable and restoring is necessary, just do it from the network. That should make those other two partitions obsolete and recover a bunch of disk space. Way down the road.

The modem is presumably one of