LINUX GAZETTE

January 2003, Issue 86       Published by Linux Journal

Front Page  |  Back Issues  |  FAQ  |  Mirrors
The Answer Gang knowledge base (your Linux questions here!)
Search (www.linuxgazette.com)


Linux Gazette Staff and The Answer Gang

Editor: Michael Orr
Technical Editor: Heather Stern
Senior Contributing Editor: Jim Dennis
Contributing Editors: Ben Okopnik, Dan Wilder, Don Marti

TWDT 1 (gzipped text file)
TWDT 2 (HTML file)
are files containing the entire issue: one in text format, one in HTML. They are provided strictly as a way to save the contents as one file for later printing in the format of your choice; there is no guarantee of working links in the HTML version.
Linux Gazette[tm], http://www.linuxgazette.com/
This page maintained by the Editor of Linux Gazette, gazette@ssc.com

Copyright © 1996-2003 Specialized Systems Consultants, Inc.

[ Table of Contents ][ Front Page ][ Talkback ][ FAQ ][ Next ]
LINUX GAZETTE
...making Linux just a little more fun!
The Mailbag
From The Readers of Linux Gazette


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.


FvwmCommand (FvwmCommandS)

Fri, 15 Nov 2002 17:17:20 -0100
Hans Borg (Hans.Borg from Physics.umu.se)
with comments by Heather Stern (LG Technical Editor) and Thomas Adam (The LG Weekend Mechanic)

Hi all,

Have tried to find a help forum for Fvwm* stuff, but can't find any. My be just tipping me of one is enough.

The problem: Have made an application using FvwmCommand that works fine when running under /root (super user, SU). However, when running under a "normal" user it fails by the FvwmCommand fifos.

[Thomas] I use nothing but fvwm :-) I love it. It would be useful to know which version of fvwm you're running.

My understanding: The FvwmCommandS sets up 2 fifos (C,M) in /var/tmp and always get the permission prw-------. Those fifos doesn't seem to be accessible from none SU.

[Thomas] Yeah -- I checked the Changelog file for fvwm version >=2.3.0, and there was a bug within the FvwmCommand module. However, as of version 2.3.6, it was fixed. I'd upgrade to the latest stable release.

When trying not SU, always get the report:

No such file or directory FvwmCommand error in opening message fifo: Permission denied.

May be this is deliberately from some security point of view, but on the other hand FvwmCommand is "x for all" in my default installation.

Best regards

[Thomas] As Heather goes on to explain, it is most likely a umask problem.
I'm a fvwm fan myself, but I've not used the FvwmCommand module. Generally I just put things on the menus as Exec calls.
However, it sounds like a umask problem; and possibly a permissions problem in the filesystem. /var/tmp, rather like /tmp, should be permissions 1777 (sticky-bit, everybody can see and write and stat things in the directory). The permissions your file got would be sufficient to defend it from other accounts reading it, but should allow the creating account to work with it. Also note that it's not executable; you weren't trying to create a script and then run it, were you? -- Heather
[Thomas] But that's what FvwmCommand can do heather! It's supposed to do that :-)
Is it also supposed to refuse to do it if the result is not marked executable?
For doing, um, dynamic things I like to have a tmp under my homedir, which belongs only to me (mode 0700) so I can do strange things but I don't subject myself to possible nosy other users. Mind you, I don't usually have other users to worry about, but what the heck; I plan some things here that may get put in production elsewhere. -- Heather

Thanks for your answers and appologies for my late
response. Have been away we no net capabilities.

I agree that it looks like a permission problem as is actually reported. There should be no problem with the /var/tmp directory permissions. They are both "rwx" (7) for all.

You don't mention if it's sticky (shows drwxrwxrwt with ls) -- Heather

The problem seems to be related to FvwmCommandS that sets up (I guess) the two Fifos and also sets the permission to prw-------. By the way, what does "P" stand for.

p stands for named pipe. Stdout (standard out) of one process may be set to feed into a pipe, and the program attached to pick up stdin (standard input) from that pipe can use that to do whatever it needs to do next.
Both the programs should have the permission to reach the pipe that has been created; the umask of the fvwmcommand process is probably restricted to prevent nasty side effects. -- Heather

Have tried after FvwmCommandS is spawned to (as SU) change the fifo permissions by all sorts of combinations with no luck. Typically I can get to prwSrwSrw-. In chmod I used "s" but comes out as "S".

That's because it had no execute permission; since the "Suid" shares a space with the "eXecute" bit, a way was needed to show that both are set, or only one of them,
execute but not suid: for owner and group, the first two triplets: rwx
execute AND suid: for owner and group: rws
not execute, but suid. This doesn't make sense for most purposes: for owner and group: rwS
execute but not sticky: for "other", the third triplet: rwx
execute and sticky: for other: rwt
not execute, but sticky. again it's rare for this to be reasonable: for other: rwT
Now, since the suid, exec, and sticky bits don't affect the read or write, those "rw" could really be any of "r-" "-w" "--" or "rw". -- Heather

My version of FvwmCommand is 2.4.7. I do not know what, or how to find out the version of FvwmCommandS.

I do not know that either. Perhaps Thomas Adams or one of the other Answer Gang members can help further. -- Heather

Thanks a lot for the information on permissions. Some of them were new
to me.

Honestly, I have to tell that I have rewritten the application in order not to use FvwmCommand, but it is still interesting to know where the problem sits. It may be useful in the future.

Just for testing I have done the following (may be someone can do the same ?).

  1. I have set the permissions as (a lot shouldn't be needed, but just for test): FvwmCommand: -rwsr-sr-x /var: drwsrwsrwx /var/tmp: drwsrwsrwt
  2. FvwmCommandS is spawned by fvwm95 (using that). When spawned I changed (as root) the two fifos permissions to: prwsrwsrwx
  3. From an xterm I run: FvwmCommand Restart fvwm95. Works when logged in as root but not as !root user.

Well, as having rewritten the application it is no longer of utmost importance.

The Answer Gang has been of a lot of help in the past. Thank you all.

Best regards
Hans.

During this thread I cc'd the Answer Gang back in so the entire Gang can help you out here. Any one of us could go underwater with complicated questions, so we do not "assign techs" to help anybody all alone. Good thing too - nice to have Thomas confirm what I was groping around in the dark about...
... and that's where it comes to you, dear readers. Hans solved his problem, by avoiding it. But if anyone happens to know what it's really up to - was it really a bug in that version, does it really work now? If anyone else out there is using fvwmcommand actively, drop us a line and let us know what you're doing with it. I presume, making FVWM a little more fun :)
Other articles or replies about making your favorite window manager do cool and weird things are also welcome. If we get enough maybe it could be the month of "The Truly Cool Things We Did To Our Computers" -- Heather


Installing Redhat on Dell X200 laptop (via 1394 CD)

Thu, 19 Dec 2002 14:58:35 -0700
Montgomery, Jim (jmontgomery from peakdatallc.com)

Please help me install Redhat 7.3 on my Dell X200 laptop. This machine has a firewire CD from which I am able to start the install process. However, the install process soon asks for the device from which to do the install (NFS, FTP, Hard disk, etc.).

No option is given for CD. It looks my BIOS can see the 1394 CD but Redhat cannot. I've looked in all the obvious places for 1394 firewire drivers (Redhat, Dell, Linux documentation and discussion sites). Please help. NFS/FTP boot is not an option.

Thanx, Jim Montgomery

[Heather] For that matter, if our readers know any distro that would cleanly install from a firewire CD, let us know. Distro vendors - look forward to more questions like this!

GENERAL MAIL


Thanks for the viewer hints

Wed, 27 Nov 2002 19:23:09 EST
Jack (JRook78123 from aol.com)

I forgot to tell the lads and lassies at Linux.......I got the .max viewer online and downloaded it.......Now I can view my nieces scans without having to fiddle with them......

Again and again, THANKS!

Jack - Chicago


The last word on "daemon"

Wed, 4 Dec 2002 09:56:00 +0100 (CET)
Maurizio Loreti (loreti from pd.infn.it)

I have read on the December Linux Gazette (mailbag) another letter about the etimology of "daemon". Usually for this kind of things the ultimate source of knowledge is "The Jargon File" by Eric S. Raymond, aka ESR (aveilable at the URL http://www.tuxedo.org/~esr/jargon) .

At this point he repeats the entry, but you can find it online at: http://tuxedo.org/~esr/jargon/html/entry/daemon.html
The jargon file entry was mentioned in the starter to this thread, which began in the October issue when someone confused about Kylix made a wildly incorrect guess about the origin of "daemon" and was immediately fed all sorts of tasty bits by The Answer Gang. I thought the timing was quite excellent as it arrived perfectly for Halloween. http://www.linuxgazette.com/issue83/tag/1.html
It has since seen replies in November's and December's mailbag http://www.linuxgazette.com/issue84/lg_mail.html http://www.linuxgazette.com/issue85/lg_mail.html which remove the haze of years that a glossary entry generally summarizes out of existence, to describe current usage only. The Jargon File doesn't always do this, but the information lost by not being quite common enough "common knoqledge" before this began to be set down as bits (and eventually paper) sadly does the glazing over quite well enough.
"ultimate" is a strong word and frankly I rarely use it for anything. Anyone who's been in this business long enough knows that to depend upon only one source for your research isn't really "ultimate" at all, and I'm pleased to have drawn some historians out of the woodwork with more complete info than the Gang pulled out of our wizard hats at the end of September.
In fact, I think the Jargon File maintainers may well like to add details from the etymology-of-daemon thread updates to their entry. To make it more likely, I've cc'd their maintainer list. :) Hi Eric, and everybody :)
As of press time, I haven't seen an update to this entry in the Jargon File as a result. No worries. It's probably because I didn't follow their posting guidelines more closely... -- Heather

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

You can mail submissions for the Jargon File to jargon@snark.thyrsus.com.

We welcome new jargon, and corrections to or amplifications of existing entries. You can improve your submission's chances of being included by adding background information on user population and years of currency. References to actual usage via URLs and/or Google pointers are particularly welcomed.

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


Booting multiple OS's

moral: pay attention during hardware upgrades.

Mon, 23 Dec 2002 18:06:41 -0500
Bob (x.generalx from verizon.net)

Your answer gang column in issue 85 had an article "Triple Booting" and had 1 segment of a triple boot as Windows 98.

Recently, I decided to upgrade my P3 MB to a P4 at 2.4gz. There was a combo of an Soyo P4vda MB and the P4 2.4gz that I couldn't resist. I did a lot of reading and the installed the MB. I also have a Slackware and Mandrake Linux installation.

On boot up, I got an error message from W98 that initialization of the NDIS had failed and the system had to be rebooted. It turned out that the only way it would boot from that point was in the safe mode. Needless to say, that's like being on a dead end street with no place to go. My 2 Linux installations were not accessible because the Promise card had been removed and they were now on hda and hdb and I couldn't get them to boot.

It seems that W95 & 98 at this speed of a P4 processor can only be made to work by getting a fix from Bill's os. Since my Pc was dead in the water, there was no way this could be done and the alternative was to install WXP. My true instincts said install Linux and to hell with windows.

Anyhow, its all said and done and WXP as far a I am concerned is a piece of crap. I sooner setup a graphics card in Slackware Linux than deal with what XP has to offer.

My reason for this litany of misery is to ward of some poor soul who might have the temptation to use this combo of a P4 2.4gz or higher processor with W95 or W98. You would think that somewhere there would be a flag to warn us but it was only after a call to Soyo, the MB manufacturer, that I learned of this pitfall. People tell us hard Linux is, if I had chosen this combo to install on Linux life would have been a bed or roses.

Bob Lee
x.generalx@verizon.net


GAZETTE MATTERS


answerguy and tag addresses gone

Wed, 4 Dec 2002 09:55:22 -0800
Mike Orr (Linux Gazette Editor)

The answerguy and tag addresses are now gone, "user unknown", bye bye, see ya. Answer Gang, expect a significant decrease in spam. -- Mike

And I suspect a significant amount of rejoicing from our sysadmin, Dan, who has to clean out the spamtrap occasionally... -- Heather


Thanks

Thu, 12 Dec 2002 21:56:25 -0500
naylor (rnaylor from nhvt.net)

I found the back issues of the Gazette included in the Debian CDs. Another hidden gem. This alone was worth the purchase price. I enjoy the format of multiple answers to questions (eg: the answer gang) and I am suprised that other publications have not tried to copy the format. It kind of has the feel of being subscribed to a news list I subscribed to 'Linux Journal' a couple of years ago because of 'linux Gazette'.

I agree, Linux is more fun.

Why don't you advertise your magazine archives? ~ Buy Our Linux Gazette Archives And Get a FREE Debian 3 Disto.~

Heather specifically wanted The Answer Gang to read like an informal conversation, so that's how she edits it. I don't know why nobody else has copied the style. For LJ, it may be because of tradition and space. The Answer Gang takes up a lot of space when printed, and print magazines have only a limited number of pages, so you'd have to drop a couple articles. But people buy LJ for the articles. -- Mike

(curtsy) thanks for the compliment, guys. I figure, a thick enough thread feels a little like an installfest... all these clues flying around at high speed... bonking people occasionally, but all in good fun. -- Heather

As for the Debian CDs, those are handled by the Debian Project and the CD vendors, so it's their job to promote them. We do have LG on the Linux Journal Archive CD (store.linuxjournal.com, under "LJ Archives"). -- Mike


Re: virtual beer and feature request

Mon, 30 Dec 2002 16:57:24 -0800
Mike Orr (Linux Gazette Editor)
Request by Raj Shekhar (lunatech3007 from yahoo.com)

Can it be possible to append the author bio to the TWDT file. Or maybe make a TWDT for the author bio itself for each issue. I really enjoyed reading the bios :-).

We'll think about this. One of the purposes of the Author pages is to have the latest contact information and bio; the articles and TWDT would not be changed after publication.

Pehaps I can put the entire bio page (minus the links to previous articles, and minus the large type in the header) at the bottom of the TWDT article, with a note that this information may be old and another link to the Author page.

Thanks for looking into my feature request about the author's bio. What you suggested is exactly what I wanted.

Done, starting in January's issue. -- Mike


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 © 2003
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 86 of Linux Gazette, January 2003

[ Prev ][ Table of Contents ][ Front Page ][ Talkback ][ FAQ ][ Next ]
LINUX GAZETTE
...making Linux just a little more fun!
More 2¢ Tips!
By The Readers of Linux Gazette

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


When LILO lies low and you see LI

Thu, 28 Nov 2002 09:38:15 -0700
Neil Koozer (neilkoozer from adelphia.net)

Adding to the Issue 84 2 cent tip #2 ...

I wish to clarify what the LI result from lilo means.

The often quoted segment from the lilo readme is sort of backwards in both halves of the sentence. When you get LI and nothing else, the second stage loader was NOT loaded. A block of bytes was loaded, but from the wrong location. This wrong block of bytes WAS executed, but since it is garbage nothing is printed.

Neil.


Learning about mail

Tue, 26 Nov 2002 23:09:30 -0800
Heather Stern (Linux Gazette Technical Editor)
Question by James M. Haviland, RN (jhavilan from attbi.com)

A continuation of Issue 85, 2 cent tip #10 ...

I have installed RH's 8.0. I'll have to admit I'm in Windows at the moment.

'sokay, that's fixable :> Or if you get really tricky you can convince a good copy of WINE to use the Windows setup, and run mswin apps even when you are in Linux.

Also the e-mail program that came with 8.0 that isn't connected to a browser retrieved my mail, but wouldn't, couldn't send my mail.

That's probably:

Fetching mail from another serv explicitly (via POP3) works. (This is common. Your ISP did all the work setting up and keeping that POP server, your mailer just visits it once in a while.)

Sending mail outbound, no SMTP server is found to talk to. (There are a few browsers which will "speak SMTP" on their own, but they are not very good mailers on the average, for other reasons.)

Adding an SMTP server to your setup is usually quite easy; look for an RPM package named any one of sendmail, qmail, or postfix. (but you only want one of them.)

and I forgot to mention that if your ISP actually gives you the explicit address of an SMTP server to use, say, mail.isp.example.com, then you could try telling that to your mailer, rather than worrying about setting up your own. -- Heather

Thank you for your time.

You're welcome :)


a new language

Wed, 27 Nov 2002 15:55:29 -0800
Rick Moen (the LG Answer Gang)
Question by Jack (jackdrook from hotmail.com)
Jack asked us a question that was so general Rick answered it with the applicable Linux answer... -- Heather

You lost me on the KPPP Tool and Linux. Linux is an OS, right?

Indeed. Thus the term "Linux Answer Gang", you see.

Now, where did I get your address? I asked some friends about how to get my telephone to operate through the PC. One person sent me a forward with "The Answer Guy" and the address. I believe it to have been a page from an old site that contained pertinent information, but not the site itself. Does this help?

Not nearly as much as it would if you inquired with that person and tracked down the "old site" for us. That would be much appreciated, as we continue to be deluged with misdirected non-Linux queries.

I am self-taught, so do not confuse me with high-altitude techtalk, just the facts.

Self-taught was at one time the only way to learn Linux, back when many of us got started with it, so we sympathise, and now attempt to assist others while, as we say, "Making Linux just a little more fun".

What is my best approach for learning a program language?

Well, first you'd have to install a Linux distribution, of course.

Strictly speaking, most of these languages are available for Windows too, but some of the mswin implementations may be less than perfectly portable, or the documentation may suggest non-portable over portable coding strategies. Go for dual booting, perhaps. -- Heather

You'll find that it comes with an amazing variety of programming language development kits, from C, C++, and Python through tk/tcl, Java, Lisp, and heavens knows what else. I personally maintain a list of Integrated Development Environment software for Linux, here: http://linuxmafia.com/~rick/faq/#idedev . As you'll see, the list has grown to pass 100 entries.

How you would proceed from there would depend on which type of programming language you'd like to use, and what you want to do with it.

Cheers, Rick Moen


Linux Router ISP Network Ip pool Details

Fri, 6 Dec 2002 14:24:43 +0530
Jim Dennis and the Gang (the LG Answer Gang)
Question by jeevan (jeevan from asthatech.com)

Is it possible for me to run Routing Protocols(ospf,BGP,rip) on my Linux Box connected to an ISP (through cable modem) and obtain all the network (including subnetwork ip pool)ip pool range of my ISP.

[JimD] Look for GNU Zebra: http://www.zebra.org It's considered to be the best available package for Linux, and has (I'm told) syntax that's reasonably similar to Cisco's IOS.
[someone else in the Gang expands] Of course you can! This is not your grandpa's operating system, here. OSPF v. 2 and BGP4/4+ are both supported by either the gated daemon or the GNU zebra daemon, both of which should be standard on your Linux distribution. Zebra can also do pretty much every variety of RIP (v.1, v.2, and RIPng). The standard old routed (prounounced "route-dee") daemon can do RIPv1, and gated can do RIPv2. (gated will also do EGP, thrown into the bargain.)

Thanks for replying. But what I wanted exactly to know is that should I need any kind of details from the ISP (like Router ip,ASN...) or any permission from the ISP for my LINUX Router to have a OSPF session with the ISP Router.

With Regards
Jeevan


security = obscurity, in this case

Mon, 2 Dec 2002 23:10:33 -0500
Faber Fedor (faber from linuxnj.com)
Question by Michael Havens (bmike1 from vei.net)

When I go to login with my online stockbroker

I get this:

"Connection to host www15.scottsave.com is broken"

Why do you think that is and what do you think can be done about it?

Let me guess, you're using the Konqueor 3.0 web browser, right? Konq is broken with respect to SSL sites. I have the same problem and I need to find an updated Konq to use or switch to another browser.
I'm not able to verify this; it could just be the same problem as in Konqueror 2.x, where the SSL support is a seperate package (kdebase-crypto under Debian; your distro may vary), and Konqueror only visits non-encrypted URLs if you don't have that package installed. Of course it doesn't bother to say so... an error message like "https: protocol not supported" would have been a little more useful. -- Heather
Galeon and Mozilla will work, but you need to d/l the Personal Security Manager (PSM). I've looked at installing it and it looks like a PITA.
Until I find an updated Konq or install PSM, I use an old version of Netscape (4.x) which works fine.


Headless Linux

Sun, 22 Dec 2002 22:54:45 -0800
Dan Wilder (SSC sysadmin)
Question by Steve B. (admin from bsdfan.cncdsl.com)

I've been looking around and can't find the info I need. How do I configure Linux to run headless with a terminal connected to a serial port?

Not quite headless, with a serial terminal connected. I choose to call the condition "nearly headless", after the phantom named "Nearly Headless Nick" in the Harry Potter series.

Take a look at:

Documentation/serial-console.txt

in the kernel source. This won't get you quite everything you'd get from a console connected. In particular, you don't have access to the BIOS. But if you can get past that, you're pretty much there. You can even tell LILO to use the serial port, as described in the documentation file. No doubt there's also a GRUB option for serial console, if that's the boot loader you're using.

As I understand it, there's at least one card which will even make the BIOS available via a serial port.


Crashing mystery? Try no DRI

Wed, 11 Dec 2002 08:19:37 -0500
Drew S (linux_man_us from hotmail.com)

Something for rajachemist of Issue 85 Help wanted #2 to try.

Though you never mentioned what your video card was, I will respond since I was having a similar problem with Mandrake Linux 9.0 on my home-built machine. I was getting lockups all the time and yet I could ssh into the box from another machine and see that everything behind the scenes was still running fine. Just X froze, but it also meant that I could not kill it with CTRL-ALT-BACKSPACE. I happened to have an ATI Xpert 2000 video card (Rage 128 chipset). The ONE item that fixed it was that the card does not seem to handle DRI properly. I commented out the line in my XF86Config file that said: load "dri", restarted X and I never saw the problem again. Perhaps your problem is similar.

Drew


imac_X-problems

Thu, 28 Nov 2002 10:24:46 -0800
Rick Moen (the LG Answer Gang)
Question by kuettner (kuettner from tuebingen.mpg.de)

after using linux for several years now on i-586 I tried to install it on my imac-g4. the problem: I do not get X to run, because of my NVIDIA GeForce4 MX. I am using debian woody for ppc and don't find any hints in the net. can anybody send me a working XF86Config for XFree 4.1.0 or any other help.

It looks like you'll need XFree86 4.2.0 or later, and will have to use the "vesa" driver (not the "nv" driver) in 16-bit mode, which is the only one supported thus far.

As you may know, these things do tend to happen with newly introduced video chipsets, and Nvidia have unfortunately been notably uncooperative with the XFree86 Project.

That they didn't buy into the XFCom release sequence (compatible binaries, source eventually committed to the open source X code tree) and want to roll their own we can understand; but they have to keep up with the Xfree86 codebase or it makes them look slow. And act slow, if one has to back down to the generic servers in order to work... -- Heather


Compiling Kernel and Installing on a new machine

Sat, 7 Dec 2002 13:11:07 -0800
Jim Dennis (the LG Answer Guy)
Question by Sunil Kayili (Sunil.Kayiti from fmr.com)

I am in a catch-22 situation. There might be an easy answer for this but I am not able to work around this problem. Sending this problem here.

Server Configuration:


Chipset 440GX
Micron NetFrame 3400
Adaptec 7680 SCSI Adapter (aic7xxx - HBA 6.2.8)
Mylex Raid - DAC960

Software:


RedHat 8.0 - Linux Kernel 2.4.18-14

Problem:

With 2.4.18-14 there is a problem in the kernel which loops on aic7xxx during boot up, hence it does not boot.

Solution:

Compile the latest kernel 2.4.18-20rc4

Catch-22:

I built the latest kernel on my other linux machine and wrote it into a CD ROM. Now how do I transfer it into my NetFrame Server.

I boot into the rescue mode using the installation CD but once in the rescue mode, I am unable to eject the CD. I have tried all possible mount points to eject the cd but to no avail.

  1. Is there a any way to transfer the new kernel image into my NetFrame PC? I exhausted all options, i,e network (since it is in rescue mode)
  2. Is there a way to disable linux to take control of the CDROM ejection mechanism?

Your help greatly appreciated.

Thanks
Sunil

Suggestions:
(Okay, that last one is way too much effort for way too little gain and the one before that is just plain silly).


Partitioning without setup

Wed, 25 Dec 2002 22:46:15 GMT
Dan WIlder and Pradeep Padala (the LG Answer Gang)
Question by Brandon Dean (bmdean from socket.net)

Hello,

I would like to know what linux program to get that I could use to repartition a hard drive without going through setup.

Thank You,
Brandon Dean

[Dan] fdisk
See "man fdisk"
[Pradeep] If you want to repartition without losing data, GNU Parted is a great tool. Details at:
http://www.gnu.org/software/parted
You can also use fdisk or diskdruid but both will destroy the data after repartitioning. These two should be installed by default in most of the distributions.
Don't forget to make good backups first -- Heather


Red Hat 7.3 Installation

Tue, 24 Dec 2002 13:19:39 -0500
Pete Keller (pkeller01 from snet.net)
Question by (dhar_mca from jntu.net)

Friends, Last week I posed a question for booting with 3 OSes. Thank U.

Here I again partitioned ... [lots of stuff about prepared system] I am trying boot from boot disk. It is coming upto "localhost login:" after which GUI screen be displayed. It displays the localhost login: prompt for a second or a half and then hangs. I thought its a problem with monitor sync values. Mine was samsung's samtron 56V model. But in the list specified - no exact match for it. So I opted for the default given (unprobed type)and modified the sync values with the ones given in my monitor manual. (My friends who have already loaded windows, have not even changed the sync values). One of my friend got the same problem. But his system didn't hang but it flashes between blank screen and the text based localhost prompt.

His "chooser" - the GUI login, keeps crashing but the system keeps trying to put it back up. kdm, gdm, xdm, one of those dm thingies. -- Heather

He was able to login. He logged into it with root and modified the Xconfigurator and now works fine.

Plz assist me.

[Pete]
  1. press control alt and F1 to get a text login.
  2. login as root and run Xconfigurator
If you're hung too hard for that to work, use the boot loader to put yourself in sincgle user mode, then fix the boot runlevel (/etc/inittab default entry) to stay in text mode. For Red Hat flavors that's runlevel 3. Set it back when you'r sure it's fixed, use startx as a user to run X explicitly while experimenting. -- Heather


is this the right place?

Wed, 27 Nov 2002 11:41:44 -0800
Mike Orr (Linux Gazette Editor)
Question by James M. Haviland, RN (jhavilan from attbi.com)

If I may. Is this the news group of ssc.com?

I'm the Technical Editor; I'm cc'ing the Gang, so everyone can chime in if they like. -- Heather

Is it better in the future to write linux-questions-only@ssc.com? Will the server accept my e-mail

TIA Jim

Yes. Linux-questions-only accepts queries from anybody; members of the list see all such messages and are expected to answer a few here and there. -- Heather
Just to be clear, this mailing list (linux-questions-only@ssc.com) is owned by Linux Gazette (www.linuxgazette.com), which is published by SSC. However, most of LG's contributors and Answer Gang members are independent volunteers not related to SSC.
There is no single ssc.com mailing list or news group. SSC hosts many mailing lists, some related to our business and others we host as part of our general commitment to Linux and to free software.
Questions about Linux should go to linux-questions-only@ssc.com. Questions about SSC should go to... well, it depends on the question. Send it to info@ssc.com if you're unsure where to direct it.
There is also linux-list, a discussion list about everything Linux (except advocacy or flame wars). linux-list is hosted by SSC and has a strong Pacific Northwest emphasis, but we do have people from other regions and people who have moved away but still want to keep in touch. To subscribe to linux-list or to any of SSC's other public lists, go to http://www.ssc.com/mailman/listinfo .


Switchboard

Wed, 27 Nov 2002 11:49:35 -0800
Ashwin N and Heather Stern (the LG Answer Gang)
Question by JRook78123 (JRook78123 from aol.com)

Dear Answerguy,

[Ashwin] Hi Jack,
There is no longer an answer guy here, but a gang of Linux enthusiasts! We answer queries on Linux in our free time.

I used to have an IBM Aptiva system that had in the bundle a switchboard supplied by Phoenix. I now have an hp pavilion 7850. It has a modem and phone dialer, but I cannot use the telephone through my computer as before. Is there some way to connect to my telephone line for normal surface telephone lines? What would I need to do?

[Ashwin] If you're using Linux, have you tried connecting using the KPPP tool?
[Heather] I'm not sure, but if he means that his computer used to handle the voice lines in his office (and yes, there are such things, which have some cute GUI app to configure them) ... then he may want to play with the program Asterisk, and maybe the hardware "LineJack" or "PhoneJack" by Quicknet, which are telephony cards you add to a computer.
If he just means that his computer needs to reach the internet, then it's true we have a bunch of dialer-helpers (KPPP is one of the better ones; xisp and a few others are out there) ... but he will still need to know some basic things like his ISP's phone number, the username he was assigned, and maybe some connection features like whether they use PAP or CHAP to identify him.
These are all things which his ISP can tell him better than we could.


ThumbDrive

Mon, 2 Dec 2002 01:57:17 +0100
Robos (the LG Answer Gang)
Question by Syborg (linux_lover2003 from yahoo.co.in)

Is it possible to install Linux on a thumb drive(size 120 MB). Or Can I copy selected files from my normal linux installation(RH 7.2 on a 40 GB hard disk) and make the thumb drive bootable independently. What is the best way to do this? I thought of copying files from my normal linux installation.But i am in doubt whether i can boot this drive in this way. Looking forward to your suggestions.

Short answer -- try this:
http://freshmeat.net/projects/runt

A Linux distro optimized for a USB gadget. I like it. So, as long as your BIOS supports booting from USB devices, you should be golden -- Heather


ip address from c program

Fri, 06 Dec 2002 17:25:28 -0800
George Victor Tereshko (georget from genesyslab.com)
Question by Dave N. (daven from web-wise.com)
Answered By Jim Dennis (The LG Answer Guy), Marian ION

In reply to LG 85, help wanted #3


I need to identify the ip address of the client fron within a c program

On Solaris

[JimD] Grump. This is a Linux magazine.

trace the incoming connections and:

See attached solaris.getting-ip-address.c.txt

[JimD] If I'm reading it correctly this translates roughly to:
dmesg | tail -1 |  grep " from " | sed -e 's/^.* from //' | cut -c '0-6'
... which could be simplified somewhat in PERL, awk, or Python, and could probably be munged to perform most of the string handling just using bash/Korn parameter substitution magic with something vaguely like:
... | grep " from " | while read line; do
line=${line//#* from /}; ipaddr=${line:0:6}; ...
Note: I'm just using shell syntax here because I consider it the easiest way to express the concept of what you're doing --- a psuedo-code to people like me who use shell extensively.
Unfortunately this code is not close to what the querent was after. He actually wants to have his program do something like:

if my input/output is a tty then:
if my tty is an inet domain socket then:
ask the socket for the remote (source) ip address
... which will involve the isatty(3) library function and the getsockname(2) system call (and some other structs and munging).
There's an example of the code for this in Wietse Venema's TCP Wrappers sources for tcpd. That code is quite portable, well testing (running on almost all mainstream Linux boxes for about a decade, as well as most BSD systems, and many others.
Your code relies on details about how a given system might be logging connections via syslog/klog or similar externalities, and it's inherently a race (other connections may be logged between the time the message gets put in the dmesg ring buffer and the time when his code is scheduled to run).
I'm not much of a C programmer. I've done a little, even having written a simple kernel device driver that's in production use. However, I rely very heavily on reading examples of similar code.
In general when looking for how to do something like this (figure out the remote system's IP address from one of your file descriptors) I try to think about which programs on my system must be doing something similar. Sometimes I run the similar program under strace, even ltrace for some hints. Then I grab their sources and read up on it. (Usually I can use a man -k or two to make a pretty good guess at which library functions or system calls are involved, even without an strace).
George, I hope you don't think I'm being hard on you. I realize that tech support, particularly trying to help people with programming questions, is difficult.
Dave, I hope this helps. I'm assuming you can figure out the actual code on your own. One reason I display my ignorance by telling people how I discovered whatever I'm suggesting is to "teach the world how to fish." I've never written code to use sockname() and hadn't ever noticed it until I did a man -k socket while writing this message.
[Marian]
struct sockaddr_in from;
socklen_t fromlen;

fromlen = sizeof (struct sockaddr_in);

getpeername (fdi, (struct sockaddr *)&from, &fromlen);
printf ("You are %s:%u\n",inet_ntoa (from.sin_addr), (unsigned)ntohs
(from.sin_port));


Tricky Linux

Mon, 23 Dec 2002 14:12:15 -0400
Kapil Hari Paranjape, Huibert Alblas (the LG Answer Gang)
Question by Hritesh Moorjani (Hritesh.Moorjani from zenitel.biz)

Dear Sir,

After soo many years have I waited to use Linux as my principle OS as we both know how much problems we have to go through with Microsoft. I've waited for years for Linux to be user friendly and finally our prayers have been answered. I have over twenty machines in my department and soon if I'm able to resolve some of the problems with software compatibility and substitutes. I would probably migrate everyone of us to Linux from Windows.

[Kapil] Welcome to the Brave GNU World! But be warned that if you want to administer a network of machines in any world you can't depend on user-friendly parts but only on the sysadmin-friendly parts!

My only problem is right now, I have an NT Server running Exchange 5.0 and our principle desktop was supposed to be NT workstation with Outlook 97. Obviously, as an administrator, I never follow protocols.

[Kapil] Quite a big confession that. Would other sysadmins be as honest and own up?!

I had Windows 2000 with Outlook 2000 and it worked perfectly. Now that I have installed Red Hat Linux workstation, I successfully connected to the server via DHCP and I can easily surf. But what I can't do is check my email through Ximian Evolution Email Service. My domain is MARS and the server name is MAIN. In exchange, we have IMAP4 and POP3. In Linux, I tried to configure the Ximian Evolution as IMAP.MAIN.COM and POP3.MAIN.COM. Ofcourse we don't have extranet so we can't browse through the Browser. It doesn't work. I even tried my login name with the hostname and it still doesn't work. Can you help me ?

Thanks.

Hritesh

[Kapil] Obviously you have confused Win NT domains with DNS domains. To have a DNS domain (which you don't seem to need since you have no extranet) you need to have an authoritative DNS name server.
If your entire network is only served through Win NS you should check up the documentation on Samba to configure your machine as a Win NS client. You can stick with localhost.localdomain for your DNS name unless you want to be more imaginative!
[Halb] Maybe you should look into Ximian Connector, it will enable to use Evolution as a complete Exchange client. Ximian will be happy to sell you these at $69.00 a piece, but this sholud not be a real problem for a company....... if this is the solution to your problem. Maybe Kapil Hari Paranjape's answer is more the direction you should be looking at.


Teething problems with a dual boot system

Tue, 24 Dec 2002 10:21:22 +0000
Huibert Alblas, John Karns (the LG Answer Gang)
Question by john todd (toddncl from hotmail.com)

Hi there, I was wondering if you could help me out here. I have a dual boot system running XP and red hat 8.0. I have just recently installed red hat and am finding a few problems whilst setting up the system. My computer has 2 physical hard disks (primary master, and secondary master) the first (hda1) has that nasty windows thingy on it (I left the file system as fat32 so I could go back to 98se if need b). Hda2 has red hat on. I can mount and access hda1 when in Linux, but I cannot access my second (fat32) hard drive at all. I have all my operating systems and software on the first hard drive and all my work on the second, so this is starting to wind me up a bit now!

It's not entirely clear if he can still see that work drive from Windows; if he can, Halb's probably right. John K's hints are good before someone starts setting up, so people can have better results. It may also be worth noting that hda2 is the second partition on the first drive; a second drive on the same IDE chain would be hdb, and its partitions also numbered, so maybe he just needs to mount /dev/hdb1 as well.
NT filesystem support for Linux, claiming to read all versions: http://linux-ntfs.sourceforge.net -- Heather
[Halb] By the look of things I would say you have NTFS on your second Harddrive. This is common behaviour on M$ machines becouse FAT23 partition sizes are artificialy restricted to 32 Gigs ( not that big for nowaday harddrives) M$ will automagicly change to NTFS, this might be the reason why you are not able to mount it. This presumes that you have made all the correct entries in your /etc/fstab.
[John] My guess is that perhaps you lost your fat32 partition on the 2nd hd. How did you set up your partition(s) on hda2 when installing RH8? The recommended method would be something like:

also when I re-start my computer I need to mount the hda1 each time. Any help would be greatly appreciated.

[Halb] here you can make an entry for /dev/hda1 like this or whatever your liking is:
/dev/hda1      /WIN2K  vfat    defaults,noatime        0 0


ISO file?

Thu, 28 Nov 2002 16:10:57 +0000 (GMT)
Dan Clark, Faber Fedor, Mike Orr (the LG Answer Gang)
Question by Paul Bailey (lil_p84 from yahoo.co.uk)

What exactly is an ISO file? I downloaded what i thought was a game and it is an ISO file. Can you convert this into an EXE file? and do ISO files only work on LINUX. Your help will be greatly appreciated thank you.

Lil_P

[Iron] This gets the award for the most frequently-asked question of the month. I think it's the third time somebody has asked how to play .iso games.
ISO9660 is the file format used for CD-ROMs, named after the International Standards Organization's standard that defines it. "ISO" is sometimes used as an abbreviation. Whether that's the format your file is in is a different matter; it could be anything. The .iso extension isn't universal like .txt, .html, .jpg, etc. What does the "file" command say about your file?
Assuming the file is really an ISO9660 filesystem image, you can write it directly to a CD and then either read the CD or boot from it. You'd write the image using "cdrecord" on Linux or one of its GUI front-ends like KOnCD in KDE. Skip the first step (making an image file from a directory hierarchy) because you already have the image.
[Faber] ISO files are binary versions of CDs. If you were to copy a CD byte for byte (NOT file for file), you would have an ISO file.

[Dreamgazer] and how can I open them without copying to cd

When I found out how to do this in Linux I was so impressed with Linux! Let's say you have a directory called /mnt/my_iso and your ISO is called /home/Dreamgazer/my_iso_file. You can mount the ISO with the command:
mount -t iso9660 -o ro,loop=/dev/loop1 /mnt/my_iso /home/Dreamgazer/my_iso_file
and then you can access any of the files in the ISO by going to the /mnt/my_iso directory! Cool, eh?!
Let's see Windows do that !
Actually, just saying -o loop is enough; iso9660 defaults to read-only, and you don't have to tell it which loop device comes next, it can figure it out all alone. I loopback mount CD images a lot myself. I have to make sure not to run out of loops available. -- Heather
[Iron] It may fail for many reasons such as loop device busy (choose another loop device /dev/loop*), your kernel not having loop device support, the /dev/loop* files not existing, etc. When you've finished inspecting the files under /mnt, do:
umount /mnt
to unmount the image (note the command name has one "n" instead of two). See "man mount". A couple details:
  1. You may be able to just use "-o ro,loop" instead and let it choose an unused loopback device, see the manpage for details.
  2. The manual says it's more convenient to mount and unmount loopback devices if /etc/mtab is a regular file and not a symbolic link to /proc/mounts. That answers another question The Answer Gang was unsure about a couple months ago, whether you lose anything by symlinking the two together. (What you gain by symlinking them together is that /etc/mtab -- and thus what "mount" without options reports -- will always be up to date.)
[Dan] A free trial of mswin software that will let you open, create, and extract (we guess this means "view the filesystem inside of") ISO files.
http://www.undisker.com/download.html


Remote X over SSH

Mon, 25 Nov 2002 21:11:17 +0100
Gürkan Sengün (gurkan from linuks.mine.nu)

You need a user account for the host you want to login to. The server should be accessible over SSH (normally TCP/22), and should have X11 forwarding configured.

$ netstat -a |grep ssh
tcp        0      0 *:ssh                   *:*                     LISTEN
$ grep orwarding /etc/ssh/sshd_config
X11Forwarding yes


X server and SSH client for Windows(r)

On UNIX, BSD or Linux you can use any X server and SSH client you want.

$ ssh -X user@1.2.3.4
user@1.2.3.4's password:


Starting the window manager

This will start the amiwm window manager in the background and display it on your X server window (xs.exe).

$ amiwm &


Screen in five minutes

We become super-user.

$ su
Password:

We start iptraf as daemon (screen session in detached mode).

# screen -dmS iptraf iptraf

We list our SockDir.

# screen -ls
There are screens on:
        604.iptraf      (Detached)
1 Socket in /var/run/screen/S-root.

We reattach to our detached screen process and detach from it.

# screen -r
<ctrl-a-d>
[detached]
Gürkan Sengün

http://www.linuks.mine.nu
Windoze not found: (C)heer, (P)arty or (D)ance?


Debian User Worldmap

Mon, 25 Nov 2002 21:11:17 +0100
Gürkan Sengün (gurkan from linuks.mine.nu)

A fun thing to do; see where fellow Debian users are, check in. I will try to make the page better with time: Like click on a place and find friends (a list) nearby, show how it's done etc...

http://www.linuks.mine.nu/debian-worldmap

Gürkan Sengün

http://www.linuks.mine.nu
Windoze not found: (C)heer, (P)arty or (D)ance?


Remote control of Linux from Windows

Mon, 2 Dec 2002 21:15:36 -0600
Thomas Adam (The LG Weekend Mechanic)
Question by Brandon M. Dean (bmdean from socket.net)

Hello,

I live in LaGrange, Missouri. I have downloaded the iso's for

Mandrake 9.0. I have installed it once. I then took it off to have Windows again.

[Thomas] Oh, dear. You do know that, Tux doesn't bite that hard.

My brother had a Linux Router, and I wanted it to act as a server, but he said it wouldn't.

[Thomas] Your brother is deluded :-)

But I have a second computer in my room. I want to add this behind my dad's desk with a 5' network cable, instead some more 100' cable to run to my room. I wanted to know a good app to run a remote desktop connection on it. I have downloaded one program called X-Win 32.

[Thomas] "A good app" -- well that depends on what you want the server to do. Your server, once it is up and running can support (amongst others): file serving, print serving, webserver, phpserver, mysql server, mail serving, etc...................
If you find you don't like that one, there arre a few other X servers mentioned in "(#tips.19)Remote X over ssh" above. -- Heather

I have Windows XP on my main computer. It has a remote desktop built in.

The open source client for that protocol is called rdesktop: http://www.rdesktop.org
But I don't know if anything on Linux serves that protocol so the windows remote-desktop client can view it.
VNC is another possibility, and may be needed if you want to share the desktop with more than one person - here's a KDE remote sharing project that uses it: http://www.tjansen.de/krfb -- Heather

I also wanted to know if it had to have a keyboard, mouse, and monitor hooked up to it at all times, even though I will have some sort of remote desktop app.

Thank You,
Brandon Dean

[Thomas] Nope, my 486 Server has no monitor, keyboard or mouse, since during the odd occassion that I have to log into the server, it is done via SSH which I can run from the command-line.
Although if your using Windows, then I suggest the use of "putty.exe".
This is also mentioned in the "(#tips.19)remote X over ssh" tip. For occasional access over a serial cable, see the "(#tips.6)headless server" tip.
As long as your BIOS is happy when you don't have these things, Linux doesn't mind at all. -- 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 © 2003
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 86 of Linux Gazette, January 2003

Contents:

¶: Greetings From Heather Stern
(?)Troubleshooting boot-time video mode problems
(?)NameVirtualHost in Apache
(?)shutdown down the system using power switch --or--
alternatives for the Big Red Switch
consider journaling...
(?)Question on writing Server program for multiple client connections.

(¶) Greetings from Heather Stern

Hello everyone, and welcome not only to the world of the Answer Gang, but a very Happy New Year!
Considering how terrible the economy is these days, Linux didn't do too badly for itself. The question is increasingly not "is that linux thingy safe enough to use in our enterprise" but "where can it serve us" ... with the advent of stabler desktop software has come some legitimacy, even among sites that really don't care as much about their desktops. Also as our installers have been improving, near as I can tell from the messages, Windows' has been getting worse, and the number of mswin distrss is increasing the chance that formerly innocent end-users will someday soon have to endure installing a new OS. And there are a fair number of free-OS hardware vendors now; the preload advantage is no longer entirely in Redmond's court, either.
Heck, Red Hat's in the black too. Not a bad year for the penguin.
Statistics, statistics. That brings me to the Gang's message queue. It was really light tthis month, about half the usual volume. I'm not even counting the spam, which we hardly see anymore. (Thanks Dan! Bunches!) And if we had ignored everything that had come as HTML or text+HTML rather than plaintext, we darn near could have gone on vacation, leaving me to gather threads from past months.
Fear not, however. We do have some good stuff here. There were plenty of good tips as well.
Of course it's time for some new years' resolutions. Being a rather techie soul -- gosh! who could have guessed?? :) -- I'm for 600x600 full color. dpi, that is. A pal of mine gave me a scanner as a winter-gift. Now all I have to do is find desk space and some time to drop SANE (Scanner Access Now Easy) into place. My dream last year of LCD prices coming down decently hasn't really settled in yet.
For a more serious resolution, regular backups. The day your computer decides to go on a magnetic starvation diet and lose a few pounds ... approximately the weight of one hard disk ... will be really annoying if you don't have 'em. Too bad DVD writing devices are still such a pain in the butt to use. They seem to be where video cards were a year or two ago - if it works then it's just beautiful right out of the box. And if it doesn't... well, have a lot of fun digging through docs and scratching your head in puzzlement. I've barely met anyone who's actually done it yet... and DVD-RAM doesn't count, since it's a different media entirely from the DVD-R and DVD+R. For that matter a mere 9Gb at a time is chicken feed to some modern drive setups. I think most folk will be backing up their medium size hard disks to even larger hard disks this year.
Have a great month, folks.

(?) Troubleshooting boot-time video mode problems

From Scott Rafferty

Answered By Joshua Jeffrey Wingstrom, Karl-Heinz Herrman, Matthias Posseldt

In reply to TAG #2, Issue 77

Josh,

Sorry for the intrusion. Came across your name in a linux archive. Your brother had a similar problem to the one I'm having right now and I was wondering if he managed to resolve the issue. The problem is the blank screen on bootup (no boot messages, no logon prompt etc)...I kinda agree with your hardware/card theory as I too am using a GEFORCE 2 card.

I can get the console text/logon prompt to appear by logging in (although I can't see what I'm typing) and starting X and then quitting X. This seems to "restore the correct mode" and the text logon prompt appears fine.

Booting up rescue mode or doing a text install from the CD seems to show the console text no problem though so why would my newly installed kernel just blank the screen.

(!) [K.-H.] just an idea:
but: At least SuSE's regular boot process shows a penguin or something and therefore must have switched to some non-text console (VGA mode). Maybe your card doesn't like that?
boot messages are of course always readable later on via dmesg, but I agree that if something goes wrong and boot hangs it would be nice to see the messages....

(?) Very little information on this problem in general. It's extremely frustrating. I'd like to see my boot messages. Interestingly enough I've encountered the same problem with Mandrake and Redhat on the same system. I could buy a new card of course but I'm determined to get to the bottom of this.

If I've intruded, please accept my apologies in advance.

Scott Rafferty

(!) [Joshua]
Scott, Thanks for contacting me. I would like to resolve this too.
I have since switched to Gentoo and the problem does not occur there.
I think that the problem is related to the bootsplash screens that Mandrake and Redhat use. The GEFORCE 2 does not seem to want to be switch into... I'm guessing VESA mode?... in the manner in which these applications are switching it. I think that this can be fixed by using the bootsplash utility from Mandrake. The CVS code for this is available at:
http://cvs.mandrakesoft.com/cgi-bin/cvsweb.cgi/soft/bootsplash
I would look at the documenatation and try to turn off the bootscreen. If this fixes the problem, try changing boot screen resolutions. Otherwise, I'm guessing we'll have to start looking at kernel configurations.
Happy hunting, Josh

(?) After scouring google yesterday for an answer to my NO BOOT MESSAGES problem there was one interesting comment I came across about settings in the BIOS. So late last night I made 2 changes to my BIOS settings. Now I can see all my boot messages. A simple but no less important solution to a frustrating problem.

The changes I made to the BIOS were these (screenshot links included) --

Enabled the memory hole from 15-16 M
http://www.motherboards.org/images/15/2002/1204_p2_11.jpg

Changed Primary VGA BIOS to [AGP VGA Card] - Was set to [PCI VGA Card].
http://www.motherboards.org/images/15/2002/1204_p2_9.jpg

(!) [Matthias] I'm pretty sure it is only the second BIOS setting which has to do with the VGA problem. You better disable the first option again, because it's more trouble than it's worth. And it is a "legacy" option, for systems which use VGA cards older then 1994 or so. Almost any system is newer to when this setting was important. In your PC timeline, order it in before "MS Windows 3.0 finally arrived. Bad OS/2 clone, btw." ;-)

(?) Different BIOS's will have different settings of course but I think these two are pretty standard across the board.

One thing to note - I had to actually switch the power off after making the changes (rather than just rebooting) for the changes to take complete effect. I also could have narrowed it down a little further to just the one BIOS change but it was late and I was so elated that I just forgot. If anyone wants me to delve further then just ask.

I really hope this helps other people with the same problem. I'm sure anyone in the know will understand exactly why these 2 settings would effect the linux bootup in such a way with some of the NVIDIA cards. I don't though. :)

Cheers, Scott

(!) [Matthias] It has to do with the AGP way of life ;-). AGP cards have two modes. The "PCI equivalent" simple mode where they can display character mode terminals etc, and the "AGP full featured mode" where they run full power. The second mode has to be supported by the Operating System with some driver and AGP layer.
And it seems that -- while the BIOS can display characters -- Linux cannot display them for some reason. Maybe because it sends PCI only commands or tries to detect the VGA card on the PCI bus and fails correctly handling

(?) NameVirtualHost in Apache

From Rich Price

Answered By Huibert Alblas, Faber Fedor, Mike "Iron" Orr, Heather Stern

I am running Slackware 7.1.0 and Apache/1.3.12 on my web server which I have been running for many years. Recently, I acquired a second domain name and I attempted to use name based virtual hosting to support both domains on this server.
I have been unable to configure apache to do this. I have been using the second edition of "Apache The Definitive Guide" by Ben and Peter Laurie as a guide. But repeated attempts to come up with a httpd.conf file have resulted in either both web sites showing the same [primary site] pages or in both sites showing an error page.
I have a number of questions that the Laurie's book has not been able to answer:
  1. Can you have both a primary site and a "NameVirtualHost" site that use
  2. Can you have both a primary site and a "NameVirtualHost" site that use the same IP address?
  3. Should I make both sites be "NameVirtualHost" sites?
  4. Should I make both sites be "NameVirtualHost" sites?
  5. Is there anything obviously wrong with these httpd.conf statements?
  6. Is there anything obviously wrong with these httpd.conf statements?
#
NameVirtualHost aaa.bbb.ccc.ddd
<VirtualHost virt-host-name>
   ServerAdmin relevant-email-address
   DocumentRoot /websites/virthost/htdocs
   ErrorLog /var/log/error_log
   CustomLog /var/log/access_log common
</VirtualHost>
#
Any advice would be appreciated!
Rich Price
(!) [Halb] Yes, as far as I can see you're missing the ServerName entry:
 <VirtualHost virt-host-name>

    ServerName virt-host-name

    ServerAdmin relevant-email-address
    DocumentRoot /websites/virthost/htdocs
    ErrorLog /var/log/error_log
    CustomLog /var/log/access_log common
 </VirtualHost>
Hope it helps

(?) Thanks for your reply. But my problem remains.

When I add the NameVirtualHost and <VirtualHost > commands [with the ServerName statement] to the end of the httpd.conf file, I get the "HTTP 404 - File not found" error message when trying to access either website.

(!) [Faber] Hang on. From what I've seen in this thread, you need to do this:
NameVirtualHost aaa.bbb.ccc.ddd

<VirtualHost aaa.bbb.ccc.ddd>   <-- note this nibbly bit
    ServerName virt-host-name
    <...snip...>
</VirtualHost>
NOT
NameVirtualHost aaa.bbb.ccc.ddd

<VirtualHost virt-host-name>    <-- this line is the problem
    ServerName virt-host-name
    <...snip...>
</VirtualHost>
(!) [Iron] That's how our sites are set up, those that do name virtual host. However, the Apache docs (version 1.3) say you can use either the IP or domain name, although they recommend the IP for the NameVirtualHost line. I would thus use the IP on both the NameVirtualHost and VirtualHost lines so it's easier for the person to match up which VirtualHost stanzas go with which NameVirtualHost.
Note that you can also use ServerAlias to define multiple names for one virtual host:
NameVirtualHost 10.0.0.1:8080
<VirtualHost 10.0.0.1:8080>
  ServerName buffy.vampire.slayer
  ServerAlias www.buffy.vampire.slayer
  ...
</VirtualHost>
This can be called the "Rick Moen can't get his users trained not to type the 'www'" approach.

(?) I figgured it out!!!!

The Apache online documentation says:

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

Note: the "main server" and any _default servers will never be served for a request to a NameVirtualHost IP Address . . .

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

So I added the origional "main server" as another virtual host like this:

See attached named-host.httpd.conf

And the original host continued to work with the new httpd.conf file.

The problem with the new host turned out to be a misspelled directory path. [I blush with shame].

Thanks for all the help.

Rich Price

(!) [Iron] Oh, OK. Often you think the problem is one thing but it turns out to be something else.
(!) [Heather] So, I didn't join this thread when it was active during the month, and here I am adding this as I edit the thread. But I figured it would be valuable to complete the example.
You need to have permissions for the directory set up in your httpd.conf too, since the very default permissions usually explicitly describe that anywhere in the web tree should be inaccessible unless opened up (or possibly, only open to localhost). The defaults may work pretty well until you start moving your web directories to a place unplanned for by your installation of Apache. (For example, having a websites directory off of the root directory, not exactly LSB compliant , but heck, it's your server.) That Rich misspelled this little tidbit, then realized and spelled it right, is what fixed him. So here's that part, presuming that these are pages for access by a world of visitors, not just a limited number of friends.
AllowOverride suggests what things .htaccess control files can affect.

See attached host-directories.httpd.conf

Now, the fact that he mentions "htdocs" suggests that he probably also has a dedicated cgi directory and maybe even a dedicated icons directory (so fancy indexing gets a touch of local flavor). So here's an expanded and slightly fancier example that covers the lot, and puts things in a slightly more reasonable place in the directory tree. Also I seperate the logs.

See attached completist.httpd.conf

Of course, to use my example you should also touch and set permissions for the logfiles you'll be keeping, and give them group permission that allows the webmasters to see their own stuff.
You'll want to change that "lettered" IP address to a real one. You can use 127.0.0.2 and a bunch of entries in your /etc/hosts file to test things out if you need to. DNS "A records" should exist pointing these sites to your IP addrress; it might be good if the less preferred names (the ServerAlias values) are all CNAMEs to their primaries, so that at least a few browsers will get the hint when bookmarking.

See attached test-fragment.etc-hosts.txt

Create /home/websites/virthost1 and its subdirectory /errors with 2 files in it, likewise for virthost2, and copy their sets of icons in.
Make sure that the webfiles and grpahics for the web are world readable in your filesystem too, so the webdaemon (which usually runs as an unprivileged user, either 'nobody' or one dedicated to run only apache) can access the files. They can be group writable by the webmaster for the given site.
Keeping the custom error pages in the directory "errors" under the web tree and numbered like that is compatible with thttpd; so is the attitude that everything under the htdocs directories iw world-readable at the filesystem. To really go whole hog with that, your virthostX directories would be named the same as the preferred name of the site instead, and your thttpd.conf would contain the lines:

dir=/home/websites
vhost
Useful to know if you're switching over in a hurry if there is some nasty apache hole that's been discovered and you can't afford to have the websites down while the patch is being prepared. Set symlinks for the ServerAliased names and it should just work, though your cgi scripts will be dead without additional setup, thttpd doesn't do fancy indices, and the logs will be somewhere new.
Add norobots.txt files for spice if you like to keep your sites from being web-indexed until they are ready.

See attached simple.norobots.txt

When things are good you can take out the second Disallow and replace it with lines for specific places that shouldn't be traversed.
After you've finished mixing all these ingredients in a big mixing bowl labelled "disk space", season to taste, stuff in the oven, bake at 450 for 10 seconds, frost. Serves thousands.

(?) alternatives for the Big Red Switch

consider journaling...

From Mark Morshedi

Answered By Thomas Adams, David Mandala, John Karns, Rick Moen, Mike "Iron" Orr, Didier Heyden, Heather Stern

What if the only option is to use the power switch to turn off the system. there are times that mouse doesn't work and keyboard is dead. how does one manages that without destorying the file system.

thanks

(!) [Thomas] My first indication is that this is VERY much hardware specific. You should check that your motherboard can handle processes like the one that you wish to implement under linux.
Typically the programs that you would want to use are: "apm" which is most likely, the program that will control the "power-down" feature via the power button anyway, and also "lm_sensors" so that you can get the current state of your system.
As far as not allowing the filesystem to get mangled, you can set the maximum mount check point to an arbitrary value (I have it set at 100), using the "tune2fs" program. Thus you can specify:
tune2fs -c 100
means that your filesystem WONT be checked until it has been mounted 100 times. You can extend this further to say that:
tune2fs -i [d/m] whereby you can set the next check to
be in either days or months. Have a look at "man
tune2fs" for more details.
(!) [Heather] Note that lm_sensors is specifically not recommended for some hardware; some thinkpad models crash hard and in fact the hardware suffers wickedly (see http://www.linux-thinkpad.org for details). Do check the internet for comments about lm_sensors and your motherboard before just brazenly invoking it.
(!) [David] One can try the three finger salute Control Alt Delete which sometimes will cause a orderly shutdown and restart. Or one can use the ext3 filesystem option on newer versions of Linux which are safer to data loss.
If the machine is networked you could try sshing or telnetting into the locked machine, sometimes the console is locked but the machine is still active on the network and you can gain control that way.
(!) [John] Re: journaling filesystems (ext3 mentioned below) I've been very happy with reiserfs over the past 18 months. Then there is the SGI (?) contributed XFS. See the LG issue 68 article about journaling filesystems for more info about them.
The magic SysRQ can also help, unless the kernel is locked up hard. It's worked for me on a number of occasions. For a system lock-up, the key sequence that I most often use is Alt-SysRq-S, Alt-SysRq-U, and Alt-SysRq-B which syncs buffers, unmounts fs's, and reboots, respectively. You may need to recompile your kernel to enable the feature though. For moe info, see /usr/src/linux/Documentation/sysrq.txt

(?) [David] I remember reading somewhere how to hook up the power switch on an ATX power supply to do an orderly shutdown but I don't remember where. Anybody else remember?

(!) [Rick] You might be thinking of Joris van Rantwijk's Linux PowerSwitch Driver. Description: "The powerswitch driver makes it possible to use the ATX power button on your computer to shutdown Linux. You simply press the power button, and the driver shuts down Linux and powers off the machine, just like the shutdown command does."
http://deadlock.et.tudelft.nl/~joris/powerswitch
A different approach:
http://www.geocrawler.com/archives/3/38/1999/9/50/2611153
Or a kernel patch for the ACPI code:
http://www.cs.helsinki.fi/linux/linux-kernel/2001-31/0968.html
(!) [Iron] Since this is a different driver than the keyboard driver, it may work even when the keyboard doesn't respond. However, if not losing data is your primary concern, the first step to do is to switch to a journalled filesystem. It's easy to switch from ext2 to ext3.
  1. Make sure your kernel has ext3 support compiled in. (Not a module, because you don't want it to fail if something happens to the module files.)
  2. Boot to single-user mode (or use "telinit s").
  3. For each filesystem:
    1. Verify it's unmounted or mounted read-only.
    2. Run "tune2fs -j /dev/THE_PARTITION".
  4. Change "ext2" to "ext3" in /etc/fstab for the affected filesystems.
  5. Switch back to multi-user mode.
You can also place /usr on a separate partition and mount it read-only except when installing software, to prevent those files from being corrupted in an unclean shutdown.
Make sure your rescue floppy (from your distribution, www.toms.net/rb/, etc) has support for the journalled filesystem you're using, or you won't be able to repair it from the floppy. Last I saw, Tom's supported ext3 out of the box, but for ReiserFS you had to put a custom kernel on the floppy. You may also want to leave /boot as ext2 (mounted read-only of course) to ensure it's repairable from the widest variety of rescue floppies, should the need ever arise.
Of course, you'll also want to determine why the keyboard is not responding and how to fix it. However, if you're stuck with unreliable hardware, immature drivers for your gee-whiz must-have peripherals, or you occasionally run out of both memory and swap, there's not much you can do except press the reset button or the power switch.
(!) [Didier] I'm being rather off-topic here, but this summarizes perfectly the problem I had with my old graphics board -- a hardware issue ... seemingly solved by replacing the defective (or MVP3-incompatible) thing with another video card.
(!) [Iron] But your first line of defense when the console hangs is to try to ssh or telnet in from another computer, because usually those services are unaffected. It may take a long time if the system is "thrashing" (meaning free memory is so low it's constantly swapping to disk), but you may be able to do a clean "halt" or "reboot" command that way.
(!) [Didier] Regarding 'ext3' however, it may be worth mentioning the following discussion about a data corruption bug recently found in the 2.4.20 kernel:
http://kerneltrap.org/node.php?id=515
The funny thing is, ever since I started using 2.4.x kernels, and regardless of the actual 'ext' filesystem subtype, I've had to 'sync' multiple times and introduce artificial delays right before powering off the beast, otherwise the filesystems are almost invariably found to "have not been unmounted cleanly" on the next boot.
(!) [Heather] The nature of the problem, and a workaround, is summarized nicely on this kernel-traffic entry: http://kt.zork.net/kernel-traffic/kt20021209_195.html#16
This bug has been caught and the patch is now available; to be safe you need to be either using an early enough kernel (the nasty bug was introduced in 2.4.20-pre5, but I think I saw discussion about interaction with a more subtle bug that lurked in the 2.4.19 series) or a late enough one (this one was nailed in 2.4.20-pre1, and two more notable ext3 bugs were nailed in -pre2).
When I realized that some of my dev work was going to heavily crash my development workstation, I decided I needed journals; saving everything aside for a thorough reiserfs makeover looked like no fun, so ext3 was my first try. That was when 2.4.19-pre10 was current and I've not encountered any sync problems; I'd certainly know, because a lot of my testing involves swapping drives around, so I'm up and down all the time deliberately as well. Also, It's not at all clear whether this ever affected the backported-to-2.2.x ext3 support, since the main flaw was in an optimization trick.
There was apparently some benchmark comparing reiserfs and ext3 mid-year 2002; it generated an awful lot of mailing list traffic at the time, easy to find in Google/linux when looking for both keywords together.

(?) Question on writing Server program for multiple client connections.

From vidya srinivasan

Answered By Faber Fedor, Kapil Hari Paranjape, Jim Dennis

Hi,

I had a question regarding servers. I want to know what happens when a server listening for multiple connections at a single port receives packets from two clients at the same time on the same port? Will the server discard one packet or accept both? Is there an order with which it accepts/discards them?

Thanks for replying in advance.

Sincerely, Vidya.

(!) [Faber] Two packets will never arrive at the port at the same time. For LAN technologies that I know of (Ethernet, Token Ring, ATM), there is only one packet on the wire at a time. Look into "Carrier Sense, Multiple Access/Collision Detection" to see how Ethernet does it.
I have no idea what happens on the really big pipes.
(!) [Kapil] I don't think the question is well phrased. Do you mean this from the kernel programmer's point of view or the socket programmer's point of view. I only understand something of the latter, which is explained below.
The man pages for socket(2), bind(2), listen(2), accept(2) and select(2) explain things quite well. The "info" pages for glibc are also a good source.
The final (presumably desirable) outcome of socket programming is to create a "socket connection" of the form (LOCALIP:PORT::REMOTEIP:PORT) which each of the processes (the local one and the remote one) can treat like a file descriptor for reading from and writing to.
If a program wishes to handle multiple connections of this type, then it must do this exactly in the way it would handle many files at the same time---by forking, threading or running on thousands of processors if possible :-)
The actual creation of the socket is handled by the kernel (in Linux) or the network daemon (in the Hurd). What the socket programmer does is to tell the kernel that
  1. a socket is needed via "socket"
  2. is to be bound to LOCALIP:PORT via "bind"
  3. to listen for (and queue) incoming connections via "listen"
  4. to accept a queued incoming (completed with REMOTEIP:PORT connection via "accept"
A file handle/descriptor is created in step (d). At this point the programmer must decide whether the program will handle multiple calls or not; in case the program(mer) feels energetic enough :-) the process forks or creates a new thread which then interacts with this particular file descriptor.
The "select" call is a mechanism by which the program notifies the kernel that it is waiting to "accept" and the kernel notifies the program when there is something to "accept".
(!) [JimD] I think the gist of his question was: How does the system disambiguate among multiple connection to the same TCP port?
The (short) answer is: All sockets (at any given point in time) are a unique combination of the following: source IP address, source port, destination IP address and destination port (and protocol, UDP or TCP). Thus the kernel internally routes data to the correct socket by looking at the source port as well as the the destination port.
I hope that's sufficient.


Copyright © 2003
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 86 of Linux Gazette, January 2003
HTML script maintained by Heather Stern of Starshine Technical Services, http://www.starshine.org/

LINUX GAZETTE
...making Linux just a little more fun!
News Bytes
By Michael Conry

News Bytes

Contents:

Selected and formatted by Michael Conry

Submitters, send your News Bytes items in PLAIN TEXT format. Other formats may be rejected without reading. You have been warned! A one- or two-paragraph summary plus URL gets you a better announcement than an entire press release. Submit items to gazette@ssc.com


 January 2003 Linux Journal

[issue 105 cover image] The January issue of Linux Journal is on newsstands now. This issue focuses on Networking/Telecom. Click here to view the table of contents, or here to subscribe.

All articles older than three months are available for public reading at http://www.linuxjournal.com/magazine.php. Recent articles are available on-line for subscribers only at http://interactive.linuxjournal.com/.


Legislation and More Legislation


 ElcomSoft Innocent

The first criminal trial under the Digital Millennium Copyright Act (DMCA) has resulted in a not-guilty verdict. The history of this case goes back to July 2001, when a soon to be famous Russian programmer by the name of Dmitry Sklyarov was arrested while attending Defcon in Las Vegas. He had come to the attention of the authorities through his work for software company ElcomSoft on a computer program capable of removing copy protection on documents created using the Adobe ebook format. Sklyarov's presentation at Defcon was on the subject of the weak protections offered by this ebook format

Dmitry's incarceration was to last 3 weeks, subsequent to which he was required to remain in the United States for a further 6 months while various legal details were hammered out. The result was that Dmitry would not have to face prosecution. Instead his employer, ElcomSoft, would have to face the charges, and Dmitry would be obliged to return to the US to testify in the trial. In the course of these events, widespread public opinion was sympathetic to Dmitry's plight, and this was likely a factor in Adobe's distancing itself from the case. Notwithstanding this, Adobe is still (as reported by The Register) a strong supporter of the DMCA, and advocates further criminal prosecutions.

In the intervening period leading up to the current trial, unsuccessful attempts were made to pre-emptively stop the prosecution based on challenges to the constitutionality of the DMCA law. These arguments were based on assertions of the right to free speech (including the rights of third parties to fair use of copyright materials), and also on a claim that the law was so vague as to be unconstitutional. Judge Ronald Whyte dismissed these motions in May 2002. Although the Judge accepted that computer code was free speech, he asserted that the DMCA was content neutral and thus dealt with computer programs on the basis of its purpose, rather than its content. He also decided that no fair use was prohibited by the DMCA, while acknowledging that many uses may be made substantially more difficult. Whyte also ruled that the law was sufficiently precise to be constitutional. This decision is a significant victory for the DMCA supporters, as was noted by Lewis Clayton in his review of IP cases in 2002, and strengthens the legitimacy of the law.

Following some difficulties with visas and the US State Department, Dmitry and Alex Katalov (chief executive of ElcomSoft) finally travelled to California in December 2002 for the trial. Some transcripts from the trial have been made available online. Additionally, Lisa Rein has done a good job of reporting on the court proceedings. A significant point on which the trial hinged was whether ElcomSoft wilfully broke the law. It was the jury's opinion that while ElcomSoft's product may have violated the DMCA, they did not distribute it while aware of this infringement. The open manner in which the product was distributed contributed to this image. The jury is also reported as having difficulties with the severe curtailment of users' rights inherent in the application of the DMCA to the ebook format.

The consequences of the verdict are unclear. Don Marti believes it is a hugely positive development, and that Federal prosecutors will be slow to attempt another DMCA criminal case given the failure of the ElcomSoft prosecution. Linux Weekly News is less upbeat, and sees this primarily as a victory for ElcomSoft. The point is made that it has now been shown that the DMCA can lead to "expensive criminal trials and arrests, even if they win in the end". This is only partly true, since as Don points out, the Federal authorities will only prosecute cases they believe can be won, and the ElcomSoft verdict raises the standard of evidence required to justify such an opinion. However, the civil-law provisions of the DMCA can also be used to cripple smaller companies with the burden of an expensive DMCA defence, and it is at the discretion of the complainant if and when to bring such cases.

Below is a quasi-random selection of the recent media reporting on the case, arranged in approximately chronological order.