old-www/LDP/LG/issue92/TWDT.html

5534 lines
207 KiB
HTML

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML><HEAD><TITLE> Linux Gazette Table of Contents LG #92</TITLE></HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#0000AF"
ALINK="#FF0000" >
<center>
<!-- A HREF="http://www.linuxgazette.com/">
<H1><IMG SRC="../gx/newlogo.jpg" ALT="LINUX GAZETTE" border="0"></H1></A> -->
<A HREF="http://www.linuxgazette.com/">
<H1><IMG ALT="LINUX GAZETTE" SRC="../gx/lglogo.png"
WIDTH="600" HEIGHT="124" border="0"></H1></A>
<H2>July 2003, Issue 92 &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
Published by <I>Linux Journal</I></H2>
<A HREF="../index.html">Front Page</A> &nbsp;|&nbsp;
<A HREF="../index.html">Back Issues</A> &nbsp;|&nbsp;
<A HREF="../lg_faq.html">FAQ</A> &nbsp;|&nbsp;
<A HREF="../mirrors.html">Mirrors</A> <!-- &nbsp;|&nbsp; --><BR>
<A HREF="../tag-kb.html">The Answer Gang knowledge base</A> (your Linux questions here!) <!-- &nbsp;|&nbsp; --><BR>
<A HREF="http://www.linuxgazette.com/search.html">Search (www.linuxgazette.com)</A>
<!-- *** BEGIN mirror site search link *** -->
<!-- &nbsp; <A HREF="http://www.linuxgazette.com/search.html">(SITE.COM
mirror)</A> -->
<!-- *** END mirror site search link *** -->
</CENTER>
<HR NOSHADE>
<!--=================================================================-->
<!-- H1><font color="#BB0000">Table of Contents:</font></H1 -->
<!-- *** BEGIN toc *** -->
<UL>
<LI> <A HREF="lg_mail.html">The MailBag</A>
<LI> <A HREF="lg_tips.html">More 2-Cent Tips</A>
<LI> <A HREF="lg_answer.html">The Answer Gang</A>
<LI> <A HREF="lg_bytes.html">News Bytes</A>, <EM>by Michael Conry</EM>
<LI> <A HREF="collinge.html">HelpDex</A>, <EM>by Shane Collinge</EM>
<LI> <A HREF="ecol.html">Ecol</A>, <EM>by Javier Malonda</EM>
<LI> <A HREF="hawk.html">select() on Message Queue</A>, <EM>by Hyouck "Hawk" Kim</EM>
<LI> <A HREF="lodato.html">Linux to Save the Health of the World</A>, <EM>by Janine M Lodato</EM>
<LI> <A HREF="nielsen.html">My Open Radio</A>, <EM>by Mark Nielsen</EM>
<LI> <A HREF="okopnik.html">Setting up the mail subsystem in Linux</A>, <EM>by Ben Okopnik</EM>
<LI> <A HREF="qubism.html">Qubism</A>, <EM>by Jon "Sir Flakey" Harsem</EM>
</UL>
<!-- *** END toc *** -->
<HR NOSHADE>
<!--=================================================================-->
<H3 ALIGN="center"><EM>Linux Gazette</EM> Staff and The Answer Gang</H3>
<BLOCKQUOTE>
<STRONG>Editor:</STRONG> Michael Orr<BR>
<STRONG>Technical Editor:</STRONG> Heather Stern<BR>
<STRONG>Senior Contributing Editor:</STRONG> Jim Dennis<BR>
<STRONG>Contributing Editors:</STRONG>
Ben Okopnik, Dan Wilder, Don Marti
</BLOCKQUOTE>
<HR NOSHADE>
<!--=================================================================-->
<A HREF="TWDT.txt.gz">TWDT 1 (gzipped text file)</A><BR>
<A HREF="TWDT.html">TWDT 2 (HTML file)</A><BR>
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.
<HR NOSHADE>
<!--=================================================================-->
<center>
<I>Linux Gazette</I><img alt="[tm]" src="../gx/tm.gif">,
<A HREF="http://www.linuxgazette.com/">http://www.linuxgazette.com/</A><BR>
This page maintained by the Editor of <I>Linux Gazette</I>,
<A HREF="mailto: gazette@ssc.com"> gazette@ssc.com</A>
<P>
<H5>Copyright &copy; 1996-2003 Specialized Systems Consultants, Inc.</H5>
</center>
<HR NOSHADE>
<!--=================================================================-->
<TABLE BORDER><TR><TD WIDTH="200">
<A HREF="http://www.linuxgazette.com/">
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png"
WIDTH="200" HEIGHT="41" border="0"></A>
<BR CLEAR="all">
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
</TD><TD>
<center>
<BIG><BIG><STRONG><FONT COLOR="maroon">The Mailbag</FONT></STRONG></BIG></BIG><BR>
<!-- BEGIN wanted -->
<STRONG>From <A HREF="mailto:gazette@ssc.com">The Readers of <i>Linux Gazette</I></A></STRONG></BIG>
</TD></TR>
</TABLE>
<P>
<!-- END header -->
<HR>
<center>
<BIG><STRONG><FONT COLOR="maroon">HELP WANTED : Article Ideas</FONT></STRONG></BIG>
<BR>
<STRONG>Submit comments about articles, or articles themselves (after reading <a href="../faq/author.html">our guidelines</a>) to <A HREF="mailto:gazette@ssc.com">The Editors of <i>Linux Gazette</I></A>, and technical answers and tips about Linux to <A HREF="mailto:linux-questions-only@ssc.com">The Answer Gang</A>.
</STRONG>
</center><HR>
<UL>
<!-- index_text begins -->
<li><A HREF="#wanted.1"
><strong>BiDi Problems in WINE + SMARTDRAW</strong></a>
<li><A HREF="#wanted.2"
><strong>Squid and FTP</strong></a>
<li><A HREF="#wanted.3"
><strong>create new lilo boot loader - on 2nd drive</strong></a>
<!-- index_text ends -->
</UL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="wanted.1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">BiDi Problems in WINE + SMARTDRAW</FONT></H3>
Thu, 12 Jun 2003 17:49:30 -0300
<BR>Daniel Carneiro do Nascimento (<a href="mailto:linux-questions-only@ssc.com?cc=dcn@microlink.com.br&subject=%20Re%3A%20%5BLG%2092%5D%20help%20wanted%20%231">dcn from microlink.com.br</a>)
<P><CODE>
#sorry about my english... i'ved learned that by myself.. so ..
<BR># U can make some modifications &lt; of course.. it's gpl..&gt; in my english
<BR>mistakes
</CODE></P>
<blockquote><font color="#000066">So I did, just a little, though usually we leave questions alone so people
have a sense of how the querent meant things
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
-- Heather</font></blockquote>
<P>
Hiya guys..
</P>
<P>
I have a problem ( d' aah)
</P>
<P>
I've tried to use SmartDraw under wine.. and then.. after I configure
everything.. It works! At least, I think that, when I see SmarrtDraw
starting.. showing the initial WELCOME.. etc.. but.. when he tries to
show me the initial screen &lt; to chose the objects of my diagram&gt;
BUMMER! My wine DIES.
</P>
<P>
my log is so big.. and every thing happens about BiDi...
</P>
<blockquote><pre>#] warn:font:GetCharacterPlacementW The BiDi algorythm doesn't conform
to Windows'
</pre></blockquote>
<P>
And then.. BiDi throws a lot of junk &lt; i suppose&gt; in my memory causing
some HEAPS Faults:.
</P>
<blockquote><pre>#] warn:heap:HEAP_IsRealArena Heap 0x40db0000: block 0x408acf is not
inside heap
</pre></blockquote>
<P>
there's not an upgrade for BiDi available.. and.. since November 22..
BiDi has been going crazy... with some programs that request some kind of..
font.. i don't know...
</P>
<P>
The HEAP Faults problem.. I solved myself making a bigger "X:/temp"
and includding a new path for junk.. but.. <A HREF="http://www.winehq.com/">WINE</A> couldn't pass through
BiDi, when it get a crash.. cause the BiDi NEVER stops to send some..
THING. &lt; i don't know what either.&gt; to the memory.. that fills up..
whatever is your <TT>/temp</TT> size! &lt; mine is 2 G!&gt;
</P>
<P>
I just don't know what to do!
I'm really really lost.. and.. I need to make wine work... it's not
for the program itself.. it's for the HONOR! AHUuhauahh
</P>
<P>
DO you guys know ANYTHING about that Suddenly Crashing?!? Or..
incompatibility ? Or whatever you call it... ...
</P>
<P>
Tnkx so much for reading my crappy email...
</P>
<P>
PS:. .. HEEEEEELP!
</P>
<P>
Daniel Carneiro do Nascimento
</P>
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="wanted.2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Squid and FTP</FONT></H3>
Fri, 27 Jun 2003 11:26:16 +0300
<BR>Nickos Yoldassis (<a href="mailto:linux-questions-only@ssc.com?cc=niyo@teipat.gr&subject=%20Re%3A%20%5BLG%2092%5D%20help%20wanted%20%232">niyo from teipat.gr</a>)
<P><STRONG><FONT COLOR="#000066"><EM>
Hi there,
</EM></FONT></STRONG></P>
<P><STRONG><FONT COLOR="#000066"><EM>
I use squid as a proxy server (default configuration) and it seems that i
can't connect to ftp sites through it.
Do I have to do anything?
</EM></FONT></STRONG></P>
<P><STRONG><FONT COLOR="#000066"><EM>
Nickos, Greece
</EM></FONT></STRONG></P>
<P><STRONG>
It appears that this is an FAQ in the land of Squid, number 12.17 --
"Can I make my regular FTP clients use a Squid cache?"
</STRONG></P>
<P><STRONG>
Nope, its not possible. Squid only accepts HTTP requests. It speaks
FTP on the server-side, but not on the client-side.
</STRONG></P>
<P><STRONG>
The very cool wget will download FTP URLs via Squid (and probably any
other proxy cache).
</STRONG></P>
<blockquote><font color="#000066">However, it would be fun to have an article about somebody using Squid
and/or other site caching software in powerful ways to make their site's
view of the web more fun. There are a bunch of add-ons at Freshmeat for
it, so I'm sure someone out there has a great example for us to follow.
Don't forget to read our author submission guidelines.
-- Heather</font></blockquote>
<!-- sig -->
<!-- end 2 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="wanted.3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">create new lilo boot loader - on 2nd drive</FONT></H3>
Fri, 13 Jun 2003 02:42:27 +0000
<BR>Geraldine Koh (<a href="mailto:linux-questions-only@ssc.com?cc=geradin07@hotmail.com&subject=%20Re%3A%20%5BLG%2092%5D%20help%20wanted%20%233">geradin07 from hotmail.com</a>)
<P>
Hi people, I have a problem......
</P>
<P>
I'm actually trying to mirror the hard disks using RAID 1 in <A HREF="http://www.redhat.com/">Red Hat</A> 9.It
can work perfectly but the bug is that i can only boot up the first hard
disk, i suppose lilo is stored as th MBR in it. The second hard disk during
booting up, shows LI and i boot it using a bootup diskette instead. I'm
wondering how to implement lilo in the second HDD in such a way that it auto
boots up just like the 1st HDD.Is it possible?
</P>
<P>
Is it true that only 1 MBR could be used will it work on 2 MBR in 2
respective hard disks?
</P>
<P>
I visited the Boot+Raid+Root+ Lilo How to documentation:
&amp; i tried this method to boot up second HDD..but there's error
</P>
<P>
it is known as a raid LILO config file pair that I implemented:
</P>
<p align="center">See attached <tt><a href="misc/wanted/geraldine.lilo.conf.hda.txt">geraldine.lilo.conf.hda.txt</a></tt></p>
<P>
I created this 2 lilo configuration file but not too sure whether is eing
read anot because i still have a current default lilo file <TT>/etc/lilo.conf</TT>
</P>
<p align="center">See attached <tt><a href="misc/wanted/geraldine.default.etc-lilo.conf.txt">geraldine.default.etc-lilo.conf.txt</a></tt></p>
<P>
Bacially that's about all...I hope your gang can resolve my roblem.Sorry if
i bored you to sleep with such a long email.
Hope to hear from ya soon...
</P>
<P>
Cheers,
Geraldine
</P>
<!-- end 3 -->
<HR>
<center>
<BIG><STRONG><FONT COLOR="maroon">GENERAL MAIL</FONT></STRONG></BIG>
<BR>
</center><HR>
<UL>
<!-- index_text begins -->
<li><A HREF="#mailbag.1"
><strong>Re: Liunx Gazette in Palm Format</strong></a>
<li><A HREF="#mailbag.2"
><strong>Article Ideas - Semaphores</strong></a>
<!-- index_text ends -->
</UL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="mailbag.1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Re: Liunx Gazette in Palm Format</FONT></H3>
Fri, 30 May 2003 17:47:34 -0400
<BR>Ben Okopnik (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2092%5D%20mailbag%20%231">the <em>LG</em> Answer Gang</a>)
<BR>Question by Herbert, James (James.Herbert from ds-s.com)
<P>
On Fri, May 30, 2003 at 12:36:02PM -0700, Heather wrote:
</P>
<!-- sig -->
<!-- sig -->
<P>
[Ben]
You can use "bibelot" (available on <A HREF="http://www.freshmeat.net/">Freshmeat</A>, IIRC); it's a Perl script
that converts plaintext into Palm's PDB format. I have a little script
that I use for it:
</P>
<blockquote><font color="#000066">Does the raw PDB format have a size limit? Our issues can get pretty
big sometimes...
-- Heather</font></blockquote>
<P>
[Ben]
"The Complete Shakespeare" was over 5MB. No trouble at all, except for
uploading it ("jpilot" wouldn't do it; neither would the Wind0ws prog on
my brother's machine. Kudos to "coldsync".)
</P>
<P><STRONG>
Plucker is an open source palm document reader and in my humble opinion THE
BEST. There are some really good Linux GUI document converters available for
it.
</STRONG></P>
<P><STRONG>
I checked out site-scooper but unfortunately they are very out of date, I'll
have to look at installing the scripts on my own box.
</STRONG></P>
<P><STRONG>
The issue I have when converting the site manually is that as the site
refences links external to the main document I get duplicate copies of the
articles in one document hence an extremely large file (Issue 91 is 1.98MB
!!)
</STRONG></P>
<P><STRONG>
Anyway thanks very much for your help, I was quite surprised to get a
<BR>response for such a trivial question --- thanks again
</STRONG></P>
<P><STRONG>
James
</STRONG></P>
<blockquote><font color="#000066">Glad we could help, though I'm disappointed to hear sitescooper isn't
keeping up to date.
-- Heather</font></blockquote>
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="mailbag.2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">Article Ideas - Semaphores</FONT></H3>
Tue, 3 Jun 2003 08:34:46 -0700
<BR>rwillis (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2092%5D%20mailbag%20%232">rwillis from ctf.com</a>)
<P>
I have done some searching on the internet for semaphores and have
found very little info, and no tutorials. I think that you could use
this as a topic to suppliment your article on Message Queues in
Issue-89 (
<a href="../issue89/raghu.html">"Exploring Message Queues, Part I"</a>
, Raghu J Menon).
</P>
<P>
Suggested Sections
</P>
<P>
1 SystemV Semaphores (semget, semop semctl)
</P>
<P>
2 POSIX 1003.1b Semaphores (sem_init, sem_wait, sem_trywait,
sem_post, sem_get_value, sem_destroy)
</P>
<P>
I have heard mention of something called pthread semaphores, but I am
unsure as to what these are, or how to use them.
</P>
<P>
BTW, SystemV semaphores use key_id (int) which must be unique. <TT> ftok()</TT>
can be used to hash a key from a filepath and a project id, but there
must be other ways to generate keys...
</P>
<P>
It would be really nice to see examples of this in action, as that is
one thing that I could not find (exclusively for Linux that is).
</P>
<P>
Great Magazine!
</P>
<P>
Thanks,
</P>
<P>
Richard Willis, B.Eng (EIT)
</P>
<!-- end 2 -->
<HR>
<center>
<BIG><STRONG><FONT COLOR="maroon">GAZETTE MATTERS</FONT></STRONG></BIG>
<BR>
</center><HR>
<UL>
<!-- index_text begins -->
<li><A HREF="#gaz.1"
><strong>The things we have to go through to get our articles</strong></a>
<!-- index_text ends -->
</UL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="gaz.1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/envelope.gif">
<FONT COLOR="navy">The things we have to go through to get our articles</FONT></H3>
Fri, 30 May 2003 17:42:52 -0400
<BR>Heather Stern (<a href="mailto:gazette@ssc.com?subject=%20Re%3A%20%5BLG%2092%5D%20gazette%20matters%20%231"><em>Linux Gazette</em> Technical Editor</a>)
<P><STRONG>
Ooh, ooh. . . . I used to ... at a former job, and hereby volunteer
to write an article on setting up an equivalent. I may need some
shouting and/or threats of physical violence to overcome my
procrastination though.
</STRONG></P>
<P>
Black helicopter request has been filed. It'll be right over as soon
as our local operative-in-dark-glasses can fix the autopilot. Of
course, if you finish the article before liftoff, do let us know, and
we'll send over one of Wooner's beautiful dame clients to pick up the
package...
</P>
<P><STRONG>
Will do. Um... over and out (?)
</STRONG></P>
<blockquote><font color="#1F1F1F">Heh. One beautiful dame, coming up next article. Watch for long legs,
slinky dresses, and languorous questions about whistling ability.
-- Ben</font></blockquote>
<blockquote><font color="#000066">And if you're the sort of person who can fry a good article up sometime
this summer -- to <EM>make Linux a little more fun</EM> for folks who get dizzy
when they need to know what sorts of barbecue briquettes are used for
firewalls around here - do let us know. We're planning our editorial
schedule to layout how August and September will be released, and having
some articles in ahead of time would be really, really handy. Now I can't
<EM>guarantee</EM> a personal pick-up by ultra modern black helicopter with an
absolutely gorgeous - shall we say bombshell? - dame flying it, but we
can ask!
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
-- Heather</font></blockquote>
<!-- end 1 -->
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
<h5>This page edited and maintained by the Editors of <I>Linux Gazette</I><br>HTML script maintained by <A HREF="mailto:star@starshine.org">Heather Stern</a> of Starshine Technical Services, <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
<br>Copyright &copy; 2003
<br>Copying license <A HREF="http://www.linuxgazette.com/copying.html">http://www.linuxgazette.com/copying.html</A>
<BR>Published in Issue 92 of <i>Linux Gazette</i>, July 2003</H5>
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->
<HR>
<TABLE BORDER><TR><TD WIDTH="200">
<A HREF="http://www.linuxgazette.com/">
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png"
WIDTH="200" HEIGHT="41" border="0"></A>
<BR CLEAR="all">
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
</TD><TD>
<center>
<BIG><BIG><STRONG><FONT COLOR="maroon">More 2&cent; Tips!</FONT></STRONG></BIG></BIG><BR>
<!-- BEGIN tips -->
<STRONG>By <A HREF="mailto:linux-questions-only@ssc.com">The Readers of <i>Linux Gazette</I></A></STRONG></BIG>
</TD></TR>
</TABLE>
<P>
<!-- END header -->
<center><STRONG>See also: The Answer Gang's
<a href="../tag/kb.html">Knowledge Base</a>
and the <i>LG</i>
<a href="http://www.linuxgazette.com/search.html">Search Engine</a></STRONG>
</center><HR>
<UL>
<!-- index_text begins -->
<li><A HREF="#tips.1"
><strong>Backup Software: Robustness</strong></a>
<li><A HREF="#tips.2"
><strong>can I have Linux on a ThinkPad G40? with WinXP?</strong></a>
<li><A HREF="#tips.3"
></a>Re: [Blt-newuser] Request suggestion for ftp server --or--
<br><A HREF="#tips.3"
><strong>FTP Daemons (Servers) and Alternatives: Just Say No?</strong></a>
<li><A HREF="#tips.4"
><strong>Pause after running xterm</strong></a>
<li><A HREF="#tips.5"
><strong>Tips on PDF conversion</strong></a>
<li><A HREF="#tips.6"
><strong>quotas on directories?</strong></a>
<li><A HREF="#tips.7"
><strong>What is Reverse DNS?</strong></a>
<li><A HREF="#tips.8"
><strong>Subscribe to groups...........pan,Knode.......????</strong></a>
<li><A HREF="#tips.9"
><strong>Confused about symantics of "mount -o,async/sync" commands</strong></a>
<li><A HREF="#tips.10"
><strong>Linux Journal Weekly News Notes - Tech Tips</strong></a>
<!-- index_text ends -->
</UL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips.1"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Backup Software: Robustness</FONT></H3>
Mon, 2 Jun 2003 08:09:29 +1000
<BR>Nick Coleman (<a href="mailto:linux-questions-only@ssc.com?cc=njpc@ozemail.com.au&subject=%20Re%3A%20%5BLG%2092%5D%202c%20Tips%20%231">njpc from ozemail.com.au</a>)
<P>
This is a reply to a letter to the Mailbag in the June 2003 issue of
Linux Gazette,
<a href="../issue91/lg_mail.html#wanted.1">compressed tape backups</a>
</P>
<P><STRONG>
quite a while back I remember a discussion on compressed tar archives on
tape and the security risk, i.e. the data would be unrecoverable behind
the first damaged bit.
</STRONG></P>
<P><STRONG>
Now at that time I knew that bzip2, unlike gzip, is internally a
blocking algorithm and it should be possible to recover all undamaged
blocks after the damaged one.
</STRONG></P>
<P><STRONG>
Your correspondent may like to look into afio instead of tar for
backups. I believe it recovers from errors much better. The mondo
rescue tool developer uses it.
</STRONG></P>
<P><STRONG>
Regards,
<BR>Nick Coleman
</STRONG></P>
<BLOCKQUOTE>
[JimD]
The problems recovering tar files are worst with GNU tar operating on
gzip'd archives. star (by Joerg Schily, of cdrecord and mkisofs fame)
cpio, and pax are all better at resynchronizing to the archive headers
past a point of file corruption than GNU tar.
</BLOCKQUOTE>
<BLOCKQUOTE>
afio might very well be better that cpio. I don't know, I neither run
my own tests nor perused the code.
</BLOCKQUOTE>
<BLOCKQUOTE>
In general I'd suggest that added redundancy (both through ECC --
error correction coding -- and additional separate copies) is the better
way to make one's backups more robust.
</BLOCKQUOTE>
<BLOCKQUOTE>
I've heard that BRU (backup/recovery utility: <A HREF="http://www.tolisgroup.com"
>http://www.tolisgroup.com</A>
a commercial product) adds ECC and checksum data to the archive stream
as it performs backups --- and defaults to verifying the archive
integrity in a second pass over the data. With cpio, afio, tar, star,
dump/restore and pax you have to write your own scripts to perform the
verification pass. (cpio and presumably afio do add checksums, GNU tar
doesn't, I don't know about the others). So far as I know none of the
common free tools adds additional ECC redundancy to their archives.
</BLOCKQUOTE>
<BLOCKQUOTE>
There is an obscure little utility called 'ras' (redundancy archive
system) which can be used to create a set of ECC (sum) files to go
with set of base files and allow one to recover from the loss of a subset
of base files. This is essentially a utility to manually (and crudely)
perform the same sort of redundancy operations as a RAID5 subsystem.
</BLOCKQUOTE>
<BLOCKQUOTE>
<A HREF="http://www.icewalkers.com/Linux/Software/52890/ras.html"
>http://www.icewalkers.com/Linux/Software/52890/ras.html</A>
</BLOCKQUOTE>
<BLOCKQUOTE>
However, I should warn that I haven't used this at all much less tried
to integrate it into any sane backup/recovery scripts!
</BLOCKQUOTE>
<BLOCKQUOTE>
So far the best free backup tool for Linux still seems to be AMANDA
(<A HREF="http://www.amanda.org"
>http://www.amanda.org</A> ) though Bacula (<A HREF="http://www.bacula.org"
>http://www.bacula.org</A> ) seems
to have a similar and impressive feature set.
</BLOCKQUOTE>
<BLOCKQUOTE>
AMANDA still uses native dump and/or GNU tar to actually perform the
backup. It initiates those processes on each client, aggregates their
archives on a central server and manages the process of writing them
out to tapes (optionally using a tape changer).
</BLOCKQUOTE>
<BLOCKQUOTE>
Thus, AMANDA is tape centric and still has the inherent risks of the
underlying archiver (vendor's dump --- dumpe2fs for Linux, or GNU tar).
</BLOCKQUOTE>
<BLOCKQUOTE>
I think it would be neat if AMANDA or Bacula were integrated with
ras or some redundancy library in some meaningful way.
</BLOCKQUOTE>
<BLOCKQUOTE>
There is an overview of these and other free backup packages for UNIX
(and Linux) at:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
<A HREF="http://www.backupcentral.com/free-backup-software2.html"
>http://www.backupcentral.com/free-backup-software2.html</A>
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE>
Ultimately you'd want to keep multiple generations of data backups even
if you knew that you had perfect ECC, redundancy, media, and drives.
You need this for the same reason you need backups regardless of how
sophisticated and redundant your RAID array is configured. Because you
may find that your software or your users corrupt your data, and you
may need to back off to earlier, known good versions of the data,
possibly days, weeks, even month after those backups were made.
</BLOCKQUOTE>
<BLOCKQUOTE>
(Some forms of corruption can be subtle and insidious).
</BLOCKQUOTE>
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips.2"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">can I have Linux on a ThinkPad G40? with WinXP?</FONT></H3>
Thu, 05 Jun 2003 18:35:32 PST
<BR>borejsza (<a href="mailto:linux-questions-only@ssc.com?cc=linux-questions-only@ssc.com, linux@linux.ucla.edu&cc=borejsza@ucla.edu&subject=%20Re%3A%20%5BLG%2092%5D%202c%20Tips%20%232">borejsza from ucla.edu</a>)
<P><STRONG>
Hi,
</STRONG></P>
<P><STRONG>
I am about to buy a laptop and am looking for advice as to its
compatibility with Linux.
</STRONG></P>
<P><STRONG>
I know little about computers (last time I owned one it was a Commodore
64), and less about Linux, but saw a friend use it, and would like to
learn how to myself, and gradually move away from Windows. The laptop I
am thinking of buying is an IBM ThinkPad G40
(<A HREF="http://www-132.ibm.com/webapp/wcs/stores/servlet/ProductDisplay?productId=8600909&amp;storeId=1&amp;langId=-1&amp;categoryId=2580117&amp;dualCurrId=73&amp;catalogId=-840"
>http://www-132.ibm.com/webapp/wcs/stores/servlet/ProductDisplay?productId=8600909&amp;storeId=1&amp;langId=-1&amp;categoryId=2580117&amp;dualCurrId=73&amp;catalogId=-840</A>). I think it is a new model, and could not find it anywhere on the
pages that list hardware that has been already tried out with Linux.
</STRONG></P>
<P><STRONG>
Can anybody confirm that I can partition that laptop between Linux and
WindowsXP before I blow all my savings on it?
</STRONG></P>
<P><STRONG>
Thanks,
<BR>Alex
</STRONG></P>
<blockquote><font color="#1F1F1F">You could buy one preloaded from EmperorLinux:
(<A HREF="http://www.emperorlinux.com/auk.html"
>http://www.emperorlinux.com/auk.html</A>)
-- Ben</font></blockquote>
<blockquote><font color="#000066">Or they'll preload a dual boot, or can customize. (So this tip is good
for more than that one model.)
-- Heather</font></blockquote>
<blockquote><font color="#1F1F1F">As far as I'm concerned, IBM-made hardware today should be a sure bet
for Linux anyway: they've really thrown themselves behind Linux in a big
way, and I'd be surprised to hear of a laptop they make that can't run
it. Come to think of it, given the range of hardware that Linux supports
these days, making a 'top that can't run Linux would be quite a trick in
the first place.
-- Ben</font></blockquote>
<BLOCKQUOTE>
[jra]
Now, that's <EM>not</EM> to say that you can <EM>easily</EM> dual-boot XP. There may
be reinstallation issues, and licensing; I don't know that Partition-*
or FIPS can safely resize whatever you have loaded without breaking it,
and you may not have "install" media for XP -- only "recover" media,
which will <EM>not</EM> let you install on a resized partition.
</BLOCKQUOTE>
<blockquote><font color="#1F1F1F">Missing install media for WinXP isn't relevant to its ability to coexist
with Linux, but personally, if my vendor "forgot" to include the Other OS
that I had paid for - I'd demand my real discs, or that they discount the
box the price of their OS. Given the number of people competing for your
business in this venue, I have precious little tolerance for that kind of
ripoff.
-- Ben</font></blockquote>
<BLOCKQUOTE>
[jra]
I would google for "linux win xp dual boot howto", and see what I got.
-- jra
</BLOCKQUOTE>
<BLOCKQUOTE>
[Kapil]
Apparently, the trick is to: (1) Install Linux and resize the NTFS
partition (2) Boot the recovery CD for XP (3) Interrupt (count 5
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle">)
the reinstallation process and run "OS.bat". It seems XP will then
"just install" on the resized partition.
</BLOCKQUOTE>
<BLOCKQUOTE>
This worked with the laptops bought for our Institute. YMMV.
</BLOCKQUOTE>
<BLOCKQUOTE>
-- Kapil.
</BLOCKQUOTE>
<!-- end 2 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips.3"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">FTP Daemons (Servers) and Alternatives: Just Say No?</FONT></H3>
Tue, 3 Jun 2003 06:03:09 -0700
<BR>Jim Dennis (<a href="mailto:linux-questions-only@ssc.com?cc=Blt-newuser@basiclinux.net&cc=jimd@starshine.org&subject=%20Re%3A%20%5BLG%2092%5D%202c%20Tips%20%233">the <em>LG</em> Answer Guy</a>)
<BR>Question by Dinos Kouroushaklis on the BLT-newuser list (Blt-newuser from basiclinux.net)
<!-- ::
FTP Daemons (Servers) and Alternatives: Just Say No?
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
:: -->
<P><STRONG>
Dear list members,
</STRONG></P>
<P><STRONG>
I would like to hear your suggestions for an ftp server.
</STRONG></P>
<P><STRONG>
I would like to replace an existing win2k ftp server with a Linux based one.
What I am interested in is reliability and ease of management.
The machine should need only one (maybe more) ethernet card to provide the
ftp service (except during installation time). The two ethernet cards can
be use
one for management and one for the traffic.
</STRONG></P>
<P><STRONG>
The machine will be an Intel Celeron 400 Mhz with 160 (128+32) and
20 GB hard disk with a public (static) IP address in the DMZ.
</STRONG></P>
<P><STRONG>
Regards
</STRONG></P>
<P>
Just to be contrarian I have to suggest that you seriously consider
abandoning FTP entirely. HTTP is adequate for simple, lightweight
anonymous distribution of files (text or binary). scp, sftp (SSH) and
rsync over ssh are inherently more secure than plain FTP can ever be.
Your MS-Windows users can get Putty (and pscp, et al.) for free.
</P>
<P>
(Plain, standard FTP will, by dint of the standards, always pass user
name and password information "in the clear" across the Internet --- those
exposing these valuable, private tokens to "sniffers"). For some
purposes BitTorrent can be far more efficient (for widespread, peer
assisted distribution of files to many concurrent clients, for
example).
</P>
<P>
SSH, scp, and sftp:
</P>
<P><BLOCKQuote>
<A HREF="http://www.openssh.org"
>http://www.openssh.org</A>
</BLOCKQuote></P>
<P>
Putty:
</P>
<P><BLOCKQuote>
<A HREF="http://www.chiark.greenend.org.uk/~sgtatham/putty"
>http://www.chiark.greenend.org.uk/~sgtatham/putty</A>
</BLOCKQuote></P>
<P>
rsync:
</P>
<P><BLOCKQuote>
<A HREF="http://www.samba.org/rsync"
>http://www.samba.org/rsync</A>
</BLOCKQuote></P>
<P><DL><DT>
BitTorrent:
<DD><A HREF="http://bitconjurer.org/BitTorrent"
>http://bitconjurer.org/BitTorrent</A>
</DL></P>
<P>
If you can, just eliminate FTP and direct your users and customers to
better alternatives.
</P>
<P>
In general the problem with FTP servers is that they run as root
(at least during the authentication phase, if they support <EM>anything</EM>
other than anonymous FTP). So FTP daemons have classically been a
source of vulnerability (as bad as DNS -- BIND/named --- and MTA --
sendmail --- daemons).
</P>
<P>
With that in mind, vsftpd would probably be my first free choice.
(<A HREF="http://vsftpd.beasts.org"
>http://vsftpd.beasts.org</A> )
</P>
<P>
ProFTPd is popular, and has configuration file syntax that's a vaguely
similar to <A HREF="http://www.apache.org/">Apache</A>/HTML/SGML (I'll leave it for others to judge that
a feature or bug). However, ProFTPd is complex and has had too many
security alerts posted against it for my tastes.
(<A HREF="http://www.proftpd.org"
>http://www.proftpd.org</A> ).
</P>
<P>
WU-FTPD (for years the default that shipped with most Linux
distributions) has the worst security track record in the field. I
wouldn't recommend it, I don't care how many bugs they've patched.
There comes a time to abandon the codebase and start from scratch.
There also comes a time when "brand recognition" (the project's name)
shifts from notoriety to notorious infamy.
</P>
<P>
By contrast, Chris Evans coded vsftpd specifically to be as secure as
possible. He discussed the design and every pre-release of the code
extensively on the Linux security auditing mailing list (and in other
fora devoted to secure programming and coding topics).
</P>
<P>
If you're willing to go with a commercial/shareware package (that's not
free) I'd suggest that Mike Gleason's ncftpd has been around longer
than vsftpd and still has a very good track record.
(<A HREF="http://www.ncftpd.com"
>http://www.ncftpd.com</A> ). Registration is only $200 (U.S.) per server
for unlimited concurrent connections ($100 for up to 50 concurrent
users) and is free for use in educational domains.
</P>
<P>
If there are no objections I'd like to cross-post this to the Linux
Gazette for publication (names of querents will be sanitized) since
the question comes up periodically and I like to refresh this answer
and the URLs.
</P>
<P>
All of this assumes that you have no special needs of your FTP server.
If you need special features (directory trees restricted by user/group
info, pluggable authentication support, virtual domain support, etc)
then you'll have to review these products more carefully. However,
each of them offers at least some virtual domain/server functionality
and a mixture of other features.
</P>
<BLOCKQUOTE>
[Dan]
For a comprehensive annotated list, see:
<A HREF="http://linuxmafia.com/pub/linux/security/ftp-daemons"
>http://linuxmafia.com/pub/linux/security/ftp-daemons</A>
</BLOCKQUOTE>
<BLOCKQUOTE>
Everybody's got their favorite, and mine's PURE-ftpd, of which
Rick Moen of Linuxmafia says on the above page:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
Seems like a winner.
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE>
<A HREF="http://sourceforge.net/projects/pureftpd"
>http://sourceforge.net/projects/pureftpd</A>
</BLOCKQUOTE>
<!-- end 3 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips.4"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Pause after running xterm</FONT></H3>
Fri, 30 May 2003 20:39:56 -0400
<BR>Ben Okopnik (<a href="mailto:linux-questions-only@ssc.com?cc=ben@callahans.org&subject=%20Re%3A%20%5BLG%2092%5D%202c%20Tips%20%234">the <em>LG</em> Answer Gang</a>)
<blockquote><font color="#000066">Okay, so it's a nickel's worth. So there.
-- Heather</font></blockquote>
<P>
Here's a little problem you might run into: you want to run a certain
program - say, as a Mozilla "Helper application" - which needs to run in
an xterm. So, you set it up like so:
</P>
<blockquote><pre>xterm -e myprogram -my -options
</pre></blockquote>
<P>
The only problem is, when it comes time to run it, all you see is a
flash as the xterm appears, then immediately disappears. What happened?
What error did it print out? Why (this does happen at times) does it
work when you launch it 'manually' but not from Mozilla?...
</P>
<P>
Here's an easy and useful solution that will require you to hit a key in
order to exit the xterm after the program has finished running. Note
that it may fail on tricky command lines (subshell invocations, evals,
and other shell-specific gadgetry) but should work fine with normal
commands and their options.
</P>
<p align="center">See attached <tt><a href="misc/tips/okopnik.hold.bash.txt">okopnik.hold.bash.txt</a></tt></p>
<P>
Invoke it like so:
</P>
<blockquote><pre>xterm -e hold myprogram -my -options
</pre></blockquote>
<BLOCKQUOTE>
[jra]
Were you actually planning to <EM>answer</EM> those question, Prof?
</BLOCKQUOTE>
<BLOCKQUOTE>
Or are they left as an exercise for the students?
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle">
</BLOCKQUOTE>
<BLOCKQUOTE>
[Ben]
The answer is implicit in the solution provided, and will depend on the
specific program being launched. The implementation, as always, <EM>is</EM>
left to the student. Giddyap, dammit.
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</BLOCKQUOTE>
<BLOCKQUOTE>
[JimD]
</BLOCKQUOTE>
<blockquote><pre> xterm -e /bin/sh 'myprogram -my -options; read x'
</pre></blockquote>
<BLOCKQUOTE>
... in other words, have a shell execute your program, then read a
dummy value from the xterm (the xterm process' console/terminal/stdin)
</BLOCKQUOTE>
<BLOCKQUOTE>
The command will run, output will be displayed, you'll get a pause
where you can type anything you like (also allowing you to scroll
through the xterm's buffer). When you hit [Enter] the xterm goes away.
</BLOCKQUOTE>
<BLOCKQUOTE>
Seems pretty transparent to me. More verbose:
</BLOCKQUOTE>
<blockquote><pre> xterm -e /bin/sh 'myprogram -my -opts; echo "[Enter] when done: ";read x'
</pre></blockquote>
<BLOCKQUOTE>
More elegant, create a two line script:
</BLOCKQUOTE>
<p align="center">See attached <tt><a href="misc/tips/jimd.pauseadter.sh.txt">jimd.pauseadter.sh.txt</a></tt></p>
<BLOCKQUOTE>
(I'm not really sure we need the eval, but I don't think it'll hurt in
any case).
</BLOCKQUOTE>
<BLOCKQUOTE>
Now simply:
</BLOCKQUOTE>
<blockquote><pre> xterm -e pauseafter.sh myprogram -my -opts
</pre></blockquote>
<BLOCKQUOTE>
(<TT>/me</TT> shudders at the electrons that got excited by this blatantly
obvious suggestion).
</BLOCKQUOTE>
<!-- end 4 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips.5"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Tips on PDF conversion</FONT></H3>
Thu, 12 Jun 2003 12:12:55 +0100 (BST)
<BR>Mike Martin (<a href="mailto:linux-questions-only@ssc.com?cc=redtuxxx@yahoo.co.uk&subject=%20Re%3A%20%5BLG%2092%5D%202c%20Tips%20%235">the <em>LG</em> Answer Gang</a>)
<P><STRONG>
Has anyone any ideas on converting PDF's to decent text.
</STRONG></P>
<P><STRONG>
To explain
</STRONG></P>
<P><STRONG>
I have a document which has been scanned in, with the only accurate
conversion being to pdf (no images)
</STRONG></P>
<P><STRONG>
So I have used pdf2ps which gives me ps file.
</STRONG></P>
<P><STRONG>
However then when I use psto... anything text like, the output is
exactly ^L
</STRONG></P>
<P><STRONG>
Any ideas/tips?
</STRONG></P>
<BLOCKQUOTE>
[Thomas]
If you could convert the pdf to ps and then to LateX then you won't have a
problem since tex -&gt; ascii is not a problem. However, going from ps to
ascii might require some more thought.
</BLOCKQUOTE>
<BLOCKQUOTE>
I know that there is a utility called "a2ps" which takes ascii and
converts it to a ps file, however I cannot see a converse one program.
</BLOCKQUOTE>
<BLOCKQUOTE>
I am sure that there is a perl module (hey, Ben!) that could be used to
write a perl-script for such a task, however, I am going to suggest you
try the following......(I haven't tested this):
</BLOCKQUOTE>
<blockquote><pre>strings ./the_ps_file.ps | col -b &gt; ~/new_text_file.txt
</pre></blockquote>
<BLOCKQUOTE>
I am shunting this through "col" since you describe having lots of "^L"
characters. You might have to edit the file by hand as well, since I am
sure that a lot of useless information is being processed.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Ben]
See the "pstotext" utility for that.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Andreas]
There's a utility called pdftotext, it is in the xpdf Package, see the
xpdf-Homepage
<A HREF="http://www.foolabs.com/xpdf"
>http://www.foolabs.com/xpdf</A>
</BLOCKQUOTE>
<BLOCKQUOTE>
Hopefully an OCR has been performed on your scanned document before it
was converted to pdf, otherwise the pdf file would just contain an image
and could not directly be converted to text.
</BLOCKQUOTE>
<P><STRONG>
Unfortunately, and very annoyingly this is what seems to have
happened, seriously aggravating software - it lies.
</STRONG></P>
<P><STRONG>
Off to to see if I can work out how to convert the image to text (its
only tables)
</STRONG></P>
<BLOCKQUOTE>
[Ben]
Well, if it's a picture, "pstotext" won't help. Oh, and don't
bother with "strings" on a .ps file: it's <EM>all</EM> text.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Robos]
Hmm, I ran into some ocr discussion lately and found this: gocr and claraorc
(<A HREF="http://www.claraocr.org"
>http://www.claraocr.org</A>). The latter one seems to be more evolved...
</BLOCKQUOTE>
<!-- end 5 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips.6"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">quotas on directories?</FONT></H3>
Tue, 3 Jun 2003 19:55:26 +0200
<BR>Emmanuel Damons (<a href="mailto:linux-questions-only@ssc.com?cc=emmanuel.damons@enterpriseig.com&subject=%20Re%3A%20%5BLG%2092%5D%202c%20Tips%20%236">emmanuel.damons from enterpriseig.com</a>)
<br>Answered By Thomas Adma, Jim Dennis, Kapil Hari Paranjape
<P>
Hi
</P>
<P>
Can you help me I need to specify the size that a folder can grow.
almost like the quotas for folder and not users
</P>
<P>
Thanks
</P>
<BLOCKQUOTE>
[K.-H.]
spontaneous idea, especially if this is for one folder only:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
create a partiton of exactly right size and mount it at mountpoint "folder".
If creating a partition is not possible use a file and mount it a loop device.
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE>
[JimD]
In the same concept you could use regular files with the loop mount
option to create "partitions" of this sort.
</BLOCKQUOTE>
<BLOCKQUOTE>
Example:
</BLOCKQUOTE>
<blockquote><pre> dd if=/dev/zero of=/mnt/images/$FOLDERNAME bs=1024 count=$SIZE
mkfs -F /mntimages/$FOLDERNAME
mount -o loop /mntimages/$FOLDERNAME $TARGET
</pre></blockquote>
<BLOCKQUOTE>
Where:
</BLOCKQUOTE>
<blockquote><pre> FOLDERNAME is an arbitrary filename used as a "loopback image"
(the container that the loop block device driver will treat
as if it were a partition)
SIZE is the desired size in kilobytes
TARGET is the desired location of the "folder" (the mountpoint for
this filesystem).
</pre></blockquote>
<BLOCKQUOTE>
You can use any of the Linux supported filesystem types (ext2, ext3,
minix, XFS, JFS, ReiserFS) and you can tune various options (like
the amount of reserved space on such "folders" and which UID/GID
(user or group) that space is reserved for. You should be able to
use quotas, ACLs and EAs (extended attributes and access control lists)
(assuming you've patched your kernel for ACL/EA use and enabled it)
etc.
</BLOCKQUOTE>
<BLOCKQUOTE>
Obviously this approach as a couple of downsides. You need
intervention by root (or some sudo or SUID helpers) to create and
use these images.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Kapil]
Of course, you can use User-mode-linux to create and use these images.
</BLOCKQUOTE>
<BLOCKQUOTE>
[JimD]
Also Linux can only support a limited number of
concurrent loop mounts (8 by default). Newer kernels allow this as
a module parameter (max_loop=&lt;1-255&gt; ... so up to 255 such folders
maximum on the system). This limits the number that could be in
concurrent use (though an unlimited number of these "folders" could
be stored on the system, mounted and unmounted as needed).
</BLOCKQUOTE>
<BLOCKQUOTE>
There might be other disadvantages in performance and overhead (I'm not
sure).
</BLOCKQUOTE>
<BLOCKQUOTE>
[Kapil]
That would be a downside with UML if you use the file systems with UML.
</BLOCKQUOTE>
<BLOCKQUOTE>
[JimD]
On the plus side you could have any of these encrypted, if you're
running a kernel that's had the "International crypto" patch applied to
it; and you pass the appropriate additional options to the mount
command(s). We won't address the key management issues inherent in
this approach; suffice it to say that almost forces us to make mounting
these filesystems an interactive process.
</BLOCKQUOTE>
<BLOCKQUOTE>
If you wanted to have a large number of these, but didn't need them all
concurrently mounted you might be able to configure autofs or amd
(automounters) to dynamically mount them up and umount them as the
target directories were accessed --- possibly by people logging in and
out.
</BLOCKQUOTE>
<BLOCKQUOTE>
There are probably better ways, but this seems to be the most obvious
and easiest under Linux using existing tools.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Kapil]
One solution (rather complicated I admit) is to switch over to the Hurd
which allows such things and more complicated things as well.
</BLOCKQUOTE>
<BLOCKQUOTE>
Another is to use "lufs" or other "Usermode filesystems". These put
hooks in the kernel VFS that allow one to set up a "user mode" program
to provide the "view" of the part of VFS that lies below a particular
directory entry.
</BLOCKQUOTE>
<BLOCKQUOTE>
[JimD]
The very notion of limiting the size of a "directory tree" (folder)
is ambiguous and moot given the design of UNIX. Files don't exist
"under" directories in UNIX. Files are bound to inodes which are
on filesystems. Filenames are links to inodes. However every inode
can have many links (names). Thus there's an inherent abiguity of
what it means to take up space "in a folder" (or "under a directory").
You could traverse the directory tree adding up all files (and the
sizes of all directories) thereunder (du -s). This works fine for all
inodes with a link count of one, and for cases where all of the inodes
are within the scope of the tree (and assuming there are no mount
points thereunder). However, it's ambiguous in the general case and
begs the question: just what are you trying to accomplish.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Kapil]
Excellent explanation Jim.
</BLOCKQUOTE>
<!-- end 6 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips.7"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">What is Reverse DNS?</FONT></H3>
Mon, 2 Jun 2003 20:37:46 EDT
<BR> (<a href="mailto:linux-questions-only@ssc.com?cc=TEEML914@aol.com&cc=jimd@mars.starshine.org&subject=%20Re%3A%20%5BLG%2092%5D%202c%20Tips%20%237">jimd from mars.starshine.org</a>)
<BR>Question by TEEML914 (TEEML914 from aol.com)
<P><STRONG>
I'm doing an assigment. Can you tell me in laymans terms what reverse DNS is?
</STRONG></P>
<BLOCKQUOTE>
[Faber]
Yes, we can.
</BLOCKQUOTE>
<P><STRONG>
Thank you and have a great day
</STRONG></P>
<BLOCKQUOTE>
[Faber]
You're welcome and have a spiffy night yourself..
</BLOCKQUOTE>
<BLOCKQUOTE>
[JimD]
Faber, I think your cheerful sarcasm might be lost on him. After,
he's dense enought to take such a simple question (from his homework
assigment, no less) and go to all the trouble it of asking <EM>us</EM>
</BLOCKQUOTE>
<BLOCKQUOTE>
Yes, we can tell you. We can answer such questions. With dilligent
work (as in DOING YOUR OWN HOMEWORK) you'd be able to answer questions
like that, too.
</BLOCKQUOTE>
<BLOCKQUOTE>
For everyone else who hears this buzz phrase and wonders about it
(people who aren't trying to skate through classes so they can make
complete idiots of themselves when they enter a job market thoroughly
unprepared by the schooling they shirked):
</BLOCKQUOTE>
<TABLE WIDTH="95%" BORDER="1" BGCOLOR="#FFFFCC"><TR><TD>
<p align="center">...............</p>
<BLOCKQUOTE><BLOCKQuote>
"reverse DNS" is the process of asking the DNS (domain name system)
for the name associated with a given IP address (which, of course, is
numeric). Since DNS is primarily used to resolve (look up) an
address given a name; this numeric to symbolic lookup is the
converse operation. However, the term "converse" is somewhat obscure
so the more literate and erudite among us are stuck with the phrase:
"reverse DNS."
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE>
On a technical level, a reverse DNS query is a question for a PTR
record in the in-addr.arpa domain. For historical reasons the
in-addr (inverse address) subdomain of the "Advanced Research
Projects Administration" (the forebear of the Internet) is reserved
for this purpose. For technical reasons the four components of a
traditional "dotted quad decimal" representation of the address are
arranged in reverse order: least significant octet first. This
allows the most significant octets to be treated as "subdomains" of
the in-addr.arpa domain which allows delegation (a DNS mechanism for
administrative and routing/distribution purposes) to be down on
octet boundaries.
</BLOCKQUOTE>
<BLOCKQUOTE>
Of course any good book on DNS will provide all of the gory details,
or one could simply read the RFCs (request for comments documents)
which are the normal mechanism by which standards are proposed to the
IETF (Internet Engineering Task Force) which marshalls them through a
review and vetting process, publishes them and recommends their
adoption. (Since the Internet is still basically anarchial the
adoption of new standards is essentially a ratification process ---
each Internet site "votes with its feet" as it were).
</BLOCKQUOTE>
<BLOCKQUOTE><DL><DT>
In particular it looks like you'd want to read RFC3172:
<DD><A HREF="http://www.faqs.org/rfcs/rfc3172.html"
>http://www.faqs.org/rfcs/rfc3172.html</A>
</DL></BLOCKQUOTE><p align="center">...............</p>
</TD></TR></TABLE>
<BLOCKQUOTE>
Please have your instructor send my extra credit points c/o Linux
Gazette and be sure to have him give you a failing grade in your TCP/IP
or Internet/Networking Fundamentals class.
</BLOCKQUOTE>
<BLOCKQUOTE>
(In the unlikely event the assignment was to explore the use of sarcasm
by curmudgeons in the Linux community --- then bravo!)
</BLOCKQUOTE>
<!-- end 7 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips.8"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Subscribe to groups...........pan,Knode.......????</FONT></H3>
Wed, 25 Jun 2003 20:21:12 +0530
<BR>Vivek Ravindranath (<a href="mailto:linux-questions-only@ssc.com?cc=vivek_ravindranath@softhome.net&subject=%20Re%3A%20%5BLG%2092%5D%202c%20Tips%20%238">vivek_ravindranath from softhome.net</a>)
<br>Answered By Dan Wilder, Karl-Heinz Herrmann, Anita Lewis, Ben Okopnik, Jason Creighton, Heather Stern
<P><STRONG>
Hi Answer Gang,
</STRONG></P>
<P><STRONG>
Can please tell me how to subscribe to linux groups
</STRONG></P>
<BLOCKQUOTE>
[Dan]
You might start by pointing your browser (konqueror, mozilla,
lynx, w3m, netscape, and so on) at:
</BLOCKQUOTE>
<blockquote><pre>http://www.tldp.org
</pre></blockquote>
<BLOCKQUOTE>
and browse what's there. Then look at
</BLOCKQUOTE>
<blockquote><pre>http://www.linuxjournal.com
http://www.linuxgazette.com
http://www.lwn.com
http://www.linuxtoday.com
http://www.slashdot.com
</pre></blockquote>
<BLOCKQUOTE>
Then you might come back and explain in somewhat more specific
terms what you're trying to do. There are lots of Linux websites,
including documentation, news, online discussions; to get to any of
those, you just click on links.
</BLOCKQUOTE>
<BLOCKQUOTE>
For e-mail discussion groups you mostly have to subscribe. How you
do that depends on what group you're interested in. Once you're
subscribed, any email you send to some submission address is duplicated
and sent to all subscribers.
</BLOCKQUOTE>
<BLOCKQUOTE>
Many discussion groups have their archives open. For example, point
your browser at
</BLOCKQUOTE>
<blockquote><pre>http://www.ssc.com/mailing-lists
</pre></blockquote>
<BLOCKQUOTE>
for an overview of mailing lists hosted by SSC, publishers of Linux Journal.
</BLOCKQUOTE>
<BLOCKQUOTE>
From that page you can click on list information pages and get to list
</BLOCKQUOTE>
<BLOCKQUOTE>
archives by following the links. The list information pages also let
you apply for membership in the lists. Normally you'll get a confirming
email back, and your list membership goes into effect when the list
management software receives your reply.
</BLOCKQUOTE>
<P><STRONG>
such yahoo groups ,
</STRONG></P>
<BLOCKQUOTE>
[Jason]
Well, "Yahoo groups" are just email lists, so you can subscribe to them and
read them offline. Same deal for any mailing list.
</BLOCKQUOTE>
<P><STRONG>
google groups .......
</STRONG></P>
<BLOCKQUOTE>
[Jason]
Now for newsgroups (What you call "google groups". Google groups is actually a
web interface on top of usenet.) I use leafnode (Sorry, don't have the URL,
but a google for "leafnode usenet server" would probaby turn up the homepage.)
for this. It's an easy to configure (IMHO) usenet server that only downloads
messages in groups that you read.
</BLOCKQUOTE>
<P><STRONG>
and download all messages for offline viewing using pan or
knode or any other software (Please mention the name of the software and
URL).I wan't to view the messages offline.
</STRONG></P>
<P><STRONG>
First of all I dont know whether it is possible.Can you suggest any other
methods to do so? By groups I mean any linux group, please suggest any good
linux groups if possible...and please give the address that is to be entered
in the address field of the viewer and other details.I just want to get
regular information regarding linux........thanks in advance.
</STRONG></P>
<P><STRONG>
Vivek.
</STRONG></P>
<BLOCKQUOTE>
[K.-H.]
for the offline reading: I'm not quite sure what "linux group" you are
talking about. If you want to have a look at linux websites as suggested
wwoffle is very useful for caching of webpages so you can view them at
leasure offline. Any new link you click on will be remembered and fetched
next time online. If you talk about news groups (usenet) like:
comp.os.linux.* I am using [x]emacs newsreader "gnus" which has a offline
feature called "agent". You can read the info pages to this but if this is
your first contact with news and [x]emacs then I can not recommend this
wholeheartedly -- gnus itself is rather complex and therefor powerful (or is
it the other way round?). Agent is an additional layer of complexity which
takes time to get used to.
</BLOCKQUOTE>
<BLOCKQUOTE>
pan I don't know,
</BLOCKQUOTE>
<blockquote><font color="#000066">It's a newsreader, whose name might offend a family publication, but
which is nonetheless supposed to be very nifty.
-- Heather</font></blockquote>
<BLOCKQUOTE>
knode I can only guess is the kde version of a newsreader.
If they support offline features I've no idea. There are other newsreaders:
nn, tin, ... but as far as I know all miss the offline feature. netscape has
a newsreader with rather limited offline capabilities but for a first try
that might be sufficient.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Anita]
Do you mean that you would subscribe to a mailing list on yahoogroups and
then go there and download their archives? That is something I would like
to know how to do too, because we had a list there and changed to our own
server. I'd like to be able to get those old messages. Well, in truth, I
would have liked to have had them, but now I think they are too obsolete.
Still, I wouldn't mind having them, especially if I could get them into mbox
format.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Faber]
&lt;musing out loud&gt;Couldn't you use something like wget in a Perl script
to download the archives by links? Ben could probably write a one-liner
to do it. In his sleep.
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle">
&lt;/musing&gt;
</BLOCKQUOTE>
<BLOCKQUOTE>
[Ben]
Actually, it would take some tricky negotiation, Web page downloading
and parsing, etc. - it's a non-trivial task if you wanted to do it from
scratch. "Yosucker" from <A HREF="http://www.freshmeat.net/">Freshmeat</A> is a good example of how to download
their Web-only mail; it wouldn't be too hard to tweak for the above
purpose (it's written in Perl.)
</BLOCKQUOTE>
<BLOCKQUOTE>
[Jason]
You could probably just use wget, with some combination of -I and -r. The
thing is a HTTP/FTP shotgun.
</BLOCKQUOTE>
<BLOCKQUOTE>
[Ben]
Nope. Remember that you need to log in to Yahoo before you can read the
stuff; after that, you get to click on the message links (20 per page or
so) to read them. If it was that easy, they wouldn't be able to charge
you for the "improved" access (which includes POP access to your mail
and a bunch of other goodies.)
</BLOCKQUOTE>
<BLOCKQUOTE>
[Jason]
Actually, I was thinking of download from an online mailing list archive, not
logging into Yahoo.
</BLOCKQUOTE>
<blockquote><font color="#000066">Perhaps a little specific encoding with lynx' ability to pick up its
transmission data from stdin ... -get_data. It's <EM>your</EM> login, so
you'll need to guard your password in that packet from prying eyes.
Like Ben says, tricky, but certainly it can be done.
-- Heather</font></blockquote>
<!-- end 8 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips.9"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Confused about symantics of "mount -o,async/sync" commands</FONT></H3>
Thu, 12 Jun 2003 21:30:21 -0700
<BR>Bombardier System Consulting (<a href="mailto:linux-questions-only@ssc.com?cc=bombardiersysco@qwest.net&subject=%20Re%3A%20%5BLG%2092%5D%202c%20Tips%20%239">bombardiersysco from qwest.net</a>)
<br>Answered By Karl-Heinz Herrmann, Thomas Adam, Ben Okopnik, Jim Dennis, Jay R. Ashworth
<P><STRONG>
Hello,
</STRONG></P>
<P><STRONG>
I am taking a local Linux certification class and seem to have offended my
instructor by questioning the semantics of the "sync" and "async" options in
the mount command. They seem backward to me and I don't understand what I
am missing.
</STRONG></P>
<P><STRONG>
The following are the definitions that I found online and understand for the
words:
</STRONG></P>
<P><STRONG><BLOCKQuote>
Synchronous (pronounced SIHN-kro-nuhs, from Greek syn-, meaning "with," and
chronos, meaning "time") is an adjective describing objects or events that
are coordinated in time. (within the context of system activities I
associate synchronous with either being timing based or requiring an
acknowledgement)
</BLOCKQuote></STRONG></P>
<P><STRONG>
Asynchronous (pronounced ay-SIHN- kro-nuhs, from Greek asyn-, meaning "not
with," and chronos, meaning "time") is an adjective describing objects or
events that are not coordinated in time. (within the context of system
activities I associate asynchronous with being event/interrupt driven).
</STRONG></P>
<P><STRONG>
It has been my experience and is my understanding with disk caching that
data that is released to the system to be written to disk is kept for a
specific time or until the cache is full before being written to disk.
Hence synchronous. It is my experience and is my understanding that data
from an application which is released to the system and is directly written
through to disk is done so in an asynchronous or event driven manner.
</STRONG></P>
<BLOCKQUOTE>
[K.-H.]
synchronous -- applications intent to write data and actual write are at the
same time
</BLOCKQUOTE>
<BLOCKQUOTE>
asynchronous -- applications intent to write and actual write are not at the
same time as system decides when to write the cached data
</BLOCKQUOTE>
<BLOCKQUOTE>
[Thomas]
These options are really useful in <TT>/etc/export</TT> if you ever need to mount
directories over NFS, too. Although just don't specify them at the same
time as each other!
</BLOCKQUOTE>
<BLOCKQUOTE>
[Ben]
Yup. The latter is more efficient, since it allows the hevy lifting to
occur all at once (one way to look at it is that the "startup" and the
"wind-down" costs of multiple disk writes are eliminated - you "pay"
only once), but is a little less secure in the sense of data safety -
if your computer is, say, accidentally powered down while there's data
in the cache, that data evaporates, even though you "know" that you
saved it.
</BLOCKQUOTE>
<P><STRONG>
This is evidently opposite of the way that the terms are understood and used
in Linux. Please help me understand.
</STRONG></P>
<P><STRONG>
Thanks,
</STRONG></P>
<P><STRONG>
Jim Bombardier
</STRONG></P>
<BLOCKQUOTE>
Put simply, ... you're wrong.
</BLOCKQUOTE>
<BLOCKQUOTE>
"sync" in the Linux parlance (and in other disk buffering/caching contexts
with which I'm familiar) means that the writes to that filesystem are
"synchronized" out to the disk before the writing process is scheduled
for any more time slices. In other words, upon return from a <TT> write()</TT>
system call the write as occurred to the hardware device.
</BLOCKQUOTE>
<BLOCKQUOTE>
This usage is consistent with the traditional meaning of the 'sync'
utility (part of all versions of UNIX I've used and heard of). The
'sync' utility forces the kernel to "synchronize" its buffers/caches
out to the device.
</BLOCKQUOTE>
<BLOCKQUOTE>
"async" means that writes are happening asynchronously to the ongoing
events in the process. In other words mere return from the function
call doesn't indicate that the data is safely flushed to the device.
</BLOCKQUOTE>
<BLOCKQUOTE>
Note that use of sync is strongly discouraged by kernel luminaries
(Linus Torvalds in particular). I sometimes choose to over-ride their
better judgement myself --- but I do so only with considerable mulling
on the tradeoffs. In general you're better off with UPS
(uninterruptable power supply) and a journaling filesystem than you'll
ever be by trying to force synchronous writes for an entire filesystem.
</BLOCKQUOTE>
<BLOCKQUOTE>
Of course, with open source packages you can opt for aggressive explicit
synchonization of selected file descriptors using the <TT> fsync()</TT> function.
Note that this can lead to poor overall system performance in some
cases. For example MTAs (mail transport agents) and syslogd both make
extensive use of <TT> fsync()</TT>. If they share the same filesystem (<TT>/var/log</TT>
and <TT>/var/spool</TT> are on a single volume) it can make the entire system
feel sluggish under only moderate mail handling load (as each mail
delivery logs several messages and each of those processes runs
its on <TT> fsync()</TT> calls.
</BLOCKQUOTE>
<BLOCKQUOTE>
[jra]
You know, the way I've always interpreted this is that it describes the
coupling between the application program's logical view of the disk
contents and the actual physical, magnetic contents of the drive,
across time:
</BLOCKQUOTE>
<BLOCKQUOTE><BLOCKQuote>
those views are either mandated to stay in "sync" -- no buffering; if
the OS says it's written, it is <EM>on the platters</EM>, or they're "async"
-- the OS is permitted to "cheat" a little bit in between when it tells
the <EM>app</EM> "it's written" and when it actually happens.
</BLOCKQuote></BLOCKQUOTE>
<BLOCKQUOTE>
I guess it's really just another way of phrasing the same thing...
</BLOCKQUOTE>
<!-- end 9 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<P> <A NAME="tips.10"><HR WIDTH="75%" ALIGN="center"></A> <P>
<H3><IMG ALIGN=BOTTOM ALT="" SRC="../gx/lil2cent.gif">
<FONT COLOR="navy">Linux Journal Weekly News Notes - Tech Tips</FONT></H3>
Mon, 23 Jun 2003 01:29:49 -0700
<BR>Linux Journal News Notes (<a href="mailto:linux-questions-only@ssc.com?cc=lj-announce@ssc.com&subject=%20Re%3A%20%5BLG%2092%5D%202c%20Tips%20%2310">lj-announce from ssc.com</a>)
<h4 align="center"><br>Cut Them Off At The Pass
</h4>
<P>
If someone's script is going haywire and making too many connections
to your system, simply do:
</P>
<P><CODE>
route add -host [hostname]
</CODE></P>
<P>
...to keep the offending box from shutting yours down entirely.
</P>
<HR width="10%" align="center">
<h4 align="center"><br>Log A Lot Less
</h4>
<P>
You can turn off syslogd's MARK lines by invoking them with -m 0. You
can put this invocation in the init script that starts syslogd. This
is especially useful on laptops to keep them from spinning up the hard
drive unnecessarily.
</P>
<HR width="10%" align="center">
<h4 align="center"><br>Watch a Bit More
</h4>
<P>
Using the watch command, you automatically can run the same command
over and over and see what changes. With the -d option, watch
highlights the differences. Try it with watch -d ifconfig.
</P>
<HR width="10%" align="center">
<h4 align="center"><br>Rooting Around with LILO
</h4>
<P>
If you are working from a rescue disk with your normal root partition
mounted as <TT>/mnt/root</TT>, you can reinstall the LILO boot sector from your
<TT>/etc/lilo.conf</TT> file with lilo -r <TT>/mnt/root.</TT> This tells LILO(
<IMG SRC="../gx/dennis/smily.gif" ALT="8)"
height="24" width="20" align="middle"> to
chroot to the specified directory before taking action. This command
is handy for when you install a new kernel, forget to run LILO and
have to boot from a rescue disk.
</P>
<HR width="10%" align="center">
<h4 align="center"><br>Removing Files Starting With Dashes
</h4>
<P>
If you want to remove a file called -rf, simply type rm -- -rf. The --
tells rm that everything after -- is a filename, not an option.
</P>
<blockquote><font color="#000066">The LG staff note that ./ (dot slash) preceding the offending filename
is effective too, and works even on older versions of rm - or non linux
systems - that may not have this handy option.
-- Heather</font></blockquote>
<HR width="10%" align="center">
<h4 align="center"><br>Any Program Can Learn To Read
</h4>
<P>
If you have a program that reads only from a file and not from
standard input, no problem. The <TT>/proc</TT> filesystem contains a fake file
to pass such programs their standard input. Use <TT>/proc/self/fd/0.</TT>
</P>
<!-- end 10 -->
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
<h5>This page edited and maintained by the Editors of <I>Linux Gazette</I><br>HTML script maintained by <A HREF="mailto:star@starshine.org">Heather Stern</a> of Starshine Technical Services, <A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
<br>Copyright &copy; 2003
<br>Copying license <A HREF="http://www.linuxgazette.com/copying.html">http://www.linuxgazette.com/copying.html</A>
<BR>Published in Issue 92 of <i>Linux Gazette</i>, July 2003</H5>
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->
<HR>
<H3>Contents:</H3>
<dl>
<dt><a href="#tag/greeting"
><strong>&para;: Greetings From Heather Stern</strong></A></dl>
<DL>
<!-- index_text begins -->
<dt><A HREF="#tag.1"
><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>Important: Apache install problem</strong></a>
<dt><A HREF="#tag.2"
><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>couple of questions regarding printing on Linux, pls</strong></a>
<dt><A HREF="#tag.3"
><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>New hard drive</strong></a>
<dt><A HREF="#tag.4"
><img src="../gx/dennis/qbub.gif" height="28" width="50"
alt="(?)" border="0"
><strong>Redhat 7.2 upgrade to Redhat 9.1 without booting from a disk</strong></a>
<!-- index_text ends -->
</DL>
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<A NAME="tag/greeting"><HR WIDTH="75%" ALIGN="center"></A>
<H3 align="left"><img src="../gx/dennis/hbubble.gif"
height="50" width="60" alt="(&para;) " border="0"
>Greetings from Heather Stern</H3>
<!-- begin hgreeting -->
<p>
Hello everyone and welcome once more to the world of The Answer Gang.
This is a time of holiday in the United States as it celebrates its
Independence Day holiady -- nowadays mostly an excuse to go picnicking,
and enjoy a lot of professional fireworks.
</p><p>
Let me see, in 1996 it was theoretically possible to declare your
indendence from Microsoft - but really, desktop Linux still had a long
way to go. Had PGP even been invented yet? We had spreadsheets all
over the place, some work on a nice little TeX based word processor --
interoperability still needed a lot of work. On the flip side, Linux
was invisibly serving a lot of systems out there, as was
<a href="http://www.freebsd.org/">FreeBSD</a>, because sysadmins and
engineers stuck with a problem to solve and folks breathing down their
necks about it, could sneak in a small pentium and just apologize later,
knowing the bosses would be just plain unlikely to unplug it after it had
been running for a month, saving their bacon.
</p><p>
I'm sorry we're late with the current issue. Life's been a bit hectic
(is this any surprise?) and a few changes are going on under the hood.
Not only that but Murphy's Law seems to have it in for me...
</p><p>
I finally
had to upgrade that 386 I've been so proud of for years - I tried to
bribe it with a new power supply, and everything. Finally I brought it
out of the server closet on a link in my open lab. Some stray keyboard
call and boom, dead as a doornail. If the keyboard controller chip
goes, there's just nothing more your can do about the motherboard; take
its memory and cpu and math-coprocessor and sell them on eBay, and make
the empty motherboard a downrange missile target. Don't worry, I'm
still your well known curmudgeonette! It's now on a 486 overdrive chip
and sounding pretty good.
</p><p>
I had to move a client system during that window of sanity between "the
new drop has arrived" and "can we do this over a weekend so DNS can get
over it's confusion while we're not looking?" Guess when that put it -
you guessed it, deadline week. Luckily this doesn't happen too often.
Even more luckily their successful transition to new IP numbers is one
of the fastest I have ever seen. I need more clients like this one
<IMG SRC="../gx/dennis/smily.gif" ALT=":D"
height="24" width="20" align="middle">
</p><p>
I had mentioned that my Star Trek free software user group has been
doing internet lounges. At least that went well - we had a great time
at this last one, only toasted two monitors (sigh, this happens to old
spare monitors occasionally) and people are just in love with
<a href="http://www.knopper.net/knoppix/">Knoppix</a>. I can tell you,
it's not the icons, because nobody reads tooltips, or reads icon labels.
It's the not having to login, and if anything goes wrong - or they are
worried about privacy, or basically <em>ANYTHING</em> - they can just
reboot it. Whee! I do have plans to play with
<a href="../issue87/sunil.html">Sunil's customization tricks</a> and
probably nail down some of the real FAQ generators. But overall, I say
live CD based distros are really nice. Mind you, we did have to have a
couple of machines that could <em>play</em> CDs to make everyone happy.
I'd score it as a big win for Linux though.
</p><p>
The spam that has been leaking through is particularly silly. Some bot
must think we're a "Gang" in the Hell's Angels sense, because now we're
getting offers to sell us motorcycle gear. Lemme see, most of us
already <em>own</em> leather jackets, and the ElfOS guy can't get a
finer bike to ride. So sorry, guys. Then we have the hits on
homework, offering us educational discounts... for a special you can
get this week, if you answer two weeks ago. Hope that class project was
a TARDiS. <strong>D'oh!</strong>
</p><p>
I've tried a bit of an experiment this month; the longer Tips that you
are seeing are the shorter kind of answers that used to fill pages and
pages of The Answer Guy column. We have some of the small ones stacked
up, but these looked pretty useful. Of course, TAG is filled with the
banter you're all used to, but perhaps these are shorter threads than
you're used to seeing -- things were late enough already
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle"> Have a lot of
fun this summer!
</p>
<!-- end hgreeting -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<A NAME="tag.1"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 1 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif"
height="50" width="60" alt="(?) " border="0"
>Important: Apache install problem</H3>
<p><strong>From Keith Richard
</strong></p>
<p></strong></p>
<p align="right"><strong>Answered By Faber Fedor, Ben Okopnik, Heather Stern
</strong></p>
<P><STRONG>
Respected sir,
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Faber]
Actually, that would be "sirs" since we more than one and you'd have to
include a...uh...a "sir-ess" for Heather. Or is that "sir-ette"?
Someone wanna help me out here?
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
I think that's Yiddish for "trouble".
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Faber]
Or is that "sir-ette"?
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
That's a heavy-duty battery company. Striking out there, Faber...
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Faber]
Someone wanna help me out here?
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
"Ma'am".
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
We're an entire Answer Gang; "Respected Answerfolk" would satisfy
Ms.Emily Post.
</blockQuote>
<blockQuote>
Your subject needs work, telling people your stuff is "important" around
here implies that the other 200 querents aren't. Or something like
that.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
I'm sure the querent has read
&lt;<A HREF="../tag/ask-the-gang.html#bad_subject&gt"
>http://www.linuxgazette.com/tag/ask-the-gang.html#bad_subject&gt</A>;
</blockQuote>
<blockQuote>
and would never simply waste electrons on gratuitous self-promotion like
that - so it should definitely be taken seriously!
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Now taking on the style of the original Answer Guy, if I'm gonna turn on
the flamethrower I'm not gonna turn it back off until I've toasted you
some marshmallows to go with that scorch mark. Asbestos clothing is
available on sale at the gift shop on your way out
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</blockQuote>
<HR width="10%" align="left"><P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
I was trying to install apache*.rpm in my
system.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
Gentle Querent,
</blockQuote>
<blockQuote>
Could you be more specific? There are several not terribly compatible
RPM based distros. In fact that could well be your problem, putting a
redhat RPM on a <A HREF="http://www.suse.com/">SuSE</A> box, a SuSE RPM on a Mandrake box, a conversion
from (package type here) to rpm via alien ... uh, there's just too many
variables.
</blockQuote>
<blockQuote>
So it really does matter, exactly <EM>which</EM> RPM you are trying to install,
and which distro you are trying to install it onto.
</blockQuote>
<blockQuote>
Maybe looking into its control tidbits by running mc (midnight
commander) and looking into the RPM would reveal what distro it was
built for.
</blockQuote>
<blockQuote>
Frankly most of the sysadmins I know who feel <A HREF="http://www.apache.org/">Apache</A> is very <EM>important</EM>
to their setup reach for upstream sources and build their own, so they
know for sure it's up to date and which options it has been built with.
They feel it's <EM>important</EM> to know exactly what version of software they
are depending on, that it's happy with the rest of the libraries which
already exist on exactly this server.
</blockQuote>
<blockQuote>
In fact some folk I know keep the general opinion that as soon as a
package manager gives you trouble, it's time to Use The Source, Luke.
Reach out with your feelings, know the build system around you. All
things are connected... errr, linked, after you run <TT>./Configure</TT>, make,
(if you're paranoid) make test, make install.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
But there is a message like "error
dependencies:
</STRONG></P>
<pre><strong> libmm.so.11 is needed to install apache*
</strong></pre>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Faber]
You need to install the file libmm.so. Where do you get the
file libmm.so? I don't know, it's not on my system.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
libmm is a rather basic and popular library. Probably you'll end up
updating many basic parts before long, Perhaps you have an RPM for the
right distro, but a later revision of it.
</blockQuote>
<blockQuote>
I've tried upgrading a system via RPMs parts at a time like that.
There's a reason my fellow techies call it "dependency hell".
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Faber]
So let's go to google. Type in "libmm.so" and the very first link says:
</blockQuote>
<blockquote><pre>RPM resource libmm.so.1. Provided by. mm-1.1.3-9.i386, A shared memory
library.
</pre></blockquote>
<blockQuote>
See that "Provided by"? That tells you what program provides libmm. In
this case, it's the package mm (they should all be that obvious!).
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
What commands I will need to complete my job?
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Faber]
Where do you get this package? Well, you didn't tell me which
distribution or version of Linux you're running. I would suggest either
looking on your CDs or clicking on the link from google.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
</blockQuote>
<blockquote><code><font color="#000033"><br>(a correct RPM for your exact distro revision)
<br>(any supporting RPMs it also needs)
<br>rpm -Uvh (rpmname) (rpmname2) (rpmname3)
</font></code></blockquote>
<blockQuote>
Don't type those parentheses, mind you, just the actual filenames...
</blockQuote>
<blockQuote>
--or--
</blockQuote>
<blockquote><code><font color="#000033"><br>ftp to get the sources
<br>follow the build instructions inside the Apache tarball
</font></code></blockquote>
<blockQuote>
Don't be too surprised if you might need to make sure you have some
specific libraries present to complete your build; and the matching .h
files, often found in (some library name)-devel RPMs.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Looking for your early reply.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather]
A willingness to poke around apache.org and read up about installation
might be handy too.
</blockQuote>
<blockQuote>
You are most welcome to read past issues of the Linux Gazette online to
get familiar with general installation tricks.
</blockQuote>
<blockQuote>
Winning the TAG lotto is not guaranteed, nor is timeliness of answer,
usefulness of answer, or keeping the flamethrower lit while you're out.
We're all volunteers here. But, if that's not ok, we could point you
toward some consulting resources. Ask nicely, and some of the gang
who do consulting might give you their own rates.
</blockQuote>
<!-- end 1 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<A NAME="tag.2"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 2 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif"
height="50" width="60" alt="(?) " border="0"
>couple of questions regarding printing on Linux, pls</H3>
<p><strong>From Sony Lloyd
</strong></p>
<p></strong></p>
<p align="right"><strong>Answered By Ben Okopnik, Heather Stern, Kapil Hari Paranjape
</strong></p>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Sorry to distrurb
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Do not disturb sleeping dragons, for you are crunchy and good with
ketchup.
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle"> This is The Answer Gang - we <em> _like</em> being "disturbed"
(several of us here could be described as having that attribute
<EM>permanently</EM> set...) - at least if you pose an interesting question.
So, fear not but approach our saurine majesties, small human creature.
</blockQuote>
<blockQuote>
(Anybody seen that BBQ sauce bottle?)
</blockQuote>
<blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] No, but I think I saw a pizza heading into the hoard room.
</blockquote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
I would have couple of questions regarding printing on Linux, pls:
(1) I see "lpd" loading at my system boot up, but my kernel
is not compiled with support for "lp" (confirmed by absence of "lp"
from outputs of "cat <TT>/proc/devices</TT>").
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
"<TT>/proc/devices</TT>" does not necessarily reflect whether you have parallel
port support available or not; in fact, mine does not contain an "lp"
entry after startup, and yet I can happily print via my parallel port.
The thing that makes the difference (and loads the modules as necessary)
is the "kmod" option in the kernel: my "lp" module will be automatically
loaded whenever I need it. Until then, "<TT>/proc/devices</TT>" will not have it
listed.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
How come lpd loads without
linux being set for printing + with lp ports not detected by linux?
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
"lpd" is a piece of software that "catches" and outputs print jobs;
that's all it does. If it is linked in your "<TT>/etc/rc*d</TT>" directories, it
will load on startup. It does not care whether you've set up a parallel
port or not; it just does what it's been told to do, which is start. If
you have not configured the system corectly, and try to <em> _use</em> "lpd", it
will log an error message - just as it should.
</blockQuote>
<blockQuote>
One of the major differences between Wind0ws and Unix is that, rather
than large monolithic programs that do many things at once (the Wind0ws
way), Unix uses "small sharp tools" - programs that do one thing well
and can be easily connected to other programs. In this philosophy, a
printing daemon does not (and should not) check for the presence or
absence of ports on startup - that's not its job. What if, for example,
I decide not to load the "lp" module until I want to print? Should "lpd"
fail to load?
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
(2)I have an old linux 2.0.30 with no xwindow.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
The 2.0 kernels are perfectly capable of supporting XFree86. In fact,
that's a bit of a misnomer: X only has a tangential relationship
with the kernel - there's nothing in the kernel (as far as I know,
anyway) that is required specifically for running it.
</blockQuote>
<blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] Yes, there is; the feature is called "sockets". But, if you disable it
there are a lot of things that won't work.
</blockquote>
<blockquote>Depending on how much your monitor hates you, you might need
framebuffers, and that's a newer kernel feature.
</blockquote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Kapil]
Actually, inter-process-communication was required for X to first be
ported to Linux. In other words Linux pre-ipcs (in the old version 0.12
days possibly upto version 0.98?) could not run X.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
True, but then you may as well say that if you had no kernel, you
couldn't run X either... 2.0.x is way after that. In practice, if you
have a $GENERIC_KERNEL, X will work just fine.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Simply want to set it to pint to a canon bjc80 printer via parrallel port.
I did recompiled the kernel for "lp" support, but do not know what to do
next.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Well, the thing to do <em> _first</em> would have been reading the Printing-HOWTO
(and perhaps the Printing-Usage-HOWTO) at &lt;<A HREF="http://www.tldp.org/&gt"
>http://www.tldp.org/&gt</A>;. It's
always a good idea to look for a HOWTO when you are experimenting with a
new and unfamiliar Linux subsystem.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
For now, the lp ports is not detected yetby my linux system.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
You don't really know that, actually. One way you can tell - it's a
little subtle, actually - is by using the "file" utility and its "-s"
(special file) option. The messages will vary a bit depending on whether
the printing daemon is loaded or not.
</blockQuote>
<blockquote><pre># Starting with printing daemon loaded
ben@Fenrir:~$ file -s /dev/lp0
/dev/lp0: can't read `/dev/lp0' (Device or resource busy).
ben@Fenrir:~$ file -s /dev/lp1
/dev/lp1: can't read `/dev/lp1' (No such device or address).
</pre></blockquote>
<blockQuote>
See the difference? Here it is with the daemon stopped:
</blockQuote>
<blockquote><pre>ben@Fenrir:~$ su -c '/etc/init.d/cupsys stop'
Password:
Stopping CUPSys: cupsd.
ben@Fenrir:~$ file -s /dev/lp0
/dev/lp0: file: read failed (Input/output error).
ben@Fenrir:~$ file -s /dev/lp1
/dev/lp1: can't read `/dev/lp1' (No such device or address).
</pre></blockquote>
<blockQuote>
Different message, but still understandable.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
So how to manually (step by step, with no x window utility -- simply from
command line)
configure my printer.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Read the above HOWTOs; they'll walk you through the process. Feel free
to let us know if you run into any problems you can't solve.
</blockQuote>
<!-- end 2 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<A NAME="tag.3"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 3 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif"
height="50" width="60" alt="(?) " border="0"
>New hard drive</H3>
<p><strong>From Rodrigues, Joseph
</strong></p>
<p></strong></p>
<p align="right"><strong>Answered By Thomas Adam, Ben Okopnik, John Karns, Anita Lewis
</strong></p>
<P><STRONG>
Hello answer gang,
</STRONG></P>
<P><STRONG>
I have recently installed an additional IDE hard drive on my system. I
previously had 1 IDE HD and one CDRW each on its on controller. After adding
the new HD, I changed the old HD and CDRW to one controller, HD master, CDRW
slave, and put the new HD on the other controller.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
Right...
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
The Bios sees the new drive, Linux sees the new drive as <TT>/dev/hdc</TT>, but
looking at the output of the dmesg command I see that it can not find a
driver for it, thus I can't use Fdisk (that's what led me to look at dmesg
in the first place) to partition it and create the file systems that I want.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [John]
Hmm, this seems odd. It would seem that if the BIOS sees it, then the
Linux kernel should too.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
OK -- I think I see what you're saying, yet your terminology is completely
out
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle"> Linux does not use the concept of "drivers" -- there are no drivers
to run hardware from. The "<TT>/dev/</TT>" directory lists all the devices you'll
need, and it is the kernel that interfaces with them.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
My question to Joseph would be, what exactly are you seeing in the
output of "dmesg" that is causing you to draw this conclusion? The
conclusion is incorrect, but the message is still important.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
To answer your question first.
This is what I get from the kernel
</STRONG></P>
<pre><strong>hdc: bad special flag:0x03
hdc: driver not present
</strong></pre>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
Also, Fdisk is used to detect information about your drive -- NOT to set
formatting (as per the DOS equivilent). There is also a program called
"cfdisk" which is quite good, but still very much experimental and not
something that I would recommend you use. So, we'll stick to the CLI
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
I know how to partition, create the file system, unfortunately I don't know
how to install the driver.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
The fact that you knew how to partition your drive is irrelivent in this
case, as I did not know that (my powers of Telepathy aren't all that great
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle"> ). Furthermore, I always like to try and expand on answers so that it
makes for good General Readership (tm), rather than answering you
specifically.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Anita]
<TT>/dev/hdc</TT> is likely the right device, since you said you have it on the 2nd
IDE and I assume as master.
</blockQuote>
<blockQuote>
First step is to partition it. Does 'fdisk <TT>/dev/hdc</TT>' do anything? Does the
drive get found? Hopefully it does and you can then use that program to
partition the drive making at least 1 partition. You don't have to
partition it all at this time if you only want to use part of it, but
remember that if you want more than 4 partitions, you will have to make one
of them extended. With fdisk, just do 'm' like it says in order to see the
commands.
</blockQuote>
<blockQuote>
After you have a partition, you can run mkfs on it --
</blockQuote>
<P>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
To create a filesystem (ext2), issue the following command.... (as root):
</P>
<pre>mke2fs -c /dev/hdc1
</pre>
<P>
(I have used the "-c" switch here to scan the drive for badblocks -- since
this is a new drive, this is a good idea).
</P>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
I looked in the <TT>/dev</TT> directory and I do see a <TT>/hdc</TT> device, so I really don't
know how to proceed. I checked some of the howtos, but they all assume that
the driver is installed and you can access the drive.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
Yes, <TT>/dev/hdc</TT> is listed, and yes, the kernel does detect it.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [John]
<TT>/dev</TT> has pre-existing entries for all commonly used devices. The
distro (<A HREF="http://www.suse.com/">SuSE</A> 7.1) on this laptop has hda through hdl. That doesn't
indicate that I have 12 ide devices connected.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Erm... well, we don't actually know what the kernel detects. He may have a bad drive, some
totally weirdo IDE controller that Linux won't recognize (hey, anything
is possible), ...
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [John]
A couple of weeks ago I had a
similar experience with a new Western Digital drive. It seems that for
want of a few more pennies, they are now making hd's which are not
equipped with a full IDE controller. The one I was dealing with required
that it be connected with the jumper on the drive set to "cs" or cable
select. When set to master (why on earth they would bother to put a
"master" jumper position on a drive that didn't support it is beyond me)
I could do nothing with the drive. (Although I seem to remember that the
BIOS coudn't see it either, which seems to differ from what the querent is
seeing.) It was recognized fine when set to cable select, but that was
it. I thought the drive had died on me and brought it back for an
exchange.
</blockQuote>
<blockQuote>
Perhaps it was defective, I don't know. But I resisted the retailer's
argument that I just continue using it with the limitation of using it as
"cs", and insisted on exchanging it for different device. It was also a
different brand - Maxtor. The WD had a very "cheap" feel to it, much
lighter than any hd I can ever remember handling, which also made me
somewhat suspicious.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
...or a piece of buttered toast plugged into the slot.
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [John]
I believe this may be the case here.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Oh - so it <EM>is</EM> a piece of buttered toast? Right on! I didn't think my
ESP was working that well, but if you insist...
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
With a bit of ginger marmalade, yum.
</blockQuote>
<blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] Alrighty then
<IMG SRC="../gx/dennis/smily.gif" ALT=":D"
height="24" width="20" align="middle"> Can we get a photo for "Really Weird Things
That Can Manage To Run Linux If You Really Try" ? If not, I will
have to see if we can get a picture of that for
a future HelpDex! Buttered toast as a drive must really cook.
</blockquote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle"> Indeed, but sometimes, Ben unless we are told otherwise certain
"stock" assumptions have to be made
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
The reason
why you cannot access it is because it has not been formatted yet in a
manner that the kernel can understand.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
This, however, is highly probable.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [John]
He should be able to run fdisk on an unformatted disk. My guess is that
the kernel makes an inquiry to the drive controller, and the platter
contents should completely irrelevant. One possible exception would be a
drive having some surface damage in a critical area such as sector zero -
which might cause a problem for the controller ... or the controller being
defective.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
I meant "access" as in "read/write files, etc."; I'm pretty certain
Thomas did as well.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
Yes, I did, Ben. The querent already stated it was seen in "dmesg" output. I
was more concerned with ensuring that the drive could read/write files, etc.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
"fdisk" does indeed deal specifically with the IDE
control mechanism rather than the platter contents (other than track 0);
it shouldn't care about the contents at all, although some broken DOS
versions (I'm thinking specifically of OnTrack, lo these many years ago)
could be made to hang with a maliciously crafted MBR - there was a
mutated version of the "Jerusalem" virus that was plain murder on
Compaqs. I met several "techies" who mistakenly threw away perfectly
good HDs because of it.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
SeaGate drives were also notorious for falling on their backs with their
legs twitching after about a year or so.....
</blockQuote>
<blockQuote>
(back to the querent)
What exactly do you have planned for this new drive, once it has been
formatted? I <EM>strongly</EM> suggest (no -- I am TELLING you)
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle"> to read the
following...:
</blockQuote>
<blockQuote><BLOCKQuote>
<A HREF="../issue83/okopnik.html"
>http://linuxgazette.com/issue83/okopnik.html</A>
</BLOCKQuote></blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
<IMG SRC="../gx/dennis/smily.gif" ALT="&lt;grin&gt;"
height="24" width="20" align="middle"> Thanks, Thomas. My own advertising service, how cool!
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
Now -- that said, and you have your drive formatted, you'll now want an
entry for it in <TT>/etc/fstab</TT> so that it can be mounted, so....
</blockQuote>
<blockquote><pre>mkdir /some_new_mount_point
</pre></blockquote>
<blockQuote>
(change the above as necessary -- that'll ensure a mount point for the new
drive. Some people like to have their devices mounted under "<TT>/mnt</TT>" - it is
up to you).
</blockQuote>
<blockQuote>
now -- you up until now you haven't said exactly which filesystem you'll
be using. I stuck with ext2 as it is the de-facto for kernels &lt; 2.4.xx. If
you're running a kernel version &gt;=2.4.17 and it has ext3 support compiled
in (it ought to) -- then you can use ext3. To do that though, you'll need
to run....
</blockQuote>
<blockquote><pre>tune2fs -j /dev/hdc1
</pre></blockquote>
<blockQuote>
to create the journal. If you know you're not using ext3 then skip that.
</blockQuote>
<blockQuote>
So...now edit <TT>/etc/fstab</TT>, and add an entry similar to this....
</blockQuote>
<blockQuote>
<TT>/dev/hdc</TT> <TT>/mp</TT> ext2 defaults 1 1
</blockQuote>
<blockQuote>
You'll have to change the above as necessary (and make sure that you
change ext2 -&gt; ext3 or vise-versa). Then when that is done, save the file.
</blockQuote>
<blockQuote>
now issue the command....
</blockQuote>
<blockquote><pre>mount -a
</pre></blockquote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
Since "defaults" in the above includes the "auto" option, this partition
will be mounted automatically the next time you boot. However, the last
two numbers which you show as "1 1" take a little more than just a
blind copy-and-paste. From the "fstab" man page:
</blockQuote>
<blockQuote><BLOCKQuote>
The fifth field, (fs_freq), is used for these filesystems by the
dump(
<IMG SRC="../gx/dennis/smily.gif" ALT="8)"
height="24" width="20" align="middle"> command to determine which filesystems need to be dumped.
If the fifth field is not present, a value of zero is returned
and dump will assume that the filesystem does not need to be
dumped.
</BLOCKQuote></blockQuote>
<blockQuote>
The sixth field, (fs_passno), is used by the fsck(
<IMG SRC="../gx/dennis/smily.gif" ALT="8)"
height="24" width="20" align="middle"> program
to determine the order in which filesystem checks are done at
reboot time. The root filesystem should be specified with a
fs_passno of 1, and other filesystems should have a fs_passno of
2. Filesystems within a drive will be checked sequentially,
but filesystems on different drives will be checked at the same
time to utilize parallelism available in the hardware. If the
sixth field is not present or zero, a value of zero is returned
and fsck will assume that the filesystem does not need to be
checked.
</blockQuote>
<blockQuote>
So, "fs_passno" will depend on exactly what this partition is. Not a
huge thing, but it should be done right.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
and that'll mount your new drive. If you "cd" to the mount-point, you'll
find a "Lost+Found" directory there, which is used during "fsck"'s for any
lost inode data that can be found.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
System information:
</STRONG></P>
<blockquote><code><font color="#000033"><br>Suse 8.1
<br>HDs both are WD just different models
</font></code></blockquote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Any help would be appreciated.
</STRONG></P>
<HR width="10%" align="left"><P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Here is what I did.
I booted from the CDR and went into rescue mode. From there I had no
problem accessing hdc and using fdisk to partition the disk as I wanted.
</STRONG></P>
<P><STRONG>
I installed linux on it, and copied my current home partition
from <TT>/dev/hda</TT> to <TT>/dev/hdc.</TT> (yes I could have copied all the file
systems, but I am not proficient enough to work out all the details,
this way it took me less time to do it, and less aggravation. I may
still want to do this as an exercise later).
</STRONG></P>
<P><STRONG>
I went back to booting from <TT>/dev/hda</TT> and was still having the same
problem with hdc when booting from hda. I just got a response from
someone which I think may have hit the nail on the head, and I quote:
"Just a thought: do you have a line such as "hdc=ide-scsi" somewhere in
your LILO (or GRUB or whatever) configuration? Trying to treat the hard
drive as an ATAPI device might cause the problem you're seeing."
sent by John-Paul Stewart.
</STRONG></P>
<P><STRONG>
As a matter of fact I do. As soon as I get home today, I will check the
parameters from by boot setup from hdc against hda and correct the hda
parameters.
</STRONG></P>
<P><STRONG>
I am hopeful that this may be the cause of the problem.
</STRONG></P>
<P><STRONG>
Thanks for all your help.
</STRONG></P>
<P><STRONG>
Joe.
</STRONG></P>
<!-- end 3 -->
<!-- .~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~.~~. -->
<A NAME="tag.4"><HR WIDTH="75%" ALIGN="center"></A>
<!-- begin 4 -->
<H3 align="left"><img src="../gx/dennis/qbubble.gif"
height="50" width="60" alt="(?) " border="0"
>Redhat 7.2 upgrade to Redhat 9.1 without booting from a disk</H3>
<p><strong>From Nick Pringle
</strong></p>
<p></strong></p>
<p align="right"><strong>Answered By Thomas Adam, Faber Fedor, Dan Wilder, Heather Stern, Ben Okopnik
</strong></p>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Hi
</STRONG></P>
<P><STRONG>
I rent a Redhat 7.2 system installed on a host machine 'in a galaxy far,
far away'. I want to upgrade to Redhat 9.1 but cannot follow the
prescribe route because I cannot boot from floppy or cd the way Redhat
say to do the upgrade. I can, however, always boot from an emergency ram
disk and then mount the real system to work on it. When booted via this
emergency RAM disk I have full net access and have ftp access to all the
Redhat CDs etc. Is there any way of running the upgrade procedure
'manually'?
</STRONG></P>
<P><STRONG>
Regards
Nick Pringle
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
How do you mean by installing it "manually"? The RH installer allows you
the choice of doing either http/ftp/cdrom install, depending on what you
choose.
</blockQuote>
<blockQuote>
Are you trying to say then, that you want to only upgrade certain packages
on your system (N.B. This is not a good idea, since as this is a higher
version than the version currently on your system, trying to upgrade
certain packages leads to "dependency hell"). Cf:
</blockQuote>
<blockQuote><BLOCKQuote>
<A HREF="../issue71/tag/3.html"
>http://www.linuxgazette.com/issue71/tag/3.html</A>
</BLOCKQuote></blockQuote>
<blockQuote>
Could you try and provide more details.
Thanks.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Faber]
That's the problem he has, Thomas. The box is "far far away" and he
can't just "put in the CD, boot the machine, and choose http/ftp/cdrom"
after selecting his language mouse and keyboard. He isn't at the
machine.
</blockQuote>
<blockQuote>
So he ants to know if he can manually start the installation process,
i.e. not reboot the machine.
</blockQuote>
<blockQuote>
It's a good question and I haven't found a solution yet.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Dan]
Maybe he shoulda used <A HREF="http://www.debian.org/">Debian</A>.
</blockQuote>
<blockQuote>
I routinely upgrade Debian systems one major release level via
an ssh login. So far not "far far away", but without touching the
box being upgraded, yes. At one point I upgraded a running web
server this way, with only a fifteen minute interruption to
its services.
</blockQuote>
<blockQuote>
Which proves such a thing can be done. Now whether other
distributions allow for it ...
</blockQuote>
<blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] I am a lot more careful about letting debian do its automagical thing if
I know I can't get over to that machine and whack it one. There have
been a few times in my life, when playing with Debian's idea of the
leading edge, I took too careless a leap and added that "b" noise to
the word. Ouchie.
</blockquote>
<blockquote>Essentially, I use a curses-mode selector such as aptitude. I update,
and I pick some very basic stuff to make sure the raw parts are
<EM>definitely</EM> grabbed first. This generally means dpkg, debconf and its
related parts - libc and things having to do with login, such as the
shell, pam, and so on. All in all I've usually done 4 or 5 small sets
of critical utilities (not always members of "base" - sometimes in
admin, or related to the actual purpose of the system). Before anything
whose improper behavior would give me the willies, I use dpkg-repack to
save an instance of its current bits before I allow it to upgrade. Yeah,
I bail out of the selector a lot. But when I finally am happy with how
perl settled in, I won't need to worry about the rest of it.
</blockquote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Ben]
1) Install the system on a local machine; configure and tweak.
</blockQuote>
<blockQuote>
2) Copy everything across (FTP or whatever) to a new partition on the
remote machine.
</blockQuote>
<blockQuote>
3) Carefully adjust the remote "lilo.conf" to boot the new
"installation" on the next reboot.
</blockQuote>
<blockQuote>
Anybody see a problem with this scenario? Sure, some stuff is going to
require tweaking afterwards - but that's true of any new install.
</blockQuote>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Dan]
Sure sounds a lot like the safest upgrade procedure for what's still,
for quirky reasons, my favorite distribution ... <A HREF="http://www.slackware.org/">Slackware</A>.
</blockQuote>
<blockQuote>
It'd be nice if the ever-so-much featureful RH could do better.
</blockQuote>
<HR width="10%" align="left"><P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Hi. Thanks for the prompt reply.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
All part of the service, sir!
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
I recently upgraded the machine in my office from Redhat Linux 7.2 to
Redhat 9.1. No trouble. I just booted from the CD, click the options in
graphics mode and did the upgrade.
<IMG SRC="../gx/dennis/smily.gif" ALT=":-)"
height="24" width="20" align="middle"> So I've been through the process
on a PC I can touch.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
Yep, installers are becoming easier and easier. I am sure people like Jim
Dennis and Ben Okopnik (resident on this list) will remember the days of
black and white, and having to use the "friendly" program fdisk
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
But I am trying out a hosting package provided by a company called
Oneandone. It's a very attractive solution because they have fast
access, I won't have to use a machine and UPS of my own and they are
cheap! It's $50 a month. It's on www.oneandone.co.uk as a Root Server 1.
I live in Britain,
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
Well, well, well. I live in England too
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle"> Small world, eh? I have heard
of oneandone, but never really looked any further, until now
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
I think the machine might be in Germany but I'm not
actually sure. I don't know what sort or hardware they run but I am
simply unable to detect if it is virtual in any way. Even the hardware
reporting at boot time says it is a real machine. I imagine they have
racks of tiny machines with only processor, memory, Realtek netcard and
a hard disk.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
A reasonable assumption.
</blockQuote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
I get Redhat Linux 7.2 installed but very limited support! When I point
out to them that Redhat 7.2 becomes obsolete in November they agree it
will but cannot upgrade my Server package. To use the service I really
need to know I can upgrade at some time.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Hmm, I am going to be picky here and say that NO Linux distibution becomes
obsolete. Yes, some of the programs will be at a lower version number than
some more recent ones, but as long as it <EM>works</EM> and does what you want it
to do -- there is no reason to upgrade at all. That is perhaps the selling
point of Linux for me over Microsoft --- you don't, nor are you forced to
upgrade. If it works, keep it. Heck, I know some people who are still
running kernel 1.x.x
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle">
</blockQuote>
<blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] I'll have to agree; I've safely let systems lay with only the important
service ever being updated, behind a nice little firewall whose kernel is
updated more often.
</blockquote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
I am truly remote. I ONLY have SSH access. I cannot boot from anything
other than the hard disk of the remote machine. When I upgraded my local
machine in the office I booted with the Redhat CD1 on my local CD drive.
As far as I can see Redhat upgrade requires you to <EM>BOOT</EM> from either a
floppy or CD. If I could boot from the CD I know I could choose
ftp/cd/or local hard disk but I cannot do the very first step.
</STRONG></P>
<blockQuote>
<IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Thomas]
I see your problem
<IMG SRC="../gx/dennis/smily.gif" ALT=":)"
height="24" width="20" align="middle"> If you have SSH support, then what I would be
inclined to do is <EM>try</EM> and run a program called "up2date", like so:
</blockQuote>
<blockquote><pre>up2date -u
</pre></blockquote>
<blockQuote>
essentially this locates a RH server and updates old packages that you
have on your current remote system with newer ones. It does not though
perform a dist-upgrade. I suppose that you could look at "up2date" as a
very childlike form of Debian's "apt-get".
</blockQuote>
<blockQuote>
So, this is a half-way solution to your problem.
</blockQuote>
<blockQuote>
Another, perhaps more direct approach is to use the utility "wget"
download the ".iso" files, and mount them on a loopback, such that you can
then issue:
</blockQuote>
<blockquote><pre>rpm -ivh *.rpm
</pre></blockquote>
<P><STRONG>
<IMG SRC="../gx/dennis/qbub.gif" ALT="(?)"
HEIGHT="28" WIDTH="50" BORDER="0"
>
Sorry to drag it on a bit but I hope the above clarifies the situation.
</STRONG></P>
<P><STRONG>
If you haven't lost the will to live by now thank you very much for
listening.
</STRONG></P>
<P><STRONG>
Incidentally I agree that partial upgrades and going through each of the
RPMs one at a time will result in "dependency hell" which is why I need
a 3rd route.
</STRONG></P>
<blockquote><IMG SRC="../gx/dennis/bbub.gif" ALT="(!)"
HEIGHT="28" WIDTH="50" BORDER="0"
> [Heather] There you have it folks; if anyone has had their own successes in such
distant climes, maybe you'd like to write us an article someday soon?
</blockquote>
<!-- end 4 -->
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
<h5>
<br>Copyright &copy; 2003
<br>Copying license <A HREF="">http://www.linuxgazette.com/copying.html</A>
<BR>Published in Issue 92 of <i>Linux Gazette</i>, July 2003</H5>
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->
<SMALL><CENTER><H6 ALIGN="center">HTML script maintained by
<A HREF="mailto:star@starshine.org">Heather Stern</a> of
Starshine Technical Services,
<A HREF="http://www.starshine.org/">http://www.starshine.org/</A>
</H6></SMALL></CENTER>
<HR>
<table border="1"><tbody><tr><td width="200">
<a href="http://www.linuxgazette.com/">
<img alt="LINUX GAZETTE" src="../gx/2002/lglogo_200x41.png" width="200" height="41" border="0"></a>
<br clear="all">
<small>...<i>making Linux just a little more fun!</i></small>
</td><td width="380">
<center>
<BIG><BIG><STRONG><FONT
COLOR="maroon">News Bytes</FONT></STRONG></BIG></BIG><BR>
<STRONG>By <A HREF="http://www.linuxgazette.com/authors/conry.html">Michael Conry</A></STRONG></BIG>
</TD></TR>
</TABLE>
<P>
<!-- END header -->
</p><center>
<table cellpadding="7"><tbody><tr><td>
<img src="../gx/bytes.gif" border="1" alt="News Bytes">
</td><td>
<h3>Contents:</h3>
<ul>
<li><a href="#leg">Legislation and More Legislation</a>
</li><li><a href="#links">Linux Links</a>
</li><li><a href="#conferences">Conferences and Events</a>
</li><li><a href="#general">News in General</a>
</li><li><a href="#distro">Distro News</a>
</li><li><a href="#commercial">Software and Product News</a>
</li></ul>
</td></tr></tbody></table>
<strong>Selected and formatted by <a href="mailto:michael.conry@softhome.net">Michael Conry</a></strong>
</center>
<p> Submitters, send your News Bytes items in
<font size="+2"><strong>PLAIN TEXT</strong></font>
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
<a href="mailto:gazette@ssc.com">gazette@ssc.com</a>
</p><hr> <p>
<!-- =================================================================== -->
</p><h3><img alt=" " src="../gx/bolt.gif">
<font color="green">
July 2003 <i>Linux Journal</i>
</font>
</h3>
<img alt="[issue 111 cover image]" src="misc/bytes/lj-cover111.png" width="200" height="268" align="left" hspace="20">
The July issue of <a href="http://www.linuxjournal.com/"><i>Linux
Journal</i></a> is on newsstands now.
This issue focuses on Hardware. Click
<a href="http://www.linuxjournal.com/modules.php?op=modload&amp;name=NS-lj-issues/issue111&amp;file=index">here</a>
to view the table of contents, or
<a href="http://www.linuxjournal.com/subscribe/">here</a>
to subscribe.
<p>
<font color="green">All articles older than three months are available for
public reading at
<a href="http://www.linuxjournal.com/magazine.php">http://www.linuxjournal.com/magazine.php</a></font>.
Recent articles are available on-line for subscribers only at
<a href="http://interactive.linuxjournal.com/">http://interactive.linuxjournal.com/</a>.
<BR CLEAR="all">
<!-- =================================================================== -->
<a name="leg"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Legislation and More Legislation</font></H3></center>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Patents
</FONT>
</H3>
<P>
It looks like the flawed system of software patenting that has become
entrenched in the United States is on its way to Europe, amidst clarion
calls of "<em>harmonise!</em>" and "<em>encourage innovation!</em>". Not
everybody is so keen. Richard Stallman and Nick Hill have written a brief
but thorough
<a href="http://www.guardian.co.uk/Print/0,3858,4683640,00.html">
critique of the plans</a>, published in <em>The Guardian</em>. Ultimately,
each side claims that the introduction of software patents will have
opposite effects. Will they encourage innovation or stifle it? Will
software development thrive in a more certain environment, or become bogged
down in a morass of litigation? Ultimately you have to look at the
evidence and make your own mind up. It is this columnist's opinion, however,
that if you look at people like Richard Stallman, and then look at the
people supporting increased patents and asks "who seems to support genuine
innovation?" you will get some way towards the answer.
<P>
Arlene McCarthy, a British MEP who has played an important role in the
development of software patenting plans, certainly knows where she stands.
She also knows what those of us who advocate free software
<a href="http://www.guardian.co.uk/Print/0,3858,4688611,00.html">
should do</a>...
<blockquote>
It is time some of the "computer rights campaigners" got real... We
have an obligation to legislate not just for one section of the
software industry who seeks to impose its business model on the rest of
industry, which moreover is not "free", but is actually a different
form of monopoly by imposing a copyright licence system on users.
</blockquote>
To be honest, this smacks of the "TINA" doctrine (There Is No Alternative)
promulgated by Margaret&nbsp;Thatcher&nbsp;&amp;&nbsp;Co. during the 1980's.
McCarthy does not even appear to appreciate the irony that the pro-patent
lobby seeks to impose a business model on the rest of industry: a business
model based on government-backed artificial monopolies.
The Register has
<a href="http://www.theregister.co.uk/content/4/31472.html">
criticised</a> those that rail against people like Arlene McCarthy as being
ineffective, and ultimately self indulgent. Although
the criticisms have some validity, they are ultimately cheap and
convenient rather than insightful, and are not necessarily
<a href="http://www.linux.ie/pipermail/ilug/2003-June/004161.html">
a true measure</a>
of the reality of opposition.
Perhaps a truer indication of the reality being faced in Europe, and maybe
especially in the UK, is the British Government's handling of the public
consultation with regard to ID cards. In an effort to maintain a result
which could be used to provide positive spin and reduce debate, thousands of
submissions made by members of the public via
<a href="http://www.stand.org.uk/">
the STAND.org.uk website</a>
have been amalgamated into a single vote. Clearly the UK Government is not
keen to have the terms of engagement defined by the public, no matter how
<a href="http://www.theregister.co.uk/content/4/31472.html">
flattering</a> we are. The interests that are defining the terms of
engagement are perhaps illustrated by proposals to include biometric data
<a href="http://www.theregister.co.uk/content/55/31380.html">
on European passports</a>.
<P>
Nonetheless, there is still work that can be done. Even though
The European Parliament's Committee for Legal Affairs and the Internal
Market (JURI)
<a href="http://swpat.ffii.org/news/03/juri0617/index.en.html">
has voted</a>
on a final list of proposed amendments to the planned software patent
directive, the proposals still have to pass the European Parliament.
Following attempts to rush the directive through the Parliament stage it
has been
<a href="http://swpat.ffii.org/news/03/plen0626/index.en.html">
rescheduled to its original date</a>, September 1st 2003. This allows some
time for concerned parties to lobby their MEPs, though with upcoming
holidays,
<a href="http://www.linux.ie/pipermail/ilug/2003-June/004161.html">
there is not as much time as one might think</a>.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">EULA
</FONT>
</H3>
<P>
<a href="http://www.infoworld.com/article/03/06/26/HNreverseengineering_1.html">
Infoworld reports</a>
that the US Supreme Court has refused to hear a reverse-engineering case,
thus allowing a lower court ruling to stand. The lower court ruling was
against a company that had imitated a product's look and feel (as opposed
to recreating similar code) in violation of the product's EULA. The case
is significant because it's outside the UCITA states (Virginia and
Maryland, which expressly make EULAs enforceable), where EULAs are of
questionable legal value. But now more valuable, apparently. The court
also apparently accepted the plaintiff's contention that the defendant
"must have" examined more than just the user interface, with no direct
evidence. This case goes back several years, with previous suits between
the companies.
<br>
(Analysis by Mike 'Iron' Orr)
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">SCO
</FONT>
</H3>
<P>
There is little point in going through the details of the SCO case once
again. Instead, you can peruse the
<A HREF="http://sco.iwethey.org/">sco.iwethey.org</A> collection of documents
relating to lawsuit.
If you want further reading,
Eric Raymond has released an updated version of his
<a href="http://www.opensource.org/sco-vs-ibm.html">
SCO vs. IBM position paper</a> which reflects some of the changes in the
case over the past weeks. Hopefully the doubt surrounding this whole
affair will be dispelled soon. As Richard Stallman
<a href="http://techupdate.zdnet.com/techupdate/stories/main/0,14179,2914132,00.html">
has commented</a>,
the media bears some blame for the depth of the FUD generated by this case.
<a name="links"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Linux Links</font></H3></center>
<FONT COLOR="green"><IMG ALT="Linux Focus"
SRC="http://www.linuxfocus.org/common/images/lflogo_sbutton.gif"
WIDTH="143" HEIGHT="45">
</FONT>
</H3>
The E-zine
<A HREF="http://www.linuxfocus.org/">LinuxFocus</A>:
has for July/August the following articles:
<ul>
<li>
<a href="http://linuxfocus.org/English/July2003/article305.shtml">
Going 3D with Blender: Very first steps
</a>
</li>
<li>
<a href="http://linuxfocus.org/English/July2003/article299.shtml">
A GNUstep "small apps" tour
</a>
</li>
<li>
<a href="http://linuxfocus.org/English/July2003/article301.shtml">
Product Review: Textmaker
</a>
</li>
<li>
<a href="http://linuxfocus.org/English/July2003/article294.shtml">
IDS - Intrusion Detection System, Part II
</a>
</li>
<li>
<a href="http://linuxfocus.org/English/July2003/article302.shtml">
Book Review: Mastering Red Hat Linux 9
</a>
</li>
<li>
<a href="http://linuxfocus.org/English/July2003/article303.shtml">
GUI Programming with GTK - part 2
</a>
</li>
<li>
<a href="http://linuxfocus.org/English/July2003/article300.shtml">
A 1 Bit Data Scope
</a>
</li>
<li>
<a href="http://linuxfocus.org/English/July2003/article297.shtml">
Building an autonomous light finder robot
</a>
</li>
</ul>
<P>
Some links of interest from the O'Reilly stable:
<ul>
<li>
<a href="http://www.onlamp.com/pub/a/onlamp/2003/05/29/netcat.html">
Introduction to Netcat</a>
"the Swiss Army Knife of networking".
</li>
<li>
<a href="http://www.onlamp.com/pub/a/onlamp/2003/06/17/dyson.html">
Eight Questions for George Dyson</a>,
Director's Visitor of the Institute for
Advanced Study and a historian.
</li>
<li>
<a href="http://linux.oreillynet.com/pub/a/linux/2003/04/06/mplayer.html">
Video Playback and Encoding with MPlayer and MEncode</a>.
</li>
<li>
<a href="http://linux.oreillynet.com/pub/a/linux/2003/06/02/snort.html">
Snort Security Holes and Strategies for Safe Network
Monitoring</a>.
</li>
<li>
Almost 2,000 ephemeral films (industrial, educational, and
advertising) from the early 1900s through the 1960s are available
for free on the Net,
<a href="http://www.oreillynet.com/pub/a/policy/2003/05/23/rickp.html">
thanks to film archivist Rick Prelinger</a>.
</li>
<li>
<a href="http://linux.oreillynet.com/pub/a/linux/2003/06/05/scripts.html">
Running Arbitrary Scripts Under CVS</a>.
</li>
<li>
<a href="http://www.oreillynet.com/pub/wlg/3198">
Python Success Stories</a>: eight true tales of flexibility, speed,
and improved productivity.
</li>
</ul>
<P>
<P>
Some interesting links from NewsForge:
<ul>
<li>
<a href="http://newsvac.newsforge.com/article.pl?sid=03/06/04/1722231">
Automatic Astronomy</a>, how computers help spot hard to see phenomena.
</li>
<li>
<a href="http://newsvac.newsforge.com/article.pl?sid=03/06/23/1341206">
SCO staff join Linux protests</a>.
</li>
<li>
<a href="http://newsvac.newsforge.com/article.pl?sid=03/06/09/1828241">
Using Slackware as a Live CD</a>.
</li>
<li>
<a href="http://newsvac.newsforge.com/article.pl?sid=03/06/09/1732237">
Inside the Linux kernel debugger</a>.
</li>
<li>
The Brazilian Public Sector to Choose Free Software
It has been reported that the Brazilian public sector
<a href="http://newsvac.newsforge.com/article.pl?sid=03/06/13/1746253">
plans to migrate from Windows to Linux</a>
on 80% of computers in state institutions and state-owned businesses.
</li>
</ul>
<P>
Some interesting links from
<a href="http://www.linuxtoday.com/">Linux Today</a>:
<ul>
<li>
US Department of Defense
<a href="http://www.egovos.org/pdf/OSSinDoD.pdf">
rates Open Source
</a>[pdf].
</li>
<li>
Wired reports that
<a href="http://www.wired.com/news/politics/0,1283,59334,00.html">
the developing world can benefit from GNU/Linux</a>.
</li>
<li>
Forbes magazine on
<a href="http://www.forbes.com/2003/06/16/cx_ld_0616linux.html">
the limitations of Linux</a>.
</li>
<li>
Welsh speaking computer users have
<a href="http://news.zdnet.co.uk/story/0,,t269-s2136525,00.html">
created their own Linux distribution</a>.
</li>
<li>
<a href="http://www.wired.com/news/technology/0,1282,59088,00.html/wn_ascii">
Building a DIY TiVo</a>
</li>
</ul>
<P>
<P>
SSC, publisher of Linux Journal, recently announced the launch of a
new on-line publication,
<a href="http://WorldWatch.LinuxGazette.com">
WorldWatch</a>.
It offers readers a
comprehensive daily digest of articles from publications around the
world about topics concerning Linux and open-source software.
<P>
<a href="http://lwn.net/Articles/34848/">
Modern SCO Executive</a>, apologies to Gilbert and Sullivan. Everybody
join in for the chorus.
<P>
<a href="http://slashdot.org/articles/03/06/13/1530210.shtml?tid=106&tid=185">
Slashdot discussion on the release of Linux 2.4.21</a>
<P>
Some Linux Journal links:
<ul>
<li>
Linux Journal has
<a href="http://www.linuxjournal.com/article.php?sid=6925">
reported on a Finnish study on FLOSS</a>
(free/libre and open-source software) in developing countries.
</li>
<li>
<a href="http://www.linuxjournal.com/article.php?sid=6909">
Working with OpenSSH</a>.
</li>
<li>
<a href="http://www.linuxjournal.com/article.php?sid=6922">
VGA for the Ultimate Linux Box</a>.
</li>
</ul>
<P>
Interesting Linux Weekly News look at
<a href="http://lwn.net/Articles/34007/">Open-Source content management
systems</a>. Many of the talkbacks have good information too.
<P>
Mike Crawford has written a fine
<a href="http://linuxquality.sunsite.dk/articles/">
selection of articles</a>
on the general topic of quality in Free Software.
Titles include
<em>
<a href="http://linuxquality.sunsite.dk/articles/whytestkernel/">
Why We Should All Test the New Linux Kernel</a>
</em>,
<em>
<a href="http://linuxquality.sunsite.dk/articles/testsuites/">
Using Test Suites to Validate the Linux Kernel</a>
</em>
and more.
<a name="conferences"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Upcoming conferences and events</font></H3></center>
<P> Listings courtesy <EM>Linux Journal</EM>. See <EM>LJ</EM>'s
<A HREF="http://www.linuxjournal.com/events.php">Events</A> page for the
latest goings-on.
<!-- *** BEGIN events table [this line needed by Linux Gazette events.py *** -->
<table cellpadding=5 border=0 width=100%>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>O'Reilly Open Source Convention</b><BR></TD>
<td valign=top>July 7-11, 2003<BR>Portland, OR<BR>
<a href="http://conferences.oreilly.com/" target="_blank">
http://conferences.oreilly.com/</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>12th USENIX Security Symposium</b><BR></TD>
<td valign=top>August 4-8, 2003<BR>Washington, DC<BR>
<a href="http://www.usenix.org/events/" target="_blank">
http://www.usenix.org/events/</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>HP World</b><BR></TD>
<td valign=top>August 11-15, 2003<BR>Atlanta, GA<BR>
<a href="http://www.hpworld.com/" target="_blank">
http://www.hpworld.com</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>Linux Clusters Institute Workshops</b><BR></TD>
<td valign=top>August 18-22, 2003<BR>Yorktown Heights, NY<BR>
<a href="http://www.linuxclustersinstitute.org/" target="_blank">
http://www.linuxclustersinstitute.org</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>LinuxWorld UK</b><BR></TD>
<td valign=top>September 3-4, 2003<BR>Birmingham, United Kingdom<BR>
<a href="http://www.linuxworld2003.co.uk" target="_blank">
http://www.linuxworld2003.co.uk</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>Linux Lunacy</b><BR><i>Brought to you by Linux Journal and
Geek Cruises!</i><br></TD>
<td valign=top>September 13-20, 2003<BR>Alaska's Inside Passage<BR>
<a href="http://www.geekcruises.com/home/ll3_home.html" target="_blank">
http://www.geekcruises.com/home/ll3_home.html</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>Software Development Conference & Expo</b><BR></TD>
<td valign=top>September 15-19, 2003<BR>Boston, MA<BR>
<a href="http://www.sdexpo.com" target="_blank">
http://www.sdexpo.com</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>PC Expo</b><BR></TD>
<td valign=top>September 16-18, 2003<BR>New York, NY<BR>
<a href="http://www.techxny.com/pcexpo_techxny.cfm" target="_blank">
http://www.techxny.com/pcexpo_techxny.cfm</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>COMDEX Canada</b><BR></TD>
<td valign=top>September 16-18, 2003<BR>Toronto, Ontario<BR>
<a href="http://www.comdex.com/canada/" target="_blank">
http://www.comdex.com/canada/</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>IDUG 2003 - Europe</b><BR></TD>
<td valign=top>October 7-10, 2003<BR>Nice, France<BR>
<a href="http://www.idug.org" target="_blank">
http://www.idug.org</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>Linux Clusters Institute Workshops</b><BR></TD>
<td valign=top>October 13-18, 2003<BR>Montpellier, France<BR>
<a href="http://www.linuxclustersinstitute.org/"
target="_blank">
http://www.linuxclustersinstitute.org</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>LISA (17th USENIX Systems Administration Conference)</b><BR></TD>
<td valign=top>October 26-30, 2003<BR>San Diego, CA<BR>
<a href="http://www.usenix.org/events/lisa03/" target="_blank">
http://www.usenix.org/events/lisa03/</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>HiverCon 2003</b><BR></TD>
<td valign=top>November 6-7, 2003<BR>Dublin, Ireland<BR>
<a href="http://www.hivercon.com/" target="_blank">
http://www.hivercon.com/</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>COMDEX Fall</b><BR></TD>
<td valign=top>November 17-21, 2003<BR>Las Vegas, NV<BR>
<a href="http://www.comdex.com/fall2003/" target="_blank">
http://www.comdex.com/fall2003/</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
<tr><td valign=top>
<b>Linux Clusters Institute Workshops</b><BR></TD>
<td valign=top>December 8-12, 2003<BR>Albuquerque, NM<BR>
<a href="http://www.linuxclustersinstitute.org/"
target="_blank">
http://www.linuxclustersinstitute.org</A><BR></TD></TR>
<tr><td colspan=2><HR size=5 width=100% noshade align=center></td></tr>
</table>
<!-- *** END events table [this line needed by Linux Gazette events.py *** -->
<a name="general"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">News in General</font></H3></center>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">SGI Announces first Altix Customers on Madison
</FONT>
</H3>
<P>
<a href="http://www.sgi.com/products">SGI</a>
has announced the first of its customers receiving the new Intel Itanium 2
'<a href="http://www.sgi.com/newsroom/press_releases/2003/may/madison.html">Madison</a>'
processor in recent sales of the SGI Altix 3000 system.
The Altix system combines SGI's fourth generation NUMAflex shared memory
architecture with Intel Itanium 2 processors and the 64-bit Linux operating
system for a uniquely balanced system. Each supercluster node runs a
single Linux operating system image with up to 64 Itanium 2 processors and
512GB of memory. With the new processor immediately available on Altix
systems. Among the first SGI customers to deploy Altix 3000 systems based
on the new processors are:
<ul>
<li>
SARA Computing and Networking Services: 416 Intel Itanium 2
processors (1.30 GHz, 3M) and 832GB of memory.
</li>
<li>
Oak Ridge National Laboratory: SGI Altix 3000 installation running
256 Intel Itanium 2 processors (1.50 GHz with 6MB L3 cache) with
2TB of system memory and 1.5 TFLOPS of computational power.
</li>
<li>
Pacific Northwest National Laboratory: SGI Altix 3000 system
powered by 128 Intel Itanium 2 processors (1.50 GHz, 6MB).
</li>
</ul>
<P>
SGI has been doing very well in terms of
<a href="http://www.sgi.com/newsroom/press_releases/2003/june/altix_benchmarks.html">
performance benchmarks</a>
with systems based on the new Itanium 2 processor.
The entry-level server starts at $70,176 (U.S. list) at four processors
with up to 32GB of memory and scales to 12 processors and 96GB of memory.
<P>
<a name="distro"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Distro News</font></H3></center>
<P>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Debian
</FONT>
</H3>
<a href="http://lists.debian.org/debian-bsd-0306/msg00002.html">
Robert Millan announced</a>
that he
has managed to get
<a href="http://people.debian.org/~rmh/gnu-freebsd/">
GNU/FreeBSD</a>
installed self-hosting. The kernel
runs init, which initialises swap and filesystems, and spawns 8 nice
gettys. He has built a new
<a href="http://people.debian.org/~rmh/gnu-freebsd/pub/">
base tarball</a>
(26.9 MB), with only the
minimal utilities plus APT. He has also
<a href="http://lists.debian.org/debian-bsd-0306/msg00004.html">
set up an APT repository</a>
for his GNU/FreeBSD packages, including the toolchain and XFree86.
(<a href="http://www.debian.org/News/weekly/2003/23/">
Courtesy Debian Weekly News</a>)
<P>
<hr width="20%" noshade>
<P>
<a href="http://articles.linmagau.org/modules.php?op=modload&name=Sections&file=index&req=viewarticle&artid=212&page=1">
Will Debian survive Linux's popularity?</a>
Discussed
<a href="http://slashdot.org/articles/03/06/30/0223205.shtml?tid=106&tid=185&tid=90">
on Slashdot</a>.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Knoppix
</FONT>
</H3>
<P> Quantian Scientific Computing Environment.
Dirk Eddelb&yyml;ttel
<a href="http://lists.debian.org/debian-devel-0305/msg02037.html">
announced</a>
<a href="http://dirk.eddelbuettel.com/quantian.html">
Quantian</a>, a remastered version of
<a href="http://www.knopper.net/knoppix/">
Knoppix</a>.
<a href="http://software.biostat.washington.edu/edd/quantian/">
Quantian</a>
differs from Knoppix by adding a set of programs of
interest to applied or theoretical workers in quantitative or
data-driven fields. It still retains all of Knoppix' impressive
features in terms of automatic configuration of virtually all
available hardware features. If there is sufficient interest, this
project may become a Debian subproject.
(<a href="http://www.debian.org/News/weekly/2003/22/">Courtesy Debian
Weekly News</a>)
<P>
<hr width="20%" noshade>
<P>
<a href="http://games.slashdot.org/games/03/06/19/1427228.shtml?tid=127&tid=186&tid2">
Slashdot report</a>
on the new bootable arcade emulator (MAME) with hardware detection from
Knoppix.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Libranet
</FONT>
</H3>
Extremetech has
<a href="http://www.extremetech.com/article2/0,3973,1114701,00.asp">
reviewed Libranet 2.8</a>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Red Hat
</FONT>
</H3>
The Register has reported that
<a href="http://www.theregister.co.uk/content/4/31259.html">
Red Hat has turned a profit once again</a>.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">SuSE
</FONT>
</H3>
<P>
<a href="http://www.suse.de/en/">
SuSE</a>
has announced the availability of
<a href="http://www.suse.de/en/e-desktop/">
SuSE Linux Desktop</a>, which it claims is the first Linux desktop for large IT
infrastructures.
<a name="commercial"></a>
<p><hr><p>
<!-- =================================================================== -->
<center><H3><font color="green">Software and Product News</font></H3></center>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Eset Unveils NOD32 Antivirus For Linux Mail Servers
</FONT>
</H3>
<P>
<a href="http://www.eset.com">
Eset Software</a>, a provider of
Internet software security solutions, announced today the debut of NOD32
Antivirus for Linux Mail Servers, extending NOD32 antivirus detection
software to the Linux email
server environment. The MTA
(Mail Transport Agent)-independent solution runs on most Linux
distributions including RedHat, Mandrake, SuSE, Debian, and others; it also
supports Sendmail, Qmail, Postfix, and Exim, among other email server software.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">VariCAD
</FONT>
</H3>
<P>
<a href="http://www.varicad.com">
VariCAD</a>
has announced the recent release of its mechanical CAD system -
VariCAD 9.0.1.0. The compact CAD package includes many tools for 3D
modeling and 2D drafting, libraries of mechanical parts, surface development
(unbending), calculations of standard mechanical components, tools for working
with bills of materials (BOM) and title blocks. It is a compact system
featuring all necessary tools that the mechanical engineering designers need to
make their work comfortable and effective. The system is distributed
"fully-loaded", with all features included. Free 30-day trial version is
available for download from
<a href="http://www.varicad.com">
http://www.varicad.com</a>
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Linux Distro Distribution in Ireland
</FONT>
</H3>
<P>
JMC SOFTWARE has announced that it has been appointed Irish
distributer for FreeBSD as well as the Linux distributions from Red Hat,
SuSE and Mandrake.
These are available throughout Ireland
at <a href="http://www.thelinuxmall.com">www.thelinuxmall.com</a>
or tel 01 6291282.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Big Medium
</FONT>
</H3>
<P>
<a href="http://www.globalmoxie.com/">
Big Medium</a>
is claimed to be an easy-to-use tool for Linux and other UNIX systems that
allows non-technical staff to edit and maintain websites while providing
<a href="http://www.globalmoxie.com/moxie/bigmedium/features.shtml">
a wide range of features</a>.
The software is a suite of Perl scripts designed for web servers running
the UNIX operating system, including Linux, Mac OSX, Solaris and FreeBSD.
Big Medium is licensed for $129, and a free
<a href="http://demo.globalmoxie.com/">
online demo</a> is available.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">Zend Performance Suite released/PHP scripting
</FONT>
</H3>
<P>
<a href="http://www.zend.com">
Zend Technologies</a>, the designers of the PHP scripting engine,
has announced the release of the Zend Performance Suite (ZPS) 3.5.
Zend Performance Suite enables both enterprises and service providers
to overcome scalability issues and to deliver high performance
Web sites, increasing server throughput by up to 30 times - without
upgrading their hardware.
<P>
<hr width="20%" noshade>
<P>
Zend has also announced that it will team with Sun Microsystems to initiate
specification for PHP and web scripting access to Java technology.
<P> <hr> <P>
<!-- =================================================================== -->
<H3><IMG ALT=" " SRC="../gx/bolt.gif">
<FONT COLOR="green">QuickUML 1.1
</FONT>
</H3>
<P>
<a href="http://www.excelsoftware.com">
Excel Software</a>
has begun shipping
QuickUML 1.1 for Windows and Linux. QuickUML is an object-oriented
design tool that provides tight integration and synchronization of a
core set of UML models.
QuickUML Linux 1.1 adds improved font handling, an enhanced Contents
view for class and object models, and a toolbar to access code
manager commands. QuickUML Linux has the same features as the Windows
edition and also uses QuickHelp to provide context sensitive
application help.
<P>
<hr width="20%" noshade>
<P>
Excel Software has also announced the
availability of QuickHelp for Linux. QuickHelp is a development tool
for creating and deploying application help to Mac OS 9, Mac OS X,
Windows 95 through XP and virtually all Linux distributions.
<!-- =================================================================== -->
<!-- =================================================================== -->
<!-- *** BEGIN bio *** -->
<!-- *** END bio *** -->
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
Copyright &copy; 2003, Michael Conry.
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 92 of <i>Linux Gazette</i>, June 2003
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->
<HR>
<TABLE BORDER><TR><TD WIDTH="200">
<A HREF="http://www.linuxgazette.com/">
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png"
WIDTH="200" HEIGHT="41" border="0"></A>
<BR CLEAR="all">
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
</TD><TD WIDTH="380">
<CENTER>
<BIG><BIG><STRONG><FONT COLOR="maroon">HelpDex</FONT></STRONG></BIG></BIG>
<BR>
<STRONG>By <A HREF="../authors/collinge.html">Shane Collinge</A></STRONG>
</CENTER>
</TD></TR>
</TABLE>
<P>
<!-- END header -->
<P>
<EM>These images are scaled down to minimize horizontal scrolling.
To see a panel in all its clarity, click on it.</EM>
<P>
<A HREF="misc/collinge/466relayofficer.jpg">
<IMG ALT="[cartoon]" SRC="misc/collinge/466relayofficer.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/collinge/474zombie.jpg">
<IMG ALT="[cartoon]" SRC="misc/collinge/474zombie.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/collinge/471aqua.jpg">
<IMG ALT="[cartoon]" SRC="misc/collinge/471aqua.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/collinge/476please.jpg">
<IMG ALT="[cartoon]" SRC="misc/collinge/476please.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/collinge/464blues.jpg">
<IMG ALT="[cartoon]" SRC="misc/collinge/464blues.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/collinge/462softdrink.jpg">
<IMG ALT="[cartoon]" SRC="misc/collinge/462softdrink.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/collinge/460evenmore.jpg">
<IMG ALT="[cartoon]" SRC="misc/collinge/460evenmore.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/collinge/458more.jpg">
<IMG ALT="[cartoon]" SRC="misc/collinge/458more.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/collinge/457insults.jpg">
<IMG ALT="[cartoon]" SRC="misc/collinge/457insults.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/collinge/454luke.jpg">
<IMG ALT="[cartoon]" SRC="misc/collinge/454luke.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/collinge/452dizzy.jpg">
<IMG ALT="[cartoon]" SRC="misc/collinge/452dizzy.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/collinge/450overclock.jpg">
<IMG ALT="[cartoon]" SRC="misc/collinge/450overclock.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<P>
<P> All HelpDex cartoons are at Shane's web site,
<A HREF="http://www.shanecollinge.com/">www.shanecollinge.com</A>.
<!-- *** BEGIN author bio *** -->
<P>&nbsp;
<P>
<!-- *** BEGIN bio *** -->
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
Part computer programmer, part cartoonist, part Mars Bar. At night, he runs
around in a pair of colorful tights fighting criminals. During the day... well,
he just runs around. He eats when he's hungry and sleeps when he's sleepy.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
Copyright &copy; 2003, Shane Collinge.
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 92 of <i>Linux Gazette</i>, July 2003
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->
<HR>
<TABLE BORDER><TR><TD WIDTH="200">
<A HREF="http://www.linuxgazette.com/">
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png"
WIDTH="200" HEIGHT="41" border="0"></A>
<BR CLEAR="all">
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
</TD><TD WIDTH="380">
<CENTER>
<BIG><BIG><STRONG><FONT COLOR="maroon">Ecol</FONT></STRONG></BIG></BIG>
<BR>
<STRONG>By <A HREF="../authors/malonda.html">Javier Malonda</A></STRONG>
</CENTER>
</TD></TR>
</TABLE>
<P>
<!-- END header -->
The Ecol comic strip is written for <A
HREF="http://escomposlinux.org">escomposlinux.org</A> (ECOL), the web site tha
t supports, es.comp.os.linux, the Spanish USENET newsgroup for Linux. The
strips are drawn in Spanish and then translated to English by the author.
<P>
<EM>These images are scaled down to minimize horizontal scrolling.
To see a panel in all its clarity, click on it.</EM>
<P>
<A HREF="misc/ecol/ecol-111-e.png">
<IMG ALT="[cartoon]" SRC="misc/ecol/ecol-111-e.png"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/ecol/ecol-112-e.png">
<IMG ALT="[cartoon]" SRC="misc/ecol/ecol-112-e.png"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/ecol/ecol-115-e.png">
<IMG ALT="[cartoon]" SRC="misc/ecol/ecol-115-e.png"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/ecol/ecol-116-e.png">
<IMG ALT="[cartoon]" SRC="misc/ecol/ecol-116-e.png"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<A HREF="misc/ecol/ecol-117-e.png">
<IMG ALT="[cartoon]" SRC="misc/ecol/ecol-117-e.png"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<P>
All Ecol cartoons are at
<A HREF="http://tira.escomposlinux.org/">tira.escomposlinux.org</A> (Spanish),
<A HREF="http://comic.escomposlinux.org/">comic.escomposlinux.org</A> (English)
and
<A HREF="http://tira.puntbarra.com/">http://tira.puntbarra.com/</A> (Catalan).
The Catalan version is translated by the people who run the site; only a few
episodes are currently available.
<P> <SMALL>These cartoons are copyright Javier Malonda. They may be copied,
link ed or distributed by any means. However, you may not distribute
modifications. If you link to a cartoon, please <A
HREF="mailto:jmr@escomposlinux.org">notify</A> Javier, who would appreciate
hearing from you.
</SMALL>
<!-- *** BEGIN author bio *** -->
<P>&nbsp;
<P>
<!-- *** BEGIN bio *** -->
<!-- P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
</em>
<br CLEAR="all" -->
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
Copyright &copy; 2003, Javier Malonda.
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 92 of <i>Linux Gazette</i>, July 2003
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->
<HR>
<TABLE BORDER><TR><TD WIDTH="200">
<A HREF="http://www.linuxgazette.com/">
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png"
WIDTH="200" HEIGHT="41" border="0"></A>
<BR CLEAR="all">
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
</TD><TD WIDTH="380">
<CENTER>
<BIG><BIG><STRONG><FONT COLOR="maroon">select() on Message Queue</FONT></STRONG></BIG></BIG>
<BR>
<STRONG>By <A HREF="../authors/hawk.html">Hyouck "Hawk" Kim</A></STRONG>
</CENTER>
</TD></TR>
</TABLE>
<P>
<!-- END header -->
<h2>Introduction</h2>
<p> When using message queue with socket or any other file descriptor based
unix facilities, the most inconvenient thing is message queue does not
support <tt>select()</tt> system call. So usually unix programmers solve
the I/O multiplexing issue in a simple but ugly way like</p>
<blockquote>
<p><tt>while(1)</tt></p>
<p> <tt>{</tt></p>
<p> <tt>&nbsp;&nbsp;&nbsp; select on socket with timeout;</tt></p>
<p> <tt>&nbsp; &nbsp; ...</tt></p>
<p> <tt>&nbsp; &nbsp; wait on a message queue with IPC_NOWAIT</tt></p>
<p> <tt>}</tt></p>
</blockquote>
<p> Certainly, the above implementation is ugly. I don't like it. Another
solution might be adopt multi-threading. But here in this article, I want
to show you a funny approach, that is, implementing a new system call called
<tt>msgqToFd()</tt>. I'm not trying to provide you with full-fledged,
bug-free kernel implementation. I just want to present you my experiment.
This article might be interesting to readers who like to play
with <b><tt>GNU/Linux</tt></b> kernel source.</p>
<br>
<h2><tt>msgqToFd()</tt> - A new non-standard system call</h2>
<p> Here is its signature.</p>
<blockquote>
<p><b><tt>int msgqToFd(int msgq_id)</tt></b></p>
<p> </p>
</blockquote>
<p> It returns a file descriptor corresponding to a message queue , which
can be used with <tt>select()</tt>.</p>
<p> If any error happens, it returns -1.</p>
<p> An application can use the call like</p>
<p> <b><tt>&nbsp; &nbsp; &nbsp; ...</tt></b></p>
<blockquote>
<p><b><tt> q_fd = msgqToFd(msgq_id);</tt></b></p>
<p> <tt>while(1)</tt></p>
<p> <tt>{</tt></p>
<p> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FD_ZERO(&amp;rset);</tt></p>
<p> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; FD_SET(0, &amp;rset);</tt></p>
<p> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>FD_SET(q_fd, &amp;rset);</b></tt></p>
<p> </p>
<p> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <b>select(q_fd + 1, &amp;rset,
NULL, NULL, NULL);</b></tt></p>
<p> </p>
<p> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(FD_ISSET(0, &amp;rset))</tt></p>
<p> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</tt></p>
<p> <tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp; &nbsp;&nbsp;&nbsp; <b>...</b></tt></p>
<p> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</tt></p>
<p> </p>
<p> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; if(<b>FD_ISSET(q_fd, &amp;rset)</b>)</tt></p>
<p> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {</tt></p>
<p> <tt>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp; <b>r = msgrcv(msgq_id,
&amp;msg, sizeof(msg.buffer), 0, 0);</b></tt></p>
<p> <tt>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<b>...</b></tt></p>
<p> <tt>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; }</tt></p>
<p> <tt>}</tt></p>
<br>
</blockquote>
<h2>How <tt>select()</tt> works</h2>
<p> A file descriptor is associated with a file structure. In the file
structure, there is a set of operations supported by this file type called
<tt>file_operations</tt>. In the <tt>file_operations</tt> structure, there
is an entry named <tt>poll</tt>. What the generic <tt>select()</tt> call does
is call this <tt>poll()</tt> function to get status of a file (or socket
or whatever) as the name suggests.</p>
<p> In general, the <tt>select()</tt> works like</p>
<blockquote>
<p><i><tt>while(1)</tt></i></p>
<p> <i><tt>{</tt></i></p>
<p> <i><tt>&nbsp;&nbsp;&nbsp;&nbsp; for each file descriptor in the
set</tt></i></p>
<p> <i><tt>&nbsp;&nbsp;&nbsp;&nbsp; {</tt></i></p>
<p> <i><tt>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; call file's poll()
to get mask.</tt></i></p>
<p> <i><tt>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if(mask &amp;
can_read or mask &amp; can_write or mask &amp; exception)</tt></i></p>
<p> <i><tt>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; {</tt></i></p>
<p> <i><tt>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
set bit for this fd that this file is readable/writable or there is an
<br>
&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;exception.</tt></i></p>
<p> <i><tt>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;
retval++;</tt></i></p>
<p> <i><tt>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }</tt></i></p>
<p> <i><tt>&nbsp;&nbsp;&nbsp;&nbsp; }</tt></i></p>
<p> <i><tt>&nbsp;&nbsp;&nbsp;&nbsp; if(retval != 0)</tt></i></p>
<p> <i><tt>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; break;</tt></i></p>
<p> <i><tt>&nbsp;&nbsp;&nbsp;&nbsp; schedule_timeout(__timeout);</tt></i></p>
<p> <i><tt>}</tt></i></p>
</blockquote>
<p> For detailed implementation of <tt>select()</tt>, please take a look
at <tt>sys_select()</tt> and <tt>do_select()</tt> in <tt>fs/select.c</tt>.
of standard kernel source code.</p>
<p> Another thing required to understand is <tt>poll_wait()</tt>. What it
does is put current process into a wait queue provided by each kernel facilities
such as file or pipe or socket or in our case, message queue.</p>
<p> Please note that the current process may wait on several wait queues
by calling <tt>select()</tt></p>
<br>
<h2><tt>long sys_msgqToFd(long msqid)</tt></h2>
<p> The system call should return a file descriptor corresponding to a message
queue. &nbsp;The file descriptor should point to a file structure which
contains <tt>file_operations </tt>for message queue.</p>
<p> To do that, <tt>sys_msgqToFd() </tt><tt>does</tt></p>
<ol>
<li>
<p>with msqid, locate the corresponding <b><tt>struct msg_queue</tt></b></p>
</li>
<li>
<p>allocate a new inode by calling <b><tt>get_msgq_inode()</tt></b></p>
</li>
<li>
<p>allocate a new file descriptor with <b><tt>get_unused_fd()</tt></b></p>
</li>
<li>
<p>allocate a new file structure with <b><tt>get_empty_filp()</tt></b></p>
</li>
<li>
<p>initialize inode, file structure</p>
</li>
<li>
<p>set file's <b><tt>file_operations</tt></b> with <tt><b>msgq_file_ops</b></tt></p>
</li>
<li>
<p>set file's <b><tt>private_data</tt></b> with <b><tt>msq-&gt;q_perm.key</tt></b></p>
</li>
<li>
<p>install fd and file structure with <b><tt>fd_install()</tt></b></p>
</li>
<li>
<p>return the new fd</p>
</li>
</ol>
<p> Please take a look at
<a href="misc/hawk/msg.c.txt"><tt>msg.c</tt></a>
and the accompanying
<a href="misc/hawk/msg.h.txt"><tt>msg.h</tt></a>
provided with this article. See also
<a href="misc/hawk/sys_i386.c.txt"><tt>sys_i386.c</tt></a>
<br>
</p>
<h2><tt>msgq_poll()</tt></h2>
<p> msgq_poll() implementation is pretty simple.</p>
<p> What it does is</p>
<ol>
<li>
<p>With <b><tt>file-&gt;private_data</tt></b>, which is a key for a message
queue, locate the corresponding message queue</p>
</li>
<li>
<p>put current process into the message queue's wait queue by calling
<b><tt>poll_wait()</tt></b></p>
</li>
<li>
<p>if the message queue is empty (<b><tt>msq-&gt;q_qnum == 0</tt></b>),
set mask as writable( this may cause some arguments but let's forget this
for now). If not, set mask as readable</p>
</li>
<li>
<p>return the mask</p>
</li>
</ol>
<br>
<h2>Modification of existing message queue source code</h2>
<p> To support <b><tt>poll()</tt></b> on a message queue, we need to modify
existing message queue source code.</p>
<p> The modification includes</p>
<ol>
<li>
<p>adding a wait queue head to <b><tt>struct msg_queue</tt></b>, which
will be used to put a process into for <b><tt>select()</tt></b>. Also the
wait queue head should be initialized when a message queue is created. Please
take a look at <b><tt>struct msg_queue</tt></b> and <b><tt>newque()</tt></b>
in <tt>msg.c</tt>.</p>
</li>
<li>
<p>Whenever a new message is inserted to a message queue, a process waiting
on the message queue( by calling <b><tt>select()</tt></b>) should be awaken.
Take a look at <b><tt>sys_msgsnd()</tt></b> in <tt>msg.c</tt>.</p>
</li>
<li>
<p>When a message queue is removed or it's properties are changed, all
the processes waiting on the message queue(by calling <b><tt>select()</tt></b>)
should be awaken. Take a look at <b><tt>sys_msgctl()</tt></b> and <tt><b>freeque()</b></tt>
in <tt>msg.c</tt>.</p>
</li>
<li>
<p>To allocate a new inode and file structure, we need to set up some
file system related&nbsp;</p>
</li>
<li>
<p>s for VFS to operate properly. For this purpose, we need additional
initialization code to register a new file system and set something up.
Take a look at <tt>msg_init()</tt> in <b><tt>msg.c</tt></b>.</p>
</li>
</ol>
<p> All the changes are "<b><tt>ifdef</tt></b>"ed with <b><tt>MSGQ_POLL_SUPPORT</tt></b>.
So it should be easy to identify the changes.</p>
<br>
<h2>File System Related Stuff</h2>
<p> To allocate a file structure, we need to set up the file's <b><tt>f_vfsmnt</tt></b>
and <tt><b>f_dentry</b></tt> properly. Otherwise you'll see some <tt><b>OOPS</b></tt>
messages printed our on your console. &nbsp;For VFS to work correctly with
this new file structure, we need some additional setup, which is already
explained briefly.</p>
<p> Since we support only <b><tt>poll()</tt></b> for the <b><tt>file_operations</tt></b>,&nbsp;
we don't have to care about every detail of the file system setup code.
All we need is a properly set up <tt><b>f_dentry</b></tt> and
<b><tt>f_vfsmnt</tt></b>. Most of the related code is copied from <tt>pipe.c</tt>.</p>
<br>
<h2>Adding a new system call</h2>
<p> To add a new system call, there two things need to be done.</p>
<p> The first step is add a new system call in kernel level, which we already
did (<tt><b>sys_msgqToFd()</b></tt>).<br>
In the <b><tt>GNU/Linux</tt></b> kernel, all <b><tt>system V IPC</tt></b>
related calls are dispatched through <b><tt>sys_ipc()</tt></b> in <tt>arch/i386/kernel/sys_i386.c</tt>.
<b><tt>sys_ipc()</tt></b> uses call number to identify a specific system
call requested. To dispatch the new system call properly, we have to define
a new call number(which is 25) for <b><tt>sys_msgqToFd()</tt></b> and modify
<b><tt>sys_ipc()</tt></b> to call <b><tt>sys_msgqToFd()</tt></b>. Just for
your reference, please take a look at &nbsp;<tt>arch/i386/kernel/entry.S
</tt> in the standard kernel source and <b><tt>sys_ipc()</tt></b>
in <a href="misc/hawk/sys_i386.c.txt"><tt>sys_i386.c</tt></a>
provided with this article.</p>
<p> The second step is add a stub function for user level application. Actually
all the system call stub functions are provided by GLIBC. And to add a new
system call, you have to modify the <b><tt>GLIBC</tt></b> and build your
own and install it. Oh hell, NO THANKS!!!. I don't want to do that and I
don't want you to do that either. To solve the problem, I did some copy and
paste from <b><tt>GLIBC</tt></b>. If you look at
<a href="misc/hawk/user/syscall_stuff.c.txt"><tt>user/syscall_stuff.c</tt></a>
provided with this article, there is a function named <b><tt>msgqToFd()</tt></b>,
which is the stub for <b><tt>msgqToFd()</tt></b> system call.</p>
<p> What it does is simply</p>
<blockquote>
<p><tt>return INLINE_SYSCALL(ipc, 5, 25, key, 0, 0, NULL);</tt></p>
<p> </p>
</blockquote>
Here is a brief description for the macro.
<blockquote>
<p><tt> ipc &nbsp;: &nbsp;system call number for sys_ipc(). ipc is expanded
as __NR_ipc, which is 117.<br>
5 &nbsp; &nbsp;: &nbsp;number of arguments for this macro.<br>
25 &nbsp; : &nbsp;call number for sys_msgqToFd()<br>
key &nbsp;: &nbsp;an argument to sys_msgqToFd()</tt></p>
<p> </p>
</blockquote>
<p><b><tt> INLINE_SYSCALL</tt></b> sets up the arguments property and invokes
interrupt 0x80 to switch to kernel mode to invoke a system call.</p>
<h2>Conclusion</h2>
<p> I'm not so sure about practical usability of this modification.
I just wanted to see whether this kind of modification was possible or not.<br>
</p>
<p> Besides that, I want to talk about a few issues needed to be addressed.</p>
<ol>
<li>
<p>&nbsp;If two or more threads or processes are accessing a message
queue and one process is waiting on the message queue with <tt>msgrcv()</tt>
and another is waiting with <tt>select()</tt>, then always the former process/thread
will receive the new message. Take a look at <b><tt>pipelined_send()</tt></b>
in <tt>msg.c</tt>.</p>
</li>
<li>
<p>For writability test, <b><tt>msgq_poll()</tt></b> sets the mask as
writable only if the message queue is empty. Actually we can set the mask
as writable if a message queue is not full and there will be no big difference.
But I chose the implementation for simplicity.</p>
</li>
<li>
<p>Let's think about this scenario.</p>
<ol>
<li> A queue is created</li>
<li> A file descriptor for the queue is created</li>
<li> The queue is removed </li>
</ol>
<p> In this kind of case, what should be do? A correct solution would
be close the fd when the queue is removed. But this is impossible since
a message queue can be removed by any process which has a right to do that.
This means a process removing the message queue may not have a file descriptor
associated with the message queue even if the message queue is mapped to
a file descriptor by some other process.</p>
<p> Additionally, if the same queue (with the same key) is created again,
the mapping will be still maintained.</p>
</li>
<li>
<p>Efficiency problem. All the processes waiting on the wait queue by
calling <b><tt>select()</tt></b> will be awaken when there is a new message.
Eventually only one process will receive the message and all the other processes
will go to sleep again.</p>
</li>
<li>No support for message type. Regardless of message type, if there
is any message, the <b><tt>select()</tt></b> will return. <br>
</li>
</ol>
<h2>Bugs and Improvements</h2>
<b>DIY :-)</b><br>
<h2>Source Code</h2>
<tt>
<a href="misc/hawk/msg.c.txt">msg.c</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Modified message queue implementation<br>
<a href="misc/hawk/msg.h.txt">msg.h</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Header file for message queue<br>
<a href="misc/hawk/sys_i386.c.txt">sys_i386.c</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Modified for the new system call<br>
<a href="misc/hawk/user/Makefile.txt">user/Makefile</a>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Makefile to build test program (rename from Makefile.txt to Makefile)<br>
<a href="misc/hawk/user/syscall_stuff.c.txt">user/syscall_stuff.c</a>&nbsp;&nbsp;&nbsp;&nbsp;Stub function for msgqToFd()<br>
<a href="misc/hawk/user/msg_test.h.txt">user/msg_test.h</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Header for msgqToFd()<br>
<a href="misc/hawk/user/msgq.c.txt">user/msgq.c</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test program source<br>
<a href="misc/hawk/user/msgq2.c.txt">user/msgq2.c</a>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Another test program&nbsp; <br>
</tt>
<p>
I used GNU/Linux kernel 2-4-20 on x86 for this experiment.<br>
To build a new kernel with this modification, I suggest you should copy<br>
<br>
msg.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;&nbsp;&nbsp;&nbsp;ipc/msg.c<br>
msg.h&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;&nbsp;&nbsp;&nbsp;include/linux/msg.h<br>
sys_i386.c&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;to&nbsp;&nbsp;&nbsp;&nbsp;arch/i386/kernel/sys_i386.c<br>
<br>
</tt>
and build and install it!!!!<br>
<br>
Before running the test programs, please be sure to make key files:<br>
<br>
<b><tt>touch .msgq_key1<br>
touch .msgq_key2</tt></b>
<!-- *** BEGIN author bio *** -->
<P>&nbsp;
<P>
<!-- *** BEGIN bio *** -->
<!-- P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
</em>
<br CLEAR="all" -->
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
Copyright &copy; 2003, Hyouck "Hawk" Kim.
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 92 of <i>Linux Gazette</i>, July 2003
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->
<HR>
<!-- startcut ======================================================= -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<html><head>
<TITLE>Article Status Notification</TITLE></HEAD>
<BODY BGCOLOR="#FFFFFF" TEXT="#000000"
LINK="#3366FF" VLINK="#A000A0">
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!-- H4>"The Linux Gazette...<I>making Linux just a little more fun!</I>"</H4>
<P --> <hr> <P>
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<p><i>This article has been temporarily removed from Linux Gazette pending
content review. Please check back later for additional news or the return of
the article in its entirety or edited for general consumption</i>
<p>Webmaster<br>Linux Gazette
<!-- P> <HR NOSHADE SIZE=6> <P -->
<!-- =============================================================== -->
<P> <hr> <P>
<!-- BEGIN lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<A HREF="../index.html"
><IMG SRC="../gx/homenew.gif" ALT="[ Front Page ]" ALIGN=left></A>
<!-- END lgnav ::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
<!-- ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: -->
</BODY></HTML>
<TABLE BORDER><TR><TD WIDTH="200">
<A HREF="http://www.linuxgazette.com/">
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png"
WIDTH="200" HEIGHT="41" border="0"></A>
<BR CLEAR="all">
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
</TD><TD WIDTH="380">
<CENTER>
<BIG><BIG><STRONG><FONT COLOR="maroon">My Open Radio</FONT></STRONG></BIG></BIG>
<BR>
<STRONG>By <A HREF="../authors/nielsen.html">Mark Nielsen</A></STRONG>
</CENTER>
</TD></TR>
</TABLE>
<P>
<!-- END header -->
<ol>
<li>
<a href="#Introduction">Introduction</a></li>
<li><a href="#apache">Setting up Apache</a></li>
<li><a href="#grip">Using Grip to Rip</a></li>
<li><a href="#python">The Python Script</a></li>
<li><a href="#play">Play the List</a></li>
<li><a href="#conclusion">Conclusion</a></li>
<li><a href="#REF">References</a></li>
</ol>
<h3>
<a NAME="Introduction"></a>Introduction</h3>
I am sick of playing cds. Half the songs on a cd suck. I don't like switching
cds in and out. I am sick of commercial radio with their stupid mid-life
crisis hosts who try to appeal to teenagers by trying to act like them (grow
up). I like to listen to music (from cds)
or shows on NPR as background noise while I
program. I decided to develop a way to make my computer play songs and NPR
shows as though it were a radio. This will eliminate cds and commercial radio
shows.
I want my computer to play this stuff in
a random order. The first thing I wanted to do was rip songs from my cds
and play them in a random order.
The second thing (which is not in this article) was to download
a playlist of all the shows I like to listen to on NPR
(I hope someday NPR will accept my offer to develop playlists (as my donation)
for their listeners).
<p>For now, I am keeping things really really simple. In the future, I plan
to add playlists, give songs weight, put stuff into a PostgreSQL databases,
add accounts, etc.
<p>
I am very lazy. So lazy, I didn't bother to look long at the various web-based
mpeg organizers of your favorite songs. I just wanted something to spit out
200 songs in a random order so that it simulates a radio station. I first
had to rip the songs and then write a simple
<a href="http://www.python.org/">Python</a> script to split out a playlist.
<p>
<h3><a NAME="apache"></a>Configuring Apache</h3>
On your Linux server, find your html root directory for your httpd server.
On some systems, this is located at "/var/www/html". Assuming that it is,
do this:
<pre>
cd /var/www/html
mkdir audio
</pre>
Now copy all of your mp3, rm, wav, or other audio files into the directory
"/var/www/html/audio". NOTE: Do you not use your web server for anybody
but yourself. Only you may listen to these songs or you may get into
copyright problems. Contact an attorney for issues regarding legal issues.
<p>
To start your webserver, usually you can do this "service httpd start".
If that doesn't work, then look at the documentation that came with your
Linux distribution to figure out how to start and stop the web service.
Usually the default web server on most Linux systems with be Apache.
<h3><a NAME="grip"></a>Using Grip to Rip</h3>
After looking at many programs, Grip seemed to be the easiest to use to
rip songs from a cd. It organizes the songs by author and album. Nice.
Here are the steps I used to configure Grip.
<ol>
<li> Download and install "LAME" from http://www.mp3dev.org. Be aware of
any patent issues.
<pre>
cd /usr/local/src
lynx --source http://twtelecom.dl.sourceforge.net/sourceforge/lame/lame-3.93.1.tar.gz > lame-3.93.1.tar.gz
tar -zxvf lame-3.93.1.tar.gz
cd lame-3.93.1
./configure --prefix=/usr/local/lame
make install
ln -s /usr/local/lame/bin/lame /usr/bin/lame
</pre>
</li>
<li>Start Grip.</li>
<li>Configure Grip. Under the "Config" menu, do this.
<br>Click on Encode, choose 'lame' as the encoder. Where is says "Encode
File Format" make sure you specify the directory "/var/www/html/audio" as the
base directory. Mine looked like this '/var/www/html/audio/%A/%d/%t_%n.mp3'.
</li>
<li>Click on "Tracks" in the top menu and select the tracks you want to rip.</li>
<li>Click on "Rip" in the top menu and then click on "Rip + Encode". </li>
</ol>
<h3><a NAME="python"></a>The Python Script.</h3>
Put this python script at "/var/www/cgi-bin/playlist.py". Execute this
command after putting it there "chmod 755 /var/www/cgi-bin/playlist.py".
After you have properly installed this python script (please use Python 2.2)
and you know it works right, you might have to change the url from 127.0.0.1
to the ip address of your computer for the network so that other computers
in your house can play the music as well.
<pre>
#!/usr/bin/python
# Make sure this line above is the first line of this file.
### Copyright under GPL
## import the python modules we need.
import os, re, time, random
## Setup some variables. You can change these varaibles for your needs.
Home = "/var/www/html/audio"
Url_Base = "http://127.0.0.1/audio"
Song_Max = 200
List_Type = "mpegurl"
## DO NOT CHANGE ANYTHING BELOW HERE UNLESS YOU ARE A PYTHON GEEK.
File_Match = re.compile('[{mp3}{rm}{wav}{ogg}{mpeg}]$')
Home_Re = re.compile('^' + Home)
List_Types = {'smil':'application/smil', 'mpegurl':'audio/x-mpegurl'}
#---------------------------------------
## This function will go through and get the absolute path of all files
## that match. It is a recursive method.
def Dir_Contents(Item=""):
Final_List = []
if Item == '': return ('')
elif os.path.isdir(Item):
List = os.listdir(Item)
for Item2 in List:
Item3 = Item + "/" + Item2
Temp_List = Dir_Contents(Item=Item3)
for Item4 in Temp_List: Final_List.append(Item4)
elif os.path.isfile(Item):
if File_Match.search(Item): return([Item])
else: return([])
return (Final_List)
#--------------------------
List = Dir_Contents(Home)
List_Copy = List
## Randomize how many times we call random.
Secs = int(time.strftime('%S')) * int(time.strftime('%H')) * int(time.strftime('%M'))
for i in range(0,Secs): random.random()
## Randomly get one file at a time until there is none left.
New_List = []
while (len(List_Copy) &gt; 0):
Position = random.randint(0,len(List_Copy) - 1)
New_List.append(List_Copy[Position])
del List_Copy[Position]
## Redo the urls in the list.
Urls = []
for Item in New_List:
## For each item, strip the Home directory prefix and preappend the url.
Url = Url_Base + Home_Re.sub('', Item)
Urls.append(Url)
## If we are greater than the number of songs we want to listen to,
## cap it off. Bonus points if you can figure out how many songs
## are in this array when Song_Max = 200.
if len(New_List) &gt; Song_Max: New_List = New_List[0:Song_Max]
## If the idiot who edited this file has an invalid list type....
if not List_Types.has_key(List_Type): List_Type = 'mpegurl'
Content_Type = List_Types[List_Type]
### Now print out the content.
print "Content-Type: " + Content_Type + "\n\n"
if List_Type == 'mpegurl':
for Url in Urls: print Url
elif List_Type == 'smil':
print "\n&lt;smil&gt;\n &lt;body&gt;\n"
for Item in Urls: print " &lt;audio src='" + Url+ "'/&gt;"
print " &lt;/body&gt;\n&lt;/smil&gt;\n"
else:
for Url in Urls: print Url
#------------------------------------------------------------------------
# Open Radio version 1.0
# Copyright 2003, Mark Nielsen
# All rights reserved.
# This Copyright notice was copied and modified from the Perl
# Copyright notice.
# This program is free software; you can redistribute it and/or modify
# it under the terms of either:
# a) the GNU General Public License as published by the Free
# Software Foundation; either version 1, or (at your option) any
# later version, or
# b) the "Artistic License" which comes with this Kit.
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See either
# the GNU General Public License or the Artistic License for more details.
# You should have received a copy of the Artistic License with this
# Kit, in the file named "Artistic". If not, I'll be glad to provide one.
# You can look at http://www.perl.com for the Artistic License.
# You should also have received a copy of the GNU General Public License
# along with this program in the file named "Copying". If not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
# 02111-1307, USA or visit their web page on the internet at
# http://www.gnu.org/copyleft/gpl.html.
</pre>
<h3><a NAME="play"></a>Play the List. </h3>
Personally, I use Real Player. I tried to use xmms, but it didn't work for
some reason (with the mpegurl list).
Real Player accepts both smil and mpegurl, so I just use it.
I would like to switch to some free GPLed player instead someday.
<p>
Just type this into your browser, Real Player, or whatever other player you
are using "http://127.0.0.1/cgi-bin/playlist.py".
<h3>
<a NAME="conclusion"></a>Conclusion</h3>
This little setup is perfect for me. In the future, I want to create
accounts, playlists, keeping track of which songs haven't been played yet,
give a song weight, and a bunch of others things. For now, I am finished
with this and will move onto making a playlist of my favorite NPR shows.
<p>
I am big ideas of where this could lead. Since I have a lot of unfortunate
experience with Flash, Real Player, Windows Media Player, and Javascript,
it seems like something could develop here. I heard a lot of stuff about
internet radio stations, but it seems like none of them are really
approaching the market right. They seem to be stuck in the old days of
radio. They need to move forward and not be constrained by the media giants
(legally). It seems like the internet radio stations don't see the big
picture. For now, I am just going to develop my own little radio for myself
and maybe do something with it for real later.
<h3>
<a NAME="REF"></a>References</h3>
<ol>
<li><a href="http://www.nostatic.org/grip/">http://www.nostatic.org/grip/</a></li>
<li><a href="http://www.apache.org">http://www.apache.org</a></li>
<li><a href="http://www.python.org">http://www.python.org</a></li>
<li><a href="http://service.real.com/help/library/earlier.html">
http://service.real.com/help/library/earlier.html</a></li>
<li>
If this article
changes, it will be available here
<a href="http://www.tcu-inc.com/Articles/34/open_radio.html">
http://www.tcu-inc.com/Articles/34/open_radio.html</a></li>
</ol>
<!-- *** BEGIN author bio *** -->
<P>&nbsp;
<P>
<!-- *** BEGIN bio *** -->
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
Mark Nielsen works at
<a href="http://www.crisphughesevans.net/">Crisp Hughes Evans</a>.
In his spare time, he writes articles relating to Free Software (GPL) or
Free Literature (FDL)</i>. Please email him at articles@tcu-inc.com
and put in the subject "ARTICLE:" or the message will be deleted and not
even looked at -- to stop spammers.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
Copyright &copy; 2003, Mark Nielsen.
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 92 of <i>Linux Gazette</i>, July 2003
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->
<HR>
<TABLE BORDER><TR><TD WIDTH="200">
<A HREF="http://www.linuxgazette.com/">
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png"
WIDTH="200" HEIGHT="41" border="0"></A>
<BR CLEAR="all">
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
</TD><TD WIDTH="380">
<CENTER>
<BIG><BIG><STRONG><FONT COLOR="maroon">Setting up the mail subsystem in Linux</FONT></STRONG></BIG></BIG>
<BR>
<STRONG>By <A HREF="../authors/okopnik.html">Ben Okopnik</A></STRONG>
</CENTER>
</TD></TR>
</TABLE>
<P>
<!-- END header -->
<p>The mail system is - or can be - one of the more complex parts of the
Linux jigsaw puzzle. True, for a lot of folks, it's not complex at all:
they install Netscape, enter their POP/SMTP server names, username, and
password, and off they go... unless, of course, they want to use anything
else that utilizes the mail system - such as writing a script that will
mail them a report when the file system is almost full, or deciding that
they'd like a different Usenet news reader, or even try to mail in a bug
report using the "bug" or "bashbug" utilities. Ooops...
<p>In Unix, mail is closely integrated with the OS itself, and not having
it working properly is like driving a car with a deflated tire. Things
work kinda OK, as long as you don't get up above 5mph, or shift your weight
to the wrong side - or even let your girlfriend get in for a ride. As soon
as you do, problems crop up by the dozen. A working mail system - like
a net connection - is one of the basic assumptions in any Unix-flavored
OS. What I'd like to do here is show you at least one example of a working
mail system, which you can then adjust or interpolate to your own setup;
the important part is being aware of the pieces that need to be operational
in order for this to happen.
<br>&nbsp;
<p><b>THE PIECES THAT MAKE UP THE WHOLE</b>
<p>The mail system consists of three somewhat loosely defined pieces: the
MUA (Mail User Agent), which is the software you use to read and compose
your mail, the MTA (Mail Transfer Agent), usually an SMTP server, although
some directly-invoked programs are also in use, and a retrieval program
(Some SMTP servers also contain POP functionality, but a stand-alone program.
is more common.) The MUA can be pretty much anything you want: it's only
a front end, meaning that you can use whatever you prefer once the other
two pieces are working. You can even stick with Netscape if you like! For
the other two in this example, I'll use Exim - a well-known MTA, and Eric
S. Raymond's "fetchmail", probably the most-commonly used retrieval utility
in the world.
<br>&nbsp;
<p><b>GETTING YOUR STUFF</b>
<p>There's not much complexity in setting up "fetchmail". Pretty much all
that's required is creating a file called ".fetchmailrc" in your home directory
and specifying your POP-related information. As an example, here's what
mine looks like:
<p>
<hr>
<pre># I want to log all retrievals to "/var/log/mail.*"
set syslog
# Set stuff that's the same for everybody
defaults&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; protocol pop3,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; timeout 300,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; nokeep,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; fetchall,
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; mda "procmail -f-"
# Get mail from my ISP
poll "pop.happybruin.com",
&nbsp;&nbsp;&nbsp; user "fuzzybear"
&nbsp;&nbsp;&nbsp; password "wouldnt_you_like_to_know";
# Grab it from my other account
poll "pop3.bearsden.com",&nbsp;
&nbsp;&nbsp;&nbsp; user "ben-fuzzybear",
&nbsp;&nbsp;&nbsp; password "shhh_its_a_secret";</pre>
<hr>
<p>Just a quick overview of the above - it's <i>very</i> well covered in
the "fetchmail" man page: I'm retrieving mail from two different accounts.
Since I have a somewhat flaky Net connection (a wireless modem), I've set
"fetchmail" to time out any given connection after 5 minutes (300 seconds).
I've also told it to delete all the mail on the server once it is retrieved
("nokeep"), to ignore the "already read" flag and get all the mail that's
waiting ("fetchall"), and to use "procmail" to do some header processing
for me ("mda ..."). The last is not needed for everyone, but some broken
SMTP servers "forget" to include a so-called "Envelope-from" header, and
this fixes it. Other than that, I think everything is pretty self-explanatory.
<p>There are generally two ways in which fetchmail is launched. It can
be started as one of the "init" scripts (this is useful if you have an
always-on connection), or from your "/etc/ppp/ip-up.d" script (more common
for dial-up connections.) Usually, you get to choose this during "fetchmail"
setup. Each user can also start it manually, as a one-time run (simply
by typing "fetchmail" at the command line) or as a daemon that will poll
the mailboxes at a set interval (I like to do it this way, with a "fetchmail
-d 600" which polls at 10 minute intervals. This can also be defined in
".fetchmailrc".)
<p>"fetchmail" is <i>far</i> more flexible and powerful than this simple
situation shows. Suffice it to say that it can do almost any kind of mail
retrieval, with any valid mail protocol; unless you have some truly complicated
lash-up - and if you did, you'd know about it - it will work for you. Of
course, if you have your own preferred retrieval agent, that's fine too.
<br>&nbsp;
<p><b>LOOKING AT THE BIG PICTURE</b>
<p>Setting up your SMTP server doesn't necessarily have to be much more
complex than the above - but it definitely should take a lot more thought.
The main thing to consider is, where do you fit into the Net? For those
of you who have never had to think of yourself on that large of a scale,
that's yet another piece of the puzzle: the reality is that most of the
Net is built up of little pieces - such as the computer that you're sitting
in front of right now. Your ISP is just another node of the Net; true,
you're connecting through their routers, but once you <i>have</i> connected,
you're just as much a part of the Net as they are - and consequently, responsible
for making sure that your little piece works in harmony with the rest.
<p>(One of the security-related RFCs I read recently - I don't recall exactly
which one - mentions that possibly 50%+ of the mail servers connected to
the Net are misconfigured to some degree. Pretty scary statistic... but
also quite a testament to the reliability and flexibility of the Net mail
system. All of this points up the need for all of us to contribute to the
Good Side of the Force - by doing our part.)
<p>For a lot of us, the situation is very simple: a desktop machine, a
single ISP, and no need to do our own SMTP - at least any more than is
necessary to forward all our mail to the ISP's SMTP server. In this situation,
pretty much any MTA will do - and there's next to no tweaking necessary,
except for address rewriting. Just answer the questions that you're asked
at setup time, and - bingo, you're off and running. However, this part
of the system is a little more "touchy" when it comes to changes: if you
use more than one ISP, or want to do anything else even slightly different
from the basics, it's going to take a little configuration... and this
is where most folks run afoul of the mail beast.
<p>
<hr>
<pre>&nbsp; "sendmail"'s configuration file looks like someone's been banging their
&nbsp; head on the keyboard. And after looking at it... I can see why!
&nbsp;&nbsp; -- Anonymous</pre>
<hr>
<p>"sendmail.cf" has been responsible for more than one sysadmin being
dragged away while tied down to a stretcher and foaming at the mouth. It's
an ugly creature... and the configuration file that it's created from isn't
any prettier. I've detailed a bit of its workings back in LG#58
(<A HREF="../issue58/okopnik2.html">Configuring
Sendmail in RedHat 6.2, or My Adventure in the Heart of the Jungle</A>); at
this point, I have the twitching mostly under control, and the doctors
tell me that I can stop taking these little pills in another year or so...
<p>Seriously, this is a decision point. If your system's network connection
is going to change in major ways (ISP, host name, from a dial-up to a full-on
Internet host) more than once or twice, you should consider doing your
own SMTP. As an example, I do my own because I travel for a living, and
use <i>lots</i> of different ISPs (dial-up, wireless, cable modems in hotel
rooms, etc.) in many different system configurations. Doing it this way
means never having to worry about what anyone else's mail setup is like,
or having to configure anything when I move from one system to another
- a great convenience. In other words, doing your own is not a big deal
to implement, but it is a critical decision that should be made based on
your own needs. I find the "do-it-yourself" approach to be far more flexible,
powerful, and hassle-free in all cases where the environment is anything
other than static.
<br>&nbsp;
<p><b>SMTP SETUP OPTIONS</b>
<p>So, at this point, we've defined two typical SMTP setups:
<p>1) Delegate everything except address rewriting (that has to be done
locally.) The ISPs SMTP server (the "smarthost", from our perspective)
takes care of all the routing. This is a good way to go when you have a
static setup that's not likely to change, especially through a major ISP
with a good reliability record (well, we can dream, can't we?)
<p>2) Do everything ourselves. This has a number of benefits, including
bypassing unreliable ISP mail services and the ability to instantly see
if your mail has actually been delivered to the host on the other end (a
few years ago, my ISP held some of my emails for <b>over a week</b>, and
discarded a batch of them <i>without</i> notifying me. That was what initially
started me doing this...)
<p>Generally, this is a decision that's made during the installation of
the MTA (Mail Transfer Agent). There's not much to it; in the case of Exim,
you're given five choices, of which only the first two really apply here
(the "eximconfig" program runs during the installation, or may be re-run
manually at any time):
<p>
<hr>
<pre>You must choose one of the options below:
&nbsp;(1) Internet site; mail is sent and received directly using SMTP. If your
&nbsp;&nbsp;&nbsp;&nbsp; needs don't fit neatly into any category, you probably want to start
&nbsp;&nbsp;&nbsp;&nbsp; with this one and then edit the config file by hand.
&nbsp;(2) Internet site using smarthost: You receive Internet mail on this&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; machine, either directly by SMTP or by running a utility such as&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; fetchmail. Outgoing mail is sent using a smarthost. optionally with
&nbsp;&nbsp;&nbsp;&nbsp; addresses rewritten. This is probably what you want for a dialup
&nbsp;&nbsp;&nbsp;&nbsp; system.
&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ...</pre>
<hr>
<p>Note that these two choices fit the above two options: the "do everything
ourselves" approach dovetails into #1, and the "smarthost" version is #2.
"eximconfig" then walks you through a few more questions, one of which
is
<p>
<hr>
<pre>...
Which user account(s) should system administrator mail go to?
Enter one or more usernames separated by spaces or commas.&nbsp; Enter
`none' if you want to leave this mail in `root's mailbox - NB this
is strongly discouraged.&nbsp; Also, note that usernames should be lowercase!</pre>
<hr>Since you're the one who's configuring the system, I assume you'll
also be the one administering it, so you should direct this to your own
username. If you go the "smarthost" route, you'll be asked for the name
of the smarthost; be sure to enter your ISP's SMTP server name correctly.
<br>&nbsp;
<p><b>THE BELLY OF THE BEAST</b>
<p>Once that's done - and we'll get to what else we need to do in the two
different cases - we need to set up address rewriting. After all, your
email address as seen by the system is "username@host", and unless you
have your own domain, that isn't going to be an Internet-valid address.
Fortunately, with Exim, it's not difficult.
<p>First, we'll edit "/etc/exim/exim.conf", and add the following to the
6th section ("REWRITE CONFIGURATION"):
<br>
<hr>
<pre>*@localhost&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ${lookup{$1}lsearch{/etc/email-addresses}\
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; {$value}fail} Ffsr
<hr WIDTH="100%"></pre>
This will search through the file where the rewriting rules are specified,
and change the addresses as necessary. Note that in some cases, "exim.conf"
will already have a line like this; just make sure that everything, particularly
the "Ffsr" flags (which rewrite the "Envelope-from", "From:", "Sender:",
and "Reply-to:" headers), is correct. Next, we'll edit - surprise! - "/etc/email-addresses"
and insert the entries for all our users.
<br>
<hr>
<pre># Root shouldn't be emailing anyone outside, but just in case...
root: happybear@bruins.com
ben: happybear@bruins.com
rivka: sweetie@here.com
linda: babe@westcoast.org
jen: saucy@wench.net
<hr WIDTH="100%"></pre>
That's it. Unlike "sendmail", there are no databases to rebuild; the file
is read "on the fly". One of the reasons I like Exim is because its conffile
is copiously documented with comments. As well, "/usr/share/doc/exim/spec.txt.gz"
is a complete (and very large) manual that details every bit of the configuration
in fine detail.
<br>&nbsp;
<p><b>THE DIFFERENT APPROACHES</b>
<p>If you're going with the "smarthost" option, at this point you're done.
Skip ahead to the "TESTING" section. If you're a do-it-yourselfer like
me, though, there's just a tiny bit more stuff to write: since we're now
responsible for getting the mail to where it's going, we also have to deal
with the situation when the delivery fails (i.e., the receiving host or
an intermediate router is down, we lose the network connection for a moment,
etc.) Most of that behavior is well-defined already, as it is in any decent
MTA, but I've found one thing that reduces "trouble emails" from Exim (which
it will send to you as the administrator) to nearly zero: in the first
section of "/etc/exim/exim.conf", you should add the following:
<pre>
<hr>auto_thaw = 5m
<hr WIDTH="100%"></pre>
Whenever a message is marked "frozen" (undeliverable) by Exim, this will
"thaw" it (reattempt delivery) after five minutes. Since most failures
are only temporary, this setting manages to "push" mail through almost
a hundred percent of the time, as long as the user and the domain are valid.
<p>Oh, by the way. Now that you're a Big-Time Mail Administrator... :)
what is it, exactly, that you're supposed to do? Not that much, actually.
Decide what to do with problem messages (if Exim notifies you that something
is stuck in the queue, run "<tt>mailq</tt>" to see what it is and look
at its log file with "<tt>exim -Mvl &lt;message_id&gt;</tt>"), add new users
to "<tt>/etc/email-addresses</tt>", and respond to any problem or spam
notifications by other folks. Read the "exim" man page, just to get familiar
with this beast. That's pretty much it. Experienced large-system mail administrators
may shrink in horror and make warding signs in my direction, but for a
single-machine or a small LAN, the above is pretty much all that's required.
Once properly set up, a mail system is a remarkably trouble-free and mostly
self-correcting sort of creature.
<br>&nbsp;
<p><b>TESTING</b>
<p>Exim has a series of built-in testing modes, one of which is about to
come in very handy. The main thing that we need to test is whether our
rewriting rules work - and that's simple:
<p>
<hr>
<pre>Baldur:~$ exim -brw ben
&nbsp; sender: happybear@bruins.com
&nbsp;&nbsp;&nbsp; from: happybear@bruins.com
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; to: ben@localhost
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; cc: ben@localhost
&nbsp;&nbsp;&nbsp;&nbsp; bcc: ben@localhost
reply-to: happybear@bruins.com
env-from: happybear@bruins.com
&nbsp; env-to: ben@localhost</pre>
<hr>Test it with a bare username, "user@localhost", and user@your_hostname;
all of these should be properly rewritten. Also, test it with an arbitrary
Internet-valid email address to make sure that it <i>doesn't</i> get changed.
<p>Once all of the above works right, your mail system should be at least
reasonably configured (the folks who set up the various distros do a pretty
good job of the basics, in every case I've seen so far.) Test it out by
sending yourself some mail, and look at the headers; the "From:" and the
"Reply-to:" (if one is defined) should match your Net-valid address, not
just your plain user name. Here's an example (the actual addresses/IPs
have been changed, as in the rest of this article, to foil spambots. Eat
fake address, spammer-slime!):
<br>In the Mutt composition menu:
<hr>
<pre>&nbsp;&nbsp;&nbsp; From: "Benjamin A. Okopnik" &lt;ben@localhost&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To: Benjamin Okopnik &lt;happybear@bruins.com&gt;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Cc:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp; Bcc:
&nbsp;Subject: Rewrite test
Reply-To:
&nbsp;&nbsp;&nbsp;&nbsp; Fcc: =Sentmail
&nbsp;&nbsp;&nbsp;&nbsp; Mix: &lt;no chain defined&gt;
&nbsp;&nbsp;&nbsp;&nbsp; PGP: Clear
<hr WIDTH="100%"></pre>
Note that in the local client, the "From:" address is a local one. You
could also - now that you have a <b>real</b> mail system - simply do it
from the command line as
<p>
<hr>
<pre>mail -s "Rewrite test" happybear@bruins.com
<hr WIDTH="100%"></pre>
<p><br>Either way - now, we send it off, and when we get it back - presto!
<p>
<hr>
<pre>Date: Tue, 30 Apr 2002 03:47:19 -0400
From: "Benjamin A. Okopnik" &lt;happybear@bruins.com&gt;
To: Benjamin Okopnik &lt;happybear@bruins.com&gt;
Subject: Rewrite test
WARNING: Deep Magic in progress.
<tt>Ben Okopnik
-=-=-=-=-=-</tt></pre>
<hr>
<p>If we look at the actual headers (in Mutt, press the "h" key), we'll
see the following:
<p>
<hr>
<pre>From ben Tue Apr 30 03:48:15 2002
Return-Path: &lt;happybear@bruins.com&gt;
Received: from Baldur (pzw-199-999-99-999.sunbridge.com [199.999.99.999]))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; by bruins.com (9.10.3/9.10.3) with ESMTP id g3U7lR45008674
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for &lt;happybear@bruins.com&gt; Tue, 30 Apr 2002 00:47:32 -0700 (PDT)
Received: from ben by Baldur with local (Exim 3.35 #1 (Debian))
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; id 172SM7-0004nd-00&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; for &lt;happybear@bruins.com&gt; Tue, 30 Apr 2002 03:47:23 -0400
Date: Tue, 30 Apr 2002 03:47:19 -0400
From: "Benjamin A. Okopnik" &lt;happybear@bruins.com&gt;
To: Benjamin Okopnik &lt;happybear@bruins.com&gt;
Subject: Rewrite test
Message-ID: &lt;20020430074718.GA18398@Baldur&gt;
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.3.28i
Status: U&nbsp;&nbsp;
X-UIDL: 27862
WARNING: Deep Magic in progress.
Ben Okopnik
-=-=-=-=-=-
<hr WIDTH="100%"></pre>
Reading the routing info from the bottom up, Exim got the message from
me, rewrote the header, and bruins.com got it from Exim, so all of that
was done correctly - meaning that what my MTA says is properly recognized
by others. If the email had disappeared, I would check my "/var/log/exim/mainlog"
to see exactly what had been done to it, and perhaps my queue to see if
it's stuck. However, it looks like all the Deep Magic is good, and everything
is working.
<br>&nbsp;
<p><b>WRAP-UP</b>
<p>If you've followed along and made it this far... congratulations. You're
now that much more of a participating Netizen, one of the folks who's contributed
a bit of time and effort to make the Net run a little more smoothly - and
I'm glad to share the IP-space with the likes of you.
<p>Be well, and happy Linuxing!
<pre><b>Ben Okopnik
-=-=-=-=-=-</b></pre>
<!-- *** BEGIN author bio *** -->
<P>&nbsp;
<P>
<P> Ben is a Contributing Editor for Linux Gazette and a member of
The Answer Gang.
<!-- *** BEGIN bio *** -->
<P>
<IMG ALT="picture" SRC="../gx/2002/tagbio/ben-okopnik.jpg" WIDTH="199"
HEIGHT="200" ALIGN="left" HSPACE="10" VSPACE="10">
<em>
Ben was born in Moscow, Russia in 1962. He became interested in
electricity at age six--promptly demonstrating it by sticking a fork into
a socket and starting a fire--and has been falling down technological mineshafts
ever since. He has been working with computers since the Elder Days, when
they had to be built by soldering parts onto printed circuit boards and
programs had to fit into 4k of memory. He would gladly pay good money to any
psychologist who can cure him of the resulting nightmares.
<p>Ben's subsequent experiences include creating software in nearly a dozen
languages, network and database maintenance during the approach of a hurricane,
and writing articles for publications ranging from sailing magazines to
technological journals. Having recently completed a seven-year
Atlantic/Caribbean cruise under sail, he is currently docked in Baltimore, MD,
where he works as a technical instructor for Sun Microsystems.
<p>Ben has been working with Linux since 1997, and credits it with his complete
loss of interest in waging nuclear warfare on parts of the Pacific Northwest.
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
Copyright &copy; 2003, Ben Okopnik.
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 92 of <i>Linux Gazette</i>, July 2003
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->
<HR>
<TABLE BORDER><TR><TD WIDTH="200">
<A HREF="http://www.linuxgazette.com/">
<IMG ALT="LINUX GAZETTE" SRC="../gx/2002/lglogo_200x41.png"
WIDTH="200" HEIGHT="41" border="0"></A>
<BR CLEAR="all">
<SMALL>...<I>making Linux just a little more fun!</I></SMALL>
</TD><TD WIDTH="380">
<CENTER>
<BIG><BIG><STRONG><FONT COLOR="maroon">Qubism</FONT></STRONG></BIG></BIG>
<BR>
<STRONG>By <A HREF="../authors/harsem.html">Jon "Sir Flakey" Harsem</A></STRONG>
</CENTER>
</TD></TR>
</TABLE>
<P>
<!-- END header -->
<P>
<EM>These images are scaled down to minimize horizontal scrolling.
To see a panel in all its clarity, click on it.</EM>
<P>
<A HREF="misc/qubism/qb-sco.jpg">
<IMG ALT="[cartoon]" SRC="misc/qubism/qb-sco.jpg"
WIDTH="640" HEIGHT="240"></A>
<BR CLEAR="all">
<P> (The tree refers to <A HREF="http://www.caldera.com/">SCO's logo</A>.
The SCO vs Linux lawsuit is covered in <A HREF="lg_bytes.html">News Bytes</A>.)
<P>
All Qubism cartoons are
<A HREF="http://www.core.org.au/modules.php?name=Cartoons">here</A>
at the CORE web site.
<!-- *** BEGIN author bio *** -->
<P>&nbsp;
<P>
<!-- *** BEGIN bio *** -->
<P>
<img ALIGN="LEFT" ALT="[BIO]" SRC="../gx/2002/note.png">
<em>
Jon is the creator of the Qubism cartoon strip and current
Editor-in-Chief of the
<A HREF="http://www.core.org.au/">CORE</A> News Site.
Somewhere along the early stages of
his life he picked up a pencil and started drawing on the wallpaper. Now
his cartoons appear 5 days a week on-line, go figure. He confesses to
owning a Mac but swears it is for "personal use".
</em>
<br CLEAR="all">
<!-- *** END bio *** -->
<!-- *** END author bio *** -->
<!-- *** BEGIN copyright *** -->
<hr>
<CENTER><SMALL><STRONG>
Copyright &copy; 2003, Jon "Sir Flakey" Harsem.
Copying license <A HREF="../copying.html">http://www.linuxgazette.com/copying.html</A><BR>
Published in Issue 92 of <i>Linux Gazette</i>, July 2003
</STRONG></SMALL></CENTER>
<!-- *** END copyright *** -->
<HR>
</BODY></HTML>