

|
|
|
Our sponsors make financial contributions toward the costs of publishing Linux Gazette. If you would like to become a sponsor of LG, e-mail us at sponsor@ssc.com.
TWDT 1 (text)
TWDT 2 (HTML)
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.
Got any great ideas for improvements! Send your comments, criticisms, suggestions and ideas.
This page written and maintained by the Editor of Linux Gazette, gazette@ssc.com
Write the Gazette at gazette@ssc.com
|
Contents: |
Date: Mon, 25 Aug 1997 15:02:14 -0700
From: cooldude cooldude@digitalcave.com
Subject: how do
how do i setup a linux server from scratch?
my freind has the t1 connection and im gonna admin it with his ermission
need ta know A. S.A.P.
=)
thanks
Date: Mon, 1 Sep 97 18:59:51 UT
From: Richard Wang rzlw1@classic.msn.com
Hi,
I have just set up a system for RedHat Linux, but I am finding getting real
support for
this system is very difficult. In fact, I cannot even setup my webpage via
SLIP from
the manuals I have. Redhat seems to go against it'scompetitor Caldera, and I
am
finding it hard to find the right manuals and guides for this system.
Do you have an online help person, who I can log to ?
Looking forward to your reply,
Richard Wang
Cambridge
United Kingdom
Date: Wed, 17 Sep 1997 19:49:55 -0700
From: Garry Jackson gjackson@home.com
Subject: Linux Problem.
I'm a linux newbie and I'm having major problems. I have a monitor that is kapible of 800X600 and I don't know anything else about it. I Also have a Trio 32/64. I cannot get Xwindows to go so what should I do.
Also I'm have a problem with my SB16 PNP and I can't get that to work and I can't get a Supra 28.9 PnP and a SN-3200 witch is a NE-200 clone if you could give me any tips on getting this stuff work It would be thanked.
Garry Jackson
Date: Wed, 3 Sep 1997 19:28:20 -0400
From: Prow Prowlyr@mindspring.com
Subject: Just some really basic help please.
I want to learn about unix but really dont know where to start. Can I get a free version somewhere to get me started? Do you know of a good Unix for dummies site that might help? Would greatly appreciate any reply via e-mail. Thanx in advance.
Date: Tue, 09 Sep 1997 00:49:50 +0200
From: Michael Stumpf ms@astat.de
Subject: Linux Kernel
I'm searching information about the status of the current kernel (release and/or developer). Do you have a web-address from an up-to-date site ? I used to look at "http://www.linuxhq.com" for this, but it seems that it is forever down.
tia
Michael
Date: Sat, 27 Sep 1997 11:02:04 -0400
From: Dave Runnels
drunnels@panix.com
Subject: 3com509b problems
I recently added a 3com509b Ethernet card to my Win95/Linux machine. I run the machine in PnP mode and the RedHat 4.2 install process won't recognize the card. RedHat's solution was to disable PnP for the machine. While this might be fine for Linux, I am forced to use Win95 for a number of things and turning off PnP (which works great for me on Win95) will be a real pain in the ass.
Is there a way I might have my cake and eat it too? I do know which IRQ the card is being assigned to.
Thanks, Dave
Date: Mon, 22 Sep 1997 10:06:04 +0200
From: Erwin Penders ependers@cobweb.nl
Subject: email only
Hi,
My name is Erwin Penders an i'm working for a local ISP in the Netherlands. I don't know if i send this mail to the right place, but i have a question about a Linux problem. I want to know how to set up an email-only account (so you can call the ISP, make a connection and send/receive email) without the possiblity for WWW, Telnet etc. The main problem is that i don't know how to set up the connection (the normal accounts get a /etc/ppp/ppplogin).... . .
Can anybody help me with this problem !?
Thanks,
Erwin Penders
(CobWeb)
Date: Sat, 20 Sep 1997 22:00:38 +0200
From: Richard Torkar
richard.torkar@goteborg.mail.telia.com
Subject: Software for IDE cd-r?
First of all Thanks for a great e-zine!
And then to my question... (You didn't really think that I wrote to you just to be friendly did you? ;-)
Is there any software written for IDE cd-r for example Mitsumi CR2600TE?
I found two programs; Xcdroast and CDRecord for Linux, but unfortunately they don't support IDE cd-r :-(
I haven't found anything regarding this problem and I've used darned near all search tools on the net... Any answer would be appreciated. If the answer is no, can I solve this problem somehow?
Regards,
Richard Torkar from the lovely land of ice beers .. ;-)
Date: Thu, 18 Sep 1997 16:03:04 -0400 (EDT)
From: Eric Maude
sabre2@mindspring.com
Subject: Redhat Linux 4.3 Installation Help
I am trying to install Redhat Linux 4.3 on a Windows 95 (not OSR 2) machine. I do want to set this machine up as dual boot but that's not really my problem. I have been totally unable to set up Linux because I am unable to set up the Non-MS DOS partition that Linux requires. I am pretty new to Linux. I would appreciate anyone that could give me detailed step by step instructions on how I go about setting up Redhat Linux. I would call Redhat directly but I am at work during their operating hours and not near the machine I need help with this! Please, somebody help me out!!
Date: Fri, 29 Aug 1997 11:02:39 -0300
From: Mario Storti mstorti@minerva.unl.edu.ar
Subject: acknowledge to GNU software
(Sorry if this is off-topic)
From now on I will put a mention to the GNU (and free in general) software I make use in the "acknowledgment" section of my (scientific) papers. I suggest to do the same to all those who are working on scientific applications. Since Linux is getting stronger every day in the scientific community, this could represent an important support, specially when requesting funding. Even better would be to make a database with all these "acknowledgments" in a Web site or something similar. Do anyone know of something like this that is already working? Any comments?
Mario
Date: Sun, 07 Sep 1997 23:58:16 -0500
From: mike shimanski mshiman@xnet.com
Subject: Fun
I just discovered Linux in July and am totally pleased. After years of Dos, Win 3.1, OS/2 and Win95, ( I won't discuss my experience with Apple), I think I found an operating system I can believe in.I cannot make this thing crash!
The Linux Gazette has been a rich source of information and makes being a newbe a great deal easier.I want to thank you for the time and effort you put into this publication. It has made my induction into the Linux world a lot easier.
Did I mention I am having way too much fun exploring this operating system? Am I wierd or what?
Again, thanks for a great resource.
Mike Shimanski
Date: Sat, 06 Sep 1997 18:01:52 -0700
From: George Smith
gbs@swdc.stratus.com
Subject: Issue 21
THANKS! Thanks! Thank You!
Issue 21 was great! I loved it! I most appreciate the ability to download it to local disk and read it without my network connection being live and with the speed of a local disk. Please keep offering this feature - I wish everyone did. BTW, I am a subscriber to the Linux Journel from issue 1 and enjoy it immensely also.
Thanks again.
Date: Wed, 03 Sep 1997 19:34:29 -0500
From: Mark C. Zolton trustno1@kansas.net
Subject: Thank you Linux Gazzette
Hello There,
I just wanted to thank you for producing such a wonderful publication. As a relative newbie to Linux, I have found your magazine of immense use in answering the plethora of questions I have. Keep up the good work. Maybe oneday I'll be experienced enough to write for you.
Mark
Date: Mon, 1 Sep 1997 00:09:53 -0500 (CDT)
From: Arnold Hennig amjh@qns.com
Subject: Response to req. for help - defrag
I saw the request for information about the (lack of) need for defragging in issue 20, and have just been studying the disk layout a bit anyway.
Hope the following is helpful:
In reference to the question titled "Disk defrag?" in issue 20 of the Linux Gazette:
I had the same question in the back of my mind once I finally Linux up and running after some years of running a DOS based computer. After I was asked the same question by someone else, I poked around a bit and did find a defrag utility buried someplace on sunsite. The documentation pretty much indicated that with the ext2 file system it is rarely necessary to use the utility (he wrote it prior to the general use of ext2fs). He gave a bit of an explanation and I found some additional information the other day following links that (I believe) originated in the Gazette.
Basically, DOS does not keep a map of the disk usage in memory, and each new write simply starts from the next available free cluster (block), writes till it gets to the end of the free space and then jumps to the next free space and continues. After it reaches the end of the disk or at the next reboot, the "next free cluster" becomes the "first free cluster", which is probably where something was deleted, and may or may be an appropriate amount of free space for the next write. There is no planning ahead for either using appropriate sized available spaces or for clustering related files together. The result is that the use of space on the disk gets fragmented and disorganized rather quickly, and the defrag utilities are a necessary remedy.
In fairness to DOS, it was originally written for a computer with precious little memory, and this method of allocating write locations didn't strain the resources much.
The mounting requirement under unices allows the kernel to keep a map of the disk usage and allocate disk space more intelligently. The Ext2 filesystem allocates writes in "groups" spread across the area of the disk, and allocates files in the same group as the directory to which they belong. This way the disk optimization is done as the files are written to disk, and a separate utility is not needed to accomplish it.
Your other probable source of problems is unanticipated shutdowns (power went out, Dosemu froze the console and you don't have a way to dial in through the modem to kill it - it kills clean, btw ;-), or your one year old niece discovered the reset button). This will tend to cause lost cluster type problems with the files you had open at the time, but the startup scripts almost universally run fsck, which will fix these problems. You WILL notice the difference in the startup time when you have had an improper shutdown.
So, yes, you may sleep with peace of mind in this respect.
Arnold M.J. Hennig
Date: Wed, 3 Sep 1997 16:19:17 -0600 (MDT)
From: Mark Midgley midgley@pht.com
Subject: Commercial Distribution
Mo'Linux, a monthly Linux distribution produced by Pacific HiTech, Inc. includes current Linux Gazette issues. They are copied in whole, according to the copyright notice.
Mark
Date: Thu, 11 Sep 1997 12:26:53 -0400
From: Brian Connors connorbd@bc.edu
Subject: Linux and Mac worlds vs Microsoft?
Michael Hammel made an interesting comment in the September letters column about aligning with Mac users against Microsoft. The situation's not nearly as rosy as all that, what with Steve Jobs' latest activity in the Mac world. As a Mac diehard, I'm facing the prospect of a good platform being wiped out by its own creator, whether it's really his attention or not. IMHO the Linux world should be pushing for things like cheap RISC hardware (which IBM and Motorola have but aren't pushing) and support from companies like Adobe. I know that in my case, if the MacOS is robbed of a future, I won't be turning to Windows for anything but games...
Date: Thu, 11 Sep 1997 22:59:19 +0900
From: mark stuart
mark@www.hotmail.com
Subject: article ideas
why not an issue on linux on sparc and alpha(especially for scientific applications) and also how about an issue on SMP with linux?
Date: Sat, 27 Sep 1997 01:57:09 -0700 (PDT)
From: Ian Justman ianj@chocobo.org
Except for the SNA server, all I've got to say about Linux with all the necessary software is: "Eat your heart out, BackOffice!"
--Ian.
Date: Wed, 24 Sep 1997 21:49:28 -0700
From: Matt Easton
measton@lausd.k12.ca.us
Subject: Thanks
Thank you for Linux Gazette. I learn a lot there; and also feel more optimistic about things not Linux after visiting.
Date: Fri, 26 Sep 1997 13:24:29 -0500
From: "Samuel Gonzalez, Jr." buzz@pdq.net
Subject: Excellent Job
Excellent job !!!
Sam
More 2¢ Tips!
Netscape and Seyon questions
Date: Mon, 8 Sep 1997 11:23:51 -0600 (MDT)
From: "Michael J. Hammel" mjhammel@long.emass.com
Lynn Danielson asked:
I downloaded Netscape Communicator just a few weeks ago from the Netscape site. I'm not sure older versions of Netscape are still available. I'm probably wrong, but I was under the impression that only the most current beta versions were freely available.
Answer:
A quick search through Alta-Vista for Netscape mirrors showed a couple of different listing for mirror sites. I perused a few and found most either didn't have anything or had non-English versions, etc. One site I did find with all the appropriate pieces is:
ftp://ftp.adelaide.edu.au/pub/WWW/Netscape/pub/
Its a long way to go to get it (Australia), but thats all I could find. If you want to go directly to the latest (4.03b8) Communicator directory, try:
ftp://ftp.adelaide.edu.au/pub/WWW/Netscape/pub/communicator/4.03/4.03b8/english/unix/
I did notice once while trying to download from Netscape that older versions were available, although I didn't try to download them. I noticed this while looking for the latest download of Communicator through their web sites. Can't remember how I found that, though.
The 3.x version is available commercially from Caldera. I expect that the 4.x versions will be as well, though I don't know if Caldera keeps the beta versions on their anonymous ftp sites.
BTW, the Page Composer is pretty slick, although it has no interface for doing Javascript. It has a few bugs, but its the best WYSIWYG interface for HTML composition on Linux that I've seen. Its better than Applix's HTML Editor, although that one does allow exporting to non-HTML stuff. Collabra Discussions sucks. The old news reader was better at most things. I'd still like to be able to mark a newsgroup read up to a certain point instead of the all-or-nothing bit.
For anyone who is interested - 4.x now supports CSS (Cascading Style Sheets) and layers. Both of these are *very* cool. They are the future of Web design and, IMHO, a very good way to create Multimedia applications for distribution on CDs. One of C|Net's web pages (I think) has some info on these items, including a demo of layers (moves an image all over the screen *over* the underlying text - way cool). The only C|Net URL I ever remember is www.news.com, but you can get to the rest of their sites from there.
-- Michael J. Hammel
Keeping track of tips
Date: Tue, 26 Aug 1997 16:29:13 +0200
From: Ivo Saviane saviane@astrpd.pd.astro.it
Dear LG,
it always happens to me that I spend a lot of time finding out how to do a certain thing under Linux/Unix, and then I forget it. The next time I need that information I will start all the `find . ...', `grep xxx *' process again and waste the same amount of time!
To me, the best way to avoid that is to send a mail to myself telling how to do that particular operation. But mail folders get messy and, moreover, are not useful to other users who might need that same information.
Finally I found something that contributes solving this problem. I set up a dummy user who reads his mail and puts it in www readable form. Now it is easy for me to send a mail to news@machine as soon as I learn something, and be sure that I will be able to find that information again just clicking on the appropriate link. It would also be easy to set up a grep script and link it to the same page.
The only warning is to put a meaningful `subject: ' to the mail, since this string will be written besides the link.
I am presently not aware of something similar. At least, not that simple. It you know, let me know too!
If you want to see how this works, visit
http://obelix.pd.astro.it/~news
A quick description of the basic operations needed is given below.
--------------------------------------------------------------------------
The following lines briefly describe how to set up the light news server.
1. Create a new user named `news'
2. Login as news and create the directories ~/public_html and ~/public_html/folders (I assume that your http server is configured so that `http://machine/~user' will point to `public_html' in the user's $HOME).
3. Put the wmanager.sh script in the $HOME/bin directory. The script follows the main body of this message as attachment [1]. The script does work under bash.
The relevant variables are grouped at the beginning of the script. These should be changed according to the machine/user setup
4. The script uses splitmail.c in order to break the mail file in sub-folders The binary file should be put in the $HOME/bin dir. See attachment [2].
5. Finally, add a line in the `news' user crontab, like the following
00 * * * * /news_bin_dir/wmanager.sh
where `news_bin_dir' stands for $HOME/bin. In this case the mail will be checked once every hour.
---------------------------------- attachment [1]
#!/bin/sh
# wmanager.sh
# Updates the www news page reading the user's mails
# (c) 1997 Ivo Saviane
# requires splitmail (attachment [2])
## --- environment setup
BIN=/home/obelnews/bin # contains all the executables
MDIR=/usr/spool/mail # mail files directory
USR=news # user's login name
MFOLDER=$MDIR/$USR # user's mail file
MYFNAME=`date +%y~%m~%d~%H:%M:%S.fld` # filename for mail storage under www
FLD=folders # final dir root name
PUB=public_html # httpd declared public directory
PUBDIR=$HOME/$PUB/$FLD
MYFOLDER=$PUBDIR/$MYFNAME
INDEX=$HOME/$PUB/index.html
## --- determines the mailfile size
MSIZE=`ls -l $MFOLDER | awk '{print $5}'`
## --- if new mail arrived goes on; otherwise does nothing
if [ $MSIZE != "0" ]; then
## --- writes the header of index.html in the pub dir
echo "<html><head><title> News! </title></head>" > $INDEX
echo "<h2> Internal news archive </h2> <p><p>" >> $INDEX
echo "Last update: <i>`date`</i> <hr>" >> $INDEX
## --- breaks the mail file in single folders; splitmail.c must be compiled
$BIN/splitmail $MFOLDER > $MFOLDER
## --- each folder is copied in the folder dir, under the pub dir,
## and given an unique name
for f in $MFOLDER.*; do\
NR=`echo $f | cut -d. -f2`;\
MYFNAME=`date +%y~%m~%d~%H:%M:%S.$NR.fld`;\
MYFOLDER=$PUBDIR/$MYFNAME;\
mv $f $MYFOLDER;\
done
## --- prepares the mailfile for future messages
rm $MFOLDER
touch $MFOLDER
## --- Now creates the body of the www index page, searching the folders
## dir
for f in `ls $PUBDIR/* | grep -v index`; do\
htname=`echo $f | cut -d/ -f5,6`;\
rfname=`echo $f | cut -d/ -f6 | sed 's/.fld//g'`;\
echo \<a href\=\"$htname\"\> $rfname\<\/a\> >> $INDEX;\
echo \<strong\> >> $INDEX;\
grep "Subject:" $f | head -1 >> $INDEX;\
echo \</strong\> >> $INDEX;\
echo \<br\> >> $INDEX;\
done
echo "<hr>End of archive" >> $INDEX
echo "</html>" >> $INDEX
fi
---- attachment [2]
/******************************************************************************
Reads stdin. Assuming that this has a mailfile format, it breaks the input
in single messages. A filestem must be given as argument, and single
messages will be written as filestem.1 filestem.2 etc.
(c) 1997 I.Saviane
******************************************************************************/
#define NMAX 256
/*****************************************************************************/
#include <stdio.h>
/*****************************************************************************/
/*****************************************************************************/
/************************** MAIN **************************************/
int main(int argc, char *argv[]) {
FILE *fp;
char mline[NMAX], mname[NMAX];
int nmail=0, open;
if(argc < 2) {
fprintf(stderr, "splitmail: no input filestem");
return -1;
}
fp = fopen("/tmp/xx", "w");
while(fgets(mline, NMAX, stdin) != NULL) {
open = IsFrom(mline);
if(open==1) {
fclose(fp);
nmail++;
sprintf(mname, "%s.%d", argv[1], nmail);
fp = fopen(mname, "w");
open = 0;
}
fprintf(fp, "%s", mline);
}
fclose(fp);
system("rm /tmp/xx");
return 1;
}
/*****************************************************************************/
int IsFrom(char *s) {
if(s[0]=='F' && s[1]=='r' && s[2]=='o' && s[3]=='m' && s[4]==' ') {
return 1;
} else {
return 0;
}
}
Displaying File Tree
Date: Tue, 26 Aug 1997 16:40:43 -0400 (EDT)
From: Scott K. Ellis storm@gate.net
A nice tool for displaying a graphic tree of files or directories in your filesystem can be found at your local sunsite mirror under /pub/Linux/utils/file/tree-1.2.tgz. It is also included as the package tree included in the Debian distribution.
Making Changing X video modes easier
Date: Thu, 28 Aug 1997 20:29:59 +0100
From: Jo Whitby pandore@globalnet.co.uk
Hi
In issue 20 of the Linux gazette there was a letter from Greg Roelofs on changing video modes in X - this was something I had tried and had found changing colour depths awkward, and didn't know how to start multiple versions of X.
I also found the syntax of the commands difficult to remember, so here's what I did.
First I created 2 files in /usr/local/bin called x8 and x16 for the colour depths that I use, and placed the command in them -
for x8
#!/bin/sh startx -- :$* -bpp 8 &
and for x16
#!/bin/sh startx -- :$* -bpp 16 &
then I made them executable -
chmod -c 755 /usr/local/bin/x8 chmod -c 755 /usr/local/bin/x16
now I simply issue the command x8 or x16 for the first instance of X and x8 1 or x16 1 for the next and so on, this I find much easer to remember:-) An addition I would like to make would be to check which X servers are running and to increment the numbers automatically, but as I have only been running Linux for around 6 months my script writing is extremely limited, I must invest in a book on the subject.
Linux is a fantastic OS, now I've tried it I could not go back to Windoze and hate having to turn my Linux box into a wooden doze box just to run the couple of progs that I can't live without (Quicken 4 and a lottery checking prog), so if anyone knows of a good alternative to these please let me know, the sooner doze is gone for good the better - then Linux can have the other 511Mb of space doze95 is hogging!
ps. Linux Gazette is just brilliant, I've been reading all the back issues, nearly caught up now - only been on the net for 3 months. I hope to be able to contribute something a little more useful to the Gazette in the future, when my knowledge is a little better:-)
keep up the good work.
Tree Program
Date: Mon, 01 Sep 1997 03:28:57 -0500
From: Ian Beth13@mail.utexas.edu
Try this instead of the tree shell-script mentioned earlier:
--------- Cut here --------
#include <stdlib.h>
#include <stdio.h>
#include <sys/stat.h>
#include <unistd.h>
#include <sys/types.h>
#include <dirent.h>
// This is cool for ext2.
#define MAXLEN 256
#define maxdepth 4096
struct dnode {
dnode *sister;
char name[MAXLEN];
};
const char *look;
const char *l_ascii="|+`-";
const char l_ibm[5]={179,195,192,196,0};
int total;
char map[maxdepth];
void generate_header(int level) {
int i;
for (i=0;i<level;i++) printf(" %c ",(map[i]?look[0]:32));
printf (" %c%c ",(map[level]?look[1]:look[2]),look[3]);
}
dnode* reverselist(dnode *last) {
dnode *first,*current;
first=NULL;
current=last;
// Put it back in order:
// Pre: last==current, first==NULL, current points to backwards linked
list
while (current != NULL) {
last=current->sister;
current->sister=first;
first=current;
current=last;
}
return first;
}
void buildtree(int level) {
dnode *first,*current,*last;
first=current=last=NULL;
char *cwd;
struct stat st;
if (level>=maxdepth) return;
// This is LINUX SPECIFIC: (ie it may not work on other platforms)
cwd=getcwd(NULL,maxdepth);
if (cwd==NULL) return;
// Get (backwards) Dirlist:
DIR *dir;
dirent *de;
dir=opendir(cwd);
if (dir==NULL) return;
while ((de=readdir(dir))) {
// use de->d_name for the filename
if (lstat(de->d_name,&st) != 0) continue; // ie if not success go on.
if (!S_ISDIR(st.st_mode)) continue; // if not dir go on.
if (!(strcmp(".",de->d_name) && strcmp("..",de->d_name))) continue; //
skip ./
..
current=new dnode;
current->sister=last;
strcpy(current->name,de->d_name);
last=current;
}
closedir(dir);
first=reverselist(last);
// go through each printing names and subtrees
while (first != NULL) {
map[level]=(first->sister != NULL);
generate_header(level);
puts(first->name);
total++;
// consider recursion here....
if (chdir (first->name) == 0) {
buildtree(level+1);
if (chdir (cwd) != 0) return;
}
current=first->sister;
delete first;
first=current;
}
free (cwd);
}
void tree() {
char *cwd;
cwd=getcwd(NULL,maxdepth);
if (cwd==NULL) return;
printf("Tree of %s:\n\n",cwd);
free (cwd);
total=0;
buildtree(0);
printf("\nTotal directories = %d\n",total);
}
void usage() {
printf("usage: tree {-[agiv]} {dirname}\n\n");
printf("Tree version 1.0 - Copyright 1997 by Brooke Kjos
<beth13@mail.utexas.ed
u>\n");
printf("This program is covered by the Gnu General Public License
version 2.0\n
");
printf("or later (copyleft). Distribution and use permitted as long
as\n");
printf("source code accompanies all executables and no additional\n");
printf("restrictions are applied\n");
printf("\n\n Options:\n\t-a use ascii for drawings\n");
printf("\t-[ig] use IBM(tm) graphics characters\n");
printf("\t-v Show version number and exit successfully\n");
};
void main (int argc,char ** argv) {
look=l_ascii;
int i=1;
if (argc>1) {
if (argv[1][0]=='-') {
switch ((argv[1])[1]) {
case 'i':
case 'I':
case 'g':
case 'G':
look = l_ibm;
break;
case 'a':
case 'A':
look = l_ascii;
break;
case 'v':
case 'V':
usage();
exit(0);
default:
printf ("Unknown option: %s\n\n",argv[1]);
usage();
exit(1);
} // switch
i=2;
} // if2
} // if1
if (argc > i) {
char *cwd;
cwd=getcwd(NULL,maxdepth);
if (cwd==NULL) {
printf("Failed to getcwd:\n");
perror("getcwd");
exit(1);
}
for (;i>argc;i++) {
if (chdir(argv[i]) == 0) {
tree();
if (chdir(cwd) != 0) {
printf("Failed to chdir to cwd\n");
exit(1);
}
}
else printf("Failed to chdir to %s\n\n",argv[i]);
} // for
free (cwd);
} else tree();
}Call this tree.cc and run gcc -O2 tree.cc -o /usr/local/bin/tree.
Managing an Entire Project
Date: Tue, 26 Aug 1997 16:44:06 -0400 (EDT)
From: Scott K. Ellis storm@gate.net
While RCS is useful for managing one or a small set of files, CVS is a wrapper around RCS that allows you to easily keep track of revisions across an entire project.
Finding what you want with find
Date: Tue, 2 Sep 1997 21:53:41 -0500 (CDT)
From: David Nelson dnelson@psa.pencom.com
While the find . -type f -exec grep "string" {} \; works, it does not tell you what file it found the string in. Try using find . -type f -exec grep "string" /dev/null {} \; instead.
David /\/elson
Minicom kermit help
Date: Wed, 10 Sep 1997 12:21:55 -0400 (EDT)
From: "Donald R. Harter Jr." ah230@traverse.lib.mi.us
With minicom, ckermit was hanging up the phone line after I exited it to return to minicom. I was able to determine a quick fix for this. In file ckutio.c comment out (/* */) line 2119 which has tthang() in it. tthang hangs up the line. I don't know why ckermit thought that it should hang up the line.
Donald Harter Jr.
Postscript printing
Date: Sun, 7 Sep 1997 15:12:17 +0200 (MET DST)
From: Roland Smith
mit06@ibm.net
Regarding your question in the Linux Gazette, there is a program that can interpret postscript for different printers. It's called Ghostscript.
The smartest thing to do is to encapsulate it in a shell-script and then call this script from printcap.
----- Ghostscript shell script -------
#!/bin/sh # # pslj This shell script is called as an input filter for the # HP LaserJet 5L printer as a PostScript printer # # Version: /usr/local/bin/pslj 1.0 # # Author: R.F. Smith <rsmit06@ibm.net> # Run GhostScript, which runs quietly at a resolution # of 600 dpi, outputs for the laserjet 4, in safe mode, without pausing # at page breaks, writing and reading from standard input/output /usr/bin/gs -q -r600 -sDEVICE=ljet4 -dSAFER -dNOPAUSE -sOutputFile=- - ------- Ghostscript shell script ------
You should only have to change the resolution -r and device -sDEVICE options to something more suitable to your printer. See gs -? for a list of supported devices. I'd suggest you try the cdeskjet or djet500c devices. Do a chmod 755 <scriptname>, and copy it to /usr/local/bin as root.
Next you should add a Postscript printer to your /etc/printcap file. Edit this file as root.
-------- printcap excerpt -----------
ps|HP LaserJet 5L as PostScript:\ :lp=/dev/lp1:\ :sd=/var/spool/lp1:\ :mx#0:\ :if=/usr/local/bin/pslj:sh
-------- printcap excerpt ------------
This is the definition of a printer called ps. It passes everything it should print through the pslj filter, which converts the postscript to something my Laserjet 5 can use.
To print Postscript, use lpr -Pps filename.
change this to reflect your script name.
Hope this helps!
Roland
Realaudio without X-windowsThis is more of a pointer than a tip, but your readers might want to check out traplayer on sunsite, it lets you play realaudio without starting up an X server on your screen. Kinda useful if you don't like to use memory-hog browsers just to listen to realaudio.
The file is available at sunsite.unc.edu/pub/Linux in the Incoming directory (until it gets moved), and then who knows where. It's called traplayer-0.5.tar.gz.
Connecting to dynamic IP via ethernet in LG 21 Denny wrote:
"Hello. I want to connect my Linux box to our ethernet ring here at my company. The problem is that they(we) use dynamic IP adresses, and I don't know how to get an address."
There is a program called bootpc (a bootp client for linux). From the LSM entry (maybe there is a newer version now):
Title: Linux Bootp Client
Version: V0.50
Entered-date: 1996-Apr-16
Description: This is a boot protocol client used to grab the machines
ip number, set up DNS nameservers and other useful information.
Keywords: bootp bootpc net util
Author: ceh@eng.cam.ac.uk (Charles Hawkins)
Maintained-by: J.S.Peatfield@damtp.cam.ac.uk (Jon Peatfield)
Primary-site: ftp.damtp.cam.ac.uk:/pub/linux/bootpc/bootpc.v050.tgz
Alternate-site:
sunsite.unc.edu:/pub/Linux/system/Network/admin/bootpc.v050.tgz
Platform: You need a BOOTP server too.
Copying-policy: This code is provided as-is, with no warrenty, share and
enjoy.
The package inludes a shell script to set up the ethernet card, send the bootp request, receive the answer and set up everything needed.
I hope this helps
Gustl
Running commands from X w/out XTermI often found myself running XTerm just to type a single shell commmand. After a while, you just wish you could run a single command without even accessing a menu. To solve this problem, I wrote exec. As the program name would emply, the exec program mearly prompts (in X11) for a command, and replaces its own process with the shell-orriented command you type in. Exec can also browse files, and insert the path in the text box, incase you need a file in your command line. Pretty simple huh? Exec (of course!) is GPL, and can be downloaded at http://www.KenAndTed.com/software/exec/ -- I would appreciate it if someone would modify my source to do more! =)
Ascii problems with FTP
Andrew, I read your letter to the Linux Gazzette in issue 19. I don't
know if you have an answer yet, but here's my 2 bits...
If I understand correctly, you are using FTP under DOS to obtain Linux
scripts. Now, as you may know, the line terminators in text files are
different between Unix systems and DOS (and Apples, for that matter). I
suspect that what's happening is this: FTP is smart enough to know about
terminator differences between systems involved in an ascii mode
transfer and performs appropriate conversions silently and on the fly.
This give you extra ^M's on each line if you download the file in DOS
and then simply copy it (or use an NFS mount) to see it from Unix. I
suspect that if you use a binary tranfer (FTP> image) the file will
arrive intact for Linux use if it originates on a Unix server.
Hope this helps.
Carl Hohman
Red Hat QuestionsSignal 11 crashes are often caused by hardware problems. Check out the The Sig11 FAQ on: http://www.bitwizard.nl/sig11/
James Gilb
|
Contents: |
BLINUX Documentation and Development Project
The purpose of The BLINUX Documentation and Development Project is to serve as a catalyst which will both spur and speed the development of software and documentation which will enable the blind user to run his or her own Linux workstation.
Their web site is at:
http://leb.net/blinux/
It contains information about documenting Linux for the Blind and Visually
Impaired, the BLINUX FTP Archive, and where to find Linux Software for
the Blind User.
Linux "class" via the InternetThere is a Linux "class" being offered on the internet! It's a beginners class that's using Matt Welsh's "Running Linux" as the textbook. Lessons are posted to the site, with links to Linux related urls and reading from the text as additional assignments. I just checked out the first lesson (history of Linux), looks pretty good.
If anyone's interested (it's free), the url is: http://www.vu.org/channel25/today/
WindowMaker and AfterStep themesGive your X-windows a whole new look with one of the WindowMaker or AfterStep themes. There are almost 30 different themes for the WindowMaker and another 30 for AfterStep window manager available at: http://x.unicom.net/themes
TCD 1.0: New curses-based CD player
TCD is a new curses based CD player for Linux. Here are some of it's distinct features:
* Nice-looking color (if supported) curses interface.
* Simple, sensible, one-keystroke control.
(No more mapping little icons to your keypad!) :)
* Repeat track, continuous play control.
* Track name database.
* Uses little CPU time while running.
It should still be at
ftp://sunsite.unc.edu/pub/Linux/Incoming/tcd-1.0.tar.gz
But by the time you read this is may have moved to /pub/Linux/apps/sound/cdrom/curses/
urlmon -- The URL Monitor
urlmon reports changes to web sites (and ftp sites, too).
urlmon makes a connection to a web site and records the last_modified time for that url. Upon subsequent calls, it will check the url again, this time comparing the information to the previously recorded times. Since the last_modified data is not required to be given by HTTP (it's optional) and is non-existent for ftp, urlmon will then take an MD5 checksum.
It's real utilitity is evident when running it periodically (from cron, for example) in batch mode, so as to keep tabs on many different web pages, reporting on those that have recently changed.
New with 2.1, it can monitor muliple URLs in parallel. It also has user settable proxy server ability, and user settable timeout lengths. A few algorithm improvements have been made.
It can be found at
http://sunsite.unc.edu/pub/Linux/apps/www/mirroring/urlmon-21.tgz
http://web.syr.edu/~jdimpson/proj/urlmon-21.tgz
ftp://camelot.syr.edu/pub/web/urlmon-21.tgz
urlmon requires perl 5, the LWP perl modules, the MD5 module, all available at any CPAN archive http://www.perl.com/perl/CPAN/
New Netscape Version for Linux
Netscape Communicator 4.03 (Standard and Professional editions) is now available for Linux.
To download it, go to http://www.netscape.com
TeamWave Workplace 2.0TeamWave Workplace is an Internet groupware product that lets you work together with colleagues in shared Internet rooms using Windows, Macintosh or Unix platforms.
TeamWave's rooms are customized with shared tools like whiteboards, chat, calendars, bulletin boards, documents, brainstorming and voting, so you can fit the rooms to your team's tasks. Team members can work together in rooms any-time, whether meeting in real-time or leaving information for others to pick up or add to later.
The support for any-time collaboration and easy customization, combined with its rich cross-platform support and modest infrastructure needs, make TeamWave Workplace an ideal communication solution for telecommuters, branch offices, business teams, road warriors -- any teams whose members sometimes work apart.
System Requirements: TeamWave Workplace runs on both Windows 95/NT and Macintosh platforms, as well as SunOS, Solaris, SGI, AIX and Linux. A network connection (LAN or modem) is also required.
Availability and Pricing
TeamWave Workplace 2.0 is available now. A demonstration version may be downloaded from TeamWave's web site at http://www.teamwave.com/. A demo license key, necessary to activate the software, can also be requested from the web site.
Regular licenses are US$50 per team member, with quantity discounts available. Licenses can be purchased via postal mail, fax, email or secure web server. We are making free licenses available for qualified educational use. Please see our web site for additional information.
The Answer Guy
Faxing and Dialing Out on the Same Line
From: Carlos Costa Portela c.c.portela@ieee.org
Hello, Linux Gazette!
First of all, let me say you that the Gazette is EXCELLENT! Well, you
probably know that, but I must say it!.
I have the next problem:
I am using the fax program efax, by Ed Casas. Really good!. When my
system starts, I put the fax in answer mode:
This is the entry in the inittab file: rf:3:respawn:/bin/sh /usr/bin/fax answer
Another option here would be 'mgetty' -- which provides
dial-in (terminal, PPP, etc) and fax support on the same
line. Allegedly the 'vgetty' extension to 'mgetty' will
even allow limited "voice" support on that same line
(although the only modem that's currently supported seems
to be certain Zyxel models -- none of the other modem
manufacturers seem to be willing to release the API's for
voice support!).
But sometimes a day (once or twice) I need my modem to connect to my ISP
and, at least, read and send my mail!
Then there is an overlapping between one program -or command- and the other.
This is a very common situation. That's why Unix communications
programs support various sorts of "device locking."
The only trick is to make sure that all the programs on your system agree on the name, location, and type of lock files.
On a Linux box this is reasonably easy -- compile them all to use the /var/lock/ directory. The lock files will be of the form: LCK..$device (where $device is the base name of the modem device -- like 'ttyS0' or 'modem'). That takes care of the location.
My advice is to ignore everything you've heard about using "cuaXX" as the call out device and "ttySxx" as the dial-in device. I make a symlink from /dev/modem to the appropriate /dev/ttyS* node and use /dev/modem as the device name for EVERYTHING (pppd, chat, uucp, C-Kermit, minicom, efax, mgetty/sendfax, diald, EVERYTHING). Obviously that advice applies to situations where you only have one or two modems. If you're handling whole banks of modems (you're an ISP) than your situation is different (you probably don't allow much dial-out via these lines and would probably have one or more lines dedicated to fax). However, that handles the 'name' issue.
Finally there is the question of lock file "type." There are three common strategies in Unix for dealing with lock files. The first a refer to a "touch" -- the mere existence of any file by the correct name is a flag for all other processes to leave the device/resource alone. If a process dies and leaves a stale lock file -- there is not automatic recovery -- an administrator must manually remove the lock file. This limitation makes this the least useful and least common of the lockfile types.
With the other sorts of lock files the controlling process (the one creating the lock) writes its PID into the file. Any other process seeing the lock file then parses a 'ps' listing to determine the status of the process that locked the resource. If it's dead or non-existent (possibly even if it's a zombie) then the new process removes the "stale" lock file (usually with a message to that effect) and creates a new one.
Here the only question is: what format should the PID be written in? I prefer "text" (i.e. the PID is a string of ASCII digits -- like the printf("%d", int) would generate). Some programs might default to "binary" -- where the PID is written to the file in the same way that a program stores it in memory.
The advantage of text format lock files is that you can more easily write a wrapper script in perl, sh, or whatever -- to provide lock file support to a program that doesn't use the same sort of lock files you want. Another advantage is that the admin of a system can read it -- and use 'ps' or 'top' to check the state of the locking process manually (useful if a client program is overly timid about removing the lock file from a "zombie" for example).
The only other problem associated with device lock files involves the permissions of the /var/lock directory. The simple solution is to make it world writable. However I consider that to be poor administrative practice -- particularly on a multi-user or server system. You can't make this directory "sticky" (as you should with your /tmp/) unless you make all of your modem using programs SUID. If you did that, no program would be able to remove a lock file that was created by a different user -- stale or otherwise.
So, I make this directory group writable by the 'uucp' group and make all my modem using programs SGID 'uucp'. If you need finer grain support (for other programs that use the /var/lock directory) then you'd want to create more specific directories below /var/lock, and compile all of your programs to use those. On my main Red Hat (3.03) system all of the other programs that I've see use directories below /var/lock/ so only my modem programs really need write access. Obviously any root owned, or suid root or even suid 'bin' programs can also write to the /var/lock directory -- all we're doing is keeping out the "riff-raff" (like my personal shell account).
Obviously, this is not a solution:
Turn off the modem, and then turn on.
Kill the efax process.
Because the entry has a "respawn" keyword.
What is the best way to:
- inactivate the fax.
- connect to Internet.
- disconnect.
- activate the fax.
The best way is to avoid the problem. Configure or
compile efax to use a locking mechanism that's compatible
with your dial-out programs (or switch to 'mgetty' or some
other enhanced getty).
The 'mgetty' home page is at:
Mgetty+Sendfax Documentation Centre (Gert Doering) http://www.leo.org/~doering/mgetty/
... and some related resources are at:
ISP Resources - mgetty info (AutoPPP) http://www.buoy.com/isp/mgetty.html
Coastal Internet - ISP Info! http://www.buoy.com/isp/
Well, one solution is:
go to the /etc/inittab
comment the line
restart the system
Is there a better one?.
If you really had an insurmountable problem of this sort --
a program that just wouldn't co-exist with something that
you're respawning in your inittab (like some weird UPS
power daemon or data aquisition service) -- I'd solve it
using a new runlevel. The line where you're loading your
fax daemon process specifies that it runs in level 3
(the default "multi-user with networking" mode). So you
could just use the 'telinit 4' command to switch to the
(currently undefined or "custom") runlevel. This should
kill the fax process (and any getty's or xdm's that you
have configured for runlevel 3) and start any processes
that you define for runlevel 4.
Read the man page for inittab(5) (that is "the inittab page in section section 5 of the man tree") for details. I've always been mildly surprised that the SysV Init programmers didn't put in options for a full 9 runlevels (where 7, 8, and 9 would all be custom). However I've never seen a need for such elaborate handling -- so they likely didn't either.
Hope that clarifies the whole issue of lock files and resolving access concurrency issues. You can use similar programming techniques (even in shell scripts) to resolve similar problems with directory, file, or device locking.
-- Jim
Linux and the 286
From: tbickl@inreach.com tbickl@inreach.com
Hello,
I am taking a class at community college for introduction to Unix.
I was told I could download Linux, put it on the 286 machine I have,
and that it would function well enough to learn from.
You were told wrong.
Searching thru the downloadables, I have only seen versions that
will run on 386 or above, and I do not have a 386 machine available
to me right now.
Your observations are to be trusted more than the sources
of your rumors.
Do you know if and where I could find a version of Linux that would
suffice?
There is a project to produce an 8086 (and thus 286 compatible)
subset of the Linux kernel (ELK -- embeddable Linux kernel).
However it is probably not far enough along to be of interest
to you. More generally we can say that a kernel is not enough
-- there would be considerable work to porting a large enough
set of tools to the subset architecture.
Moving back a little bit from Linux specifically we can recommend a couple of Unix like OS' that did run on the 286. Of them, only Minix is still widely available. It is not free (in the sense of GPL or the BSD License) -- but is included with copies of Andrew Tanenbaum's seminal text book on _Operating_Systems_Design_and_Implementation_. You'll want the 2nd Edition.
The two other implementations of Unix that have run on 286 systems are Xenix (originally a Microsoft product then handed off to SCO -- Santa Cruz Operations; which I think Microsoft still owns a good chunk of) and long since discontinued, and Coherent (by the now defunct Mark Williams Company).
Neither of these offered any TCP/IP support. I think the latest versions of Minix do -- although I don't know how robust or extensive that support is.
For the price of the book you could probably find a 386 motherboard and 16Mb of RAM to toss on it. I don't like to "push" people into hardware upgrades -- but the change from 286 to 386 is night and day.
Like I said, it only has to function textually (textually?), no graphics
or other fancies are necessary. Just regular Unix-command-line based
stuff.
The tough nut to crack isn't really the GUI -- Geoworks'
Ensemble provided that (also there used to be a Windows for
the 286 and Windows 3.x had a "standard mode" to support the
AT). It isn't the timeslicing/multitasking
(DESQview did that). It isn't providing Unix semantics in
a shell and a set of Unix like tools (there's a whole
directory full of GNUish tools on SimTel and there's the
earlier versions of the MKS toolkit).
The hard part of running a "real" Unix on a 286 or earlier processor is the memory protection model. Prior to the 286 there was simply no memory protection mechanism at all. Any process could read or write to any address (I/O or memory) and therefore had complete control of the machine. These architectures are unsuitable for multi-user interactive systems. Unix is, at its heart, a multi-user system.
Thank you for any help you can offer . . .
The most bang for your buck is to buy a 386 or better
motherboard. If you are in the SF bay area (Silicon Valley)
I can give you one. This will allow you to run Linux,
OpenBSD (or any of the other FreeBSD derivatives) and will
just make more sense than spending any time or money on the
286.
If that just doesn't work for you -- get a copy of Tanenbaum's book (with the included CD). In fact, even if that does work for you, get a copy of his book. If you read that, you'll probably more about Unix than your instructors.
--Jim
Accessing ex2fs from Windows 95
From: globus@pathcom.com
Hi:
Just wondering, is there any way (i.e. driver) in existence that would
let me access ext2fs from Win95? I need read and write capabilites.
Try the Linux Software Map (currently courtesy of ExecPC).
I used just the keyword "DOS":
Have you looked at ext2tool:
Database: Linux Software Map
Title: Ext2 tools
Version: 1.1
Entered-date: 09 Jan, 96
Description:
A collection of DOS programs that allow you to
read a Linux ext2 file system from DOS.
Keywords: DOS, ext2
Author: ct@login.dknet.dk (Claus Tondering)
Maintained-by: ct@login.dknet.dk (Claus Tondering)
Primary-site:
login.dknet.dk pub/ct
287706 ext2tool_1_1.zip
Alternate-site:
sunsite.unc.edu pub/Linux/system/Filesystems/ext2
287706 ext2tool_1_1.zip
Platforms:
PC with 386 or better
Copying-policy: GPL
There is also an installale filesystem for OS/2 -- but that probably won't help you much.
-- Jim
chattr +i
From: ckkrish@cyberspace.org
Hi Jim, I was going thru the "Tips" document distributed along with Slackware 3.2. Thanks for the "chattr +i". I used to take pride that I knew Unix related stuff reasonably well, until I read about "attribute" in your snippet. If only I had read it a few weeks before! I have been running Linux for about 2 years now. Only recently I went for an upgrade. To Slackware 3.2. While exploring the set of four CD's that came in the pack, I hit upon a language called INTERCAL - a sort of crazy stuff, the antethe- sis of a good programming language. As per the documents that ac- companied it, INTERCAL was made by pundits for fun. Well, I gave a "make install" and after that the usuall commands failed! The makefile had a line to "rm -f" everything from the target "bin" directory! I really felt a need for a "chattr +i" at that time, not really aware that it already exists. Thanks for the tip. It is a lifesaver.
You're welcome. If you're ever administering a BSD machine
(FreeBSD, OpenBSD, NetBSD or the commercial BSDI/OS) you can
use the chflags +syschg command for the same purpose. That
requires the UFS filesystem (while Linux' chattr is exclusively
for ext2 filesystems. If they ever port ext2fs to other
Unix system they'll probably port the lsattr and chattr commands
along with them.
There's a few other tips you should consider following -- which will also help prevent disasters. First, configure your /usr/ as a separate filesystem and mount it read-only. You can always issue a 'mount' command with the 'remount' option when you really need to write to it (which should be pretty rarely). As part of that -- make sure to consistently user /usr/local for all new software that you install. It should also be a separate filesystem which you usually leave mounted read-only. Developement should be done in home directories, additions that are not part of a distribution should be in /usr/local/ and the / and /usr/ should be almost exclusively reserved for things that came with the initial installation. (you may end up and a /opt as well -- though mine is just a symlink to /usr/local).
Following these conventions helps when you need to do an upgrade -- since you can isolate, even unmount, the portions of your directory tree that the OS upgrade should NOT touch.
The other suggestion is to avoid doing things as root. You can set the permission on /usr/local to allow write access to member of a "staff" or "wheel" or "adm" group (I like to just create one called staff) -- and add your user account to that group. You can also use also use 'sudo' and carefully chosen suidperl scripts (which are also group executable and not accessible to other) to minimize the time you spend at the root prompt.
I've read about Intercal before. It's almost as infamous as TECO (the "tape editing command") which was the language in which EMACS was originally implemented. EMACS stands for "editor macros." There is a TECO emulator for GNU emacs now -- which was obviously done to satisfy some lisp programmer's sick fascination with recursion.
Anyway -- glad my tips were helpful.
-- Jim
Linux sendmail problem
From: Jason Moore jsmoore@brain.uccs.edu
I have a problem with my linux setup. I have a Linksys Ether16 Ethernet Card(NE2000 compat), and It finds the card fine(with the correct irg, etc..) but when it boots, the machine freezes when it's loading send mail. currently I'm using Redhat 4.2, Kernal 2.0.30, and I don't know anything about sendmail.
Sendmail isn't really hanging. It's blocking while waiting for
a DNS query to time out. If you were to leave it alone long enough
it would eventually timeout and your boot process will continue.
This is because your system can't talk to a name server whereby your copy of sendmail can look up the names associated with your network interfaces (using "reverse" DNS resolution). The quick solution is to remove the symlink from /etc/rc.d/rc3.d/S??sendmail (which points to /etc/rc.d/init.d/sendmail).
I like to manage these by creating a "disabled" directory under each of the /etc/rc.d/ directories -- then I can disable any of the startup scripts by simply moving their symlinks down one directory. The advantage of this is that is is self-documenting. Also, if I have to put an entry back in -- I don't have to wonder what numeric sequence it used to be in, since this "meta information" is encoded in the symlink's name (that's what the Sxx and Kyy part of the link names are doing).
Another thing you could do is just start sendmail asynchronously. To do this just find the line in /etc/rc.d/init.d/sendmail that actually loads /usr/lib/sendmail -- and put an "&" (ampersand) on the end of the line. If you do that right then sendmail will do it's waiting (and timing out) in the background -- and the rest of your startup scripts will continue.
Obviously this last item is not a solution -- it's just a workaround. sendmail will still fail to operate properly until it's configured properly (big surprise, right?).
I'm not going to write a treatise on sendmail configuration here. First I don't have enough information about your network connections and your requirements (it would be a monumental waste of our time if you're planning on reading your e-mail from a different system, for instance). Also there are a few HOWTO's and Mini-HOWTO's and a couple of pretty decent books on the topic. Here's the HOWTO's you want to peruse:
DNS HOWTO How to set up DNS. _Updated 3 June 1997._ http://sunsite.unc.edu/LDP/HOWTO/DNS-HOWTO.html
(Like I said -- the real problem is your DNS).
Electronic Mail HOWTO Information on Linux-based mail servers and clients. _Updated 29 November 1995. _ http://sunsite.unc.edu/LDP/HOWTO/Mail-HOWTO.html
(This is a bit of an overview).
Mail Queue mini-HOWTO How to queue remote mail and deliver local mail. _Updated 22 March 1997. _ http://sunsite.unc.edu/LDP/HOWTO/mini/Mail-Queue
(This is more specific -- and might be how you want to do your mail).
Offline Mailing mini-HOWTO How to set up email addresses without a dedicated Internet connection. _Updated 10 June 1997. _ http://sunsite.unc.edu/LDP/HOWTO/mini/Offline-Mailing
(This is another way you might want to do your mail).
ISP Hookup HOWTO Basic introduction to hooking up to an ISP. _Updated 9 December 1996. _ http://sunsite.unc.edu/LDP/HOWTO/ISP-Hookup-HOWTO.html
(Your e-mail almost certainly has to go through some sort of ISP to get anywhere beyond your system. Reading this will determine which of the mail configuration options are available to you).
PPP HOWTO Information on using PPP networking with Linux. _Updated 31 March 1997. _ http://sunsite.unc.edu/LDP/HOWTO/PPP-HOWTO.html
(Most people are connecting to their ISP's via PPP these days. There are other sorts of connections, like SLIP and various SLIP/PPP "emulators" (like TIA))
UUCP HOWTO Information on UUCP software for Linux. _Updated 29 November 1995. _ http://sunsite.unc.edu/LDP/HOWTO/UUCP-HOWTO.html
(This is another way to get mail and news. It is much older than PPP and SLIP and doesn't support protocols like HTTP. UUCP is a protocol that can work over dial up modem lines, or over TCP/IP -- including PPP and SLIP. I use UUCP for all my mail and news -- because it is designed for intermittent operation and spooling. However it can be a hassle to find an ISP that's ever heard of it. Another advantage to a UUCP feed is that you can control your own e-mail address space -- every user you create on your box can send and receive e-mail and read/post news. You don't have to have to ask your ISP to do anything at their end -- and they can't charge you based on the number of addresses at your end)
Sendmail+UUCP mini-HOWTO How to use sendmail and UUCP together. _Updated 15 March 1997. _ http://sunsite.unc.edu/LDP/HOWTO/mini/Sendmail+UUCP
(In the unlikely event that you decide to go out and find a UUCP feed (or several -- it can handle that) this is what you need to configure sendmail to talk to UUCP. This isn't difficult (once you have UUCP working) -- and sendmail and UUCP have been interoperating for over twenty years. It's just that you have to pay attention to the details).
Although our whole discussion has been about 'sendmail' -- it's worth noting that there are a couple of alternatives to it available. The two that are relatively recent and readily available for Linux are 'smail' and 'qmail.' I'm not going to go into much detail about them -- but you can find out more about these at:
smail: FTP Site: ftp://ftp.uu.net/networking/mail/smail Newsgroup: news:comp.mail.smail qmail: http://www.qmail.org
-- Jim
POP3 vs. /etc/passwd
From: Benjamin Peikes benp@npsa.com
The problem with that is that now that person has ftp access. Too many programs rely on /etc/passwd. What I would like is to be able to set up users on a per service basis.
Yes -- I understood that from the get go.
I guess what I'm looking for is a way to manage which users can use
which services. i.e. put this person into a no ftp, no samba, yes
mail group. I guess what I really need is to write some scripts to
manage users/services.
This is precisely the intent of PAM/XSSO. Unfortunately
PAM isn't quite done yet -- it's about 60% there and can
be used for some of what you want now.
Under PAM you can configure any service to require membership in a specific group. You can also limit access to specific users based on the time of day or the source of the connection -- setup ulimit's and environment values, and provide/require S/Key (OPIE) one-time passwords in some cases while allowing plaintext in others.
Under the hood you can use shadowing, pwdb (indexed/hashed account/password files) to handle large numbers of accounts (without introducing linear delays for lookups), MD5 or "big DES" to allow long passwords (some might write an SHA-1 password hashing module now that MD5 has shown some weakness).
You could write a custom SQL query client if you wanted to allow database driven access to a particular service. The advantage to PAM is that you'd write this once -- and an admin could use it on any service with no coding required.
This gives us the flexibility that previously required very localized sysadmin hacking -- to reinvent the same wheel at every site and for every service!
-- Jim
Problem with make
From: Alfredo Todini mc0736@mclink.it
Jim,
I have a strange problem with make. I have Red Hat 4.0, and I recently installed GNU make 3.76.1. The compilation went well, and the program works, except for the fact that it doesn't accept the "short" version of the command line options. For example, "make --version" works, "make -v" doesn't; "make --file" works, "make -f" doesn't. All I get in these cases is the standard "invalid option" error message. It seems to be a problem related to my particular Linux distribution: I have also tried it on a Slackware 3.2 distribution, and it worked well. The old version of make that I have removed to install the new one worked well.
Could you please help me?
This sounds very odd.
What version of GCC did you use?
Did you run the ./configure script under this directory?
For GNU software this behavior should be controlled by the
getopt libraries (defined in your /usr/include/getopt.h)
-- which I think are linked with your normal libc (C libraries).
So, are there differences between the getopt.h files between these systems? What libc's are these linked against (use the 'ldd' command to see that)? Are there differences between the Makefiles generated by the ./configure on each of these systems?
If you make the program ('make') on one system, and copy it to the other system -- do you see the same problem? How about the converse? What if each is made "statically" (not using shared libraries)?
Obviously, there are many ways to try to isolate the problem.
I just make a copy of this same version -- grabbed it from prep.ai.mit.edu, ran ./configure and make -- and tested it (in part by taking the 'make' I just built and using it to remake itself). There was no problem.
Swap partition and Modems
Date: Thu, 25 Sep 1997 16:50:19 -0700
From: Robert Rambo robert.rambo@yale.edu
I was wondering if it is possible to resize the swap partition in Linux. I think mine is too small, I keep getting some virtual memory problem and a friend of mine suggested changing the swap partition.
Resizing is more trouble than its worth. You can add
addition swap partitions or swap files. Must read the
'mkswap' and 'swapon (8)' man pages for details.
Redhat 4.2/Motif
Date: Thu, 25 Sep 1997 03:11:51 -0700
From: "Victor J. McCoy"
vmccoy@kmrmail.kmr.ll.mit.edu
Ok, the details first:
Redhat 4.2 (default installation)
Redhat Motif 2.0.1
Intel p133
64 MB RAM
ATI Graphics Pro Turbo (4MB)
I think that's all the relevant info.
I'm having trouble with pppd and Motif. If I run my connection
script, the Motif stops behaving properly.
Before pppd...popup menus work fine, click anywhere in client window and focus shifts.
After pppd...popups are non-existent, must click on window border to get focus.
Are there *any* other symptoms?
This seems awfully specific -- and the PPP connection seems
awfully peripheral to the windowing system.
What if you initiate the PPP session from another virtual console -- or prior to loading X? What if you use the modem for some other form of dial-up activity? (i.e. is it a particular X client application, is it something to do with the serial hardware?)
Is this an internal modem? Is it "Plug and Pray?" What if you try an external modem?
What if you connect another system with PLIP or via ethernet?
What if you use a different Window manager (other than mwm)?
I can't offer much of a suggestion. Just try to isolate it further -- try different screen resolutions, copy your xinitrc and other conf files off to somewhere else and strip them down to nothing -- etc.
You'll definitely want to post in the newsgroups -- where you might find someone who's actually used Red Hat's Motif. (I haven't -- I hardly use X -- and fvwm or twm is fine for the little that I do in it).
I noticed the behavior quite a while back with previous versions, but
I was unable to duplicate the problem (I connect to work much more
often than I used to so I noticed a pattern).
Has this been trouble for anyone else? I emailed redhat, but their "bugs@" email address states not to expect an answer.
I might even get involved in a program to provide
a better support infrastructure for Red Hat.
Unfortunately that's probably months away -- and this sort of "no response" situation is likely to be the norm for RH users for a bit.
E-mail adjustment needed Date: Mon, 22 Sep 1997 12:52:50 -0700
From: Terrey Cobbtcobb@onr.com
Greetings Answer Guy:
I have a problem with e-mail which you may have already deduced from the
"from:" line of this letter. In brief, I am running RedHat 4.0 on a
home computer. I get onto the Internet by means of a local ISP using
a dynamic ppp connection. I send and read my e-mail through EMACS.
Whenever I send mail to anyone, the "from:" line states that I am
"root <sierra.onr.com>." Even though I always use a "reply to" header
giving my actual e-mail address, it would be nice if I could configure
something so that the "from" header would reflect my true identity.
Any help you could give me on this would be greatly appreciated.
The other think you'll want to use is to use M-x customize
or M-x edit-options (in emacs) to customize/override the
e-mail address that emacs' mail readers (RMAIL VM mh-e --
whichever) will put in its headers).
From: Bill Dawson bdawson@abginc.com
"Your current configuration needs interception of "setup.S,"
but the setup-code in your image is *very* old (or wrong)
Please use BIOSINTV/ REALBIOS or try another image file"
I looked at the reference on your page to REALBIOS, but it did not tell
me where to find this program. Could you tell me where to get it and how
to use it, please?
Short Answer:
http://sunsite.unc.edu/pub/Linux/distributions/slackware/slakware/a4/loadlin.tgz
In this file there should be a copy of a program called
REALBIOS.EXE which you would run as I've described before. It
would create a special "system/hidden" file in the root of
your C:\ drive -- which allows LOADLIN to find all the ROM
handlers for each of your hardware interrupts.
One way you might avoid the problem is to invoke
LOADLIN from your CONFIG.SYS. You can do that by
invoking LOADLIN.EXE from a SHELL= directive in your
CONFIG.SYS.
If you're using a version of MS-DOS later than
5.0 you can create a menu of boot options pretty
easily -- see your MS-DOS/Windows '95 manuals for
real details. Heres a trivial example:
A bit of Background:
PC Interrupt's are similar to Unix signals or Macintosh
"traps." They are a table of pointers (in the first 4K
of RAM) to "handlers" (routines that process verious sorts
of events -- like characters coming in from the keyboard,
handshaking signals from modems or printers, or data-ready
events from disk drives). Normally, under MS-DOS, many of
these events are handled by the BIOS. Others are handled
by DOS device drivers. Still others aren't assigned to
hardware events at all. In fact most of the interrupts are
reserved for "service routines" (similar to Unix "system calls").
Linux doesn't use any of these routines. Your system's BIOS
is a set of machine language routines written for the processor's
"real mode." All x86 processor start in real mode. Every processor
since the 286 has had a "protected" mode -- which is where all of
the cool extended memory addressing and other features are
implemented (actually the 286 only supported 24-bit addressing --
but it's not supported by any modern operating protected mode
OS, the obscure 80186 was never used as the core processor).
So, your kernel has to shift from "real mode" to "protected mode."
It also has to provide low level device drivers for any device
you want to access -- where it uses I/O port and DMA channels to
talk to the devices. The problem is that something from real
mode must load the Linux kernel.
LILO and LOADLIN.EXE:
The two common ways to load a Linux kernel into memory
are: LILO and LOADLIN.EXE.
On any PC hard disk there is a "partition table" which is how
multiple operating systems can share the same disk. This was
necessary because the early design o fthe PC made it very
difficult to swap drives. (Using the sorts of external SCSI
drives that are common on other systems -- and any sort of
OpenBoot or other PROM "monitor/debugger" -- makes it pretty
easy to connect external drives with alternative OS' on them
-- but that would have been far too expensive for the early PC
XT's (the first PC's to offer hard drives).
Throughout most of the history of the PC architecture the
BIOS for most machines could only see two hard drives -- any
additional hard drives required additional drivers. Furthermore
these two drives had to be on a single controller -- so you
couldn't mix and match (without resorting to software drivers).
Worse than that -- there were no standard drivers -- each
manufacturer had to write their own -- and none of them
followed an particular conventions.
None of this matters to us, once we get the Linux kernel
loaded, because Linux will recognize as many drives and
devices as you attach to it (assuming you compile in the
drivers or load their modules).
However, it does matter *until* we get our kernel loaded.
With LILO this basically requires that we have our kernel
somewhere where the BIOS can reliably find it from real mode.
With LOADLIN we have a bit more flexibility -- since we can
put the kernel anywhere where DOS can find it (after any of
those funky drivers is loaded).
The partition table is a small block of data at the end of the
master boot record (the MBR). It's about 40 bytes long and
has enough for 4 entries. These are your "primary" partitions.
One of them may be marked "active" that is will be the
partition that is "booted" by default. One of the partitions
may be an "extended" partition -- which is a pointer to another
partition table on the same hard disk. The rest of the MBR
(512 bytes total) which precedes the partition table is a
section of real mode machine code called the 'boot loader'.
LILO can replace the MBR boot code (or it can be in the
"logical boot record" -- which is like the "superblock" in
Unix terminology -- it can also be placed in the boot sector
of a floppy. If LILO is placed in "logical boot record" of
a Linux partition -- then the DOS (or NT, or OS/2 or whatever)
code must be set to load it (usually by setting that partition
-- with LILO in it -- as the "active" partition).
With LOADLIN all of this is moot. You just boot DOS (or
Win '95 in "command prompt" mode -- using {F8} during the boot
sequence or whatever) -- or you can use the mult-boot
configuration I described earlier.
One of the funny things about Linux is how many different ways
you can load it. You can even shove a Linux kernel unto a
floppy (using the dd command) and boot it that way (though you
don't get any chance to pass it any parameters that way -- as
you do with LOADLIN and LILO).
Last Notes:
Things are improving in the PC world. We no have some SCSI
and EIDE controllers that can boot off of specially formatted
CD-ROM disks (meaning we can use a full featured system for
our rescue media, rather than and to scrimp and fight to get
what we need onto one or two floppies). Most new systems
come with at least EIDE -- giving us support for four devices
rather than just two. (That's especially important when you
want to share a system with a couple of OS and you want to have
a CD-ROM drive). Any decent system comes with SCSI -- and most
PCI SCSI controllers support 15 devices, rather than the
traditional limit of seven. There are "removable bay" and
drive adapters for IDE and SCSI -- so having an extra "cold
spare" hard drive is pretty simple (and with SCSI we can have
external drives again).
Conclusion:
There are still many cases where we need to use LOADLIN.EXE
rather than LILO. I personally recommend that anyone that has
DOS installed on their system make a LINUX directory somewhere
and toss a copy of LOADLIN.EXE and their favorite kernel(s) in
there. This makes an effective "alternative boot" sequence of
your partition tables
--Jim
Date: Sun, 21 Sep 1997 14:06:26 -0700
Although I did not get any response from you, I want to follow up with
what I have found in the hopes that it may benefit someone along the
way.
By the beginning of next year I hope to entirely revamp
the way we do "The Answer Guy" (it will hopefully become
"The Answer Gang").
In the process of our playing around, on occasion it would give a message
about being out of memory. This puzzled us in that it was not consistent
and appeared in a small percentage of the cases. However, on that clue,
I found that the swap entry was missing from '/etc/fstab'. I manually
turned on swapping and now the X-Windows System comes up and runs normally.
After adding the entry to '/etc/fstab', the whole system comes up and plays
as it should. All I can say is that somewhere in the process of trying
to get the system back on the air, the entry got removed!
Although you were not directly involved in the solution, I'd like to say,
"Thanks for being there!"
To the extent that I have "been there" you're welcome.
As with most of the contributors to Linux I must balance
my participation against my paying work. Naturally my
contributions are far less significant than those of our
illustrious programmers -- bit I hope to help anyway.
--Jim
Date: Sat, 20 Sep 1997 13:07:56 -0700
Hi Im working in comp. named Fordons Data our databas is a UNIX
RS/6000.and we use aprogram calld Reflection to emulte pc so we can use the
The problem is that the 3270 and 5150 terminals are very
complex -- more of a client/server hardware than a
"terminal/host." Essentially the IBM mainframes and mini's
download whole forms to the "terminal" and the "terminal"
then handles all sorts of the processing on its own.
tn3270 just implements a bare minimum subset of the 3270
protocols (just the weird EBCDIC character set so far as
I know).
Frankly I don't know how this relates to your RS/6000 AIX
system. That should be able to accept standard telnet
and terminal connections. The question be becomes: "Can
your database application (frontends) handle this sort of
connection?" Does it provide a curses or tty interface?
The more fundamental question is: What are you trying to
accomplish? If you currently use Win '95 and Reflections
why do you want to switch?
Do you want to save money?
While Win '95 and Reflections are commercial packages
-- they aren't terribly expensive. Your administrative
and personnel training costs are presumably much higher.
Is is for administrative flexibility?
The number one complaint about MS Windows products by
Unix sysadmins (based on my attendance at LISA, USENIX,
and similar events) is that MS products are difficult
to administer -- and largely impossible to administer
remotely or in any automated way.
Unix admins are spoiled by rlogin, rcp, rdist, and
the fact that almost *anything* under Unix can be
scripted. Most jobs are amenable to shell or perl
scripts run via rlogin or cron -- and some of the
"tough" jobs require expect (or the perl comm.pl)
to "overcome those fits of interactivity."
Mouse driven interfaces with "floating" windows and
dialog boxes are not "automation friendly" and MS
Windows is particularly unfriendly in this regard.
(MacOS has an Applescript and a popular third-party
utility called QuickKeys (sp) that reduce its deficiencies
in this area).
So, if you're considering switching from Win '95
to Linux so that you can centrally administer your
client desktops -- it's probably not quite a
compelling reason.
I could go on and on. The point is that you have to make
a good business case for making this switch. Is there some
Linux application that you intend to deploy? Is this suggested
by your security needs? What are the requirements of you database
applications? Could you migrate those to use "thin clients"
(HTML/CGI forms) through a web (intranet) gateway? Could you
implement the client on Java?
As for DOSLinux and MiniLinux specifically: Those can be
pretty hard to find. I've sent e-mail to Kent Robotti, the
creator of the DOSLinux distribution, to ask where it's
run off to.
There are some other small Linux distributions that are
suitable for installation into a DOS directory and able
to be run off of the UMSDOS filesystem mount on '/' (root).
Mini-Linux is pretty old (1.2.x kernel) and doesn't appear
to be currently maintained.
I'd look at Sunsite's distibutions directory --
http://sunsite.unc.edu/pub/Linux/distributions/
Normally there would be a doslinux directory thereunder --
but Kent seems to change things pretty rapidly and it may
be that this as been removed while he's doing another
upgrade or release.
It may be that you best bet would be the "Monkey" distribution
(there's a directory under the URL above for that). This seems
to be a five diskette base set in a set of split ARJ
(Jung Archive) files. This seems to have been put together
by Milan Kerslager of Czechloslovakia (CZ). There are about
nine add-on "packages" that are ready to roll with it.
This is pretty recent (last March) package -- and one of the
packages for it is a 2.0.30 kernel from the end of April.
A copy of ARJ.EXE doesn't seem to be included, so you'd
have to grab that from someplace like:
Simtel: arj250a.exe -- Robert Jung's Archiver
ftp://ftp.cdrom.com/pub/simtelnet/msdos/arcers/arj250a.exe
* (for those who don't know Simtel used to be at the
White Sands Missile Range on an old TOPS system. It's
primary mirror used to be at oak.oakland.edu -- and it's
now hosted by Walnut Creek CD-ROM (ftp.cdrom.com). If
you need any sort of DOS shareware or freeware (perhaps
to run under dosemu or Caldera's OpenDOS) this is the
definitive collection. If you need any significant
number of packages (like you need to test/evaluate
a dozen of them to decide which works for you) I'd
suggest springing for the CD. Another invaluable site
for any non-MS DOS users is at http://www.freedos.org --
which in proper free software tradition has links to other
DOS sites like RxDOS. DOS is truly the OS that wouldn't
die -- and the shareware writers have about a decade headstart
on ubiquitous availability over Linux).
--Jim
Date: Thu, 18 Sep 1997 15:34:08 -0700
I'm looking for a sw that can translate an application developed in
Visual Basic to Unix. Could you help me?
I haven't used this product personally (since I have no
interest in Visual BASIC). However they do claim to
support Microsoft Visual BASIC source code and they offer
some other, related products.
I see a DBIX (which appears to be a database engine with
ODBC -- open database connectivity drivers for Linux/Unix and
MS Windows '95 and NT). Also interesting might be their
"BASIC 4 Java." Here's a blurb from their web pages:
"Halcyon Software Java Products
InstantBasic Script -Written in 100% Pure Java, Halcyon InstantBasic
Script (IBS) is more than just cross-platform BASIC; it is BASIC for
the Internet. Moreover, IBS is available as both a compiler and an
interpreter, thus allowing developers to execute scripts as either
BASIC source code or Java binaries(class file). The engine is
compatible with Microsoft's BASIC
Script Edition and provides complete Java Beans and ActiveX* support.
The engine is easily customizable for quick integration and comes with
its own lightweight Interactive Development Environment (IDE).
InstantBasic 4 Java - InstantBasic 4 Java is a 4GL development
environment written 100% in Java that allows programmers to quickly
and easily migrate their existing VB applications to run under any
Java environments using the VB-like IDE.
--Jim
I purchased a new computer system and 4.2 RedHat Linux Power Tools for
my son, Blake, who is a student at Trinity University in San Antonio, TX.
They were purchased from different vendors.
Neither, Blake, his profs,myself or my vendor knew what we were doing. The
result is a big mess. I believe the basic configuration is incorrect.
That notwithstanding, I need to know which parts are not supported by Linux
and recommended replacements. The following is a brief description of the
system:
When I have the correct equipment I will find a professional to properly
configurer it.
Thank you for your assistance.
In fact an upcoming issue of the Linux Journal has a hardware
review of just such a system: the VAR Station II by VA Research
(http://www.varesearch.com).
For about the same as you have spent on these parts separately
you could probably get a system from VA Research or several
others.
Here's a short list in no particular order:
PromoX
(http://www.promox.com)
Aspen Systems
(http://www.aspsys.com)
Linux Hardware Solutions
(http://www.linux-hw.com)
SW Technology
(http://www.swt.com)
Apache Digital
(http://www.apache.com
Telenet Systems Solutions
(http://www.tesys.com)
... and that doesn't include the ones that specialize in
Alphas or SPARC based systems.
So, you have many choices for getting system with Linux
preconfigured.
Now, if you're stuck with the system you've got, and you
just want it all to work, you could pay a consultant to
install and configure on the existing hardware. At typical
rates of $50 to $150 per hour (mine are usually set at $91/hr)
you'd rapidly spend more on this than on getting system from
any of these vendors (who presumably have most of the
installation and configuraiton process automated).
I cannot, in good conscience, recommend that you hire me
to configure a system like this. It's just too expensive
that way.
If you made it clear to your vendor that you intended to
run Linux on the system, and they were unable to adequately
install and configure it -- I personally think you are fully
justified in returning everything and starting over. (If
not then yo are still probably within your rights -- and
you may still want to consider it).
Another approach you might try is to get just a hard disk
with Linux pre-installed on it. This is the popular LOAD
(Linux on a Disk) product from Cosmos Engineering
(http://www.cosmoseng.com). This isn't quite a neat as
getting the whole box pre-configured -- you still have to
tell it what sort of video, sound, and other cards you want
it to use (and you have to be able to support the extra
drive -- which may be tricky if you have an IDE HD and
an IDE CD-ROM drive already on your IDE controller. Many
new IDE controller have two "channels" (enough to support
four IDE devices) and some don't.
Another approach is to just let Blake fend for himself.
He can wander around the campus a bit and look for fellow
students who use and understand Linux. Who knows, he may
meet some great people that way -- maybe even get a date
in the process. Linux is very popular at colleges and
universities -- and students are generally pretty enthusiastic
about helping one another use any sort of toys -- computers
especially.
--Jim
My entire Linux filesystem currently resides on /dev/hda2 and uses up
almost 90% of this partition. Because I am quickly running out of disk
space on my original hard drive, I recently added a second hard drive
and created a Linux partition on it which the system sees as /dev/hdb1.
The /usr subdirectory of my filesystem has swollen to over 300MB, so I
would like to copy all the directories and files under /usr over to
/dev/hdb1 and then edit /etc/fstab so that this partition will then be
mounted on /usr in the filesystem when I boot up.
I've given a lot of thought about how to do this, but I am very
concerned about making this change because of the potential problems it
might cause if not done properly. I would, therefore, appreciate your
advice on how to proceed and what steps I should take to safeguard the
integrity of my filesystem. BTW, I have a second, unused partition
(/dev/hdb2) available on the new drive that could be used to store a
"backup copy" of all the directories and files currently under /usr on
/dev/hda2, and I also have an emergency boot/root floppy disk set that
provides basic utilties.
Thanks very much for any help you can give me on this. Also, I want you
to know that I enjoy your column in the Linux Gaxette and have found it
to be very helpful.
You're welcome.
Re: how to move (migrate) trees full of files:
I can understand you concerns. Under DOS and Windows
this sort of operation is hairy, tricky, painful, and
often terribly destructive.
The good news is that Unix is *much* better at this.
Here's the overview:
Mount the new filesytem to a temporary location
Use a cpio or tar command to copy everything
* (optionally) Make all these files "immutable"
Boot from an alternate partition or a rescue disk
Rename the source directory
Make a new directory by that name (a mount point)
Mount the new fs on the new mount point
Update your /etc/fstab to make this permanent
* (optionally) Update your tripwire database
Test
Remove the old tree at your leisure.
That's all there is to it. Now we'll go back over those
steps in greater detail -- with same commands and some
commentary.
Mount the new filesytem to a temporary location:
I like to use /mnt/tmp for this. So the command
is:
Use a cpio or tar command to copy everything
I used to use tar for this -- but I've found that
cpio is better. So here's the tricky command that's
really the core of your question:
* note: must do this as root -- to preserve
permissions and ownership!
I realize this is an ugly looking command. However,
we'll explain it step by step:
cd /usr/ && -- this cd's to the user directory
and (if that goes O.K.) executes the following.
If you typed /usr/ wrong you won't end up with a
mess.
find . -print0 -- this provides a list of filenames
as "null terminated strings" -- this will work
*even if some of the files have spaces, newlines, or
other dubious characters in them*. The results
are written into a pipe -- and the program reading
them must be capable of using this list. Luckily the
GNU cpio and xargs command have this feature, as we'll
see.
| cpio -p0vmd /mnt/tmp -- here's the tricky part.
This is the "passthrough" mode of cpio. cpio normally
copies files "in" or "out" -- but it can do "both"
using the "passthrough" mode. cpio expects a list
of filenames for its standard input (which we are
providing with the 'find' command). It then copies
the corresponding file "in" from the path specified
(as part of the input line) and "out" to the the path
specified as one of cpio's arguments (/mnt/tmp in this
case).
The rest of the switches on this cpio command are:
0 -- expect the input records (lines) to be null
terminated, v -- be verbose, m -- preserve the
modification time of the files (so your next
incremental backup does think that everything under
/usr/ has suddenly changed), and d -- make leading
directories as needed.
The last argument to this cpio command is simply
the target directory we supply to the -p switch.
* (optionally) Make all these files "immutable"
One obscure feature of Linux' ext2 filesystem that I
like to suggest is the "immutable attribute." This
prevents *any* change to a given file or directory
until the file is made "mutable" again. It goes way
beyond simply removing write permissions via the
standard Unix chmod command.
To do this use the command:
... or (to just do the files and not the directories):
Ultimately this protects the sysadmin from his or her
own 'rootly' powers. Even 'root' gets an "operation
not permitted" error on any attempt to modify any
feature of an immutable file.
Under normal circumstances this only marginally improves
the system's security (any attackers who get a 'root'
shell can just 'chattr' the files back to "-i" (mutable),
and then have their way with your files). However,
with the addition of the "sysctl securelevel" features
that are expected in the 2.2 kernel (and may already be
in the current 2.0 and 2.1 kernels) -- this will actually
be a real security feature. (Discussion of "securelevel"
is for a different article).
The point is that you can save yourself from many
sorts of mistakes by making files immutable. This
is particularly handy when running 'make' as root
-- when you may have missed some problem in the file
that would otherwise wipe out some of your important
files. I suspect it's also handy if you get a bogus
RPM package -- for basically the same reason.
(Many sysadmin's I've talked to and exchanged mail
and news postings with fervently rail about the
dangers of running make as root or using any sort
of package management system. I understand their
concerns but also recognize that the number of new
inexperienced SA's -- and the sheer amount of wor
REALBIOS?
Linux Wizard,
I am a newbie to Linux, and it has been a rocky start. Through a series
of trial and error I discovered I needed to use loadlin to get started.
When I ran loadlin I got this message:
This happens when you have a memory manager, a disk manager,
or any sort of TSR or device driver that "hooks" into your
BIOS controlled interrupt vectors prior to running LOADLIN.
-------------
Look for the loadlin.tar.gz package -- it
should include that. Here's the URL for the
copy of that on sunsite:
rem CONFIG.SYS
menuitem WIN
menuitem LINUX
menudefault LINUX
[WINDOWS]
FILES=64
BUFFERS=32
[LINUX]
rem Load my 2.0.30 Linux kernel
SHELL=C:\LINUX\LOADLIN.EXE C:\LINUX\L2030.K root=/dev/hdc1
--------------------
---------------------
-----------
-----------
X-Windows Libraries
From: PATAP!DPFALTZG@patapsco.com
Sorry. The volume of my mail and the nature of my
expertise (that is the fact that I don't know much about
X Windows -- meaning I have to research anything
I'm thinking of saying), means that there are sometimes
unfortunate delays in my responses.
This is about the problem of the X-Windows System not coming up but
instead gives messages to the effect that it couldn't map the libraries.
I'm glad that worked. I'll try remember that next time a similar probl
em comes up.
PC Emulation
From: SAFA ISAA safaisaa@swipnet.se
That would be the WRQ Reflections to emulate a 3270 or 5150/5250
IBM terminal.
pc=B4s as aterminal.We use ethernet withe TCP/IP protcol=20
for com.betwen RS and PC .In pc we use win95.My q. is can we use
doslinux or minilinux to com. withe rs instade of Reflection ??
You could install DOSLinux or MiniLinux and a copy of
tn3270 and it *might* be able to talk to your RS/6000 (AIX)
applications.
If the answer is YES would U tell me where can I gat and how to test
it..We R the bigest comp. in skandinavin for adm the hole car sys
THX
This looks pretty mangled. The answer is "I don't know."
However, Linux has the virtual of being free -- so there's
very low risk in setting up a copy and trying it.
Visual Basic for Linux
From: Forzano Forzano@ansaldo.it
The product you were undoubtedly
thinking ofis VBIX by Halcyon Software (http://www.vbix.com).
(408-378-9898).
Date: Wed, 17 Sep 1997 20:03:54 -0700
Linux 4.2 software and Hardware compatablity problems
From: John Arnold jarnold@hal-pc.org
Supermicro P5MMS motherboard with 430TX chip set. Ultra DMA 33 Mb/s
Transfer and 512K pipe line burst mode cache
AMD K6 MMX Processor @166 MHz, 6th generation performance, Microsoft
certified.
32 MEG SDRAN-10ns-DIMM Memory
Western Digital 4.0 Gig IDE hard drive. Split 50/50 by vendor
TEAC 1.44 floppy disk drive
MATROX MYSTIQUE 4MEG SGRAM PCI Video card
14" NI SVGA Color monitor by MediaTech,
1024X768-28DPI (I beleive it has a Fixed Frequency)
PIONEER 24X CD ROM Drive
Keytronics keyboard
Microsoft PS2 mouse
US Robotics 28.8/33.6 Sportster modem
Sound Blaster AWE 64 sound card with speakers
Windows 95 & Plus, Service release 2
All of this equipment is fine. However I have to question your
approach. There are several vendors that can ship you a
fully configured system with Linux and Windows '95 pre-installed
and configured (or just Linux, if you prefer).
This system is very similar to the
one you described (using the same video card, keyboard, and sound
card and a very similar 24X CDROM). The big difference between
the configuration you list and the one I reviewed is that
the VAR Station came with a 4Gb SCSI hard drive, a Toshiba SCSI
CD-ROM, and a SymBIOS SCSI adapter (in lieu of the IDE equipment
you listed). Also the system I reviewed had a 3Com PCI
ethernet card rather than any sort of modem (I already have
some modem on my LAN). The other thing is that this motherboard
is an Intel and uses a 266 Pentium II.
Date: Wed, 17 Sep 1997 18:11:32 -0700
Moving /usr subdirectory to another drive..
From: Ben Bullock bullock@toolcity.net
Re: my previous columns and articles.
mount /dev/hdb1 /mnt/tmp
cd /usr/ && find . -print0 | cpio -p0vumd /mnt/tmp
cd /mnt/tmp && chattr -R +i *
find /mnt/tmp -type f -print0 | xargs -0 chattr +i