LINUX GAZETTE

December 2002, Issue 85       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-2002 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.


What do I do to make evolution sync with a Visor PDA?

Tue, 29 Oct 2002 08:18:05 -0700
Michael Havens (bmike1 from vei.net)

Is it possible? Another forums told me that it was! They told me it was yet it will not. Whenever a sync is attempted the PDA tells me that a connection "could not be established". What could I download in it's stead that I don't have to fiddle-faddle with? Perhaps it isn't reading the USB correctly. If I open the hardware browserand click 'USB Devices' it gives me a manufacturer and a driver (usb-uhci) but no device. Any help you can give me would be very much appreciated. Once I learn more how would I go about joining your team? I want to help others later who are in the same predicament that I am now :-)

Cool. Anybody who wants to be helpful is welcome to join; see http://www.linuxgazette.com/tag/members-faq.html. I'll add that a cheery sense of humor is a plus. -- Heather

One last thing, do I have to uninstall anything like in Windows? If I remember correctly the answer is 'no' but I best make sure before I erase any programs.

I'm running RedHat 7.3 with a KDE desktop (did I phrase that correctly?).

:-) ~Mike~ (-:

Yes, you did. It might be handy to know a kernel version, but we can guess you have the stock one that came with Red Hat 7.3. -- Heather

Oops, one more question. When do you release the monthly editions of your web magazine? If you already covered these issues in previous editions just refering me to the edition's URL would work.

Linux Gazette is published on the first of the month at midnight (UTC-0800). Sometimes it's a few hours late (as one smart alec in Australia noticed at 12:15am on the millenium New Year in 2000 :) ), but that's the goal. -- Mike


Redhat 7.1 freezes often

09 Nov 2002 13:59:46 +0000
Rajaraman (rajachemist from yahoo.com)

Hi,

My computer version is redhat 7.1.I had two xeon processors inside. (8*512GHz) I am using gnome as my window manager.

It frezees randomly (like once a week or twice or thrice) and I can not do anything other than use the power swtich to reboot it though mouse is moving but it is not doing anything on the screen. Hardaware diganstic test, I did with a CD sayhing that there is no error.

I though it would be a temperature problem,but in UK the temperature is not so hot and there are six fan inside the cpu.I put an extra fan as well, it does not help.

I have used the cpu memory and tempertaute controller in linux to monitor the temp. chnages but it reveale normal temperture. I have not got any clue and why. I consult some body but most of the people are unware about the OS and the problems.

SO it would be helpful If you could tell me sugesstions and ideas.

regards
rajaraman


How can i determine IP address of client?

Thu, 07 Nov 2002 13:53:06 -0600
Dave Nissman (daven from web-wise.com)

I have a linux server and for various reasons I have processes telneting in. I need to identify the ip address of the client fron within a c program running in the telnet session

  1. so i can tell the client his ip address from application
  2. so ican limit what that node can do.

Any thoughts Thanks in advance


Question

Wed, 6 Nov 2002 16:22:13 -0500
Antony Gordon (agordon from bkbacademy.org)

Hi,

My manager wants me to setup the network so that based on userid and IP address (more so userid) you can print anywhere in the building, or just to the printer in the room. I am doing this at a school. Any ideas as to how that can be accomplished?

TIA, -Tony

[David Mandala] Really need more information in order to answer your question. What types of computers are on the network, what types of print servers, etc.
Cheers

The network consists of a server (RH 7.3) with about 50 ThinkNICs (diskless workstations) booting via PXE into Linux. The printers consist of HP DeskJets in the classroom hooked to JetDirect boxes, a LJ 4100 DTN with JD built in, and a Xerox Document Centre 425.


glibc versioning

31 Oct 2002 15:27:11 +0000
mike (mike from redtux.demon.co.uk)

Does anyone know if it is possible to compile against a specific glibc version

To be clearer, I have glibc-2.2.93 installed which contains versions up to and including 2.3

What I am trying to do is set up a build system for producing RPM's that will work on RH 7.3 setups (which is 2.2.5)


Alan Turing

Wed, 27 Nov 2002 11:10:52 -0000
Shane (shane from hairyfred.freewire.co.uk)

Hi Linux gang, I am a fairly recent convert to Linux, I am currently running a Win98 (boo hiss) and Redhat 7.2 dual boot system.

I wonder if you could help me? After delving through your back issues I came to number 75 and part one of a very interesting article about Alan Turing. What happened to part 2? Regards and thankyou for the magazine. Shane Doveton. (Scarborough, England).

The author, G James Jones, has health problems and was unable to complete the series. However, the good news is his health is now better and he's started working again on the second part. I for one really appreciate his articles because they are so readable and make the history come alive, and readers have also sent in a significant amount of positive feedback too.
If anybody else would like to write some articles about the giants in computer science history, we'd be interested in publishing them. -- Mike

GENERAL MAIL


Great info

Sun, 24 Nov 2002 09:29:42 -0700
lucifersam (lucifersam from shaw.ca)

I realy enjoy finding new ways to code something with examples that actualy work!

This notion came to me after I found the artical on "Adding Plugin Capabilities To Your Code" By Tom Bradley. Except for a implicit cast and some missing header file includes, the code worked like a charm.

I usualy find it difficult to find code that does what it says it does and is in a simple an understandable fasion. I have been impressed. I expect (read hope) to see more of this in the rest of your issues!

Thanks.


etymology of "daemon"

Mon, 18 Nov 2002 09:40:52 -0800
Bob Krovatz (krovetz from nec-labs.com)

Hi Heather,

The use of daemon/demon in Operating Systems goes back to the early 1960's. I did some further checking on the web and found that it was used by the team at Project MAC around 1963 (see http://ei.cs.vt.edu/~history/Daemon.html). On that web page Fenando Corbato attributes the inspiration to Maxwell's daemons. He says "Maxwell's daemon was an imaginary agent which helped sort molecules of different speeds and worked tirelessly in the background. We fancifully began to use the word daemon to describe background processes which worked tirelessly to perform system chores.". There is also a notion of "demon" in Artificial Intelligence; that was where I heard about the etymology from Selfridge's paper from 1958. I thought that Selfridge's work inspired their use in operating systems (since his paper was so early), but I should have done some more checking. In any case the concept of "daemon" in operating systems predates BSD by some time.

Bob

Thanks for the extra effort to chase that down. It's cool to learn about these things! Forwarding to the Answer Gang so they get to see it, and so I can get it added into The Mailbag for this month.

Have a great day


virtual beer and feature request

Wed, 6 Nov 2002 07:04:17 -0800 (PST)
Raj Shekhar (lunatech3007 from yahoo.com)

Hi folks! This letter has some feature requests, some tips and lots of virtual beer.

Heather & Mike

LG# 84 was great, awesome, cool!Keep up the good work :-).

Heather

Your list of Do's and Dont's was really in the spirit of Linux. Enjoyed it and have copied it :-)

Ashwin

Thanks for the tip on using Konqueror for
reading info pages.

Ben

Thanks for the tips on whatis,whereis. It seems you have something against info. I find it(info) good.

Michael Conry

Your News Byte "Venezuela and Other Government News" in LG#83 helped me a lot in writing a paper on using Free Software in egovernance in India. Your selection of sites for News Byte is always wonderful.

And now a "Feature Request" I use a cyber cafe to download TWDT(HTML) for LG. Earlier you included author bio with the article itself.

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 :-).

I have sent my tip to TAG

May the great gnu have mercy on your soul!


Raj Shekhar

We've shared the kudos around to everybody, and I restocked the TAG fridge with your v-beer. Glad you're enjoying the 'zine. -- Heather
(regarding bios in TWDT) 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. -- Mike


Hoping... Recovered, THANKS!

Tue, 29 Oct 2002 10:02:48 -0500
Lon Diffenderfer (profitrocket from nmax.net)
An email thread occurred which was not linux, but about rescuing documents in some oddball word processing format. A few of the Gang gave it a shot. -- Heather

To all who replied, "THANK YOU!"

With the information you provided, I was able to find a local professional who had administered Xenix systems in years past and was able to use "strings" to recover the data. I still do not understand exactly what he did, but I am elated and very grateful to your group for your assistance. If this is the kind of help I can get for Linux, maybe it's time to learn it and switch.

[Jay R. Ashworth] Probably. :-)
Outstanding; glad to ehar you got your data back. Now you understand why Unix people (and especially Linux people) are fond of textual configuration and data files whenever possible...
What he did was to use the Unix strings(1) program, which sifts through a [random] file looking for strings of characters that appear to be ASCII text, extracting them from the surrounding (binary) data, and printing them on it's output. Once you do that, it's usually just a cleanup pass.
[Thomas Adam] You're welcome!!!
I'm glad that people such as Jay, and myself, were of some use. Makes a change actually!!
He he....

GAZETTE MATTERS


Hey answer guy.

Wed, 13 Nov 2002 21:28:19 -0800
Rick Moen (the LG Answer Gang)
Once upon an email, a good question came in. Too bad it had one of those automatic confidentiality notes attached. Darn. The Answer Gang (I don't recall who at the moment) sent the fellow a little note, suggesting that we can help him if he attaches counter-disclaimers, or gives us permission. We could make him anonymous, of course.
He replied with a short, brusque note saying he found the answer elsewhere. Whose exact text, of course, we can't repeat :) -- Heather
[Rick Moen] Don't worry, we know what you really meant by that rather graceless, if not arrogant, comment: You meant "Er, sorry about failing to compensate for a dumb disclaimer that defeats the purpose of your group entirely, and if deliberate would have suggested that I don't value what you do. I'll make sure I don't do it in the future."
We understand that sometimes you just don't say what you mean, and we hear the intended message, anyway.
[Robos] Hi Rick. I normally don't post on /. but I read this there quite often and somehow this also applies in your case:


PLEASE MOD PARENT UP!

;-) How about in school, teaching the kids to have some manners and we all might get along more nicely...

Z for South, A for Africa

Fri, 8 Nov 2002 10:07:51 -0800
Richard Meyer (meyerri from au1.ibm.com)
and Chris Duncombe Rae (duncombe from ring.wcape.gov.za)

[Richard Meyer] Hi Heather,

Just a minor correction on the advice you gave the laddie asking about Net2Phone. The .za is South Africa's TLD. In case you're interested (and I admit that you may not be), in the 19th century the Afrikaners used to call South Africa, Zuid Afrika in the Dutch-descended Afrikaans. So that's where SA becomes ZA, leaving SA for Saudi Arabia? (I think).

Funny, I though we did publish a correction about that in the same Mailbag item. It must have been a letter that came in after publication. -- Mike

Keep up the good work with the Gazette.

Thanks 8). Mike's right, of course: -- Heather
[Chris Duncombe Rae] First off, ZA is South Africa's country code; Zambia is ZM.
...but the corrector had more important news than that I forgot to look up the ISO codes before going to press. -- Heather
[Chris] The http://www.linux.org.za/LDP URL leads nowhere. Hunting and pecking around from http://www.linux.org.za leads to some HOWTOs and more dead links. Speaking as one who also suffers bandwidth limitations I'd prefer to be pointed directly at the Linux Documentation Project than have to scratch around a supposedly closer site fruitlessly.
Second, I've had a look at your mirror sites in South Africa and a lot of them are very stale.
Of the ones he tried two lead to mirrors that are more than 2 years stale, one may be alive but having connection problems, and others were dead. -- Heather
[Chris] Time to update your mirror site list? Or maybe everyone turned off their sites as well as their mirrors while you were upgrading yours?
I wrote to www.linux.org.za to see if they plan to reinstate their mirror. For the others, I'll check again in a couple weeks and if they're still down I'll delete the listings.
We don't get feedback when mirrors go down unless somebody tells us, and we don't have the time to check 210 mirrors manually. I have looked into writing an automatic mirror checker or finding one off the shelf, but haven't found anything satisfactory yet, anything that can deal with timeout errors on 200 sites, do retries, and report problems back to a program in a way it can take action. -- Mike
Folks, if you are running one of our listed mirrors and decide you can't handle the bandwidth anymore, take it private, or otherwise aren't going to mirror visibly... Please, take a spare moment, and let us know that you're leaving the mirror system; we'll be glad to take all the extra visitors back off your shoulders. Our blessings to you for what you could provide aren't any less when you can't any longer.
Also, new mirrors are always welcome :) -- 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 © 2002
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 85 of Linux Gazette, December 2002

[ 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


Linux now serving: Outlook Global Address List

Tue, 19 Nov 2002 11:59:58 -0800
Rick Moen (the LG Answer Gang)
Question by Luis Sanchez (LUIS from casiano.com)

Is there a way to share the users in a Linux Mail Server for Outlook clients? We will connect out Outlook clients via pop3/smtp to the linux email server but wonder how to share the global address list (like Exchange) ..

What you need to do is set up a shared address book using the OpenLDAP server, an open-source facility for serving up Lightweight Directory Access Protocol information to networks, that is routinely included in Linux distributions. This needs to be done with some care on the OpenLDAP end of things, because Micros*ft Outlook is unusually picky about the LDAP schema. One hands-on guide to configuring the schema is here:
http://www.dclug.org.uk/archive-Nov00-May01/msg00253.html
You can find one general guide to setting up LDAP (server end) software, in the form of a set of lecture notes I wrote about LDAP, a year or so ago:
http://linuxmafia.com/~rick/lecture-notes/ldap
An example of how to set up the client (MS-Outlook) end of the problem (at a university site) is here:
http://www.cae.wisc.edu/fsg/info/mail/ldap_outlook.html
Note that appending to the address book from MS-Outlook is not supported (or desirable, actually).
Good luck with the project. Expect it to take a while, to work out all the details.


no more duplicate email

Tue, 29 Oct 2002 10:20:31 -0800
Dan Wilder (SSC.COM sysadmin)

We now keep an MD5 sum the body of every message submitted to the Answer Gang. If another identical message body shows up, it gets sidelined.

As usual, this is run over procmail, with two stanzas in the list's procmailrc that look like:

See attached dupekiller.procmail.txt

The first stanza says "filter this message through a program".

The second says "sideline if you see an X-Duplicate header in the result".

The duplicate elimination script being used on this list has been upgraded to use Python's library md5 routines rather than an external pipeline, and to employ locking on the db.

By popular request, we're now filtering other lists here with this, and one local user who often receives duplicate emails that are not always spams has asked for the script, too.

The upgraded script, which the procmail recipe calls upon:

See attached dup.py.txt


Changeing IP address

Fri, 22 Nov 2002 07:22:58 +0530
Kapil Hari Paranjape (kapil from imsc.res.in)
Question by eyal (eyal_kornblut from mod.gov.il)

I have a Linux server that functions as a Mail Relay in my system. All I want to do is to change its IP address. How shuld I do it ? witch files shuld I change, and how ??

I would be very thanksfull for some help

eyal

This depends quite a bit on the precise distribution of Linux you have installed. Is it RedHat, Debian, SuSE, Mandrake,...

It also depends on how your network is configured. By static addresses entered in some file under /etc or via DHCP.

At the very least you should do:

grep -ril "your_current_ip_address_here" /etc

to find out which files refer to your IP address.

In addition if you use SSL and/or SSH you must go through the configuration of these services and check that the new IP address is reflected.

Having gone through this procedure more than once, I must warn you that if you a free machine that can take the place of your mail server then the easiest solution is to setup that machine as the new mail server and switch off the old machine.

Regards,
Kapil.

You might also want to check that reverse-resolution of DNS is updated to reflect that your new host is attached to this IP address; it's normally handled by the ISP who owns the IP block, so it's not stored locally unless you have made special arrangements, and even if you have, best to make sure they went through safely for both the old and new address. -- Heather


The "Other" [Alt] Key

Mon, 18 Nov 2002 09:46:18 -0800
Jim Dennis (the LG Answer Guy)
Question by The Gavitron (gavitron from shaw.ca)

http://www.linuxgazette.com/issue35/tag/magickeys.html

James,

Further to your technical article quoted above;

You explain that I can use the /other/ alt key for ttys 13-24, but in my case, I only want to use both alt keys to switch between the same 12 ttys. Is it possible to configure this? Would making tty24 a symbolic link to tty12 accomplish it? I realise it's been over 4 years since you wrote the original article, but if you can still help, I would greatly appreciate it.

Yours, Gavin McDonald.

You DON'T want to try symlinking those device files around.

Just use the 'loadkeys' utility to change your Linux console's keymaps around to suit you tastes. You can start by reading the following man pages: loadkeys(1), keymaps(5), dumpkeys(1), and possibly showkey(1)

Then use 'dumpkeys' to dump a set of all the current key bindings. Edit that (delete all the stuff you don't want to change) and look for the section that looks something like this:

See attached jimd.console-keymap-fragment-1.txt

... and another section like:

See attached jimd.console-keymap-fragment-2.txt

Now simply change those to read:

See attached jimd.console-keymap-fragment-otheralt.txt

Notice that all I'm doing is changing the Console_13 to Console_1 etc. (at the end of each line that begins with the word keycode).

Then simply pass that through the loadkeys command. In fact you could take that last excerpt (as show between the " and " quotes above) save it to a file --- /usr/local/etc/mykeymap.def --- for example and add a line to your rc.local file to perform a simple:

loadkeys < /usr/local/etc/mykeymap.def

... command.


how to create Imakefiles

Fri, 08 Nov 2002 16:10:27 +0530 (IST)
Karl-Heinz Herrman (the LG Answer Gang)
Question by Kirankumar Po (Kirankumar.Pv from geind.ge.com)

plz excuse me for asking questions without your permission ,

now my question is ...........

This group (answergang) is willing to answer questions related to the operating system linux, so if you ask a question according to this little help what to ask and how to ask it:

http://www.linuxgazette.com/tag/ask-the-gang.html

you won't have to appologise for asking.

"can we delete a file of a particular version ?" if so how , if not what is the alternate for that

Now this question is somewhat... broad. Yes, certainly linux has a version management system, My preferred one is CVS. But unless you tell us what you use if you use one we will have trouble guessing what might be appropriate in your case.

file name is test

test 1.1---1.2--1.3----1.4---1.5

i want to delete version 1.3 what is the command for that and tell me the condition of 1.4

For cvs this would be the command "admin" with flag "-o" for outdate.

khh > cvs -H admin
Usage: cvs admin [options] files...
      [.......]
        -o range   Delete (outdate) specified range of revisions:
           rev1::rev2  Between rev1 and rev2, excluding rev1 and rev2.
           rev::       After rev on the same branch.
           ::rev       Before rev on the same branch.
           rev         Just rev.
           rev1:rev2   Between rev1 and rev2, including rev1 and rev2.
           rev:        rev and following revisions on the same branch.
           :rev        rev and previous revisions on the same branch.

Information on a particular version would be told by cvs status or cvs log on the file with an additional "-r revnumber" if you really are interested only in that particular version.


Even journalled filesystems need fsck sometimes

Mon, 18 Nov 2002 13:08:46 +0000 (GMT)
Thomas Adam (The LG Weekend Mechanic)
Question by Trev (tedlinux from inet.net.nz)

Hi, love your Mag, and your doing a great job here.

[Thomas] I know :-) I love the magazine too :-)

My MDK 8.1, kernel 2.4.8.26-mdk system stops at

running DevFs deamon
invald operand:0000
CPU:0
EIP:   .........
EFLAGS .........
eax    .........
asi    .........
ds     .........
Process devfs pid 123
Stack: .........
CallTrace: .....
Code:
(Lots of letters and numbers)

Is this a hardware problem ?

[Thomas] Oh, it most certainly would suggest a hardware problem. As I am sure you are aware the "dev fs" sets up those hardware devices contained within "/dev" such as soundcard, etc.

i have no problems in SuSE or Win (SuSE and Win on hda, MDK and some vfat partitions on hdb) and i can mount MDKs partitions (in rescue) ok.

I've had problems when booting with devfs twice, the first time (some weeks ago) it put it back to the old dev system, 10 to 15 boots back, it put it back to the devfs system.

[Thomas] I'm not certain but is the new way ("devfs") actually a kernel module rather than it being "built-in" to the kernel???

I tried rescue to rebuild devfs but not knowing/finding any commands (no man pages) i got nowhere, reiserfsck and e2fsck found no problems, i commented out pts from fstab but it made no difference. I tried booting with devfs=nomount but lilo would not recognize it, not in lilo i guess.

[Thomas] hmmm...the script "/dev/MAKEDEV" does some things, but not what you're trying to do.

I had no luck with your DB or google.

Neither did I :-(


Sorry for being slow getting back to you, only got it going late last night and read your email (and 450 others).

[Thomas] Oh, that's ok. You actually read 450 consecutive e-mails? Gosh -- hope you haven't got eye-strain :-)

I changed the "devfs=mount" to "devfs=nomount" in lilo.conf but it made no difference,

[Thomas] Hmm, that would suggest that your filesystem type for the particular partition is abnormal in someway.

then out of desperation i tried reiserfsck again on / but this time i did reiserfsck --rebuild-tree and it fixed it :-), dmesg says "Mounted devfs on /dev".

[Thomas] Ah.... that's interesting and something that Mandrake should have tested and/or implemented in both the kernel and their documentation. I'm sure there are other like you running MDK8.1 with the same problem/.

I'll see if devfs and reiserfs has an update for MDK 8.1.

[Thomas] Unlikely -- you'll probably have to re-compile your kernel as a result. But it's not as hard as you might think....honest. Last I heard Eric Raymond was working on a graphical "maze" frontend for compilation!!! So much for the tcl/tk interface :-(
[ashwin] Linus rejected that for kernel 2.5. Instead, a Qt interface was chosen, so that's what will be in 2.6 (or it may even be called 3.0).

Thanks Thomas for your reply.

[Thomas] As I said -- it's what we're here for :-) :-) Anytime. If you have any other problems, let us know!
Gentle readers, it's also worth mentioning that journaled fs' will still be fsck'd when the volumes reach their maximum mount count. Journals make them robust, so a crash (which marks notmal filesystems "dirty", forcing fsck) simply results in a journal replay. So now we know one thing that can happen if the journal itself gets an ouchie. -- Heather


Foxpro

Sun, 17 Nov 2002 20:43:29 -0800
Rick Moen (the LG Answer Gang)
Question by Deviyanti Setionegoro (devi_ys from yahoo.com)

My name is Deviyanti, I want to ask a question, I have a foxpro 2.6 under dos that runs on windows NT. Now I want to migrate from windows NT to linux Redhat 7.2. The question is will my application in foxpro 2.6 can run in Linux? If can, what are the additional software that I should install first, before I move my aplication in foxpro 2.6 to linux.

Something called "Recital Linux Developer" runs FoxPro 2.6 applications unchanged on Linux:

http://www.recital.com/solutions_foxpro.htm

Additionally, this question did sort of come up once before, a few years back, when Answer Gang founder Jim Dennis was The Answer Guy, all by his lonesome:

http://www.linuxgazette.com/issue30/tag_database.html

Some of that will no doubt still be relevant.


unable to open an initial console

Fri, 08 Nov 2002 12:24:07 +0530 (IST)
Karl-Heinz Herrman (the LG Answer Gang)
Question by Lawrence O'Sullivan (lawrence.osullivan from 141.com)

Hi, I could sure use some help with this problem. I've followed the "Linux from Scratch" guides to building a Linux system. Their instructions and guides were very good, and everything seems to have compile correctly. Also, I have posted this question on their support mail, and received several suggestion but none helped. When I boot into the new Linux system, the process hangs and the last three lines displayed are:

Freeing unused kernel memory: 140k freed
Warning: unable to open an initial console
Kernel Panic: Attempted to kill init

Entering this lfs root=/dev/hda9 init=/bin/sh in lilo still hangs.

I'm pretty sure (since I had the same when I was first time switching from 2.2.x kernel to 2.4.x style) that the console driver is not in the kernel. my config seems to have that as "y" not as module.

See attached k-h.kernel-dot-config-fragment.txt

I'm not using devfs.

The inittab file appears correct, and was reviewed by the LFS folks.

The fstab file appears correct, and was reviewed by the LFS folks.

The configuration (.config) for the Kernel build appears to be correct. It was reviewed by the LFS folks and I compared it to the distribution that loads.

Maybe or maybe not -- make sure the above mentioned character devices are there.

The new Linux system is on its own partition and the root and boot are on the same partition.

My original Linux distribution, which is on its own partition, still boots and can mount the partition with the new Linux system.

Any suggestion as to what else I can check or change would really help.

Thanks
Lawrence


IP Masquerading: Red Hat 8.x Redoux

Mon, 18 Nov 2002 20:55:34 -0800
Jim Dennis (the LG Answer Guy)
Question by chhong (chhong from cisco.com)

I have a RedHat Linux 8.0 machine with kernal 2.4.18-14. One of the network card (Eth0 eg. 192.168.10.1) is connected to my private network (consisting of a FTP server and 2 pc). Another network card (Eth1 eg. 201.1.1.*) is connected to the internet. How do I make my FTP server accessible from other pcs in the internet and make pcs in my private network access the internet?

Thanks
Chris Hong

Well, I haven't played with Red Hat 8.0 yet. However, the key to your question lies in two steps. First you have to enable the kernel's packet forwarding feature. Manually this can be done via a command like:

echo 1 > /proc/sys/net/ipv4/ip_forward

However, that would not persist beyond a reboot. Under Red Hat there is an /etc/sysctl.conf file which needs to have an entry like:

net.ipv4.ip_forward = 1

This allows the kernel to route packets (from your internal network to the outside world).

However, that obviously won't do much good by itself. Packets from your network that "leaked" out to the Internet would be useless since no responses could get back to your RFC1918 non-routable addresses (192.168.*.*, 10.*.*.*, and 172.16.*.* through 172.31.*.*).

So, the other requisite step is to enable IP masquerading. Over the years the Linux IP packet filtering features haved changed radically with each major kernel release. So old versions of Linux used the 'ipfw', then the 'ipfwadm', and then the 'ipchains' commands to manage the kernel's packet filtering tables and configure its behavior. Red Hat version 8.0 uses a 2.4 kernel with the netfilter subsystem and the 'iptables' command to manage it.

modprobe iptable_nat
# In the NAT table (-t nat), Append a rule (-A) after routing
# (POSTROUTING) for all packets going out eth1 (-o eth1) which says to
# MASQUERADE the connection (-j MASQUERADE).
iptables -t nat -A POSTROUTING -o eth1 -j MASQUERADE

You may have to hunt around in the Red Hat /etc/ directory tree to figure out the best place to put his command. I think they have an /etc/rc.d/init.d/iptables script which you can enable with their 'chkconfig' command. If you read that I think you'll find some file like /etc/sysconfig/network-scripts/iptables.dat or something like that. If I recall correctly from Red Hat 7.x, you could put just the arguments for this iptables command (from the -t to the end of the line) into that file.

The reason I'm tossing in so many qualifiers in this last paragraph is because I mostly use Debian and haven't actually installed or managed a Red Hat 8.0 system, yet. In addition some of the details change with every major release. The differences are minor --- easy to adapt to if you can read simple shell scripts.

There is probably also a way to do all of this using some GUI tool. However, I still avoid graphical system administration tools. I'm firmly of the opinion that the most important systems administration tool is your favorite text editor!


Learning Red Hat 8.0

Tue, 26 Nov 2002 13:40:35 -0800
Heather Stern (Linux Gazette Technical Editor)
Question by James M. Haviland (jhavilan from attbi.com)

What is the best book to learn RH's 8.0? Or will the books I have on learning 5 or 6 and maybe 7 be good enough to learn the basics or anything except the fine points.

Stuff about the bash shell will be pretty much the same.

Learning how to use a text editor will be pretty much the same.

Chances are that in a modern one the screen may look a little different but it will likely be a little easier to read.

Anything showing screen shots walking you through the install will show pictures only good for that exact version. You can read the chapter anyway, as the basic steps of partitioning and answering network questions will still be asked, but the screens will look different.

Pretty much, you can follow along in an older book, and look at man pages or --help output from a program to catch up on some things that may be new. If you also connect to the internet and surf to the home pages of some software you are trying to learn, there may be discussion forums and more things to read there.

And of course there's the Linux Documentation Project :) (www.tldp.org)

Many of these things will be equally valid for red hat, or for other linux distributions.

I tried to use the e-mail program that came with it and I set it up wrong some how so that I couldn't send e-mails. I was able to use Mozzarella or Netscape's e-mail program.

You have to connect to an internet provider before you can read emails. Your system usually has to have an SMTP program (sendmail, or one of its competitors) in order to send emails.

Mozarella, yum. You probably meant "mozilla" - the browser's firebreathing dinosaur-like mascot.

Mozilla and netscape use the same code under the hood; they compose SMTP messages and transmissions directly, rather than needing a local server. Think of this as driving the mail up to the post office yourself all the time instead of leaving it at your door for the postman to pick up when he comes by every day for the mail.

Thank you for your time.

Jim

You're welcome.


Q: man pages for poll_wait(), wait_event() and others

Mon, 4 Nov 2002 16:21:32 -0500 (EST)
Pradeep Padala (the LG Answer Gang)
Question by Vitaly Karasik (vkarasik from ndsisrael.com)

Are there any additional sources for manpages [we've checked kernel-doc package, http://kernelnewbies.org/documents, Kernel* HOWTO's and so on, but without success].

Linux source is the authoritative documentation for kernel functions. I guess you already know about http://lxr.linux.no. That's the right place to look for documentation :-)

Apart from that Alessandro Rubini's book on device drivers has some information on this. Information regarding poll is here in that book:

http://www.xml.com/ldd/chapter/book/ch05.html#t3

This should give a fair idea of what needs to be done when poll on a device is done.

You can read the whole book online at:
http://www.xml.com/ldd/chapter/book

Also try to follow any driver's code which implements 'select' or 'poll' for the device.


is the md5 check always right?

Sun, 3 Nov 2002 18:23:17 +0000
Steve Kemp (skx from tardis.ed.ac.uk)
Question by Simon Pople (paupople from online.no)

I just downloaded 3 Mandrake CDs via FTP and read after doing that that I should have set the download mode to binary not ASCII. I didn't do that, but when I run MD5 on all the .iso files they are all fine....is it possible that even though the MD5 checksums are all matching, the files still aren't correct, or is MD5 an infallible test of the downloaded ISOs?

MD5 should be a good enough test of validity. It has got some weaknesses which have recently come to light, but it's extremely unlikely that you've come across three seperate examples.

It's probably the case that your FTP/download software switched to binary by itself, without you having to explicitly do it.


Follow ups on mgp and mplayer

Sun, 17 Nov 2002 03:40:22 +0100
Robos (the LG Answer Gang)

Hi Folks

I did look into the mgp with embedded mplayer issue today again and got a little further: after looking into the man-page of xwininfo I found -name. If I call:

xwininfo -name MagicPoint

(always the same I hope :) I get the win-id like this:

xwininfo -name MagicPoint |grep Window |awk '{print $4}' >/tmp/wid

and then:

mplayer /home/robos/movies/play* -vo x11 -wid cat /tmp/wid=1BOB

OK, I actually put the whole calls into a bash script since mgp makes some strange things if I call it from within mgp with %system. So, in the mgp text I do a

%system "/home/robos/mplayer.sh"

and call the whole thing like this:

mgp mplayer.mgp -x vflib -U

The -U is the important one: -U since forking is prohibited otherwise... This sorta works, but the display stays a little garbled afterwards (I put a %system "killall mplayer" on the next page) and in the page that displays the vid nothing else is shown (no text). But, I would say something to improve upon. If you use -o with mgp it doesn't go fullscreen and then the vid is also centered in my case (I use enlightenment btw).

OK
I'll toy a little more
Robos


Net2Phone ipchains config

Mon, 18 Nov 2002 11:46:27 -0600
John Larmour (jlarmour from eds.com)
In last issue ( LG 84) help wanted #3: http://www.linuxgazette.com/issue84/lg_mail.html#wanted/3 it was asked if Linux has net2phone support. -- Heather

I see that this request is a month or more old. Has this problem been solved?

Many times, people do get their solutions, but don't pass them back along to us. So I cannot really say. -- Heather

I have a linux firewall (ipchains) at home, and run Net2Phone on a window98 box that goes through the firewall. If you are still having problems, I may be able to help with some of the settings.


Okay, I'm at home now and can check the settings. On the Net2Phone client, choose menu->preferences->network. Make note of the "doorman" URLs and port numbers (mine are call1.net2phone.com and call2.net2phone.com, both on port 6801). In the client box, choose a number for your ports (I use the same for both TCP and UDP). Valid numbers are greater than 1024 and less than 65000.

My firewall uses masquerading, and is not a proxy. I don't know what your setup is, so this may or may not work for you. In my previous message I said I use ipchains. Sorry, that shoud have been iptables. I got it set up a while ago, and really haven't touched it since.

Here are the variables I use in my script:

${ISP} is the network card connected to my ISP,
${LAN} is the network card connected to my home network.
${PHINIT}is the port used by the doorman (6801)
${PHCTL} and ${PHVCE} are the TCP and UDP port numbers I picked

Here are the iptables commands I added to my script to start my firewall:

iptables -A INPUT -p udp -i ${ISP}-s call1.net2phone.com -m state
--state != INVALID --source-port ${PHINIT} -j ACCEPT
iptables -A INPUT -p udp -i ${ISP}-s call2.net2phone.com -m state
--state != INVALID --source-port ${PHINIT} -j ACCEPT
iptables -A INPUT -p udp -i ${ISP}--source-port ${PHVCE} -j ACCEPT
iptables -A INPUT -p tcp -i ${ISP}--source-port ${PHCTL} -j ACCEPT

Hope this isn't too late to be helpful....


Lost win95 data (and system) when loading linux

Sun, 17 Nov 2002 13:00:20 EST
mike, Heather Stern (the LG Answer Gang)
Question by JTHodgson (JTHodgson from aol.com)

Dear Answer gang - my problem is an inaccessible C: drive holding my win95 system and all my data - much of it not backed up, naturally :-( .

Here is how I think it happened.

I started with a standard Win95 set up, with a 5G C: drive, a bootable 48x cd drive and a standard floppy a: drive.

I then added a 20G Western Digital secondary drive. This came with the Phoenix bios overlay ez-bios, which took control of both internal drives (despite the fact that c: was within the old bios limit).

With both drives running a single dos partition, the system ran without problems, until I tried to partition the d: drive to load linux (6.3 suse). Neither partition magic, nor fip would repartition the disk.

I then downloaded the latest data life guard (DLG) (=ez-bios) installation utility from the web, and used it to partition the d: drive. I also made a floppy win95 boot disk.

At this point the win95 system was operating correctly, but with a reduced disk size visible on d:.

I then started to load linux by booting from the cd. It ran through the initial screens without problem, but when it came to assigning the partition to mount the system, the second partition on d: was not visible. There was no escape route, so I powered off.

Now the system would not boot from c:.

Nor would it boot from the system disc in a:, or ,rather, when I did the c: drive was not accessible (nor the d: drive!).

I tried fdisk /mbr, and restoring the mbr "before installing ez bios" and " after installing ez-bios" (options in the downloaded DLG utility). The DLG utility also told me that the c: drive had a "non dos partition".

I assume that I have inadvertently created a linux partition on the c: drive.

How can I recover from this? Or is there some other explanation? Is this a

diy job, or should I consider a data recovery service (my marriage may be at stake here!).

Very grateful for any help you could give. I'm keen to join the penguins, but this is off-putting!

John Hodgson

[mike] First off, can you boot into linux? If so check the data as follows
mount the c: partition
type ls /mnt to see if a mount point has been setup by your distro
if you see something like /mnt/dos_c do ls <this dir> to see if there are any files
if there is no /mnt/dos etc directory do the following
mkdir /mnt/c
mount /dev/hda1 /mnt/c
then type df to see what partitions are mounted
then type ls /mnt/c to see if your files are still there

Thanks, Mike...

To avoid the possibility of further over-writing on the old C: drive, I used DemoLinux running from the CD drive. By default this loads the KDE desk top.

This showed two internal drive icons, but clicking on hda1 gave an error:


"Unable to run the command specified.  The file or directory file:/mnt/hda1
does not exist"

Moving to console mode:

ls /mnt gave the response

cdrom  floppy  hdb1

Apparently the old C: drive is not being recognised

Mkdir /mnt/c gave error message

Mkdir cannot create directory  '/mnt/c' : permission denied

While DemoLinux was loading I spotted a line that I think related to the old C: drive, giving it the following properties: win98 FAT-32 LBA-matched partition

[Heather] Sorry to come a bit late to the game. Anyways it looks to me as if your initial diagnosis is correct - the partition table has gotten somehow mismatched with what is really on the drive.
The Linux utility to deal with this problem is gpart - it will physically look at the bits on the drive, and guess a partition table for you. If your drive electronics do not agree with what your BIOS reads for cylinder/head/sector values, it might actually be wrong, but if you see something that looks like the layout you remember, it's probably right, and you can write the result into the MBR-tail with a commandline switch.
(I say "tail" because strictly speaking the first 446 bytes are the boot loader and the 64 bits at the end are the partition table, and some techies refer to only the loader as the MBR, while others call the whole 512byte cluster this. But we digress.)
The DOS analogue to solve this problem - bearing in mind that I've not had to use it for years, so I cannot vouch for the current edition one way or another... is Symantec's Norton Disk Doctor... NDD /REBUILD. As a few repartitioning utlities are on the market they might also have some sort of "reset to whatever the disk has on it" feature - possibly as a last-ditch rescue against their own failure modes. The same caveat against the BIOS mismatch problem applies. Also, if it isn't new enough a DOS tool may not recognize any linux bits you've managed to get on there.
Anyways, I have used gpart recently myself and can assure you that it works. The real fun is getting a cd-boot or floppy-boot distro that has it in there. I don't recall if I used Knoppix, or if I host-mounted one of my laptop drives temporarily (so /dev/hda was a known good system). DemoLinux, if it has a copy of gpart on it, can help you solve that quite quickly, and if it doesn't have it, you may be able to fetch a binary of the program into your ramdisk.
Pretty much, all the live-CD discs use a ramdisk or two.


Good locations for sendmail howtos?

Tue, 26 Nov 2002 13:07:33 -0800
Heather Stern, John Karns (the LG Answer Gang)
Question by David (supersimian from hotmail.com)

Hey there Answer Gang,

You've helped me in the past, I'm hoping you can help me again.

I'm having diffuculties setting up sendmail and friends on a small home network. I can't seem to get mail to work between hosts. I feel fairly competent in linux in general, but this continues to baffle me.

I'm using RedHat 8.0 on two systems, my main desktop, and our firewall/dns/nat/etc box. My roommate is using WinXP. But basically, I'm looking for a good howto doc on setting up email between the gateway box and my desktop, so I can forward the root mail form the gateway to an arbitrary account on my desktop. Y'know, for getting alerts, logwatch info, etc.

And just to learn a bit more about the workings of email in general.

At present, I can't get ANY kind of email to move between the two boxes.

Mostly, I'm looking for a really good writeup on how to configure things to my liking. I mean, I don't want to have to buy a book on it, it's just for home use, but I want a good understanding.

If you people can point me towards a good resource, I'd really appreciate it.

[John Karns] Well I suppose the best resource is the O'Reilly book on sendmail - but since you mentioned that you don't want to buy a book, I do recall stumbling across a helpful sendmail web site about 3 yrs ago. So a web search would probably turn up a few sources of info. There are also some fairly comprehensive FAQ's etc available...
[Heather]
  1. try the faq's and other helpful notes at sendmail.org, then the community forums at sendmail.net.
  2. each of sendmail's major competitors also have websites; since some of their FAQs are in the form of "under sendmail I would... how do I do that in this mail transport?" then reading the documentation of all the major mailers should help considerably toward learning about email in general.
  3. for your NT box to get mail from your linux server, either your linux server needs to run POP or IMAP daemons... or your NT system has to run an SMTP daemon and be listed as a MX for itself. The first one is much easier.

Thanks Heather, I'll have a look at these resources. Luckily, I've managed to muddle through a bit of it on my own, the mail is moving, just need to fine-tune things a bit. I now understand why the sendmail.cf file is so infamous :)

rewrite rules, UGH...

[John Karns] Finally, I can provide a quick hint about (one method of) setting up mail between hosts. For my purposes I just added the host names in /etc/mail/mailertable in form of
machine1.my.psuedo.dom smtp:machine1.my.psuedo.dom machine2.my.psuedo.dom smtp:machine2.my.psuedo.dom
In the comments in that file:

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

# sendmail will look for all non-local email into this file to determine
# the transport way to the next host. the destination hostname is used
# to find an entry in this file.

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

And from /etc/mail/README:

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

sendmail.cf supports some more external database files. The default configuration uses /etc/aliases, /etc/mail/mailertable, /etc/mail/genericstable and /etc/mail/virtusertable. These files are normal text files that are converted with "makemap" to the real database files (ending in .db).
For all outgoing email, sendmail will use the destination hostname and look into /etc/mail/mailertable to see how this email should be transported to the next destination. Please read that file for some examples on email-routing.

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

Note 1: There is a Makefile in that dir to enable running 'make' after adding the host names to the text file. That will create the .db file which sendmail actually uses.
Note 2: I'm not sure how much of this structure is from the generic sendmail and how much may be contributed by SuSE, but my gueess is that it is mostly generic. This seems to be born out by the above reference to sendmail.cf pointing to those files.
Note 3: This setup works for me. I don't have a name server set up, just use a hosts file. YMMV.

Will this modem even work? Let's ask the internet

Sun, 10 Nov 2002 14:15:06 -0800
Rick Moen (the LG Answer Gang)
Question by Helen & Ralph (ralphk from hauns.com)

can I use a zoom/modem usb model 3090 with redhat 7.2 ?

The best place to research USB-hardware support problems in Linux is http://www.linux-usb.org. You might want to make a note of that, for the future. Selecting "Working devices list" on the front page takes you the Overview page. From there, we select Devices, since we're looking up support for a particular hardware device, rather than any of the other information categories. We're now shown the dozen or so USB device categories, and pick "Comm: Communications devices (Modems)". This brings us to a long multipage list of modems by manufacturer. Moving through that to the Zs, eventually finding the line item for "Zoom Telephonics, Inc. 3090". Finally, selecting that item brings us to http://www.qbik.ch/usb/devices/showdev.php?id=660.

And it's bad news:

Zoom sales claims this is "a winmodem and will not work with Linux". Shame.

There's more, but that about sums it up: This is undoubtedly a unit designed to achieve the lowest possible retail price by omitting key circuitry normally integral to all modems (the ROM or "controller" chip implementing required communications protocols, and/or the UART chip to control and buffer serial communications). The omitted functionality is then emulated in software by MS-Windows-only proprietary "engine' software.

If/when you go shopping for a better modem, you might want to consult Rob Clark's modem database, at http://www.idir.net/~gromitkc/winmodem.html.

The real tip here, for newbies and old hands alike; we can no longer assume that being external or internal, or which interface a modem is plugged into, indicates whether it has an incomplete chipset and needs a booster shot from specialized driver software. Some manufacturers offer fully-capable internal modems, and some external ones are duds like this one. Use the net resources at http://www.linmodems.org, and if you decide to use a supported or partially supported winmodem, don't expect too much out of it when you have your system under a heavy CPU load. -- 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 © 2002
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 85 of Linux Gazette, December 2002

LINUX GAZETTE
...making Linux just a little more fun!
(?) The Answer Gang (!)
By Jim Dennis, Ben Okopnik, Dan Wilder, Breen, Chris, 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
(!)Triple booting
(!)code safety
(!)PC-MOS
(?)restoring broken X connections

(¶) Greetings from Heather Stern

Welcome once more folks, to the world of The Answer Gang. We haven't decided where to hang the stockings; Tux goes out on Geek Cruises all the time, so he's rarely found at the South Pole anymore. Perhaps I should create a /hearth in my home directory, and give it a /chimney, some /stockings, and what the heck, /menorah, /presents, and /peace.on.earth. Top things off with a /var/log/yule we can burn in January, and...
Oh, you didn't want to hear all this silliness. You wanted to get to the presents. Well, I can tell you this little nerdette is still looking for LCD monitor prices to come down. I guess my New Year's Resolution will have to be running past a nice scanner.
If you can't think of anything for the geek in your life, I recommend a good uninterruptible power supply (UPS). We can always use more...
For those who are wondering, the top reason for anyone not getting answered this month is: insufficient detail! Folks, we're pretty smart, and might even be accused of telepathy, but we are not there in the room with you, so we can't see that machine. We really need those error messages, any bleeps it's making, how it worked before and what you were expecting of it. With these things, we can provide answers you probably had no idea were available ... beyond just how to do the thing you think will work. WIthout these hints, we're as blind and as stumped as you are to what's going on.
To all the tiny elves, Kris Kringles and Gnomes in our computers, enjoy your extra trons and blinkylights this season.

(!) Triple booting

From Raj Shekhar

Comments By Mike Orr, Heather Stern, Rick Moen

In response to LG 84, Tips 25: http://www.linuxgazette.com/issue84/lg_tips.html#25 -- Heather

(?) Muthukumar Kalimani wanted to install three operating systems on his box. I had helped my friend do the same and here are some hard found lessons.

(!) [Mike] The Large Disk HOWTO http://www.tldp.org/HOWTO/Large-Disk-HOWTO.html claims this is mostly not a problem any more.
(Paranoid people like myself continue to place /boot partitions and C: partitions below 1024.)
(!) [Rick] In theory, it went away in 1994.
That was the year that motherboard manufacturers rolled out Yet Another BIOS Extension, providing a new method by which boot-time software could get extended BIOS routine 13h information to directly address logical cylinders numbered 1024 and above. A new version of LILO immediately came out, that requested and could process that BIOS information.
So, in theory, the only people who need put /boot below the 1024th logical cylinder are
  1. using really antique booting software (a very bad idea) or
  2. contending with very old motherboard BIOSes, usually on 486es. I'm unclear on whether any early Pentium motherboards used the older-version int 13h call, or whether it's a 486-only issue.
A lot of us old-timers retain the /boot-filesystem-first habit just from long usage, but also because people sometimes come in the door with antique BIOSes and fail to mention that fact. Better to put /boot near the outer tracks than risk spending considerable effort building a system and then find it unbootable.
(!) [Heather] Rick and I both do installfests; I especially help people with laptops, which have all sorts of oddball things in their BIOS. It's far easier to obey this rule of thumb than have to do things over on the limited time available at such install parties (usually only about 4 or 5 hours, but people arrive late, and would rather spend time learning the diffs between K and Gnome, set up their mailer, etc).
I think it's important to note that /boot doesn't care about being first, only about early on the disk (if it cares at all). I usually give it partition 2; that satisfies some MSwin setups that want the first entry, and avoids the 4th entry, which some hibernation setups like to take. Make the third an extend partition, put a D: in there if you were planning a more even split on a large disk, a swap, and at least one more volume for / (though I refer you to past articles for The Gang's recommendations about partition layout beyond that).
If you are really trying for maximum space "under the bar" assigned elsewhere instead ... it can be as small as 7 or 8 MB. I wouldn't go smaller for fear that monolithic kernels might get pretty big at some point. You always want room for three things: the bootloader parts themselves, a known good kernel, and whichever one you are recently trying out. If you're triple-or-more booting and more than one are Linux, you might want to lean the other direction and make room for lots of modules to go with them (symlink /lib/modules to /boot/modules in all distros and share the goodies).

(?) If you want to know more about Partitioning using "fdisk" refer to:


Linux Partition HOWTO
by Tony Harris and Kristian Koehntopp
(it is a mini HOWTO)
in particular see section [5] [Partitioning with fdisk]
http://www.tldp.org/HOWTO/mini/Partition/index.html
(!) [Heather] If you create the FAT filesystem for it ahead of time, MSwin's SETUP.EXE usually won't gratuitously fill the entire disk for you, which saves digging up a resizer later.

(?)

Hope you find this relevant.

(!) [Mike] Are you specifically excluding LILO and GRUB? Why?

(?) I had written that the querent needs to install a loader _if he has trouble_ booting into GNU/Linux (using either GRUB/LILO). I had installed RH 7.1 with Win2k and I had trouble booting into GNU/Linux. RH 7.1 came with LILO version 21.4-4

Thankfully this problem was well documented in Linux+NT-Loader mini-HOWTO It had adviced to use Boot Part for solving this problem. I am still using Boot Part to boot into my GNU/Linux(RH 7.1) OS. I think newer versions of RH do not show this problem but I am not sure as I have only RH 7.1. (thinking of shifting to Debian).LILO does not need any special hacking to detect and boot up Win98.

One of my friends had discovered XOSL and even though he was a newbie, he had three OSs up and running in no time. (Win 98,WinXP,Linux and maybe Win2k too!)

(!) [Mike] GRUB is more user-friendly than LILO. I wish I could use it on my computer but the "linear" option doesn't work. I had to switch back to LILO because my computer won't work with the "lba32" setting.

(?) Talking about loaders, three years back I experimented with Be OS.It was really cool and really sparing of machine resources. I had Win98 installed on my box. It installed quite easily on FAT filesystem and it placed an icon on my Win98 desktop. On clicking it, Be would boot up. And I think it did not take much time to startup. I removed it beacuse it did not come bundled with much apps. What I wanted to know do we have this sort of funky loader in GNU/Linux?

(!) [Heather] Yes. The canonical way to launch Linux froma running DOS or MSwin system is a program called LOADLIN.EXE. I understand there is a mildly different version of it for NT, and you should prepare a PIF for it that tells MSwin it's okay to give it all the resources it needs - go ahead and take over the CPU - then you'll have a happy one way trip to whatever kernel you told it to load. Oh yeah, and the linux kernel you use has to be visible in your DOS filesystem. I usually suggest to keep such parts in C:\LINUX so it's obvious.

(?) I have not experimented with GRUB but LILO can be tough for a newbie (IMVVHO). Again I am talking about the older versions and I have no experience with newer versions.

(!) [Rick] A lot of people never learned the Zen of LILO:
  1. /sbin/lilo (the "map installer") is best thought of as a compiler, and /etc/lilo.conf as its source code.
  2. Therefore, if you change /etc/lilo.conf or any of the files it points to, you must run /sbin/lilo before rebooting, to "recompile".
  3. You should always have a "safeboot" stanza in /etc/lilo, pointing to a known-good kernel image that you never fool with, as a fallback. This ensures that if, e.g., you compile a new kernel but accidentally omit console support, you can easily recover.
GRUB is a capable and flexible bootloader, but practically all of the reasons commonly cited for it being preferable to LILO boil down to "I once messed with my boot files before reading LILO documentation, shot myself in the foot, and therefore blame LILO."

(!) code safety

From Jose Nazario

Comments By Mike Orr, Ben Okopnik, Steve Kemp, Tom Bradley

i was looking through the november issue of linux gazette and something caught my eye. overall the issue had a few things i was pretty happy to see: a piece on mono, elf kernel execution, and adding loadable plugins to code. it's this last piece i have a problem with.

Adding Plugin Capabilities To Your Code:
http://www.linuxgazette.com/issue84/bradley.html

tom bradley's code, while demonstration code, is a perfect example of unreliable code and illustrates why this kind of thing should be avoided. in main.c (truncated to save space):

#define PATH_LENGTH 256
...
        char path[PATH_LENGTH], * msg = NULL;
...
        /* build the pathname for the module */
        getcwd(path, PATH_LENGTH);
        strcat(path, "/");
        strcat(path, argv[1]);

it's quite trivial to overflow path[PATH_LENGTH], even inadvertantly. before you say "look, this isn't setuid root, this isn't anything but demonstration code, don't rush off to bugtraq" i want to say this: for precisely the reason that it is demonstration code it should do bounds checking.

(!) [Ben Okopnik] Agreed, 100%. One of the many security-related sites I read on a regular basis had a "ha-ha-only-serious" quote that's worth paying attention to:
<ironic> Security hint of the day:
        find . -name '*.[ch]' | xargs egrep -l 'sprintf|strcat|strcpy' | xargs rm
</ironic> -- Pavel Kankovsky aka Peak
Funny, but...
(!) [Steve Kemp] There are a few decent scanning tools available, like 'flawfinder', 'rats', and 'its' which are worth using if you want to be scared!
Steve
---
# Debian Security Audit Project
http://www.steve.org.uk/Debian

(?) lots of people are going to code their apps with this as a start and not think twice about the reliability of the foundation of this code. the fact is someone can easily hit this upper limit inadvertantly (think of a well organized person who has a deep directory structure ... suddenly path[] has a lot less overhead).

secondly, bounded string manipulation should just be a habit, and habits develop after repeated application of the effort. crappy, unchecked runtime errors are the bane of software quality, there's no reason you shouldn't always do sanity checks, even in demo code. one reason alone to do it is that you'll get so annoyed you may want to improve the interface to error checked code, benefitting us all.

anyhow, thanks for the november issue.

Forwarding to the author, Tom Bradley <tojabr@tojabr.com>. This message will be in December's LG . Feel free to write a response or a follow-up article if you wish. -- Mike

(?) thanks mike. tom, in all seriousness that article was really cool and timely, and i will definitely be referring to it to make use of it. i just take issue with unchecked errors in code ...

thanks for an otherwise well written piece.

(!) [Tom Bradley] I agree that was setting a bad example on my part, below is a corrected version.
(truncated to only changed partion) ...
char * path, * msg = NULL; int (*entry)(); void * module;
if(argc < 2) {
printf("No module given.\n"); return; }
path = (char*)get_current_dir_name(); path = (char*)realloc(path, strlen(path) + strlen(argv[1]) + 2); strcat(path, "/"); strcat(path, argv[1]); ...
the #define has been removed.
Tom

(!) PC-MOS

From Reilly Burke

Comments By Thomas Adams, Mike "Iron" Orr, Heather Stern

(!) [Heather] Reilly Burke is Technical Advisor for a company called Aero Training Products, Inc. (http://www.aerotraining.com)

To Derek Holliday

We have copies of PC-MOS and LanLink available. We also produce LanLink drivers for PC-MOS.

PC-MOS is required to run POS systems with DOS applications. DOSEMU is not good enough to run many (most) of the apps. PC-MOS is file-compatible with DOS systems, but only the November 93 kernel (of PC-MOS) can access 3.5" floppies.

I'd love to replace our PC-MOS applications, but nothing quite measures up yet. Linux is nowhere near being able to do the job (it's way too big, complex, & geeky)! Possibly DR-DOS 8 (coming out in spring 2003 with FAT32) might do the job.

(!) [Thomas] How would you know until you tried? Just because Linux is too big and "geeky" in your eyes; does not mean to say that it couldn't do the job! It's not really logical to say that.
(!) [Iron] DOS programs, however, often access the hardware directly, so it's not surprising DOSEMU can't emulate the environment quite well enough.
(!) [Heather] Thanks for this tip on an old thread; it's not Linux, but since we seem to be the only place that talks about it...
I'm curious about what the problems under DOSEMU + (say) MS-DOS 5.0 are, but unless this is a problem you're trying to solve for yourself, you may not want to bother delving any further.
The buzzword "point of sale" typed into the Freshmeat search index (http://freshmeat.net) yields 7 direct hits, and a category for point of sale containing 42 projects. Well over a year ago I saw one written up in a magazine article (I think it was Linux Journal actually) about a POS system optimized for a pizza place. That's geeky; but the pizzas he was selling are real.
Some of these projects will really be "e-business" (aimed at web based stores, not one where a high school student has to run the register, nor where the machine has a real register to pop the change out of) and a few of them are optimized for a specific kind of shop. But they may do for some people.

(?) Of course we're still trying to move our PC-MOS apps to Linux, but so far, after years of experimenting and coding, we're still running the PC-MOS systems because there's still nothing like them for Point-Of-Sale utility. It's fast and small and entirely bug-free. The last PC-MOS kernel released was November 93 (9 years ago). But it's designed for old hardware (ISA slots, NE2000 ethernet cards, Wyse terminals, and serial printers), and the systems are becoming increasingly difficult to maintain. There's probably still 100,000 PC-MOS users looking for an answer, but the closest thing is probably DR-DOS. Linux is not being maintained by POS geeks, so there's a real shortage of Linux POS tools and solutions.

We've tried disassembling the drivers (we succeeded in cloning the Lan client drivers with new serial numbers!) , but disassembling the entire OS is far too complicated. We've also tried rewriting the DOS apps (in particular, the Shark database). We have its horribly complicated monolithic Microsoft C source code, with chunks of assembler mixed in, but it's still a giant task. The only feasible direction looks like rewriting the Shark compiler in Kylix, but even that is a horrendous prospect. So far, PC-MOS still works (and it's paid for :-), and the Shark database is still fast and flexible.

We'd really like to hear from any other POS types who are trying to move to Linux.

Reilly Burke


(?) restoring broken X connections

From Mustafa C. Kuscu

Answered By Jay R. Ashworth, Rick Moen, Robos, Heather Stern, Kapil Hari Paranjape

Hi, James. When a remote X-forwarding ssh connection is broken, all the windows at my local server get lost. Is there a way to prevent the remote processes from shutting down, so as to resume the processes and have the windows re-sent to the local X-server when I relogin?

Thanks Mustafa

(!) [jra] Not per se, but investigate VNC. I'm in the midst of writing an article on it as it happens, but it can be used to do what you need.
(!) [Rick] Jay, just to help: I know of these VNC implementations (also known as "RFB" = Remote Frame Buffer):
You'll find a number of resources about VNC over SSH in my ssh-clients file, http://linuxmafia.com/pub/linux/security/ssh-clients
Also worth looking into:
(!) [Robos] Well, not entirely true IIRC since I had some thoughts about this lately too and shortly after that a friend of mine told me that there exists something like screen for xserver connections. And now guess what, he and me forgot it again. Great. So, it exists, but somewhere and I can't tell where...
(!) [Rick] Possibly, you're trying to think of xnest?
(!) [Heather] I suspect not; xnest handles issues about color depth, not being able to set processes to sleep and waken them up from another console.
(!) [Kapil] Actually you may mean "ratpoison" but that is only a window manager which has a "screen"-ish look and feel.
The following setup works well for me from home and work.
At work:

start ratpoison
get ratpoison to start rfb (or to give its full name x0rfbserver).
get ratpoison to start a screen session.
Do some real work via screen.
(All programs that invoke graphics work via ratpoison).
At Home:

run ssh -L 5900:localhost:5900 to the work machine.
on the remote machine run "screen -D -R"
start xvncviewer on the local machine.
Do some real work via screen!
Thus text based applications work via ssh and screen so are reasonably fast. Meanwhile any remote program that invokes graphics creates a window within the xvncviewer.
Needless to say ratpoison runs at home too!
I was quite pleased when I cooked up this config as you can see!
As long as the machine at work continues to run none of the sessions is ever exited or lost. VNC and screen passwrods provide some security as well.
Hope this helps,
Kapil.
(!) [Robos] Nope, I found it! I actually mean - xmove! Look here:
ftp://ftp.cs.columbia.edu/pub/xmove
Thats also the thing the original querent might wanna have.
(!) [Kapil] I tried out "xmove". Er, ... just one problem. It uses TCP connections to connect with the xserver which means that X with "-nolisten tcp" does not work.
In the modern security conscious world this is essentially all X servers!
(!) [Robos] Well, thats true. But, you can either remove the call in /etc/X11/xinit/xserverrc and maybe /etc/gdm/gdm.conf (dunno for kdm or xdm) or ssh -X _should be permitted if I gather some comment I read correctly. The say the others?
(!) [Heather] As far as X is concerned ssh -X merely yields a valid server running at a higher screen number - 10 rather than 1 is typical, so localhost:10 would send all processes down the ssh pipe back to where you are sitting.
If you're sure it works at the TCP level it may not work. If it works with normal TCP/IP packets, then it can surely be tunneled. But you can try playing games with ssh at the transport layer first. There are stacks of examples for POP over SSH out there; that's how they work, so it's worth a look too.




Copyright © 2002
Copying license http://www.linuxgazette.com/copying.html
Published in Issue 85 of Linux Gazette, December 2002
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


 December 2002 Linux Journal

[issue 102 cover image] The December issue of Linux Journal is on newsstands now. This issue focuses on System Administration. 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


 DMCA

Finding bizarre implications of the DMCA with which to ridicule it is as easy as shooting fish in a barrel. The Register recently reported that four major retailers (WalMart, Target, Best Buy and Staples) had invoked the DMCA to prevent FatWallet.com from disseminating information about sales and price comparisons. The argument runs that sale prices are copyrightable information (and not just simple facts). FatWallet has had to comply to avoid the risk of a very costly legal battle.

In other DMCA related matters, Security Focus reported that hardware manufacturers producing games console mod chips have found themselves under pressure, applied through the device of the DMCA, to cease such production. The argument hinges on whether the non-infringing uses legitimise the chips, and its a criterion which can vary substantially from country to country.

Finally, there is a very interesting DMCA article by Adam C. Engst at TidBITS. It provides a good overview of the issues arising from the law, and the stakes the "content industry" is playing for in its long-term strategy. Related to this is another article at TidBITS (by Cory Doctorow) entitled Can the Digital Hub Survive Hollywood?. It does a fine job of highlighting the tensions between the content/media industries versus the interests of the technology industry at large (as opposed to the welfare of sectoral interests within the tech industry who might do very well if their technology is used for protecting "content"). Particular attention is paid to the BPDG (Broadcast Protection Discussion Group).


 Mobilix

In a reversal of an lower court's decision, a German court has ruled that the name Mobilix is sufficiently close in sound and appearance to Obelix to cause confusion. Mobilix is a website dealing with the area of Unix on mobile devices. Obelix is a character from a French comic book. The final implications of this decision are not clear. You can follow the entire story on the Mobilix website.


 DRM

Slashdot recently reported on the ACM Digital Rights Management Workshop. Among those present was Ed Felten whose brief commentary can be read here. It was reported that there was some scepticism that DRM was truly a panacea for the copy-protection worries of Hollywood info-hoarders. In a not unrelated story, The Register reported on the future of Microsoft's Palladium and the Trusted Computing Platform Alliance (TCPA). Even proponents of the system admit it is not totally secure and potentially vulnerable to intelligent hardware attacks.


Linux Links

Some links from Linux Weekly News:

Some links from the O'Reilly websites:

DesktopLinux.com have an article about Film Gimp. Film Gimp is a motion picture frame-editing tool. The article has some technical details and reports on its use in the film industry.

Linux Journal have an article explaining how to train mutt to catch spam using ESR's bogofilter.

News.com have reported on IBM's plans to build two new machines which would be the fastest supercomputers to date. The Blue Gene/L, the faster of the two, will be Linux powered, and 10 times faster than the current title-holder, NEC's Earth Simulator.

A survey of some open source multimedia projects which might be of interest.

Some links from Linux Today

The Inquirer has run a series of articles describing the Linux install process in a way designed to help beginners. Parts 1, 2, 3, 4, 5.

IBM Developerworks have an article on open source scientific software, being used increasingly by those involved in scientific research.

A report at Linux and Main on the path to the next major kernel release.

From Debian Weekly News, a link to an interview with Klaus Knopper of Knoppix. Particular comments on hardware detection implementation.

Some links of interest from The Register: