[0463] daemon@ATHENA.MIT.EDU (Digestifier)  Linux Digest Archive  06/12/92 23:15 (1152 lines)
Subject: Linux-Activists Digest #285
From: Digestifier <Linux-Activists-Request@BLOOM-PICAYUNE.MIT.EDU>
To: Linux-Activists@BLOOM-PICAYUNE.MIT.EDU
Reply-To: Linux-Activists@BLOOM-PICAYUNE.MIT.EDU
Date:     Fri, 12 Jun 92 23:15:08 EDT

Linux-Activists Digest #285, Volume #2           Fri, 12 Jun 92 23:15:08 EDT

Contents:
  Linux Frequently Asked Questions 1/2 [monthly posted] (corsini@labri.greco-prog.fr)

----------------------------------------------------------------------------

From: corsini@labri.greco-prog.fr
Crossposted-To: news.answers
Subject: Linux Frequently Asked Questions 1/2 [monthly posted]
Date: 12 Jun 92 09:41:43 GMT
Reply-To: linux@numero6.greco-prog.fr

Archive-name: linux-faq/part1
Last-Modified: 92/06/11  15:35:30
Version: 1.8

*********************************************************
*                                                       *
*   Answers to Frequently asked questions about Linux   *
*                                                       *
*********************************************************

This post contains Part 1 of the Linux FAQ


Hi Linuxers!

The originall FAQ 1st version was posted in Dec. 19, by Robert Blum,

Most credits of this work to Linus, Robert and Ted. The X11 section
was written by Peter Hawkins, the rest was either on the list posted
by many (real) activists, not me ;-), either in some other news
groups, or else by direct posting to me (thanks Humberto, Dan,
Michael, Drew, Audoin). I haven't systematically copyrighted them, so
thanks to every one who participated even indirectly to this FAQ.

Many of the questions could be avoided, if people had read the FAQ of
the following newsgroups: 
comp.lang.c, gnu.emacs.help, comp.unix.questions 
 
[The last-change-date of this posting is always "two minutes ago".  :-)]

This is the introduction to a list of frequently asked questions (FAQ
for short) about Linux with answers (Yeap!).  This article contains a
listing of the sections, followed by the question/answer part.

This FAQ is supposed to reduce the noise level ;-) in the comp.os.linux
newsgroup, and spare the time of many activists. I will post it twice a 
month, since there are more and more new incomers, and new features.

BTW This FAQ is available at the main Linux sites in the doc
directory, the addresses are given in section II. of this FAQ.

Please suggest any change, rephrasing, deletions, new questions,
answers ...  
Please include "FAQ" in the subject of messages sent to me about FAQ.  
Please use linux@numero6.greco-prog.fr whatever will be the From part 
of this message. [If a mail to the previous address bounce to you try
corsini@labri.greco-prog.fr]


Thanks in advance,
                                Marc

Future Plan:
        - verification/location/organization for files available 
        via FTP (I've tried what a mess!!). In fact I can't handle
        this, so if there is some kind soul...
        - reorganization of the FAQ. I don't know what will be the
        next step of this, may be numbering and subsectionning.

================================8<=====8<==============================
CONTENTS
        0.      WARNINGS                        (part1)
        I.      LINUX GENERAL INFORMATION       (part1)
        II.     LINUX USEFUL ADDRESSES          (part1)
        III.    INSTALLATION and SECURITY       (part1)
        IV.     LINUX and DOS                   (part1)
        V.      SOME CLASSICAL PROBLEMS         (part1)
        VI.     INSTALLATION HINTS              (part1)
        VII.    MORE HINTS                      (part2)
        VIII.   FEATURES                        (part2)
        IX.     GCC MISC INFORMATION            (part2)
        X.      SCSI SPECIAL                    (part2)
        XI.     X11, THE MINIMUM and MORE       (part2)
 
0. WARNINGS
===========

The FAQ contains a lot of information sometimes I've put it down 
in 3 different ways because people seems not to understand what they
read (or what I wrote, you know I'm just a froggy and english is not
my natural language). What I mean is that not all is in the FAQ but 
many things are there, so please just take time to read it this will 
spare a lot of the other linuxers [and if you think I should rephrase
some Q/A just drop me a note].

In what follows I consider Linuxv0.96(a) as the current version. Linus
Torvalds wrote the following about the 0.96 release:

0.96 has a lot of changes; it contains a lot of new files, as well as
some reorganizations in the old ones.

The main new things are:
- The SCSI distribution is now in the standard package.
- X11r5 as ported by Orest Zborowski is supported. It's still in 
beta-testing (join the X11 channel see the USEFUL ADDRESS section)
- Hopefully better interrupt latency
- Reorganization of the vfs routines and minix filesystem driver
- ps/uptime patches + added readahead, so having computationnaly
intensive background processes is not as noticeable anymore while
doing IO.


Due to my hardware limitation (386SX, IDE drives, 8MB RAM, 2MB swap
file and VGA card); some information provided in this FAQ about X11,
and SCSI drivers are not my own. I just grab them from the various
mailing lists and comp.os.linux. In fact the Linux X11 section is from
Peter Hawkins, the rest is extracted from the X386 faq, the SCSI
section is from Drew. And the Serial subsection was enhanced by Jim
Gifford. 


I. LINUX GENERAL INFORMATION 
=============================

QUESTION: What is linux?

ANSWER: Linux is a small unix for 386-AT computers, that has the added
advantage of being free. It is still in beta-testing, but is slowly
getting useful even for somewhat real developement.  The current
version is 0.96a, date: May 22th 1992. The previous version v0.95c+
(April 9th) has been enhanced a bit (see 0. section). 


Linux is a freely distributable UNIX clone.  It implements a subset of
System V and POSIX functionality.  LINUX has been written from
scratch, and therefore does not contain any AT&T or MINIX code--not in
the kernel, the compiler, the utilities, or the libraries.  For this
reason it can be made available with the complete source code via
anonymous FTP.  LINUX runs only on 386/486 AT-bus machines; porting to
non-Intel architectures is likely to be difficult, as the kernel makes
extensive use of 386 memory management and task primitives.



QUESTION: What is the current state of Linux?

ANSWER: do "finger torvalds@kruuna.helsinki.fi", or read the
comp.os.linux newsgroup.


QUESTION: I've just heard about linux, what should I do to get it?

ANSWER: First read all this FAQ, and the INFO-SHEET monthly post, then
go to the nearest ftp site (see below), download the Images there are
two a rootimage and a bootimage (in general in the images directory),
for the present version, you need boot-image096 and root-image095a 
(or later), then download the INSTALL and RELNOTES files.  Find
the rawrite utility (for example at tsx-11 it's in
/pub/linux/INSTALL), then rawrite the images on HIGH density floppies
(5.25 or 3.5), finally boot on the root diskette and that's it.  

BTW From another Unix system a "dd" works fine. On "my" sun I use the
following "uncompress -c root-image.Z > /dev/fd0", assuming I had a
formatted floppy in /dev/fd0


After playing a while, you should want to install linux on HD (there
were scripts on the v0.95c+ images for that purpose, I guess they are
in 0.96 too), see also section III for INSTALLATION. Then you will need
a compiler (gcc) and utilities, all can be found at the different
places described in section II below.


QUESTION: Does it run on my computer?

ANSWER: Linux has been written on a clone-386, with IDE drives and a
VGA screen. It should work on most similar setups. The harddisk should
be AT-standard, and the system must be ISA.  A high density floppy
drive -- either 5".25 or 3".5

IDE and MFM seem to work with no problem. It works, also, for some
ESDI drive (Joincom controller with Magtron drive after you have
commented out the "unexpected hd interrupt"-message from hd.c). There
exists a high-level SCSI driver, under which low-level drivers are
placed; a ST-01/ST-02 low driver has been completed see the FEATURES
and the USEFUL ADDRESSES sections.

Otherwise the requirements seem relatively small: a 386 (SX, DX or any
486).  Any video card of the following: Hercules, CGA, EGA, (S)VGA.

It needs at least 2M to run, and 4M is definitely a plus. It can
happily use up to 16M (and more if you change some things). 

BTW On some high speed machine (486/33 DTK, 64KB cache, 4MB RAM), 
there might be some trouble with the HD driver ; on possible cure is
to switch off the "turbo" i.e. set the speed to 8MHz instead of 33MHz 

QUESTION: Why the suggested 4Meg, for Linux?

ANSWER: Linux uses the first 640k for kernel text, kernel data and
buffercache. Your mother board may eat up 384K because of the chipset.
Moreover there is: init/login, a shell, update possibly other daemons.
Then, while compiling there is make and gcc (1.40 ~530k; 2.01 ~770k).
So you don't have enough real memory and have to page.


QUESTION: How would this operate in an OS/2 environment?

ANSWER: Linux will coexist with *any* other operating system(s) which
respects the "standard" PC partionning scheme - this includes Dos,
Os/2, Minix etc.


QUESTION: Will linux run on a PC or 286-AT? If not, why?

ANSWER: Linux uses the 386 chip protected mode functions extensively,
and is a true 32-bit operating system. Thus x86 chips, x<3, will
simply not run it.


QUESTION: Will Linux run on a 386 Laptop?

ANSWER: It works for some at least.


QUESTION: How big is the 'complete' Linux package?

ANSWER: Well, the boot and root image diskettes are about 750Ko
compressed.  The kernel sources are about 200Ko compressed, and the
libc sources are another 170Ko compressed.  The GNU C (1.40) compiler 
is 670Ko, the GNU C (2.01) package which enclose C and C++ compiler is
about 3Mo; and the other miscellaneous unix utilities are probably a 
bit over a megabyte.

Now add sources to whatever you want to port and compile yourself.
The sources to GNU emacs are about 3 megabytes, compressed.  Groff (a
troff replacement) is just over 1 megabyte.

If you think this is big, remember that the OS/2 2.0 Limited
Availability release is 20 1.44 megabyte diskettes.


QUESTION: (Dan) How long has Linux been publicly available?

ANSWER (partial): Few months, v0.10 went out in Nov. 91, v0.11 in Dec.
and the current version 0.95c+ is available since April 9th. But even
it is pretty recent it is quite reliable. There are very few and small
bugs and in its current state it is mostly useful for people who are
willing to port code and write new code.
As Linux is very close to a reliable/stable system, Linus decides that
v0.13 will be known as v0.95
Believe it or not: the whole story started (nearly) with two processes
that printed AAAA... and BBBB...
BTW consult the digest#136 Vol2 for a complete story


QUESTION: What is the proper pronounciation for "Linux"?

ANSWER: (Linus himself)
'li' is pronounced with a short [ee] sound: compare prInt, mInImal etc. 
'nux' is also short, non-diphtong, like in pUt.  It's partly due to
minix: linux was just my working name for the thing, and as I wrote it
to replace minix on my system, the result is what it is...  linus' minix
became linux. 

I originally intended it to be called freax (although buggix was one
contender after I got fed up with some of the more persistent bugs :)
and I think the kernel makefiles up to version 0.11 had something to
that effect ("Makefile for the freax kernel" in a comment).  But arl
called the linux directory at nic.funet.fi pub/OS/Linux, and the name
stuck.  Maybe just as well: freax doesn't sound too good either (freax
is obviosly free + freak + the obligatory -x). 


QUESTION: What's about the copyright of linux.

ANSWER: This is an except of the RELEASE Notes v.095a: Linux is
NOT public domain software, but is copyrighted by Linus Torvalds. The
copyright conditions are the same as those imposed by the GNU
copyleft: get a copy of the GNU copyleft at any major ftp-site (if it
carries linux, it probably carries a lot of GNU software anyway, and
they all contain the copyright).


QUESTION: Should I be a UNIX and/or a DOS wizard to install/use Linux?

ANSWER: Not at all, just follow the install rules, of course it will be
easier for you if you know things about Unix. Right now Linux is used
by more than 400 persons, very few of them enhance the kernel, some
adds/ports new soft, most of us are only (but USEFUL) beta testers.
Last but not least, various Linuxers work on manpages, newuser_help,
file-system organization. So join us and choose your "caste"


QUESTION: What are the differences, pros and cons compared to Minix ?

ANSWER (partial): 
Cons: 
- Linux is not as mature as Minix, there is less working software right now.  
- Linux only works on 386 and 486 processors.  
- Linux needs 2M of memory just to run, 4M to be useful.  
- Linux is a more traditional unix kernel, it doesn't use message passing.

Pros: 
- Linux is free, and freely distributable, BUT copyrighted.  
- Linux has some advanced features such as:
  - Memory paging with copy-on-write
  - Demand loading of executables
  - Page sharing of executables
  - Multi-threaded file system
  - job control and virtual memory, virtual consoles and pseudo-ttys.
- Linux is a more traditional unix kernel, it doesn't use message
passing.


QUESTION: Does Linux use TSS segments to provide multitasking?

ANSWER: Yes!


QUESTION: If my PC runs under Linux, is it possible to ftp, rlogin,
rsh etc.. to other Unix boxes?

ANSWER: Not yet, but kermit has been ported to Linux, and the ka9q too.


QUESTION: Does linux do paging? Can I have virtual memory on my small
machine?

ANSWER: Linux0.96(a) does do paging in a better way than Linux0.95c+.


QUESTION: Can I have tasks spanning the full 4GB of addressable 386
memory? No more 64kB limits like in coherent or standard minix?

ANSWER: Linux does limit the task-size, but at a much more reasonable
64MB (MEGA-byte, not kilos), so bigger programs are no problem.


QUESTION: Does the bigger program sizes mean I can run X?

ANSWER: X is ported to linux, it's in beta and needs some special
hardware stuff. As I said in the 0. section, there is some
support in the Linux 0.96 (and after) release.


II. LINUX USEFUL ADDRESSES 
=========================

QUESTION: Where can I get linux?

ANSWER: Linux can be gotten by anonymous ftp from
1) Major Sites
EUROPE:
        nic.funet.fi (128.214.6.100):
                directory /pub/OS/Linux
        Tupac-Amaru.Informatik.RWTH-Aachen.DE (137.226.112.31):
                directory /pub/msdos/replace
US:     
        tsx-11.mit.edu (18.172.1.2):
                directory /pub/linux

2) Mirroring sites (some of them)
AUSTRALIA:
        kirk.bu.oz.au (131.244.1.1)
                directory /pub/OS/Linux
EUROPE:
        src.doc.ic.ac.uk (146.169.3.7):
                directory /pub/os/Linux
        ftp.mcc.ac.uk (130.88.200.7):
                directory pub/linux
        ftp.informatik.tu-muenchen.de (131.159.0.110):
                directory pub/Linux
US:
        ftp.eecs.umich.edu (141.212.99.7):
                directory linux
        banjo.concert.net (192.101.21.6):
                directory pub/Linux/mirrors
JAPAN:
        utsun.s.u-tokyo.ac.jp (133.11.11.11):
                directory misc/linux

You might want to check out which of these is the most up-to-date.
Moreover banjo.concert.net is mirroring hpb, nic and tsx.

If you don't have ftp-capability, you are in trouble. See next Q/A.  If
you have no uncompress utility, there are a lot even for DOS, have a
look on SIMTEL, or else use facilities provided by some sites to
uncompress for you. Don't do that if you can, because it's lengthy,
expensive and causes troubles to other users on ftp sites.


QUESTION: I do not have FTP access, what can I do to get linux?

ANSWER: Try to contact a friend on the net with those access, or try
mailserver/ftpmail server otherwise contact tytso@ATHENA.MIT.EDU. You
might try mailing "mailserver@nic.funet.fi" with "help" in the body of
the mail.  If you choose ftpmail server (example: ftpmail@decwrl.dec.com),
with "help" in the body, the server will send back instructions and
command list. As an exemple to get the list of files available at tsx-11
in /pub/linux send:

                mail ftpmail@decwrl.dec.com
                subject: anything
                reply <your e-mail>
                connect tsx-11.mit.edu
                chdir /pub/linux
                dir -R
                quit

In Europe ftp.informatik.tu-muenchen.de is accessible via e-mail (send
"help" in the body to ftp-mailer@informatik.tu-muenchen.de)


QUESTION: Is there a newsgroup or mailing-list about linux? Where can
I get my questions answered? How about bug-reports?

ANSWER: comp.os.linux is formed, and alt.os.linux is dying little by 
little, for those who can't access to the news you can ask for digest to:
Linux-Activists-request@NEWS-DIGESTS.MIT.EDU. On the other hand, mail
sent to Linux-Activists@NEWS-DIGESTS.MIT.EDU are posted to
comp.os.linux

DO NOT mail "I want to [un]subscribe" to the newsgroup, use
the request-address. IF not your mail-box will be over-crowded by
activists.

Questions and bug-reports can be sent either to the newsgroup or to
"torvalds@kruuna.helsinki.fi", depending on which you find more
appropriate. Moreover there is a BUGLIST file available in the
different main site (at least you can find it at tsx-11, in
pub/linux/patches/BUGLIST). 

People are working on the organization of Linux, this is done on
a separate mailing-list.

linux-standards: Discussion of distribution and directory standards
for the Linux operating system, including directory structure, file
location, and release disk format.

Requests to be added to this list must be sent to:
                linux-standards-request@banjo.concert.net

Others on the man pages and users guide.
                contact linux-man-request@stolaf.edu

And last but not least there is the original mailing-list, which is
now a multi-channel list. 
                contact linux-activists-request@niksula.hut.fi


QUESTION: Could you be more explicit about the multi-channel list?

ANSWER: Well, there are many things to say:
        - these channels are rather devoted to hackers
        - the one I am aware of are: GCC, MGR, X11, SCSI, NEW-CHANNELS,
        MSDOS (emulator discussion) , NORMAL
        - whenever you want to join or quit a channel you have to
        contact the request address
        - you have to use special header (Mn-Key and Mn-Admin); Mn-Key
        is *ONLY* for regular post, the Mn-Admin is for *REQUEST*

QUESTION: How can I join the channel XXX on the linux-activists
mailing list?

ANSWER: just send a mail to the request address with help in the body;
you will get back a mail which gives you the list of channels and the
way to join them (or simply send a mail to the request address with
the following line: 
X-Mn-Admin: join XXX
)

QUESTION: Does there exist a place where the traffic of the newsgroup
is kept?

ANSWER: Yes, on nic and tsx-11 (see the ftp addresses above), and since
12th March, a Gopher server is up at beryl.daimi.aau.dk
(130.225.16.86). The archives go back to Nov. 18. 91
Also recently a WAIS server for the linux mail archive has been setup
at fgb1.fgb.mw.tu-muenchen.de contact tw at that address.


III. INSTALLATION and SECURITY 
==============================


QUESTION: Does there exist *any* reliable information that can help me
to install Linux, 'cause I know very few things about Dos and/or Unix?

ANSWER: Yes, there is a lot of effort which has been done recently.
You should read the following files:
Beginner's Guide: Installation  by      I. Reid
(Dos) Beginner's guide          by      C. Boyer
Info-sheet                      by      R. Blum
Install-0.xx                    by      L. Torvalds (?)
Relnotes-0.xx                   by      L. Torvalds (?)


QUESTION: Does there exist a simple way to get all (or nearly) the
Linux stuff? 

ANSWER: You can grab an 'interim' version of Linux at ftp.mcc.ac.uk in
/pub/linux/mcc-interim/0.95c+/images (thanks to A. V. Le Blanc). The
README files are in /pub/linux/mcc-interim/0.95c+ These files are
mirrored at banjo.concert.net in /pub/Linux/mirrors/uk.mirror/mcc-interim


QUESTION: What are the files provided in the interim distrib?

ANSWER: (16 April 92) The kernel supplied is the 0.95c+ one, there are
also 4 binaries floppy including C and C++ compilers.
boot-UK.Z (or boot-US.Z)        this is the boot/root image disk 
util-UK.Z (or util-US.Z)        this disk is mounted on /mnt
comp.image                      the Gnu C 2.1 compiler (and everything)
                                +shoelace for Linux
comp2.image                     the GNU C++ 2.1 compiler (and all)
                                +kermit

QUESTION: Ok, I've got the interim distribution, what should I do now?

ANSWER: You should read the README file provided, and follow the
instructions. Roughtly, you have to uncompress boot-?? and util-??
then rawrite them on HD floppies. After that boot on the boot-?? disk
and follow the instructions (some are also on-line provided); remove
the floppy and put the util one. 
 
QUESTION: I have copyed all the rootimage stuff on my HD, how can I
use the hard-disk as root?

ANSWER: There are three ways to answer this: 
a) You have downloaded the linux sources and a compiler, in that case
recompile the kernel to make a new boot-floppy according to your
environment. If you have dowloaded the sources of linux-095c+ (or
later), you just have a look in the main Makefile to set your national
keyboard, your root drive and the flags for the compiler version you
use; if you have grabed linux-095a then you have to set your keyboard
in kernel/chr_drv/keyboard.S (.S not .s). "make disk " will compile
the kernel and create a new boot floppy, or else "make" and then "cp
Image /dev/PS0".
b) You have nothing except the images and DOS, in that case you should
have read the INSTALLATION notices provided at your ftp site, but
well: you have to change the boot image at offset 508.  The word (in
386-order, i.e low-byte first) tells the system which device to use as
root: initially it's 0 which means that we want to use a floppy of the
same type as the boot-disk (this is the reason why HIGH density floppy
is required for the boot-image).  In order to use the HD as root, this
value has to be changed to point to the correct device. For that
purpose you can download the program enclosed in INSTALL-0.10
(provided some slight modification according to the new minor/major
numbers) use the program written by Henning Spruth wich can be found
in digest#149 vol1 (there are both the C code and the uuencoded DOS
executable) or else any sector editor.
c)If you have Linux running, the command rdev will change the boot device
of a floppy or of a Linux image file.  In the 'interim' release,
because the boot disk is in memory, there are instructions for unmounting
the utilities disk and making a floppy which will boot with the newly
installed file system as root.


QUESTION: I have the previous Linux version, how can I upgrade it?

ANSWER: It's quite simple. Down-load the new Linux kernel (the current
one is v0.96). Unpack it in /usr/src/linux. Have a look in the main
Makefile to setup your environment.
a) If you use shoelace, then perform 'make'. Then 'mv /etc/Image
/etc/Image.old' and finally 'cp /usr/src/linux/Image /etc/Image'
reboot, that's it.
b) You do not use shoelace, then it's even simpler just put a
formatted floppy in the driver and perform: 'make disk' 


QUESTION: How can I be sure I won't be writing over anything
important?  I have to use DOS on my machine, and I don't want to
lose any files.

ANSWER: Back up everything. Just in case. Then, write some easily
recognizable pattern to the partition you have reserved for linux,
using some DOS tool. You can then use "cat /dev/hdX" under linux to
examine which of the partitions you used.


QUESTION: Linux mkfs doesn't accept the size I give the device,
although I double-checked with fdisk, and it's correct.

ANSWER: Be sure you give the size in BLOCKS, ie 1024 bytes, not
sectors. The mkfs doesn't work for very big partition (over than 64
Megs). Also, make doubly certain that you have the correct partition.

There are a few rules about this: /dev/hda (linux0.95a and latter) 
corresponds to /dev/hd0 (under minix) and /dev/hdb (linux0.95a ..) 
to /dev/hd5 (minix).  DO NOT USE THEM, they are the whole raw
disk, not partitions. Also if a partition is on drive 1 under minix
(ie /dev/hd1-4), it is drive 1 under linux as well.  Moreover, there
is no real consensus on whether partition #1 is the first partition on
the disk, or is the first entry in the partition table.  Some parition
programs sort this information on the screen only, some will write the
sorted information back to the hard disk.  Linux assumes that the
first entry is hda1, and so if some utility starts sorting/reordering
the table these things can change.  Moreover, use very carefully extended
partition they are still in beta-test (this is in the installation notes). 

REMARK Minix does some reordering.

A useful hack is to make each of your partitions a different size.
Then after any editting or possible change to the partition table you
can boot a floppy system and run fdisk (linux's, not DOS) to see if
the assignments still hold.


QUESTION: I have a one partitionned 40Mb disk. If I run mkfs, what
happens?

ANSWER: If you do that, you will have an empty 40Mb Linux file system.
You should, at least, make on your hard disk, one partition per
operating system you want to use. 


QUESTION: I mounted the linux filesystem, and copied the files from
the root-disk to the harddisk. Now I cannot find them any more, and
somethimes linux dies with a "panic: trying to free unused inode".

ANSWER: You have probably forgot to sync before rebooting. Linux, like
all unices, use a "buffer cache" to speed up reads and writes to disk.
On a machine that has enough memory, this buffer-cache is 1.5MB, and
if you forget to sync before exiting, it may not be fully written out
to disk. Re-mkfs and re-install (or try to use the preliminary fsck,
but remember that although fsck tries to correct the faults it finds,
it may fail.)


IV. LINUX and DOS 
=================

QUESTION: Is it possible to access to DOS world from Linux

ANSWER: Yes, there is the mtools package (with patches for devices.c)
The original sources of mtools can be found at any places not only at
nic, tupac and tsx-11, and the patches for Linux (with fix for big DOS
partitions are in the directory patches or ports). Moreover you should
download the file patch.Z to apply patches :)
It is possible to find the compiled mtools stuff at mcc (see above for
the address)
BTW An improved version of mtools is on nic.funet.fi in
/pub/OS/Linux/tools/mtools.n.tar.Z, where all tools are in a single
executable; the device configuration are set in /etc/mtools one per
line. In the package, you will find a readme file, the compiled
program, an example of /etc/mtools and diffs to mtools-2.0.5.tar.Z.
It's also provided in the 'interim' release (in the util-?? disk).


QUESTION: the mtools package won't work. I get an ENOENT error message
for all devices.

ANSWER: mtools needs to be told which device to look for. If you have
the mtools.n.tar.Z package set correctly your /etc/mtools file; if you
use the older mtools stuff (see Q/A above) use 'ln' or 'mknod' to
create a special file called "/dev/dos?", where ? is A, B, C, X or Y.
A and B are for floppies (12 bits), C is for hard disk and X, Y for
any. This file should point to the device you want to read.  About the
minor/major pair have a look in section INSTALLATION HINTS.


QUESTION: Whenever I use mtools to read a 720K in an 1.44MB drive, I
get a long sequence of reset-floppy-errors, why? 

ANSWER: This is what happens if you use the /dev/PS0 device (b 2 28),
to read a 720k floppy you have to use another device, for example
/dev/ps0 (b 2 16).


QUESTION: I've got the mtools.n.tar.Z package, but I can't read
anything even with the etc/mtools file properly set. Any clue ?

ANSWER: To use the binary you have to link (or simlink) the mtools
binary with mattrib, mcd, mcopy, mdel, mdir, mformat, mkmanifest,
mlabel, mmd, mrd, mread, mren, mtype and mwrite.
Then You just need to use the proper mstuff with the apropriate
device. 


QUESTION: What is as86.tar.Z ?

ANSWER: It's the port of Bruce Evans' minix assembler, you need it to 
be able to recompile Linux at your convenience. In fact this is ONLY
used for boot/setup.S and boot/bootsect.S they create 80x86 REAL mode
code. 
BTW as86 should not work on keyboard.S, instead, you must use gcc -E
and then (g)as. Since 0.96 the keyboard routine is no longer .S but .c 


QUESTION: Turbo (Microsoft) Assembler won't compile the Linux boot
code.  In fact, some of the opcodes in these files look completely
unfamiliar.  Why?

ANSWER: The Linux boot codes are written in Bruce Evans' minix
assembler, which has the same opcodes as the original minix assembler
ported to linux get as86.tar.Z Anyway there are a few differences
between these and normal DOS assemblers.


V. SOME CLASSICAL PROBLEMS 
==========================

QUESTION: While running du I get "Kernel panic: free_inode: bit
already cleared".  Also, du produces a ENOENT error for all the files
in certain of my directories.  What's going on?

ANSWER: These are both consistent with a bad file-system.  That's
relatively easy to produce by not syncing before rebooting, as linux
usually has 1.5MB of buffer space held in memory (unless you have <=4M
RAM, in which case the buffers are only about 0.5MB). Also linux
doesn't do anything special about the bit-map blocks, and as they are
used often, those are the thing most likely to be in memory. If you
reboot, and they haven't been written to disk ...

Just do an fsck on the device, the -a flag might repair it otherwise,
the only thing to do is to reinstall the filesystem from the Images.

A sync is done only every 30 seconds normally (standard unix
practice), so do one by hand (some people think you should do 3 syncs
after each other, but that's superstition), or by logging out from the
startup-shell, which automatically syncs the system. Unmounting a
filesystem also syncs it (but of course you can never unmount root).

Another (sad) possibility is that you have bad blocks on your disk.
Not very probable, as they would have to be in the inode-tables, just
a couple of blocks in size. Again there aren't programs available to
read a disk for bad sectors and put them in some kind of
"bad-sector-file".  On IDE drives this is no problem (bad sectors are
automatically mapped away).


QUESTION: How can I partition my hard-drive to use Linux?

ANSWER: There are (at least) two ways to answer this. The easy way is
probably to use a program which will do it for you, such as the MS-DOS
fdisk, Minix fdisk, Xenix/Unix fdisk, or programs such as edpart.exe 
or part.exe. With the 0.95a distribution, there is pfdisk. To use it
have a look in the beginner's guide written by I. Reid, it's clear and
it had worked for me like a charm. In the mcc-interim release ther is
also fdisk-0.92, which runs under Linux and manages partition tables
(it also creates extended partitions).

On the other hand, you can use a disk editor and modify the contents
of the partition table directly. This has been already done, and an
extensive explanatory note can be found in the mailing-list archives 
(25th Jan. 92). You must also edit the bpb on the Dos partition you
are shrinking, otherwise Dos will step on Linux.

BTW It might be useful to set three (3) separated partitions for
Linux, one for the root, another one for the usr and a third one for
swap, as an illustration, my root partition is 10Meg, the usr is 22Meg
and the swap partition is 8Meg (twice the size of RAM on my box). As 
an experience I have used MS-DOS fdisk to partition my two hd and got 
no peculiar difficulties.
You can, as long as you stay within the 64MB per filesystem
limit, have swap, root, etc, ... all on there.


QUESTION: I heard something about repartition a hard disk without
deleting everything on it, any clue?

ANSWER: It's not a program but a partition procedure which requires
a) a partitionning program
b) a sector editor
The procedure itself can be found (at least) in digest#132 Vol2.


QUESTION: What must I do to mkfs a floppy?

ANSWER: blocks are of size 1K so 1.44 floppy is 1440 blocks. The
floppy has to be formatted before this will work.


QUESTION: When I try to (un)compress many files in one command, the
command partially fails?

ANSWER: This is a bug, many partial fixes are floating around but ..
You can solve it by a bash command "for i in whateverfiles;do 
compress $i; done". Another possibility is to download the
new tar and compress binaries (at tsx /pub/linux/binaries/usr.bin). 


QUESTION: I have some trouble with tar/untar; any clue ?

ANSWER: The tar provided on .95a disk is broken. Use the one available
at tsx-11 in /pub/linux/binaries/usr.bin


QUESTION: I can do this as root but not as non-root, is it a bug?

ANSWER: Except for the make utility, the problem is caused by an
incorrect permission flag. The most common problems are about /tmp
which should be 1777 and /dev/ttys? which might be 766. So as root do

        chmod 1777 /tmp ; chmod 766 /dev/ttys?


QUESTION: When I use make as non root, it doesn't work, why?

ANSWER: ?????, the message is either (null) setuid ..., or (null)
setgid... This was a known bug in the first Linux make. May be this is
fixed in the gmake-3.62 version enclosed in gmake-3.62.tar.Z (at tsx
in pub/linux/binaries).In fact the make.a provided in the gcc-2.1
package or even the one provided in mcc-interim are correct.  

BTW This problem does not exist with the pmake (make for BSD 4.3 Reno
and BSD 4.4) package.

QUESTION: "du" reports twice the size showed with "ls -l", is it a
bug?

ANSWER: No it is not, the report is 512 bytes multiple (due to POSIX
requirement), for KB you just add the -k flag. You can add a du
function in your .profile which does this automatically, something
like du(){ /usr/bin/du $* }
        


QUESTION: Sometimes, I get "mount can't open lock file"; what does this
means? 

ANSWER: This can happened for two reasons: 
A) You try to mount something as non-root. In that case you can either
retry as root, or set the setuid bit to mount.
B) You are root. mount wants to open /etc/mtab and /etc/mtab~ - the
first one for reading, the second as lock file. If there is already a
mtab~ remove it. This can happen if you used once gnuemacs on mtab.

To forbid that case, just add the following entry in your /etc/rc file:
rm -f /etc/mtab


QUESTION: When I try "mount /dev/hd?? /user", I get error 2.

ANSWER: Be sure, that your mount point /user does exist; if not perform 
a "mkdir /user". 


QUESTION: Since I have upgrade my Linux kernel, ps won't work anymore,
why? 

ANSWER: Each time you upgrade (or re-compile the kernel), you should
perform a 'ps -U' (-U is for update the /etc/psdatabase). 

Every time you boot a new kernel you have to do a 'ps U' to update
the psdatabase, after doing this you can remove the system file or
do a make clean.

The pathname to the system binary [/usr/src/linux/tools/system] is
stored in the psdatabase, so you only have to specify it if you have
moved your source tree or if you are creating the psdatabase for the
first time. The psdatabase is always '/etc/psdatabase'.


VI. INSTALLATION HINTS 
======================
Special gcc information are located in section IX. A special section is
devoted to it since it's *the* compiler of Linux. I have subsectionned
this part in Misc/Device Major-Minor/Serial Information.

VI.A. Misc information
~~~~~~~~~~~~~~~~~~~~~~
QUESTION: I've got all the things on site ??? but I don't know what
goes where.

ANSWER: Read this carefully, it's a mess right know and I hope this
problem will be fixed when the ABC-release will be out. It heavily
rely on the compiler you use:
A) The following information are for those using gcc-1.40 or previous
release (1.37): include.tar.Z goes to /usr/include; system.tar.Z
contains the latest sources of the system files (mkswap, mkfs, fsck
and fdisk).  In version 0.12 utilbin.tar.Z has been replaced by
fileutil.tar.Z and utils.tar.Z which contains a new tar to handle the
symbolic links, make, uemacs kermit and minor programs (sed,...).
Other utilities have been ported separately.
B) For those who use gcc-2.1 there are nearly everything in the
package that you can find at banjo in pub/Linux/GCC in the
2.1shared.tar.Z file. You could find more sources in system095a.tar.Z
file (at tsx in sources/system/system0.95a)
C) The 'mcc-interim' release comes with gcc 2.1, which it installs in the
correct place.  If you have tar and compress (remember use the good
one ..), you can install gcc from the 'interim' comp.image and g++
from the comp2.image even if you don't have the rest of the 'interim'
version. 


QUESTION: It seems that $#@! ported on linux don't run correctly

ANSWER: Possible, but check first if the size of your file corresponds
to the one on the ftp sites, if it is then check the BUGLIST available
on the main linux sites. If the bug is not reported, do a complete
report of the error, try to correct it and send your result to
johnsonm@stolaf.edu.


QUESTION: Does anyone port this to linux?, if not i'll compile it

ANSWER: First check on the sites, have a look to the info-sheet
monthly post and also available on sites. Have a look in the "old"
digest files and mail-archives of linux-activists, these are kept at
least at tsx-11 and nic possibly at tupac. Look also at the GNU(*)
utilities to see if someone has already written a freely distribuable
version. Ask then on the list/news.


(*) GNU stands for GNU's Not Unix, which (besides being a recursive
acronym) is a project started by the Free Software Foundation (the FSF)
to write a freely distributable version of Unix.  The GNU kernel is
named HURD, and is based on Mach.  It is currently being written, and is
not yet done.  Many of the GNU utilities, however, are completed and are
much more functional than the original Unix utilities.  Since they are
freely available, Linux is using them as well.


QUESTION: I've ported *** to Linux, what should i do to add it in the 
standard distribution?

ANSWER: Read first the previous Q/A, then to make something available to
others you have to contact Alan Clegg (abc@banjo.concert.net) about
putting your code in the ABC-Release of Linux. The ABC-Release
is a standardized set of Linux sources and binaries that will be
available in an easy installable format, and which will be maintained
in a standard way. Submissions should conform to the Linux File System 
standard version 1.0 (this file is kept at banjo.concert.net in
/pub/Linux/docs). 
BTW Whenever you submit binaries, please do NOT link them with shared
libraries. 

QUESTION: I want to port *** to Linux, what are the flags?

ANSWER: Recall that Linux implements subset of SYSV and POSIX, so
-DUSG and -DPOSIX work in general. Moreover throw away most of the ld
flags such as -lg, since the libg.a is missing for some version of gcc
(see section IX. for more details).


QUESTION: Linux lacks on ****/ Linux has a bug in ***, what are the
rules to enhance/correct the kernel?

ANSWER: Before anything check if some one else is working on that
subject, contact those people, since end february a BUGLIST (thanks to
Michael Johnson) is kept on the major sites. Test your improvment (it
should work is NOT enough), then send the patches in cdiffs form to
Linus and/or the list, moreover the localization must be clear. This
does NOT mean that bug-reports and patches are not accepted. Moreover,
you should sent a brief note to Michael: johnsonm@stolaf.edu; contact
also abc@banjo.concert.net he organizes the ABC-Release.

VI.B. Major/Minor device number
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

QUESTION: What are the device minor/major numbers?

ANSWER: 
                Memory devices: Major = 1 (characted devices) minor
0       /dev/ram 
1       /dev/mem 
2       /dev/kmem - not implemented (easy, but I haven't done it) 
3       /dev/null 
4       /dev/port (implemented, but untested - don't play with it)

example: "mknod /dev/null c 1 3"


                Floppy disks: Major = 2 (block devices)

minor = drive + 4*type, drive = 0,1,2,3 for A,B,C or D-diskette

type    1: 360kB floppy in 360kB drive (5.25")
        2: 1.2M floppy in 1.2M drive (5.25")
        3: 360kB floppy in 720kB/1.44Mb drive (3.5")
        4: 720kB floppy in 720kB/1.44Mb drive (3.5")
        5: 360kB floppy in 1.2M drive (5.25")
        6: 720kB floppy in 1.2M drive (5.25")
        7: 1.44M floppy in 1.44M drive (3.5")

Thus minor nr for a 1.44Mb floppy in B is: 1 + 4*7 = 29, and to read
an old 360kB floppy in a 1.2M A-drive you need to use minor= 0 + 4*5 
= 20.

Example: "mknod /dev/PS0 b 2 28" (b for block: 2 for floppy, 28 for
1.44 in A)


                Hard disks: Major = 3 (block devices) minor
0       /dev/hda - The whole hd0, including partition table sectors
etc.  
1       /dev/hda1 - first partition on hd0 
...  
4       /dev/hda4 - fourth partition on hd0 
5       /dev/hda5 - Extended partition
64      /dev/hdb  - The whole hd1, again including partition table info 
65      /dev/hdb1 - first partition on hd1
...  
68      /dev/hdb4 - fourth partition on hd1
69      /dev/hdb5 - extended partition on hd1

NOTE! Be /very/ careful with /dev/hda and /dev/hdb - you seldom need
them, and if you write to them you can destroy the partition tables:
something you probably don't want.  The only things that use /dev/hda
are things like "fdisk" etc.

NOTE 2!! The names for hd's are no longer the same as under minix,
there is a straightforward correspondance, but I think
minix orders the partitions in some way (so that the partition numbers
will be in the same order as the partitions are physically on the
disk).  Linux doesn't order anything: it has the partitions in the
same order as in the partition table (ie /dev/hd?1 might be physically
after /dev/hd?2).

NOTE 3!! Extended partitions are recently detected, use them VERY
carefully, they should work, but backup everything before.

                        Tty's: Major = 4 (character devices) minor
0       /dev/tty0       - general console 1 -
63                      - reserved for virtual console
64-127                  - reserved for serial io
128-                    - reserved for pty's

And more particularly we have: 
64      /dev/ttys1      - com1
65      /dev/ttys2      - com2
66      /dev/ttys3      - com3
67      /dev/ttys4      - com4

                        lp: Major=6 (character devices) minor since 095c+
0       /dev/lp0
1       /dev/lp1
2       /dev/lp2

                        Scsi: Major=8 (block devices)
Minors are assigned in increments of 16 to SCSI disks as they are
found, scanning  from host 0, ID 0 to host n, ID `7, excluding the
host ID. For more information read the SCSI.note file available with
patches for SCSI (see the SCSI section below).

NOTE 4!! all the numbers given are in decimal form (the one you can
see if you perform ls -l on /dev).


VI.C Special Serial
~~~~~~~~~~~~~~~~~~~
Douglas E. Quale:
This has come up a couple of times already (including the case of
serial mice as well), but for the record stty acts on stdin not
stdout.  Old stty's (from V7 through BSD4.3) used stdout, but this is
suboptimal and doesn't conform to POSIX.  The GNU stty you are likely
using on Linux uses stdin, as does the stty distributed with BSD
Networking Release 2.  (Also, ``stty -a'' is more informative about
possible parameters, although it's pretty hard for me to remember what
90% of that stuff does without refering to the man page.)


QUESTION: Is there a list somewhere where I can get help with serial
   communications under Linux?

ANSWER: (Jim Gifford -- jgifford@attmail.com)
   There is a new list for the discussion of serial communications under
   Linux.  It is for problems, drivers, new developments, etc... with
   the Linux serial devices. The list is: linux-serial@stolaf.edu
   To join, send mail to linux-serial-request@stolaf.edu
   I hope that this list will prove beneficial to the improvement of
   Linux. This list is maintained by Michael K. Johnson as
   linux-serial-request@stolaf.edu

QUESTION: When I run kermit under Linux, I get "Warning, Read access
   to lock directory denied". What am I doing wrong?

ANSWER: Nothing, you just need to create /usr/spool/uucp (kermit 4.6?)
   or /usr/spool/locks (this is for the kermit5A), which is where kermit
   like to lock files.

QUESTION: What are the major, minor numbers for the serial ports under linux?

ANSWER:   Major 4, Minor :
   64      /dev/ttys1      - com1
   65      /dev/ttys2      - com2
   66      /dev/ttys3      - com3
   67      /dev/ttys4      - com4

QUESTION: can anyone give me a sample /etc/inittab entry for login
   from a pc attached to serial line /dev/ttys2?

ANSWER: "Humberto speaking :)"
   First set up the modem to turn off echo and enable auto answer, I do
   this in kermit by connecting to the modem and typing "ate0s0=1"
   followed by enter (w/o quotes). Then setup inittab to spawn getty on
   the modem
   ttys2:console:/etc/getty -m 1200 ttys2

   Then it should work. Some modems can be permanently set to disable
   echo and set auto answer, see your manual.

   Jim Weigand says:
     disable all messages. This will prevent getty from hanging up
   your modem.
   Set       For:
   ATE0      No echo
   ATQ1      No messages
   ATS0=2    Answer 2nd ring
   ATS7=60   1 minute to answer (shorter if 2400 baud)
   You can use kermit to set these. Do an AT&W to save for power-up.

   Michael K. Johnson says:
   If you would rather not save these commands as defaults to come up
   on power-up, perhaps because you want to use your current modem
   settings under a DOS communications package, you can also shove
   these command out ttys? from /etc/rc (or /etc/rc.local) using
   the command:
      echo "<modem_settings>" > /dev/ttys?

QUESTION:
   How do I set parameters like parity for serial login?

ANSWER: Use stty and redirect output to serial line.
ex: stty parodd > /dev/ttys2 which gives ttys2 odd parity.  
type stty by itself to get an idea of possible parameters. 
Or 'man stty' as well :)
 

------------------------------


** FOR YOUR REFERENCE **

The service address, to which questions about the list itself and requests
to be added to or deleted from it should be directed, is:

    Internet: Linux-Activists-Request@NEWS-DIGESTS.MIT.EDU

You can send mail to the entire list (and comp.os.linux) via:

    Internet: Linux-Activists@NEWS-DIGESTS.MIT.EDU

Linux may be obtained via one of these FTP sites:
    nic.funet.fi				pub/OS/Linux
    tsx-11.mit.edu				pub/linux
    tupac-amaru.informatik.rwth-aachen.de	pub/msdos/replace

The current version of Linux is 0.96a released on May 22, 1992

End of Linux-Activists Digest
******************************
--[0463]--

