5924 lines
225 KiB
Plaintext
5924 lines
225 KiB
Plaintext
Newsgroups: comp.os.linux,comp.os.linux.announce,news.answers,comp.answers
|
|
Distribution: world
|
|
Followup-To: poster
|
|
From: corsini@labri.greco-prog.fr
|
|
Reply-To: linux@numero6.greco-prog.fr
|
|
Organization: Greco Prog. CNRS & LaBRI, Bordeaux France
|
|
Subject: Linux Frequently Asked Questions 1/4 [monthly posted]
|
|
Summary: Linux, a small and free unix-like for 386-AT computers.
|
|
|
|
Archive-name: linux-faq/part1
|
|
Last-Modified: 93/03/28
|
|
Version: 1.17
|
|
|
|
*********************************************************
|
|
* *
|
|
* Answers to Frequently asked questions about Linux *
|
|
* *
|
|
*********************************************************
|
|
|
|
This post contains Part 1 of the Linux FAQ (4 parts)
|
|
|
|
Hi Linuxers!
|
|
|
|
The original FAQ 1st version was posted on Dec. 19, 1991 by Robert Blum.
|
|
|
|
Most credits to Linus, Robert and Ted for the departure point of this
|
|
work. The first 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.
|
|
|
|
Since September 1992, the FAQ is co-written by:
|
|
|
|
WHO (WHAT) E-MAIL
|
|
=============================================================================
|
|
Matt Welsh (META-FAQ) mdw@tc.cornell.edu
|
|
Mark Komarinski (DOS) komarimf@craft.camp.clarkson.edu
|
|
Matt Welsh (GENERAL INFO) mdw@tc.cornell.edu
|
|
Matt Welsh (INSTALLATION) mdw@tc.cornell.edu
|
|
Drew Eckhardt (SCSI) drew@headrest.woz.colorado.edu
|
|
Hongjiu Lu (GCC) hlu@eecs.wsu.edu
|
|
Krishna Balasubramanian (X11) balasub@cis.ohio-state.edu
|
|
Zane Healy (BBS INFO) healyzh@holonet.net
|
|
Philip Copeland (NET INFO) p_copela@csd.bristol-poly.ac.uk
|
|
Rick Miller (DEVICE INFO) rick@ee.uwm.edu
|
|
Peter MacDonald (SLS INFO) pmacdona@sanjuan.uvic.ca
|
|
Rick Sladkey (EMACS) jrs@world.std.com
|
|
Dirk Hohndel (PROOF READER) hohndel@informatik.uni-wuerzburg.dbp.de
|
|
Marc-Michel Corsini (FAQ collector) corsini@{labri,firmin}.greco-prog.fr
|
|
=============================================================================
|
|
|
|
If anyone is interested in participating with this FAQ, just send me a
|
|
note with: your name/e-mail and the section you want to maintain.
|
|
|
|
Many of the questions could be avoided, if people had read the FAQ of
|
|
the following newsgroups: news.announce.newusers, comp.lang.c,
|
|
gnu.emacs.help, comp.unix.questions, comp.windows.x.i386unix.
|
|
|
|
[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 and queries.
|
|
|
|
This FAQ is supposed to reduce the noise level ;-) in the
|
|
comp.os.linux newsgroup, and spare the time of many activists. I will
|
|
cross-post it each month to news.answers. This FAQ is NOT an
|
|
introduction to UNIX, there are many books for unix, and there is
|
|
*also* a FAQ for unix (it's the one of comp.unix.questions which
|
|
contains things such as "How do I remove a file named -". I DO NOT
|
|
WANT TO ADD SUCH THINGS IN THIS FAQ DEVOTED TO LINUX.
|
|
|
|
Some books to read:
|
|
The C Programming Language: Kernighan & Ritchie
|
|
POSIX Programmer's Guide: D. Lewine
|
|
Unix System Administration Handbook: Nemeth, Snyder & Seebass.
|
|
Unix for the Impatient: Abrahams & Larson
|
|
Unix System V Release 4, An Introduction, by Rosen, Rosinski and
|
|
Farber; Publisher Osborne MacGraw-Hill.
|
|
The X Windows System in a Nutshell: O'Reilly.
|
|
.....
|
|
|
|
This FAQ is available at the main Linux sites in the doc directory,
|
|
the addresses are given in section II. of this FAQ. There is also an
|
|
archive of (all) FAQs at rtfm.mit.edu [18.172.1.27]. Have a look in
|
|
the anonymous ftp directory: /pub/usenet/news.answers/linux-faq.
|
|
If you do not have anonymous ftp access, you can access the archive by
|
|
mail server. Send mail to mail-server@rtfm.mit.edu with the words
|
|
"help" and "index" in the body on separate lines for more information.
|
|
|
|
The information in this multi-parts FAQ is likely to change relatively
|
|
quickly. If this is more than two months old (it was released on
|
|
February 1993) then you should obtain a new copy. See the paragraph
|
|
above for details of where to find a more recent version.
|
|
|
|
Please suggest any change, rephrasing, deletions, new questions,
|
|
answers ...
|
|
Please include "FAQ" in the subject of messages sent to me about FAQ.
|
|
Please send them to linux@numero6.greco-prog.fr whatever will be the
|
|
>From part of this message. Finally discussion about the FAQ can be
|
|
done on the DOC Channel (see section II).
|
|
|
|
|
|
Thanks in advance,
|
|
Marc
|
|
|
|
The FAQ can be found in LaTeX version, thanks to Pepe Flores Peters.
|
|
|
|
Future Plan:
|
|
|
|
- provide FAQ as diff too, since it seems to stay stable
|
|
except for very few sections.
|
|
- perform automatic post to c.o.l, c.o.l.a, c.a and n.a
|
|
every month as I promised long time ago.
|
|
|
|
================================8<=====8<==============================
|
|
CONTENTS (of this part)
|
|
|
|
0. WARNINGS (part1)
|
|
I. LINUX GENERAL INFORMATION (part1)
|
|
II. LINUX USEFUL ADDRESSES (part1)
|
|
|
|
================================8<=====8<==============================
|
|
|
|
|
|
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 with the corrections].
|
|
|
|
As the Linux kernel changes monthly (and even more ...), I define 2
|
|
pseudo variables a la C one for the version, and one for the date of
|
|
the release.
|
|
|
|
#define CURRENT_VERSION 0.99 /* the current version */
|
|
#define PATCH_LEVEL pre8 /* the patch level */
|
|
#define KERNEL_DATE 31, Mar. /* Date of the CURRENT_VERSION */
|
|
|
|
In what follows I'll consider CURRENT_VERSION as the current version.
|
|
|
|
> From: Linus Torvalds <torvalds@cc.helsinki.fi>
|
|
> Subject: I'm back: new ALPHA-diffs on nic.funet.fi
|
|
> Date: Wed, 31 Mar 1993 20:44:44 +0300
|
|
>
|
|
>
|
|
> I'm back in circulation (although "somewhat" behind with news: 980
|
|
> messages to go), and I have already uploaded new kernel diffs to
|
|
> nic.funet.fi. The directory is the same old pub/OS/Linux/PEOPLE/Linus,
|
|
> and the files are called ALPHA-diff.z (diffs against clean 0.99pl7, not
|
|
> the "7A" version), or linux-0.99.pre8.tar.z (for the full sources).
|
|
>
|
|
> Changes relative to pl7A:
|
|
> - fixed a silly (and major) bug in the keyboard driver which can result
|
|
> in problems under some circumstances (among them X11 crashes)
|
|
> - changed the way signals are handled: I don't like the idea of doing
|
|
> signals in a pre-determined order, so I decided to try to fix some
|
|
> other problems with signal-handling instead. The fixes should
|
|
> hopefully be enough to remove the problems with bash: if they don't,
|
|
> I'd call it a bash bug.
|
|
> - upgrading the ext2fs to the newest version: this fixes problems with
|
|
> named pipes on ext2fs partitions. I also did some additional changes
|
|
> to the named pipe code, mostly due to comments from Bruce Evans.
|
|
> - Another fix suggested by Bruce: the minixfs rename() call should
|
|
> finally work correctly under all circumstances (ie renaming
|
|
> directories over each other etc).
|
|
> - I did some final coding to try to remove the old race-condition where
|
|
> the same name can occur multiple times in a directory. The problem
|
|
> probably exists in all other fs's, though.
|
|
> - SCSI patches from Eric Youngdale. These should recognize the new
|
|
> AHA-1542C controller as well as fixing some other problems.
|
|
> - I'm trying out a different way of recovering from 387 errors: there
|
|
> are timeouts and some resetting code in the kernel now, and it might
|
|
> be enough.. It will result in problems, but at least it should work
|
|
> most of the time at full speed, and if the 387 fails, you should get
|
|
> an appropriate error message..
|
|
> - FPU emulation patches from Bill Metzenthen. They fix the problems
|
|
> with v86 mode as well implementing the full rounding control
|
|
> functionality.
|
|
>
|
|
> As always, the more alpha-testers, the merrier... And problem- or
|
|
> success-reports are always welcome.
|
|
>
|
|
> Linus
|
|
|
|
|
|
|
|
I. LINUX GENERAL INFORMATION
|
|
=============================
|
|
*** This section is maintained by Matt Welsh (mdw@tc.cornell.edu). Mail
|
|
*** him if you have corrections, additions, other questions, etc.
|
|
*** Last update March 1993.
|
|
|
|
|
|
I.01) 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 CURRENT_VERSION, date: KERNEL_DATE.
|
|
|
|
(*) Free means that you may use it, change it , redistribute it, as
|
|
long as you don't change the copyright. Free does not mean public
|
|
domain.
|
|
|
|
|
|
Linux is a freely distributable UNIX clone. It implements a subset of
|
|
System V and POSIX functionality, and contains a lot of BSD-isms.
|
|
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.
|
|
|
|
|
|
I.02) Does Linux support GCC, TCP/IP, X-Windows, MGR, etc.?
|
|
|
|
ANSWER: Linux currently supports and uses a large amount of the GNU
|
|
software (i.e. GCC, bison, groff, etc) so all of that functionality is
|
|
there. X-Windows is also available, along with many client
|
|
applications. MGR is there too. TCP/IP is in testing, and is available
|
|
for you to try out.
|
|
|
|
(Dirk Hohndel:) TCP/IP is available. I use Linux boxes as Xterminals
|
|
and my "own" asterix has mounted half a Gig via NFS. Mitch DSuoza is
|
|
running an anonymous FTP server on his Linux box. This is definitely
|
|
more than testing. The newest SLS has a TCP/IP kernel by default.
|
|
|
|
|
|
See section VIII of this FAQ ("Features")!
|
|
|
|
In short, Linux supports many, many features and programs. One of the
|
|
biggest questions is:
|
|
"Does ***** work on Linux? Does Linux have *****?"
|
|
The answer, usually, is "yes". Just check out the rest of this FAQ,
|
|
the newsgroup, as well as the files on the FTP sites.
|
|
|
|
|
|
I.03) What is the current state of Linux?
|
|
|
|
ANSWER: read the comp.os.linux newsgroup, where the INFO-SHEET is
|
|
periodically posted. You can also read comp.os.linux.announce.
|
|
|
|
|
|
I.04) I've just heard about linux, what should I do to get it?
|
|
|
|
ANSWER: FIRST read this FAQ, and especially section III
|
|
(installation). Choose a "release" of Linux (such as MCC, SLS,
|
|
bootdisk/rootdisk, etc). Download from your nearest FTP site, use the
|
|
"rawrite" program as needed to write the images to high-density
|
|
floppies (5.25 or 3.5). Specific instructions are given in section III
|
|
and in the README files for each release.
|
|
|
|
Note that some releases only give you the kernel and a few utilities,
|
|
and others give you everything you need (including X11, GCC, and more)
|
|
in that latter case the downloading is close to a douzen of SOFT. Just
|
|
check out section III for more info.
|
|
|
|
|
|
I.05) 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. (though *some* EISA
|
|
success has been reported [T. Koenig], Linux doesn't take advantage of
|
|
the EISA structure). A high density floppy drive -- either 5.25" or
|
|
3.5"-- is required.
|
|
|
|
{Drew's information:
|
|
Linux supports anything that's register compatable with a WD1003 MFM
|
|
disk controller (ie, the original PC-AT disk controller.) Most AT
|
|
MFM, RLL, ESDI, and IDE setups look like this.
|
|
|
|
XT compatable disk controllers won't work.
|
|
|
|
Generally, the rule is if you have the disk configured into the
|
|
CMOS setup of your machine, it will work (because the BIOS is talking
|
|
to a WD 1003 compatable board), otherwise it won't.}
|
|
|
|
IDE and MFM seem to work with no problem. It works, also, for some
|
|
ESDI drive (you might have to comment 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 (with SWAP), and 4M is definitely a plus.
|
|
It can happily use up to 16M (and more if you want).
|
|
|
|
BTW There are problems with some MAXTOR drives on high speed machines
|
|
(sometimes switching off "turbo" helps). There may also be a problem
|
|
with "slow" memory (under 60ns) on fast machines. Again, the solution
|
|
|
|
is to turn off "turbo". Mixed SIMMs (3 and 9 chip versions) have also
|
|
reported to be problematic.
|
|
|
|
NOTE1: It doesn't run (yet?) on a MCA machine
|
|
NOTE2: There is a driver for XT but not tested by me (see below)
|
|
NOTE3: There is also a support for 8514 and S3.
|
|
|
|
|
|
> From: smackinla@cc.curtin.edu.au (Pat Mackinlay)
|
|
> Newsgroups: comp.os.linux.announce
|
|
> Subject: New version of XT (8 bit) HD driver
|
|
> Keywords: XT disk driver
|
|
> Date: 18 Mar 93 15:09:14 GMT
|
|
|
|
> This is post to announce the newest (and hopefully last) version of the
|
|
> XT hard disk driver for Linux. This version will only work with Linux 0.99p7
|
|
> or better due to a couple of kernel changes. The files should be available
|
|
> on tsx-11, nic and sunsite FTP sites as soon as the administrators process
|
|
> their incoming data. The files are:
|
|
>
|
|
> tsx-11.mit.edu:/pub/linux/BETA/xtdisk/xtdisk6.tar.z
|
|
> nic.funet.fi:/pub/OS/Linux/BETA/xtdisk/xtdisk6.tar.z
|
|
> sunsite.unc.edu:/pub/Linux/ALPHA/xtdisk/xtdisk6.tar.z
|
|
>
|
|
> and there's the complete README in those directories too.
|
|
>
|
|
> Note that this will probably be my last version of this driver because I'm
|
|
> upgrading to a 200 meg SCSI drive and don't have any more room in my machine.
|
|
> I'll be listening out for volunteers to take over the code <grin>, although
|
|
> the only changes needed now will be to keep up with rest of the kernel.
|
|
>
|
|
> What follows is an extract from the README:
|
|
>
|
|
> INTRODUCTION
|
|
> ------------
|
|
> This is version BETA-6 of the XT hard drive driver for Linux. The patch is
|
|
> for Linux 0.99p7, and will not work for earlier kernels.
|
|
>
|
|
> First, a quick introduction to the reason for this driver. There are, in
|
|
> general, three different types of hard disk controller:
|
|
>
|
|
> a. Generic AT style controllers (includes IDE drives) - all 16 bit
|
|
> b. SCSI style controllers - all incompatible <grin>
|
|
> c. XT style controllers - all 8 bit
|
|
>
|
|
> Each of these three different types of controllers has to be programmed in
|
|
> it's own way, and they use different DMA channels/IRQ lines etc. in order to
|
|
> communicate with the computer. Generic AT and SCSI controllers are already
|
|
> supported in the "stock" Linux kernel, but XT controller are not. This driver
|
|
> will allow you to use one of these older controllers in your machine running
|
|
> Linux.
|
|
>
|
|
|
|
I.06) How much space will Linux take up on my hard drive?
|
|
|
|
ANSWER: It depends on which release you choose. See the section
|
|
INSTALLATION below. Usually it's somewhere between 10 megs (for a
|
|
nominal system+swap space) and 30-40 megs (for everything plus space
|
|
for user directories, etc.).
|
|
|
|
BTW the full SLS needs around 60 MB (including TeX and other goodies).
|
|
|
|
|
|
I.07) 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.
|
|
|
|
|
|
I.08) Will Linux run on a 386 Laptop?
|
|
|
|
ANSWER: It works, including X on most of them.
|
|
|
|
|
|
I.09) 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 (2.01 ~770k).
|
|
So you don't have enough real memory and have to page.
|
|
|
|
|
|
I.10) 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.
|
|
|
|
WARNING: Linux and OS/2 *can* co-exist on the same machine. BUT, you
|
|
cannot use Linux's fdisk to make Linux partitions! See the warnings in
|
|
section III about Linux and OS/2.
|
|
|
|
|
|
|
|
I.11) (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 CURRENT_VERSION is available since
|
|
KERNEL_DATE. 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 decided 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.
|
|
|
|
|
|
I.12) 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).
|
|
|
|
(Rick's note for English speakers: Linux - "LIH-nuhks".)
|
|
|
|
|
|
I.13) 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: The GNU GENERAL PUBLIC LICENSE Version 2, June 1991 is part
|
|
of the source tree.
|
|
|
|
|
|
I.14) 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 BIGNUM 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".
|
|
|
|
It is even used in production environments (Dr. G.W. Wettstein)
|
|
|
|
|
|
I.15) Does Linux use TSS segments to provide multitasking?
|
|
|
|
ANSWER: Yes!
|
|
|
|
|
|
I.16) If my PC runs under Linux, is it possible to ftp, rlogin,
|
|
rsh etc.. to other Unix boxes?
|
|
|
|
ANSWER: Kermit and ka9q have both been ported to Linux. Also, TCP/IP is
|
|
quite reliable, only a few clients are missing.
|
|
Read section XI. devoted to Ethernet and Linux.
|
|
|
|
|
|
I.17) Does linux do paging? Can I have virtual memory on my small
|
|
machine?
|
|
|
|
ANSWER: Yes, it does. Generally you set up a swap file or partition, and
|
|
enable it with the "swapon" command. Voila! Virtual memory.
|
|
|
|
|
|
I.18) Can I have tasks spanning the full 4GB of addressable 386
|
|
memory? No more 64kB limits like in coherent or standard minix?
|
|
|
|
ANSWER: Since 0.97 it uses 4 GB Process Space, 3 for userspace and
|
|
1 for the kernel space.
|
|
|
|
|
|
I.19) Does the bigger program sizes mean I can run X?
|
|
|
|
ANSWER: Yes! See section XII below for details on X11.
|
|
|
|
|
|
I.20) What are the differences, pros and cons compared to Minix ?
|
|
|
|
ANSWER (partial):
|
|
Cons:
|
|
- 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.
|
|
|
|
|
|
I.21) What are the pros and cons compared to 386BSD ?
|
|
|
|
ANSWER: Linux and 386BSD started out as completely different projects,
|
|
with completely different goals and design criteria in mind.
|
|
|
|
there are newsgroups devoted to 386BSD : comp.os.386bsd.*
|
|
|
|
- I haven't seen a recent FAQ for 386BSD :). Nevertheless the Linux
|
|
FAQ is not bug free, and contains some outdated information.
|
|
- 386BSD can do POSIX and BSD
|
|
- Linux can do POSIX, SYSV and some BSD stuff
|
|
|
|
For most of the *nix* users both systems are fairly usable, but none
|
|
of them are bug free.
|
|
|
|
|
|
I.22) Why can't we split comp.os.linux ?
|
|
|
|
ANSWER: (Ian Jackson)
|
|
|
|
There is a procedure for creating new newsgroups, involving discussion
|
|
periods and votes; it can be found in news.announce.newgroups.
|
|
|
|
In November last year I (Ian Jackson) started a formal discussion
|
|
under that procedure and duly held a vote for four new groups,
|
|
comp.os.linux.announce (moderated), comp.os.linux.questions,
|
|
comp.os.linux.bugs and comp.os.linux.misc.
|
|
|
|
There was quite a heated argument, with many people (esp from Fidonet
|
|
and the news->mail gateway) complaining that if the group split they
|
|
wouldn't be able to read it.
|
|
|
|
At the end of the vote the results were as follows (culled from the
|
|
announcement at the end of the voting period):
|
|
|
|
yes no abs diff ratio result why to change
|
|
.announce 479 131 3 348 3.6564885 PASS 249
|
|
.questions 380 217 16 163 1.7511521 FAIL (ratio) 54
|
|
.bugs 390 212 11 178 1.8396226 FAIL (ratio) 34
|
|
.misc 390 207 16 183 1.8840580 FAIL (ratio) 24
|
|
|
|
diff = number more yes than no votes - this must be >=100 for a group
|
|
to pass.
|
|
ratio = ratio of yes to no votes - this must be >=2 for a group to
|
|
pass.
|
|
to change = the minimum number of votes which would have been
|
|
required to change the result (if they were all "yes" or "no"
|
|
as appropariate).
|
|
|
|
The guidelines say that unless a group gets at least twice as many
|
|
"yes" as "no" votes and at least 100 more "yes" than "no" votes it
|
|
won't be created. Hence all the new groups except .announce failed.
|
|
|
|
The guidelines also say that you have to wait at least 6 months after
|
|
a failed vote before trying again - this to stop the obvious problem
|
|
of failed groups coming back over and over again.
|
|
|
|
Hence any more discussion of proposed splits is futile until at least
|
|
very late in June. In any case, such a discussion should take place in
|
|
the group reserved for that purpose, news.groups, not in
|
|
comp.os.linux.
|
|
|
|
|
|
II. LINUX USEFUL ADDRESSES
|
|
=========================
|
|
|
|
|
|
II.A. LINUX ON THE NET: ftp, mailing-list
|
|
II.B. OBTAINING LINUX FROM BBS'S: everything about bbs
|
|
|
|
|
|
II.A. LINUX ON THE NET
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
II.01) Where can I get linux?
|
|
|
|
ANSWER: Linux (all the software, binaries, sources, releases, and so on),
|
|
can be retrieved via anonymous FTP from :
|
|
|
|
[ Major sites ]
|
|
EUROPE:
|
|
nic.funet.fi (128.214.6.100):
|
|
directory /pub/OS/Linux
|
|
ftp.informatik.tu-muenchen.de (131.159.0.110)
|
|
directory /pub/Linux
|
|
|
|
US:
|
|
tsx-11.mit.edu (18.172.1.2):
|
|
directory /pub/linux
|
|
sunsite.unc.edu (152.2.22.81):
|
|
directory /pub/Linux
|
|
|
|
[ Mirroring sites (some of them, there are lots now) ]
|
|
|
|
AUSTRALIA:
|
|
kirk.bu.oz.au (131.244.1.1)
|
|
directory /pub/OS/Linux
|
|
|
|
EUROPE:
|
|
src.doc.ic.ac.uk (146.169.2.1):
|
|
directory packages/Linux
|
|
ftp.mcc.ac.uk (130.88.200.7):
|
|
directory pub/linux
|
|
ftp.dfv.rwth-aachen.de (137.226.4.105):
|
|
directory /pub/linux
|
|
ftp.informatik.rwth-aachen.de (137.226.112.172):
|
|
directory /pub/Linux
|
|
ftp.ibr.cs.tu-bs.de (134.169.34.15):
|
|
directory /pub/os/linux
|
|
|
|
JAPAN:
|
|
kuis.kyoto-u.ac.jp (130.54.20.1):
|
|
directory /Linux
|
|
/Linux/mirror (for the tsx mirror)
|
|
KOREA:
|
|
cair.kaist.ac.kr (143.248.11.170):
|
|
mirror of sunsite; directory pub/Linux
|
|
|
|
US:
|
|
wustl.wuarchive.edu (128.252.135.4):
|
|
directory /pub/mirrors4/linux
|
|
ftp.eecs.umich.edu (141.212.99.7):
|
|
directory linux
|
|
|
|
|
|
You might want to check out which of these is the most up-to-date.
|
|
|
|
> (From: Lee M J McLoughlin <lmjm@doc.ic.ac.uk>)
|
|
> src.doc.ic.ac.uk:
|
|
>
|
|
> We are also on Janet (the main UK academic network) as
|
|
> uk.ac.ic.doc.src (000005102000).
|
|
>
|
|
> More useful perhaps is we are the only big archive available via FTAM,
|
|
> the ISO equivalent to FTP. We can be reached either over the
|
|
> internet or janet (see above addresses) or via the European IXI
|
|
> network on 204334504108
|
|
|
|
|
|
If you have no FTP capability, you are in trouble. See the next Q/A.
|
|
Also, you'll need the "UNCOMP.EXE" and "RAWRITE2.EXE" programs for DOS
|
|
(to make your install disks). These are usually found in the Linux
|
|
directories on the above FTP sites.
|
|
|
|
|
|
II.02) I do not have FTP access, what can I do to get linux?
|
|
|
|
ANSWER: You can either read the next subsection related to BBS's
|
|
otherwise, read the following.
|
|
|
|
The SLS release is distributable by snail-mail on floppies for those
|
|
without net access; see the SLS section in section III of this FAQ for
|
|
more.
|
|
|
|
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@doc.ic.ac.uk,
|
|
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)
|
|
|
|
|
|
II.03) Is there a newsgroup or mailing-list about linux?
|
|
|
|
ANSWER: The comp.os.linux newsgroup is literally *teeming* with postings.
|
|
So, to the first question, yes. :) The older newsgroup, alt.os.linux,
|
|
is being phased out and shouldn't be used anymore.
|
|
|
|
If you don't have news access you can get the digest of postings via
|
|
e-mail from: Linux-activists-request@news-digests.mit.edu. This list
|
|
is gatewayed to the newsgroup as well. Only use the 'request' address
|
|
for subscribe/unsubscribe messages; don't post those to the newsgroup
|
|
or to the actual mailing list.
|
|
|
|
|
|
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
|
|
|
|
II.04) Where can I get my questions answered? How about bug-reports?
|
|
What do I put into a post to comp.os.linux?
|
|
|
|
ANSWER: (Paul Gortmaker pg@cain.mmtc.rmit.oz.au)
|
|
You can post your problem to the above group, comp.os.linux. BUT, BEFORE
|
|
YOU DO THIS, PLEASE READ THE FOLLOWING GUIDELINES.
|
|
|
|
If you have read the FAQ, man pages, etc, and you still haven't
|
|
solved your problem, then check to make sure you have got the latest
|
|
version of whatever it is that you are working with. Check the dates
|
|
and revision numbers of your versions with the versions on your local
|
|
ftp site (tsx-11.mit.edu , sunsite.unc.edu ?). This includes (most
|
|
importantly) the kernel itself. Make sure you have applied the latest
|
|
patches and recompiled the kernel, or have got the kernel "Image"
|
|
from someone who has done so. And, of course check comp.os.linux
|
|
for info too. If you have a genuine problem, chances are that you
|
|
aren't the first one to find it. So it has probably already been
|
|
reported (...and fixed???). For example, if you are having trouble
|
|
with say Xconfig for some strange VGA card, and you use nn to read
|
|
comp.os.linux, then you could invoke nn as follows:
|
|
|
|
nn -x -s 'config' comp.os.linux
|
|
|
|
and it will find all the latest articles with the word config in
|
|
their subject for you. This will be one of the most up to date
|
|
sets of information that you can get -- DON'T OVERLOOK IT !!!
|
|
(You can check the man pages of your news reader to determine
|
|
the options that do the same as the above.)
|
|
|
|
OK, so you've done all the above, spent 40 hours trying to figure
|
|
it out, have had a nervous breakdown, your girlfriend/boyfriend has
|
|
stopped talking to you, and you decide that you will turn to the
|
|
Linux community for help. Here are some guidelines on posting that
|
|
will ensure that you get a quick response, and that you hopefully
|
|
don't get flamed.
|
|
|
|
1) Choosing a Subject:
|
|
|
|
It is important to try and squeeze as much information into
|
|
as few words as possible. If you can manage it, try and
|
|
put the package name, version, and problem into the subject.
|
|
But don't make it too long, or the middle will get chopped
|
|
out. For example "I'm having problems with poeig-1.1.tar.Z
|
|
on my 486 with 0.99p6" will probably appear to everybody as
|
|
"I'm having prob <> ith 0.99p6" Not very useful...
|
|
What should have been used was something like:
|
|
"poeig-1.1 w 99p6 wont compile" would be much better, and
|
|
relays that you are having trouble with getting it to
|
|
compile. (Note that this is just an example, I have no
|
|
knowledge of problems with poeig!) Also, (unless you like
|
|
bugs -> getting flamed!) DON'T claim you have found a bug, unless
|
|
you are ABSOLUTELY SURE! Nothing p***es developers off more
|
|
than erroneous bug reports.
|
|
|
|
2) Keywords:
|
|
|
|
If your news poster program asks for keywords, try and put
|
|
in some useful descriptive words, so that others can use them
|
|
for a meaningful search.
|
|
|
|
3) Body of the Article:
|
|
|
|
There are some key things that need to be included in the
|
|
body of the article. (a) The name and version of the thing
|
|
that you are having the problem with. (b) The type of problem,
|
|
ie compilation, execution, etc. -- (c) versions of related
|
|
software, ie if compilation is the problem, then the version
|
|
of GCC you are runnning is relevant. If you are having trouble
|
|
with a program that uses X, then the version of X you are using
|
|
is relevant. (d) The version and patchlevel of the kernel you
|
|
are using at present. (ie. 0.99p7 or whatever) (e) the type
|
|
or brand of any related hardware, ie. if you are having problems
|
|
with networking, then you would want to say that you are using
|
|
a Western Digital SMC Elite 16 or whatever your ethernet card
|
|
is. (f) Any relevant error messages that were reported by the
|
|
system during the problem.
|
|
And, of course, there are some things that one should NOT put
|
|
in the article. For example, don't post a 30 page configuration
|
|
file and expect anybody in their right mind to look through it.
|
|
And similarly for any HUGE files. If they are relevant to your
|
|
problem, then someone will respond by asking you something like
|
|
"Did you check line 32 in file such and such???" And try to
|
|
avoid negative comments like "The documentation isn't fit for
|
|
my dog." If you have a bone to pick, do it via e-mail, so the
|
|
rest of us don't have to read a flame war! It just adds to the
|
|
amount of useless noise on comp.os.linux, which already takes
|
|
too long to scan through. Besides, the developers are doing this
|
|
FOR FREE. THEY ARE NOT OBLIGATED TO DO ANYTHING. DON'T ABUSE
|
|
THEM!!! (Or they might just go away, which hurts us all.)
|
|
|
|
Well, with all this in mind, hopefully you will get a quick response to
|
|
your problem, and maybe someday you will be able to answer someone else's
|
|
problem from the experience you gain!
|
|
|
|
II.05) 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 ones I am aware of are: GCC, MGR, X11, SCSI, NEW-CHANNELS,
|
|
MSDOS (emulator discussion) , NORMAL, KERNEL, FTP, LAPTOP, DOC,
|
|
NET, CONFIGS, LINUXNEWS ...
|
|
- whenever you want to JOIN or LEAVE a channel you have to
|
|
contact the request address
|
|
- you have to use special header (X-Mn-Key and Mn-Admin); X-Mn-Key
|
|
is *ONLY* for regular post, the X-Mn-Admin is for *REQUEST*
|
|
|
|
(Ari Lemmke: 1 Nov. 1992):
|
|
Hmmm.... It seems our list has now about 1500 users
|
|
in 21 channels (mailing lists). 3960 without uniq.
|
|
|
|
"echo foo | mail linux-activists-request@niksula.hut.fi"
|
|
to get the Mail-Net User Guide.
|
|
|
|
II.06) 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/leave them. Basically you send mail to the request address
|
|
with the line:
|
|
X-Mn-Admin: join <channel>
|
|
|
|
|
|
II.07) How can I leave the channel XXX on the linux-activists
|
|
mailing list?
|
|
|
|
ANSWER: Same as above, basically. You send mail to the request address
|
|
that contains the line:
|
|
X-Mn-Admin: leave <channel>
|
|
|
|
II.08) I'm not an hacker, what are the channels I could be interested
|
|
in?
|
|
|
|
ANSWER: Probably these are the most interesting for you (IMHO)
|
|
|
|
Channel NORMAL:
|
|
~~~~~~~~~~~~~~~
|
|
Channel normal is the former Linux-Activists mailing list
|
|
(all the people who were on the old Linux-Activists list
|
|
are moved to this channel).
|
|
|
|
|
|
Channel DOC:
|
|
~~~~~~~~~~~~
|
|
This channel is for Linux document "project". Discussion about Linux
|
|
documents, manuals, papers, etc.
|
|
|
|
Channel CONFIGS:
|
|
~~~~~~~~~~~~~~~~
|
|
This channel will be devoted to send submissions of systems that have
|
|
Linux already running, AND those that, for any reason, can't get it
|
|
to work yet.
|
|
|
|
Mainly, what it's need from all the channel users is to send their
|
|
hardware configuration list (as complete as possible). Include
|
|
anything that you feel pertinent for information: CPU,
|
|
motherboard, RAM amount, HD & floppy controller, BIOS, monitor,
|
|
video card & memory, network adapter, etc. If you are having trouble
|
|
with your current system, or you find out that a program doesn't work
|
|
properly on your system due to a HARDWARE problem, it may be useful
|
|
for us to know your configuration; maybe you can get a lot of help.
|
|
|
|
Channel LINUXNEWS:
|
|
~~~~~~~~~~~~~~~~~~
|
|
The LINUXNEWS channel will be used for distribution of Linux News, a
|
|
weekly (if I can find the time) summary of things that happen in the
|
|
Linux community. Discussion is not encouraged, if you have complaints
|
|
or suggestions, send them directly to me (Lars.Wirzenius@helsinki.fi).
|
|
|
|
Channel NEW-CHANNELS:
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
On the future users on this channel get the information about new
|
|
channels created.
|
|
|
|
By this way you can join the channels you want, and do not need to
|
|
send mail to Mail-Net info server or listen rumours.
|
|
|
|
II.09) 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@fgb1.fgb.mw.tu-muenchen.de for more info.
|
|
|
|
All back issues of the Digest are available on tsx-11.mit.edu
|
|
[18.172.1.2] in the following place(s):
|
|
|
|
pub/linux/mail-archive
|
|
~/Volume? /* where '?' in volume #
|
|
~/digestnnn.Z * and nnn is issue #
|
|
*/
|
|
|
|
|
|
|
|
|
|
II.B OBTAINING LINUX FROM BBS'S
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
*** This section is maintain by Zane Healy (healyzh@holonet.net)
|
|
*** Last Update November 1992.
|
|
|
|
II.10) I don't have access to FTP, how can I obtain Linux?
|
|
|
|
ANSWER: Linux is available from various BBS's around the world.
|
|
|
|
II.11) I got this FAQ from a local BBS, or a friend, and I see there
|
|
is a newsgroup called comp.os.linux . I don't have access to USENET or
|
|
mail, so how can I get the messages?
|
|
|
|
ANSWER: Some of the BBS's on FidoNet carry comp.os.linux as a FidoNet
|
|
conference. Also some of the other BBS's carry it in some form or other.
|
|
|
|
II.12) Do BBS's offer anything that the Internet does not?
|
|
|
|
ANSWER: Yes, on the information side there are the UNIX conferences on
|
|
both the RIME network and FidoNet. Although they are not dedicated to
|
|
linux, a large amount of the messages are linux related. Also at least
|
|
one software package being developed for linux, and also one port is
|
|
available via BBS's long before they are available via anonymous FTP.
|
|
|
|
II.13) What is a BBS?
|
|
|
|
ANSWER: A BBS is a Bulletin Board System, it let's you transfer
|
|
message's and file's via your phone line and all you need is a
|
|
computer with communications software and a modem. Some BBS's
|
|
transfer message's among each other forming large computer network's
|
|
similar to USENET. The most popular of these in the US are FidoNet
|
|
and RIME.
|
|
|
|
II.14) How can I get a (Near) complete list of BBS's that carry Linux?
|
|
|
|
ANSWER: I (Zane Healy) post a list of all known BBS's that carry Linux
|
|
to comp.os.linux as well as the RIME and Fidonet UNIX conferences on the
|
|
1st and 15th of each month.
|
|
|
|
II.15) Now that I have a phone number, how do I go about accessing a
|
|
BBS?
|
|
|
|
ANSWER:
|
|
|
|
1. You need a computer equipped with communications software and a modem.
|
|
|
|
2. For ALMOST all BBS's you will need to set the comm software up for:
|
|
8 - Data Bits
|
|
N - Parity
|
|
1 - Stop Bit
|
|
|
|
Although certain BBS's and Communication services require that the
|
|
software be set for:
|
|
7 - Data Bits
|
|
E - Parity
|
|
1 - Stop Bit
|
|
|
|
You will also need to set the comm software for the correct speed,
|
|
either the top speed, or the max speed for your modem.
|
|
|
|
3. Using the comm software, call the BBS. Once you connect with the
|
|
BBS (this may take awhile, as other people are likely to be using it),
|
|
you will be asked some questions.
|
|
If you are a registered user of the BBS it will normally only ask
|
|
for your name and password. However if you are not a registered user,
|
|
it will most likely require that before you do anything, you register.
|
|
The method of registration varies from BBS to BBS.
|
|
Normally the first thing that will happen is, you sign on to the
|
|
BBS, and tell it your name. It will then check it's list of user's
|
|
and see that you are not one of them. At which time it will ask you
|
|
if you are a new user, or if you wish to re-enter your name. When you
|
|
tell it you are a new user, it will then ask you some questions about
|
|
yourself, such as where you are calling from and your phone number. A
|
|
lot of BBS's will want some statistical info such as what type of
|
|
computer you are using, your communications software, your age, etc,
|
|
etc.
|
|
After this, most BBS's require some sort of validation, this is for
|
|
the System Operator's (SysOp's) protection. One type is where you
|
|
give the BBS software your phone number, hang up, and the BBS calls
|
|
your computer to verify that you gave it legitament phone number.
|
|
Some BBS's require that you mail the SysOp a postcard. Most, however
|
|
just require that you give the SysOp the request info and then he
|
|
upgrades your level of access a couple of day's later.
|
|
For the most part you will find that the registration process is
|
|
easy to follow and well documented.
|
|
|
|
II.16) There is a local BBS that carries Linux, but it isn't on the
|
|
latest Linux BBS List. How do I go about submitting it for inclusion in
|
|
the list?
|
|
|
|
ANSWER: Send the following information on the BBS to me:
|
|
|
|
BBS Name:
|
|
Phone Number:
|
|
Modem Speed:
|
|
City and State/Country:
|
|
Whatever Network it's on (i.e. FidoNet, RIME, etc.):
|
|
First Time access to D/L Linux Files (Y/N):
|
|
Free Access to Linux Files (Y/N):
|
|
Allow File Requests (Y/N):
|
|
BBS Rating (1-5):
|
|
|
|
I can be reached at one of the following E-Mail Addresses:
|
|
Internet -- healyzh@holonet.net
|
|
CompuServe -- 70332,14
|
|
Prodigy -- SCNN49A
|
|
Fido NetMail -- Zane Healy at 1:109/615
|
|
RIME UNIX Conference -- Zane Healy
|
|
|
|
II.17) What can I do to help ensure the continued development of
|
|
Linux?
|
|
|
|
ANSWER: PLEASE UPLOAD FILES TO BBS'S
|
|
|
|
I would like to point out that a very large number of the Linux
|
|
enthusiasts don't have FTP access. In fact it is possible that by now
|
|
most of the Linux fan's don't. So I would like to suggest that those of
|
|
us that do, find at least one BBS to post the Linux file's to. I, for
|
|
one post every file that I get to at least one of the local BBS's, and
|
|
from there they the file's tend to find there way to other local BBS's.
|
|
I've seen posts about the future of Linux etc., well here is a way to
|
|
help guarantee it. I think it's safe to assume that most people with FTP
|
|
access also have a modem. So how about doing other Linux fan's a favor
|
|
and finding a BBS to upload the Linux files to.
|
|
|
|
II.18) How do I read the data contained in the Linux BBS List?
|
|
|
|
ANSWER: The list uses the following format:
|
|
|
|
State YYY BBS Name Phone Number Modem Speed
|
|
Rating City Other data
|
|
|
|
The BBS's are rated by the number of Linux related file's that they
|
|
carry. This is so you can choose one's that has a better chance of
|
|
carrying the file's you are looking for if you are calling long distance.
|
|
The BBS's are rated on a scale of one to five.
|
|
|
|
1 -- Only enough the most basic of files
|
|
2 -- The basics and a little more
|
|
3 -- So, so
|
|
4 -- A respectable amount
|
|
5 -- Pretty much everything you need
|
|
|
|
Information about the boards access policies can be obtained by
|
|
checking a three digit field.
|
|
|
|
YYY -- Either a Yes/No/? answer to the question
|
|
|||
|
|
||Free access to Linux files
|
|
|Allow file requests (FidoNet)
|
|
First time D/L of Linux related files
|
|
|
|
NOTE: Just because a board has N's in the first two fields does not
|
|
mean that it is a board to stay away from. A lot of boards require
|
|
that you register and be verified before you can access most of their
|
|
features, hence the first N. The second field is, to the best of my
|
|
knowledge, limited to BBS's that are part of FidoNet.
|
|
|
|
II.19) What are some of the best BBS's to check out?
|
|
|
|
ANSWER:
|
|
|
|
In the US:
|
|
|
|
CA YNY hip-hop 408-773-0768 14.4k V.32bis/HST
|
|
5 Sunnyvale Login: guest (no password)
|
|
DC NNY When Gravity Fails 202-686-9086 14.4k
|
|
5 Washington
|
|
FL ??? Slut Club 813-236-1232 14.4k
|
|
5 Tampa/St.Pete Fidonet 1:377/42
|
|
GA YYY Information Overload 404-471-1549 9600 HST
|
|
5 FidoNet 1:133/308
|
|
ID ??? Rebel BBS 208-887-3937 9600
|
|
5 Boise
|
|
IL YYY EchoMania BBS 618-233-1659 14.4k HST
|
|
3 Belleville Fido 1:2250/1 (f'reg LINUX)
|
|
F'reqs from unlisted nodes, online callback verifier (works L.D.)
|
|
MD ??? Brodmann's Place 301-843-5732 14.4k
|
|
5 Waldorf RIME ->BRODMANN
|
|
NC ??? MAC's Place 919-891-1111 DS modem
|
|
5 Dunn RIME ->MAC
|
|
NY YYY Prism BBS,Middleton 914-344-0350 9600 HST/v.32
|
|
5 Middletown, NY Fidonet 1:272/38
|
|
NY YYY The Laboratory 212-927-4980 16.8k HST, 14.4k v.32bis
|
|
3-4 FidoNet 1:278/707
|
|
OR YYY Intermittent Connection 503-344-9838 14.4k HST v.32bis
|
|
5 Eugene, Ore 1:152/35
|
|
TX YYY Advanced BBS 512-578-2720 9600
|
|
5 Victoria, TX Fidonet 1:3802/215
|
|
VA ??? VTBBS 703-231-7498
|
|
5 Blacksburg
|
|
WA YYY S'Qually Holler 206-235-0270 9600
|
|
5 Renton Fidonet 1:343/34
|
|
|
|
And here are all the known BBS's outside the US:
|
|
|
|
AUSTRALIA:
|
|
NSW YYN Linux-Support-Oz +61-2-418-8750 2400
|
|
2-3 Sydney Intlnet, SBCNet
|
|
? ??? 500cc Formula 1 BBS +61-2-550-4317 V.32
|
|
? (2-3)
|
|
CANADA:
|
|
ON ??? EX-10 Kitchner 519-725-4400
|
|
?
|
|
ON ??? Ned's Ottawa 613-739-1591
|
|
2
|
|
ON ??? Bytown 613-236-1232
|
|
2 SmartNet
|
|
PQ ??? Synapse 819-246-2344 819-561-5268
|
|
5 Gatineau RIME->SYNAPSE
|
|
GERMANY:
|
|
??? bakunin.north.de 00 49 421 870532 9600
|
|
? D 2800 Bremen kraehe@bakunin.north.de
|
|
??? ?????????????? +49-40-735-5349 14.4k
|
|
1
|
|
??? Hipposoft's Mail Server +49-241-875090 14.4k V.32bis/HST
|
|
3 D-W5100 Aachen Fidonet 2:242/6
|
|
IRELAND:
|
|
??? TOPPSI +353-1-711047 or 773547 9600
|
|
? Fidonet 2:263/151
|
|
NORWAY:
|
|
??? Thunderball Cave 472567018
|
|
? RIME ->CAVE ?
|
|
NETHERLANDS:
|
|
??? DownTown BBS Lelystad, Linux Support BBS 14.4k
|
|
? +31-3200-48852 FIDONET
|
|
SOUTH AFRICA:
|
|
??? Andre Skarzynski - Linux Activists of Southern Africa
|
|
? +27 2231 78148 (Is this voice or data?)
|
|
UNITED KINGDOM:
|
|
NYN The Purple Tentacle +44-734-590990 HST/V32bis
|
|
3-4 Reading Fidonet 2:252/305
|
|
??? A6 BBS +44-582-460273 14.4k
|
|
? Herts Fidonet 2:440/111
|
|
|
|
|
|
II.20) What are File Requests?
|
|
|
|
ANSWER: FidoNet BBS's with the right type's of front-end mailer's can
|
|
call other Fido BBS's and request their front-end mailer to send them
|
|
files that they want. All this can be done automatically. File
|
|
Requests (freqs) are basically the FidoNet equivallent to UUCP.
|
|
|
|
|
|
===================8<==========>8================
|
|
|
|
|
|
Newsgroups: comp.os.linux,comp.os.linux.announce,news.answers,comp.answers
|
|
Distribution: world
|
|
Followup-To: poster
|
|
From: corsini@labri.greco-prog.fr
|
|
Reply-To: linux@numero6.greco-prog.fr
|
|
Organization: Greco Prog. CNRS & LaBRI, Bordeaux France
|
|
Subject: Linux Frequently Asked Questions 2/4 [monthly posted]
|
|
Summary: Linux, a small and free unix-like for 386-AT computers.
|
|
|
|
Archive-name: linux-faq/part2
|
|
|
|
Last-Modified: 93/03/28
|
|
Version: 1.16.1
|
|
|
|
*********************************************************
|
|
* *
|
|
* Answers to Frequently asked questions about Linux *
|
|
* *
|
|
*********************************************************
|
|
|
|
This post contains Part 2 of the Linux FAQ (4 parts).
|
|
It must be read *after* the first part.
|
|
|
|
================================8<=====8<==============================
|
|
CONTENTS (of this part)
|
|
|
|
III. INSTALLATION, and COMMON PROBLEMS (part2)
|
|
IV. SOME CLASSICAL PROBLEMS (part2)
|
|
V. LINUX and DOS (part2)
|
|
|
|
===================================8<====>8============================
|
|
|
|
|
|
|
|
|
|
III. INSTALLATION, SETUP, and COMMON PROBLEMS
|
|
=============================================
|
|
*** Note: this FAQ section should be kept up-to-date, and should
|
|
*** be the most 'reliable' source for installation info. Please mail
|
|
*** any corrections or changes to this section's coordinator,
|
|
*** Matt Welsh (mdw@tc.cornell.edu). Last update March 93.
|
|
|
|
|
|
III.A. WHERE TO START: What are the reliable sources of information
|
|
III.B. LINUX PACKAGES: Where and how install a complete Linux package
|
|
|
|
III.C. SOME COMMON PROBLEMS: Simple problems and simple solutions
|
|
|
|
|
|
III.A. WHERE TO START
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
III.01) I want to install Linux on my machine. Where do I start?
|
|
|
|
ANSWER: The first thing you should do is read through the various
|
|
introductory files, and ESPECIALLY the FAQ (this file). Especially
|
|
this section :). A lot of effort has been done on these intro files,
|
|
but note that some of them conflict with each other and cover older
|
|
versions of Linux. When in doubt consult this file.
|
|
|
|
These files are all found on tsx-11.mit.edu:/pub/linux/docs...
|
|
|
|
FAQ
|
|
The Linux Frequently Asked Questions list
|
|
It's sitting in your hands now. This section is probably the best
|
|
place to start to get the most up-to-date Linux installation
|
|
information.
|
|
|
|
INFO-SHEET
|
|
Linux Information Sheet, by J. Winstead/L. Wizenius
|
|
This is a collection of general info about Linux. It's
|
|
a good place to start if you've never heard of the package
|
|
before.
|
|
|
|
README.kernel
|
|
Kernel compilation README file, by L. Wirzenius
|
|
This is the README notes for recompiling the Linux kernel from the
|
|
sources. You don't need it unless you're planning to upgrade
|
|
your kernel by compiling it yourself.
|
|
|
|
Others
|
|
Every "release" of Linux (such as SLS, boot/root, HLU's disks, etc.,
|
|
see below) has its own up-to-date README files and docs that explain
|
|
how to install that release. This FAQ section summarizes, but for more
|
|
info on how to install Linux, read the READMEs and docs for the release
|
|
that you choose.
|
|
|
|
Old docs
|
|
There are a number of obsolete, old docs lying around. Most of these
|
|
tell how to install Linux from the old boot/root disk combo. I DO NOT
|
|
SUGGEST that you use these docs unless you know what you're doing--
|
|
the best thing for beginners to do is read this FAQ and install the SLS
|
|
release (using the docs and READMEs for the SLS release).
|
|
These old docs are things like "install.txt", "guide.txt", "RELNOTES",
|
|
"CHANGES", and so on, and are all geared towards old versions of the
|
|
boot/rootdisk. They are *NOT* relevant to current versions of Linux.
|
|
|
|
|
|
III.02) Is there some kind of limit on how large my Linux partitions
|
|
and/or filesystems can be?
|
|
|
|
ANSWER: There's no limit on partition size (just the size of your drive),
|
|
but Linux mainly uses the minix filesystem which limits filesystems to
|
|
64 megs each. You can also use the extended filesystem (which is still
|
|
in testing, but has been included with recent kernel versions) which has
|
|
a limit of 4 terabytes. Probably enough unless you have a disk array. :)
|
|
|
|
See section III.C below on creating partitions and filesystems for more info.
|
|
|
|
|
|
|
|
III.B. LINUX PACKAGES
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
This section contains information about *SOME* of the current Linux
|
|
packages available.
|
|
|
|
III.03) Does there exist a way to get all (or nearly all) of the Linux
|
|
stuff?
|
|
|
|
ANSWER: Yes. To install Linux, you're going to want to choose one of the
|
|
"releases" of Linux, all of which have a different method of installation
|
|
and set up. Each release also has its own README and installation docs,
|
|
which you'll want to read first. But I'll summarize here. The major
|
|
releases are:
|
|
|
|
* The "Softlanding Linux System Release"
|
|
Also known as the "SLS" release, consists of 14 disks for Linux
|
|
and 8 for X11. The nice thing about this release is that you can
|
|
pick and choose which disks and packages you want to install. The
|
|
first 2 disks must be "rawritten" (using rawrite.exe) on floppies,
|
|
and the rest of the images are put onto DOS format floppies.
|
|
Contains all of the softs you'll ever need, and is easy to install
|
|
for newcomers.
|
|
|
|
This is the release that I suggest everyone new to Linux should
|
|
install. It's the most complete and up-to-date package. HLU's
|
|
disks, below, are good for upgrading, and (unfortunately),
|
|
the MCC-interim is quite dated at this point. If you install
|
|
SLS you'll save yourself a lot of trouble.
|
|
|
|
* The "TAMU" (Texas A&M University) Linux Release
|
|
This release is supposedly like the SLS release, but has some
|
|
different softs and a different installation procedure. From Dave
|
|
Safford, "The installation procedure is the main difference from
|
|
SLS. A single boot diskette is used, and it boots directly into
|
|
an automated installation program." This installation program
|
|
asks a few questions about the desired configuration, and sets up
|
|
everything, including your filesystems, booting from the hard
|
|
drive with LILO (see section III.C below), and a simplified
|
|
X-Windows configuration.
|
|
|
|
This humble author has never installed the TAMU release but I've
|
|
heard good things about it.
|
|
|
|
* H.J. Lu's "bootable rootdisk"
|
|
This is a release of the Linux kernel and basic binaries on
|
|
a single floppy. It, along with HLU's 'gccdisk', 'libdisk',
|
|
and so on, are good for upgrading or installing basic
|
|
Linux system by hand. It's not reccommended for newcomers,
|
|
because there's no real install script, it's mostly meant
|
|
as an upgrade of the basic system software. Beginners should
|
|
install SLS or MCC-interim (see below) instead.
|
|
The images and docs are found at tsx-11.mit.edu:/pub/linux.
|
|
|
|
* Others but OUTDATED
|
|
There are other releases and distributions of the Linux software,
|
|
such as the "MCC-Interim" and "MJ" releases. There is also an older
|
|
"boot/root" disk combo (0.98.1) which is like HLU's bootable
|
|
rootdisk, above, but it's no longer supported (as far as I know).
|
|
|
|
The MCC-Interim release (the previous de facto Linux standard)
|
|
isn't going to be updated anymore, according to Owen LeBlanc. So
|
|
if you install it, be warned that you'll have to upgrade it all
|
|
in some other way (the last version of MCC-Interim was 0.97.2,
|
|
quite dated).
|
|
|
|
The "MJ" release, according to Martin Junius, is no longer
|
|
maintained. The last version was 0.97.1.
|
|
|
|
III.04) Where can I get these versions of Linux?
|
|
|
|
ANSWER:
|
|
|
|
The SLS release is at tsx-11.mit.edu:/pub/linux/packages/SLS and
|
|
sunsite.unc.edu:/pub/Linux/SLS.
|
|
|
|
H.J. Lu's "bootable rootdisk" release is found at tsx-11.mit.edu:
|
|
/pub/linux/packages/GCC, as well as the mirror sites.
|
|
|
|
TAMU.99p4 is available from sc.tamu.edu in pub/free_unix/TAMU.99p4.
|
|
|
|
|
|
III.05) What should I do to install the SLS release?
|
|
|
|
ANSWER: Basically all of the releases are alike. You need to get the
|
|
DOS program 'rawrite.exe' (or 'rawrite2.exe'). This program takes a
|
|
binary file and writes it, block by block, to a blank formatted
|
|
floppy. This is the way to take a Linux floppy image and put it onto a
|
|
disk from DOS.
|
|
|
|
For the SLS release, you need to get the files in the a1, a2, a3, and
|
|
a4 directories at least. You also need the README's there. Basically,
|
|
you use rawrite to copy the a1 and a2 images onto floppies. Or, you
|
|
can use 'dd' on your UNIX system to transfer the files directly to
|
|
floppies (assuming you have a floppy drive on your UNIX system) in
|
|
place of rawrite.
|
|
|
|
The rest of the files all go onto DOS-formatted floppies, just using
|
|
DOS copy. The SLS release is nice because it reads the DOS floppies
|
|
during installation, so you don't have to rawrite all of those disks.
|
|
|
|
Once you have these 4 disks, you're ready to go. You can also get all
|
|
of the files in the b1-b7 directories (for extras, like man pages and
|
|
emacs), c1-c4 directories (for the GCC compiler and libraries), the
|
|
x1-x8 directories (for Xwindows), and so on, but they're all optional.
|
|
I suggest at least getting the files in the a, b, and c directories.
|
|
Remember that only the a1 and a2 images need to be rawritten, ALL of
|
|
the other files just do onto the floppies in DOS format.
|
|
|
|
First you boot the a1 disk. It will load up Linux, and will ask you to
|
|
put in the a2 disk at some point. You'll be left with a prompt... from
|
|
here you want to look at the SLS README file on-line (it tells you
|
|
how). Then you'll run 'fdisk' to create your Linux partition(s), (see
|
|
section III.C, below, for info on making partitions), and
|
|
then reboot the a1 disk again (putting in the a2 disk, again, when
|
|
asked). Then you'll run 'mkfs' and 'mkswap' to make your filesystems
|
|
and swap space. Then you're ready to install the software-- type
|
|
doinstall /dev/PART
|
|
where PART is the main Linux partition you created with fdisk, above.
|
|
>From here on it's pretty automatic-- you simply flip disks while it
|
|
installs the software. First it will ask you how much software you
|
|
plan to install-- just choose the correct option depending on which
|
|
sets of disks you got.
|
|
|
|
You will need to have a blank DOS-formatted floppy on hand. The
|
|
installation procedure makes a Linux kernel boot disk out of it.
|
|
|
|
III.06) What's about SLS ?
|
|
|
|
ANSWER: (this is part of the FAQ written for SLS 0.98p5 by Peter
|
|
MacDonald).
|
|
SLS (Softlanding Linux System) Copyright 1992, Softlanding Software.
|
|
|
|
which is NOT just an image dump of someones Unix system.
|
|
|
|
Also note that in the interest of preventing ftp storms, the version
|
|
of SLS that appears on the internet, is not quite the same as the
|
|
version distributed by Softlanding. Softlanding regularly gets a
|
|
whole new version which has the changes integrated. But the updates
|
|
to the Internet version are tailored to minimize the amount that has
|
|
to be downloaded to become current. That is why bugs manage to creep
|
|
in on me. I am not installing and testing the Internet version,
|
|
although, functionally, it should be quite close to the Softlanding
|
|
one.
|
|
|
|
So, why am I telling you this? After the next period of stability
|
|
(few changes to SLS), I will be uploading the Softlanding version of
|
|
SLS to tsx-11.mit.edu.
|
|
|
|
This distribution is freely available if you have internet
|
|
access, or an obliging friend with access to it.
|
|
|
|
The purposes of the SLS are the following:
|
|
0) provide an initial installation program (for the queasy).
|
|
1) utilities compiled to use minimal disk space.
|
|
2) provide a reasonably complete/integrated U*ix system.
|
|
3) provide a means to install and uninstall packages.
|
|
4) permit partial installations for small disk configs.
|
|
5) add a menu driven, extensible system administration.
|
|
6) take the hassle out of collecting and setting up a system.
|
|
7) give non internet users access to Linux.
|
|
8) provide a distribution that can be easily updated.
|
|
|
|
SLS is a binary mostly distribution (except for the kernel), and is
|
|
broken into multiple parts, or series, each of which is denoted by a
|
|
letter followed by the disk number as follows:
|
|
|
|
a1-aN: The minimal base system
|
|
b1-bN: Base system extras, like man pages, emacs etc.
|
|
c1-cN: The compiler(s), gcc/g++/p2c/f2c
|
|
x1-xN: The X-windows distribution
|
|
i1-iN: Interviews (doc and idraw)
|
|
t1-tN: TeX (document processing)
|
|
|
|
This scheme allows new disks to be added to the distribution without
|
|
changing the disk numbering. Also, the sysinstall program doesn't
|
|
have to be changed when new disks are added as the last disk is marked
|
|
by the presence of the file "install.end". And when interviews is
|
|
added, say as a new series "i", it can be installed with:
|
|
|
|
sysinstall -series i
|
|
|
|
Highlights of the base are: gcc/g++, emacs, kermit, elm/mail/uucp,
|
|
gdb, sc (spreadsheet), man pages, groff, elvis, zip/zoo/lh and menu.
|
|
Highlights of X are: X, programmers libs, 75 dpi fonts, games (spider,
|
|
tetris, xvier, chess, othello, xeyes, etc) and utilities like xmag,
|
|
xmenu, xcolormap and ghostscript. Approximate usage is as follows:
|
|
|
|
Tiny base system: 9 Meg (Series 'a')
|
|
Main base system: 25 Meg (Series 'a', 'b' and 'c')
|
|
Main base system + X11: 45 Meg (Series 'a', 'b', 'c' and 'x')
|
|
|
|
Please read the file COPYING which outlines the GNU copying
|
|
restrictions. The linux kernel is copywrite Linux B. Torvalds.
|
|
Various other copywrites apply, but the upshot is that you
|
|
may do whatever you like with SLS, except restrict others
|
|
in any way from doing likewise, and you must leave all copywrites
|
|
intact, and you can not misrepresent or take credit for others work.
|
|
|
|
AVAILABILITY
|
|
|
|
SLS is available from the address:
|
|
|
|
Softlanding Software
|
|
910 Lodge Ave.
|
|
Victoria, B.C., Canada
|
|
V8X-3A8
|
|
(604) 360-0188
|
|
|
|
More details about SLS can be asked to pmacdona@sanjuan.uvic.ca
|
|
|
|
|
|
III.07) What should I get to install the bootdisk/rootdisk combo
|
|
release?
|
|
|
|
ANSWER: Essentially it's a lot like the SLS installation, above. You
|
|
get the boot disk and root disk, and use rawrite to transfer them to
|
|
floppies. Then you boot the boot disk, and put in the root disk when
|
|
asked. At this point you login as 'install' to install the software.
|
|
|
|
|
|
III.08) How do I get and install H.J. Lu's "bootable rootdisk" release?
|
|
|
|
ANSWER: It's just like the boot/root disk and the SLS release. Just
|
|
get the bootroot disk image and use rawrite to transfer it to a
|
|
floppy, and then boot it. You'll probably want to get the 'gccdisk'
|
|
and 'libdisk', etc. images and rawrite them to floppies as well. Note
|
|
that this release doesn't have a user-friendly installation script,
|
|
it's meant mostly to upgrade or install the system by hand. Unless
|
|
you're familiar with Linux this may prove difficult. :)
|
|
|
|
|
|
III.09) What is the MCC interim version of Linux?
|
|
|
|
ANSWER: The MCC-Interim release of Linux was put together by Owen
|
|
LeBlanc of the Manchester Computing Centre. Unfortunately, it's quite
|
|
dated, and isn't going to be updated anymore. :(
|
|
|
|
|
|
|
|
|
|
III.C. SOME COMMON PROBLEMS
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
III.10) What filetype is the extension ".z"? What about ".taz",
|
|
".tpz", and ".tgz"? I see these files on the archives but I don't
|
|
know how to unpack them.
|
|
|
|
ANSWER: Here's a list of common filename extensions on the archives.
|
|
|
|
Extension Used by
|
|
--------- ----------------------------------------------------------
|
|
.Z compress/uncompress. Use "uncompress foo.Z" to
|
|
uncompress the file.
|
|
.z gzip. Gzip is now used by many archive sites instead
|
|
of compress; if you don't have gzip on your system,
|
|
get it! To uncompress one of these files use
|
|
"gzip -d foo.z".
|
|
.tar Tar file. Use "tar xvf foo.tar" to unpack it. Or, you
|
|
can fo "tar tvf foo.tar" to get an index listing of
|
|
the tarfile.
|
|
.taz Compressed tar file. You can do something like
|
|
"zcat foo.taz | tar xvf -" or "tar xvfz foo.taz" to
|
|
unpack it (some versions of tar don't have the z
|
|
option).
|
|
.tpz, .tgz Gzipped tar file. If you have gzip, zcat is linked to
|
|
it, so you can do "zcat foo.tpz | tar xvf -" to unpack
|
|
it. .tpz is the old extension; all gzipped tar files
|
|
should now end in .tgz instead.
|
|
|
|
The SLS distribution uses gzipped tar files (.tgz).
|
|
|
|
|
|
III.11) How do I make partitions and/or filesystems for Linux?
|
|
|
|
ANSWER: For most Linux installations (such as SLS) you'll need at
|
|
least two partitions: one for swap space (used as virtual memory) and
|
|
another for your "root filesystem" (that is, the actual Linux software
|
|
itself). You can also make seperate partitions for your /usr
|
|
filesystem, etc. (however, the SLS doinstall program, at this point,
|
|
mounts your root filesystem for you before installing, thus, you can't
|
|
have a seperate /usr filesystem to start out with).
|
|
|
|
But that's beside the point. First thing you need to do is resize the
|
|
existing partitions on your drive (if any) to make space for Linux;
|
|
for example, if you have a DOS partition taking up all of your drive,
|
|
you need to use FDISK under MS-DOS to delete it and recreate it with a
|
|
smaller size. Of course, in so doing you'll lose everything on that
|
|
DOS partition-- just back it up first and reinstall after you've
|
|
recreated and reformatted the partition. That's life! :)
|
|
|
|
Now you can boot up Linux (say, from SLS, or from the boot/root disks).
|
|
>From there you run 'fdisk' to create your partitions: it's very self-
|
|
explanatory. If you make a swap partition you need to change it's type
|
|
to "Linux swap" with the fdisk 't' command.
|
|
|
|
And, if you want a Linux partition larger than 64 megabytes, you'll
|
|
need to use the extended filesystem[*] (as opposed to the default, the
|
|
Minix filesystem). The extended filesystem ("extfs" for short) has a
|
|
4 terabyte size limit (and lets you have filenames longer than 14
|
|
characters). If you want to use it just set the type of the partition
|
|
to "Linux extfs" with the fdisk 't' command.
|
|
|
|
[*] You can also use the Xia filesystem (xiafs) or ext2fs (better version of
|
|
the extended filesystem). These two filesystems are proving to be more
|
|
widely used as both the extfs and the Minix filesystem are being phased out.
|
|
Both of them are now included in SLS. Use "mkxfs" to create Xia filesystems,
|
|
and "mke2fs" to make Extdended 2 Filesystems. As most installations are
|
|
phasing out the Minix and Extended filesystems I suggest using xiafs or ext2fs.
|
|
|
|
NOTE: "Extended filesystem" does NOT equal "extended partition". An
|
|
extended partition acts as a "container" for logical partitions, which
|
|
is nice because you can have many logical partitions inside the
|
|
extended partition, and only use up one of your four available primary
|
|
partitions on the drive. (You can have only one extended partition
|
|
per drive). Extended partition can't hold data on their own: you need
|
|
to create logical partitions on top of it first. They are numbered
|
|
/dev/hda5, /dev/hda6, and so on.
|
|
|
|
The extended FILESYSTEM on the other hand has nothing to do with
|
|
extended partitions. It's just the name of another filesystem used by
|
|
Linux which lets you have larger filesystem sizes and other features.
|
|
|
|
Once you've got your partitions created, you need to reboot the system
|
|
so that changes to your partition table are picked up. Then you need
|
|
to 'format' the partitions (i.e. create filesystems on them). For your
|
|
swap partition, use the command 'mkswap <partition> <size>'. For
|
|
example, if you have a swap partition on /dev/hda2 with a size of 8208
|
|
blocks (about 8 megs), use the command
|
|
mkswap /dev/hda2 8208
|
|
|
|
If you have a partition set up for a Minix filesystem (the default
|
|
type) use the command 'mkfs <partition> <size>'. If however you're
|
|
going to use the extended filesystem (a must for partitions over 64
|
|
megs) use the command 'mkefs <partition> <size>'. (Note: If you use the
|
|
ext2fs, you'll have to use mke2fs, and if you use Xia filesystem, you'll
|
|
have to use mkxfs when creating the filesystems).
|
|
|
|
III.12) Why does fdisk say "Linux cannot currently use XXXX sectors of
|
|
this partition"?
|
|
|
|
ANSWER: Fdisk is an older program which expected all filesystems to be
|
|
Minix fs, which limited filesystems to 64 megs. You can ignore this warning
|
|
because the extfs, xiafs, and ext2fs don't have this limit.
|
|
|
|
|
|
III.13) What does the message "MINIX-fs: Magic match failed" on bootup mean?
|
|
|
|
ANSWER: Basically, this means that you're trying to mount a non-Minix
|
|
filesystem as a Minix filesystem, and mount is croaking on it because the
|
|
type is wrong. If you use a root filesystem type other than Minix fs (i.e.
|
|
if you use the extfs, ext2fs, or xiafs) you'll probably see this message:
|
|
the kernel tries to mount root as Minix, then extfs, then ext2fs, and so on...
|
|
every time it fails for one type it tries the next type.
|
|
|
|
In most situations, this can be ignored, if the kernel is able to mount
|
|
your root partition as any one of its known types. However, if you have the
|
|
root device set to the wrong partition, for example, then the kernel should
|
|
hang at this point and you'll have to use "rdev" to set it correctly.
|
|
|
|
III.14) 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 Linux BLOCKS (1024 bytes), not
|
|
sectors. Also make sure that you have the right partition: partitions
|
|
are numbered "/dev/hda1", "/dev/hda2", and so on (and "/dev/hdb1",
|
|
"/dev/hdb2" for the second hard drive)... DON'T use "/dev/hda" or
|
|
"/dev/hdb" as they correspond to the entire disk, not just single
|
|
partitions.
|
|
|
|
Also remember that SCSI drives use /dev/sda1, /dev/sda2... and
|
|
/dev/sdb1, /dev/sdb2, and so on for their partitions.
|
|
|
|
|
|
III.15) How can I get mkfs/mkefs to check for bad blocks?
|
|
|
|
ANSWER: Unfortunately the -c option on mk(e)fs does not work; it
|
|
cannot detect bad blocks on the drive, and thus if you create a
|
|
filesystem over a part of your hard drive with bad blocks, things will
|
|
eventually go wrong. So you need to generate a bad block list (in a
|
|
file) and use the -l option on mk(e)fs so it will flag those blocks
|
|
when making a filesystem.
|
|
|
|
NOTE: This is only needed for older RLL and MFM drives. SCSI and IDE
|
|
drives have bad block logic on-board.
|
|
|
|
Generating a bad block list for mk(e)fs
|
|
=======================================
|
|
Nov 11, 1992 Gerhard Kircher (kircher@neuro.tuwien.ac.at)
|
|
|
|
Introduction
|
|
------------
|
|
First of all: the -c option (check bad
|
|
blocks) of mk(e)fs does not work (the code used cannot detect any bad
|
|
blocks). Fortunately there is another option -l <file> to tell
|
|
mk(e)fs where the bad blocks are. SCSI and IDE drive users do not
|
|
need any bad block management - the drive logic does it for them.
|
|
However, users of old MFM or RLL drives do need it.
|
|
|
|
1 Where are my bad blocks ?
|
|
---------------------------
|
|
Every MFM or RLL drive is tested by the manufacturer and the locations
|
|
of bad blocks are usually printed directly on the drive case. If you
|
|
cannot find any bad block information on your drive, you can use the
|
|
common disk test software (Norton,...) to check your drive and obtain
|
|
a defect list.
|
|
|
|
Locations of bad blocks are given in terms of cylinder and head
|
|
coordinates. Cylinder and head together specify a certain track. Some
|
|
manufacturers are more specific about the location of the bad spot
|
|
within the track but if you know how to use this information you
|
|
probably do not need to read this guide. So if we know the track
|
|
where the bad spot sits, we declare the entire track as bad (even
|
|
experts do this).
|
|
|
|
What we have now is a table of the form
|
|
|
|
CYLINDER HEAD
|
|
... ...
|
|
... ...
|
|
... ...
|
|
|
|
|
|
2 calculating all bad sectors
|
|
-----------------------------
|
|
Each sector on the drive can be addressed by three cordinates:
|
|
Cylinder = [0..CYLINDERS-1]
|
|
Head = [0..HEADS-1]
|
|
Sector = [0..SECTORS-1]
|
|
where
|
|
CYLINDERS ... total number of cylinders
|
|
HEADS ... total number of heads
|
|
SECTORS ... number of sectors per track
|
|
|
|
The absolute address of a sector on the disk is then calculated
|
|
according to the formula
|
|
|
|
Abssector = HEADS*SECTORS*Cylinder + SECTORS*Head + Sector.
|
|
|
|
We can now calculate the absolute addresses of all sectors
|
|
of every bad track on our disk according to
|
|
|
|
for each bad track given by Cylinder and Head do
|
|
begin
|
|
for Sector=0 to SECTORS-1 do
|
|
begin
|
|
Abssector = HEADS*SECTORS*Cylinder + SECTORS*Head + Sector
|
|
end
|
|
end
|
|
|
|
obtaining a list of all bad sectors.
|
|
|
|
|
|
3 Converting absolute sectors to partition relative sectors
|
|
-----------------------------------------------------------
|
|
Partitions are like separate disks, that means that sector counting
|
|
starts with 0 for each partition. So what we have to do next is to
|
|
generate a bad sector list for each partition we want to use for
|
|
linux. To do that, we must know where each partition starts and ends.
|
|
We can get this information from fdisk. When we start fdisk and type
|
|
'p' to view the partition table, the begin, start and end information
|
|
will be given in terms of cylinders. When we type 'u' to toggle the
|
|
units, an then again 'p' we get what we need: Start and End of each
|
|
partition in terms of absolute sectors. Here is what I see on my
|
|
system (I use my second disk for linux):
|
|
|
|
# fdisk /dev/hdb
|
|
|
|
Command (m for help): p
|
|
|
|
Disk /dev/hdb: 8 heads, 17 sectors, 1024 cylinders
|
|
Units = cylinders of 136 * 512 bytes
|
|
|
|
Device Boot Begin Start End Blocks Id System
|
|
/dev/hdb1 1 1 963 65483+ 81 Linux/MINIX
|
|
/dev/hdb2 964 964 1024 4148 82 Linux swap
|
|
|
|
Command (m for help): u
|
|
Changing display/entry units to sectors
|
|
|
|
Command (m for help): p
|
|
|
|
Disk /dev/hdb: 8 heads, 17 sectors, 1024 cylinders
|
|
Units = sectors of 1 * 512 bytes
|
|
|
|
Device Boot Begin Start End Blocks Id System
|
|
/dev/hdb1 1 1 130967 65483+ 81 Linux/MINIX
|
|
/dev/hdb2 130968 130968 139263 4148 82 Linux swap
|
|
|
|
Sector counting (as counting always should do :-) starts with 0.
|
|
The first partition begins with sector one, as sector 0 is
|
|
always the boot sector.
|
|
|
|
This is how we calculate the addresses for one partition:
|
|
|
|
a) From the list obtained in section 2, cancel all addresses
|
|
that are not in the range [Start..End] (including limits)
|
|
shown by fdisk.
|
|
b) Subtract Start from each remaining entry.
|
|
|
|
|
|
4 Converting to blocks
|
|
----------------------
|
|
A disk sector has a length of 512 bytes (this is the usual size
|
|
BIOS/DOS can handle). Linux groups two sectors to an entity called
|
|
block. A block therefore consists of two physical sectors and has a
|
|
size of 1024 bytes (I read somewhere that larger blocks will be
|
|
supported in the future). The mk(e)fs program wants to know the
|
|
addresses of bad blocks, not sectors. So we convert our partition
|
|
relatve sector addresses to partition relative block addresses by
|
|
dividing by two and taking the integer part. Doing that we certainly
|
|
get a lot of duplicate addresses which we have to get rid of, so we
|
|
simply delete redundant entries.
|
|
|
|
What we have now is a list of bad blocks for each partition. Mk(e)fs
|
|
likes to get this information from a file, one address per line, one
|
|
file for each partition.
|
|
|
|
|
|
5 Automating the process
|
|
------------------------
|
|
Doing all the calculations by hand is tedious and error prone.
|
|
So we may decide to automate the whole thing.
|
|
We can do everything in dos when we use the proper utilities
|
|
(see later)
|
|
|
|
5.1 The Input File
|
|
|
|
We need a single file containing the coordinates of all bad tracks of
|
|
one entire disk. Each line of the file consists of two fields, the
|
|
first of which is the cylinder number and the second is the head
|
|
number. These are the first few lines of the file for my second disk:
|
|
|
|
48 0
|
|
105 4
|
|
150 2
|
|
224 1
|
|
380 2
|
|
427 6
|
|
435 1
|
|
|
|
|
|
5.2 An AWK script for doing all the calculations
|
|
|
|
In the following we present an awk script that does all the work for
|
|
us. We just have to plug in the correct values of the partition and
|
|
drive parameters and off we go. I use gawk211.zip and sort03.arc
|
|
which I downloaded from a simtel20 mirror. Sort is used to remove the
|
|
duplicates.
|
|
|
|
#---the awk script starts here
|
|
# generates linux bad blocks file (starting count with 0)
|
|
# for partition ONE
|
|
# for micropolis drive 8 heads, 17 sectors
|
|
# input file: cyl[0.. ] head[0.. ]\n
|
|
# stdout: abs blocks of corresponding partition\n
|
|
BEGIN { start = 1;
|
|
end = 130967;
|
|
sectors = 17;
|
|
heads = 8;
|
|
}
|
|
{ sec=$1*sectors*heads+$2*sectors;
|
|
if (sec>=start && sec<=end)
|
|
for (i=0; i<sectors; i++) print int((sec-start+i)/2) | "sort -mu"
|
|
}
|
|
#---the awk script ends here
|
|
|
|
Suppose that our input file is named 'badtrack.lst' and that the awk
|
|
file is 'part1.awk', then we can generate a bad block list for mk(e)fs
|
|
by typing the command
|
|
|
|
gawk -f part1.awk badtrack.lst > badblk1.lst
|
|
|
|
This is the file we need.
|
|
|
|
5.3 Making the file system
|
|
|
|
What we must do now is to have this file accessible for linux during
|
|
installation. There are several ways to do this. You can either mount
|
|
your DOS partition and copy the file over to Linux, or use mtools (as
|
|
in 'mcopy c:badblk1.lst /user/badblocks').
|
|
|
|
Now we can make the file system. In this case the bad blocks file is
|
|
in /user/badblocks, and the partition we're making a filesystem on is
|
|
/dev/hdb1. We're making an extended filesystem with a size of 65483
|
|
blocks:
|
|
|
|
mkefs -l /user/badblocks /dev/hdb1 65483
|
|
|
|
Thats it!
|
|
|
|
|
|
Bugs
|
|
----
|
|
I only tried mkfs but I'm rather convinced that it works with
|
|
mkefs as well.
|
|
|
|
|
|
III.16) How can I boot Linux off of my hard drive?
|
|
|
|
ANSWER: You need to install the "LILO" program which changes the boot
|
|
sector of your hard drive to allow you to choose between a DOS or a
|
|
Linux partition to boot from. These programs are provided with most
|
|
major releases, or you can get them seperately from one of the FTP
|
|
sites.
|
|
|
|
As of LILO version 8 there is a "quick install" script available which
|
|
should make LILO installation quick and easy. See Section VII for LILO
|
|
information.
|
|
|
|
|
|
III.17) Cripes! I tried to install LILO, but screwed up somehow, and
|
|
now can't boot anything from the hard drive. How can I fix this?
|
|
|
|
ANSWER: Simple. First you need an MS-DOS 5.0 (or OS/2) bootable floppy
|
|
with FDISK.EXE on it. Boot it and run the command
|
|
FDISK /MBR
|
|
which will (hopefully) restore your hard drive's master boot record to
|
|
a standard MS-DOS (resp. OS/2) boot record. Now you can go back and
|
|
reinstall LILO. :)
|
|
|
|
|
|
III.18) When installing SLS, I get the error "You may have inserted
|
|
the wrong disk" when putting in the next disk in a series. What's
|
|
going on?
|
|
|
|
ANSWER: Each disk has a small file on it which contains the name of
|
|
the disk. For example, the SLS a3 disk has a file on it called
|
|
"diska3". If it doesn't exist, or is named something else (like
|
|
"diska3.z"), then just create it/rename it.
|
|
|
|
Also, the last disk in a series (i.e. the a4 disk, b5 disk, etc.) has
|
|
a file on it called "install.end". You need this file as well. These
|
|
files are used by the SLS doinstall program to keep track of where it
|
|
is.
|
|
|
|
|
|
III.19) When installing SLS, the installation script creates a "boot
|
|
floppy" for me to boot Linux with. How can I make these myself (or fix
|
|
problems with them?)
|
|
|
|
ANSWER: The SLS install scripts just copy the kernel image to a blank
|
|
floppy for you to boot Linux with. When SLS is installed, a copy of
|
|
the kernel is stored in the file /Image on your hard drive: since you
|
|
use the kernel on your boot floppy to boot, this file isn't used
|
|
during the bootup process (unless you install LILO).
|
|
|
|
To make a boot floppy yourself, you must do two things:
|
|
1) Run 'rdev' (a.k.a. 'rootdev') on the kernel in the file /Image to set
|
|
the root partition it uses. For example, if your root partition is
|
|
/dev/hda3, run the command
|
|
rdev /Image /dev/hda3
|
|
2) Copy the kernel to a new floppy. You may need to DOS format the floppy
|
|
first(*). Then run the command
|
|
cp /Image /dev/fd0
|
|
if the floppy is in /dev/fd0 (the first floppy drive). You can use a
|
|
command like
|
|
dd if=/Image of=/dev/fd0 bs=16k
|
|
as well; they should accomplish the same thing.
|
|
|
|
(*) (From: "Michael L. Kaufman" kaufman@delta.eecs.nwu.edu)
|
|
Formating the floppy lays down the track/sector information. If
|
|
you have a completely unformated floppy, dd can fail in interesting
|
|
ways.
|
|
|
|
Many folks have problems with their SLS boot disks made in this manner
|
|
because they forgot to run 'rdev' on the kernel image before copying
|
|
it to the floppy.
|
|
|
|
III.20) How can I set the default video mode used by Linux? Do I have
|
|
to recompile the kernel to do this?
|
|
|
|
ANSWER: No, you don't have to recompile the kernel. Just use "rdev" with
|
|
the "-v" switch to set the video mode in the kernel (either on your
|
|
hard drive (if booting from LILO) or on your boot floppy). For example,
|
|
to change the kernel in /Image to prompt for the videomode on bootup, do
|
|
rdev -v /Image -3
|
|
to change the kernel on your boot floppy do,
|
|
rdev -v /dev/fd0 {video-mode}
|
|
|
|
III.21) How else can I use rdev?
|
|
|
|
ANSWER: rdev is very handy and also is used to set the root and swap
|
|
partitions, ramdisk size, and more, in a compiled kernel. It means you
|
|
don't have to recompile the kernel to make these changes. Use "rdev -?"
|
|
for a list of options.
|
|
|
|
|
|
III.22) When I login as non-root, I get tons of errors about
|
|
"shell-init: permission denied". Also, some things work as root but
|
|
not as a normal user. What's the deal?
|
|
|
|
ANSWER: This is a really common problem which comes from not having
|
|
permissions set right and a misunderstanding of some UNIX terms. Some
|
|
installations won' t have the file permissions set correctly on the
|
|
various directories that normal users (i.e. non-root) will use. For
|
|
example, if your user directories are in /home, then /home must be of
|
|
mode rwxr-xr-x, or 'chmod 755 /home'. Also, a home directory must be
|
|
owned by the user who it belongs to (i.e. /home/mdw must be owned by
|
|
'mdw'... just 'chown mdw /home/mdw', for example). Also, the
|
|
permissions must be set correctly for / (the root directory). Here's a
|
|
list of permissions that should work (although you can use other
|
|
permissions, these are just suggestions that shouldn't cause trouble):
|
|
|
|
permissions (chmod) owner file
|
|
----------- ------- ----- ---------------------------------------------
|
|
rwxr-xr-x (755) root /
|
|
rwxr-xr-x (755) root /home
|
|
rwxr-xr-x (755) mdw /home/mdw
|
|
rwxr--r-- (744) mdw /home/mdw/.profile (or other startup files)
|
|
rwxr--r-- (744) mdw /home/mdw/foo (normal files)
|
|
|
|
In most cases the group of the file doesn't matter, but in general
|
|
most files are set to group 'root' (except for binaries which are
|
|
group bin, and so on) and user files are set to group 'user' (or
|
|
whatever group users are in).
|
|
|
|
In general you want directories that everyone can access to be
|
|
rwxr-xr-x (chmod 755). Files that everyone can read are rwxr--r--
|
|
(chmod 744), and programs that everyone can run are rwxr-xr-x (chmod
|
|
755).
|
|
|
|
Thus /bin, /usr, /usr/bin, /etc, and so on, should all be rwxr-xr-x.
|
|
All binaries should be rwxr-xr-x (unless, of course, they're setuid
|
|
programs). For UNIX newbies, setuid programs run under the user id of
|
|
the owner, thus programs owned by root which have a permission of
|
|
rwsr-xr-x (note the 's') run as root, with root's priveleges. So
|
|
before changing permissions on a program check to see if it's setuid
|
|
first. To make a program setuid prepend a '4' to the permissions you
|
|
give to chmod, i.e. rwsr-xr-x is 'chmod 4755'.
|
|
|
|
Here's a list of common uses for permissions:
|
|
|
|
permission effect on files effect on directories
|
|
---------- ----------------------- ---------------------------------
|
|
read lets you look lets you see what's in the directory
|
|
at a file, lets you with ls
|
|
run a shell script
|
|
|
|
write lets you edit a file or lets you create or delete a file from
|
|
copy over it the directory (*)
|
|
|
|
execute lets you run a binary or lets you cd into the directory
|
|
shell script
|
|
|
|
(*) Note that you can delete a file from a directory even if you DON'T
|
|
have write access to the file itself! Write access to the DIRECTORY
|
|
that the file is in will let you delete any file in that directory.
|
|
The permissions of the file itself have nothing to do with being able
|
|
to delete a file. This is standard across all UNIX systems, nothing
|
|
new with Linux.
|
|
|
|
|
|
III.23) I have the previous version of the Linux kernel, how can
|
|
I upgrade it?
|
|
|
|
ANSWER: If you've never done this before, get the kernel sources from
|
|
your nearest FTP site (in a file named something like linux-*.tar.Z)
|
|
and unpack them into /usr/src/linux. As of Linux-0.99 there is a
|
|
script to autoconfigure your kernel, and you need at least GCC version
|
|
2.3.3. You unpack these sources in /usr/src/linux. Make sure you have
|
|
the logical links for /usr/include/linux and /usr/include/asm as
|
|
described below.
|
|
|
|
First run 'make config' and answer the various questions. Then
|
|
edit /usr/src/linux/Makefile to set the root partition, keyboard, etc.
|
|
Finally, do a 'make dep' (to set dependencies: VERY important!) and
|
|
finally 'make'. Assuming you have GCC installed correctly, the kernel
|
|
should compile and you'll be left with a new "Image" which is your new
|
|
kernel: if you boot from harddrive, copy the Image to wherever you
|
|
told LILO to look for it, or if you boot from floppy dd the Image to a
|
|
new floppy. Make sure that you run "rdev" on the Image to make it look
|
|
for the correct partition for your root filesystem (if you specified
|
|
this correctly in the Makefile you don't need to do this).
|
|
|
|
** Make sure you read /usr/src/linux/README, which explains in detail
|
|
** what to do when recompiling the kernel.
|
|
|
|
If you HAVE done this before, you can just apply the source patches to
|
|
your old sources and then recompile (i.e. you don't have to get the
|
|
entire kernel sources all over again). Use the "patch" program to do
|
|
this. Before you recompile the kernel do a 'make dep' to set
|
|
dependencies and a 'make clean'.
|
|
|
|
|
|
III.24) Where is /usr/include/linux and /usr/include/asm, or,
|
|
Why won't the kernel compile correctly?
|
|
|
|
ANSWER: The files /usr/include/linux and /usr/include/asm are symbolic
|
|
links to /usr/src/linux/include/linux and /usr/src/linux/include/asm,
|
|
respectively. In other words, all of the Linux include files are
|
|
actually under /usr/src/linux/include, but to access them you need two
|
|
symbolic links in /usr/include:
|
|
/usr/include/linux -> /usr/src/linux/include/linux
|
|
/usr/include/asm -> /usr/src/linux/include/asm
|
|
To make these, run the commands
|
|
ln -sf /usr/src/linux/include/linux /usr/include/linux
|
|
ln -sf /usr/src/linux/include/asm /usr/include/asm
|
|
NOT the other way around. :) If you dont have these links then many
|
|
compilations will surely fail.
|
|
|
|
|
|
III.25) How can I upgrade to the newest version of GCC and/or
|
|
libraries?
|
|
|
|
ANSWER: See section IX on GCC for more information, but essentially
|
|
all you need to do is FTP to sunsite.unc.edu (or one of the other
|
|
Linux FTP sites) and look in /pub/Linux/GCC. You'll see a number of
|
|
.tar.Z files there (often abbreviated .TZ). The names change from time
|
|
to time: you need to get the compiler (often in a file such as
|
|
'gcc233.TZ'), header files, and library files. At this point, the
|
|
compiler lives in /usr/bin, the compiler's setup files are under
|
|
/usr/lib/gcc-lib/i386-linux, and the libraries (shared, jump table,
|
|
and static) are all in /usr/lib. It's all very straightforward once
|
|
you actually unpack the tar files and everything falls into place.
|
|
|
|
|
|
III.26) What's the deal with these things called "jump tables"?
|
|
|
|
ANSWER: There's more information in section IX and VII, but to be
|
|
brief: There are three kinds of libraries for Linux. As of gcc v2.3.3
|
|
they all live in /usr/lib. The files are...
|
|
/usr/lib/*.a static (non-shared) libraries (use gcc -static ...)
|
|
/usr/lib/*.sa jump table shared lib stubs (use gcc -jump ...)
|
|
|
|
There is an older form of the shared libraries which is no longer widely used.
|
|
Nonetheless, you may run across it from time to time.
|
|
/usr/lib/*.ca classic shared lib stubs
|
|
|
|
When you compile a program, depending on the options you give gcc
|
|
(-jump is the default) it will link it against one set of these
|
|
libraries. The static libs contain all of the code and thus make your
|
|
executable very big; no shared code is used. The classic shared libs
|
|
were actually 'stubs' which reference the shared code in
|
|
/lib/libc.so.VERSION (where VERSION is a number like '4.2').
|
|
/lib/libc.so.VERSION is a file which contains the actual code of the
|
|
library, which is accessed at runtime by your executable. The
|
|
jump-table library stubs are also shared libs, but they are built in
|
|
such a way that you can upgrade the /lib/libc.so.VERSION file without
|
|
having to recompile the programs that use it.
|
|
|
|
So when we say "uses Jump Tables version 4.2" we mean it uses the
|
|
actual library itself, /lib/libc.so.4.2. To compile programs that use
|
|
jump tables version 4.2 you need the right version of /usr/lib/*.sa
|
|
installed, but you don't need them to RUN programs that use jump
|
|
tables.
|
|
|
|
However programs that are compiled to use, for example, jump table
|
|
version 4.2 (in the file /lib/libc.so.4.2) won't work if you only have
|
|
libc.so.4.1 installed. They're only backwards-compatible. If you get
|
|
errors about 'can't find /lib/libc.so.4.1' then the executable you're
|
|
using is looking at runtime for a jump table version that you don't
|
|
have. Basically you're safe if you have the most recent version of the
|
|
/lib/libc.so.VERSION file installed (which is found on
|
|
sunsite.unc.edu:/pub/Linux/GCC and comes with the GCC stuff).
|
|
|
|
You should always have a symbolic link with the major version number
|
|
of the library in /lib, because that's what's actually read. For
|
|
instance, if you have /lib/libc.so.4.2 installed, then you need the
|
|
symbolic link
|
|
/lib/libc.so.4 -> /lib/libc.so.4.2
|
|
Make this with the command
|
|
ln -s /lib/libc.so.4.2 /lib/libc.so.4
|
|
|
|
III.27) How to upgrade jump tables? (Without hanging my system)
|
|
|
|
ANSWER: Be careful! If you upgrade your /lib/libc.so.VERSION file and
|
|
either remove the symlink or delete the old libc.so.VERSION file
|
|
before the new one is in place (and the link points to it), then more
|
|
than likely all of your binaries like "cp", "mv", "ls" and "ln" use
|
|
the library, so they'll all stop working once you kill the link or the
|
|
library file. So to upgrade the file, copy the new version to /lib and
|
|
switch the link in one step with a command such as
|
|
ln -sf /lib/libc.so.NEW_VERSION /lib/libc.so.4
|
|
where NEW_VERSION is the new version of the library you're installing.
|
|
This will switch the link in one step and everything should work. You
|
|
just can't copy over the old file because the old version is in use by
|
|
'cp', 'mv', and so on.
|
|
|
|
BTW you get new versions of GCC, jump tables, libraries, include files, etc.
|
|
from tsx-11.mit.edu:/pub/linux/GCC.
|
|
|
|
|
|
III.28) How can I be sure I won't be writing over anything important
|
|
when installing Linux? I have to use DOS on my machine, and I don't
|
|
want to lose any files.
|
|
|
|
ANSWER: Back up everything. Just in case. As long as your DOS and
|
|
Linux partitions don't overlap you should be okay.
|
|
|
|
|
|
III.29) I just rebooted my machine, and now Linux dies with a
|
|
"panic: trying to free unused inode". What's going on?
|
|
|
|
ANSWER: You probably forgot to "sync" before rebooting, which stores
|
|
on the disk physically the contents of the kernel buffers. You can
|
|
either run "fsck" on the partition to TRY to correct the problem (it
|
|
might fail), or re-mkfs and re-install the software on that partition.
|
|
For the extended filesystem use "efsck" instead.
|
|
|
|
The best way to shutdown your system is the "shutdown" command. To
|
|
shutdown and reboot the system, use
|
|
shutdown -r now
|
|
or substitute a number of minutes in place of "now". Leave off the
|
|
"-r" switch if you just want to shutdown and not reboot.
|
|
|
|
|
|
III.30) Can I use both OS/2 and Linux on my machine??
|
|
|
|
ANSWER: Yes! See the following two Q/A's about getting your OS/2 Boot
|
|
Manager to work. But, be warned: IF YOU USE OS/2, DO NOT USE LINUX's
|
|
FDISK TO CREATE LINUX PARTITIONS!! The problem is with a bug/feature
|
|
in OS/2's fdisk that tries to correct 'errors' in partitions that it
|
|
doesn't like... Linux partitions included. The solution: make your
|
|
Linux partitions with OS/2's fdisk, then use Linux's fdisk to change
|
|
the partition ID's to the right values (this is self-explanatory with
|
|
Linux's fdisk).
|
|
|
|
If you made your Linux partitions with Linux's fdisk, and OS/2 sees
|
|
them, it will think they have errors and end up trashing them.
|
|
|
|
|
|
III.31) I use OS/2's Boot Manager on my hard drive. How can I get it
|
|
to recognize Linux?
|
|
|
|
ANSWER: To do this, install LILO on your Linux root partition, NOT on
|
|
your hard drive's master boot record. The lilo command for this would
|
|
be (if /dev/hda3 is your Linux root partition, and your Linux kernel
|
|
is in /Image):
|
|
|
|
/etc/lilo/lilo -c -b /dev/hda3 -v -v /Image
|
|
|
|
Then use OS/2's fdisk to add it to the Boot Manager.
|
|
|
|
|
|
III.32) When I run Linux's fdisk it says "OPUS" for OS/2's Boot
|
|
Manager partition. Is this right? What's OPUS?
|
|
|
|
ANSWER: It's correct. OPUS is BBS software that used partition type
|
|
0x0A long before OS/2.
|
|
|
|
|
|
|
|
|
|
IV. SOME CLASSICAL PROBLEMS
|
|
===========================
|
|
|
|
IV.01) 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, you just have to give time
|
|
to the first sync to finish), 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).
|
|
|
|
|
|
IV.02) How can I partition my hard-drive to use Linux?
|
|
|
|
ANSWER: See section III of the FAQ on installation.
|
|
|
|
IV.03) 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.
|
|
|
|
|
|
IV.04) 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 (e.g., fdformat can
|
|
do this from within Linux).
|
|
|
|
|
|
IV.05) I have some trouble with tar/untar; any clue ?
|
|
|
|
ANSWER: The tar provided on .96 and later is Pax (don't know for
|
|
CURRENT_VERSION) which does not accept the z flag. You can download
|
|
the GNU tar at tsx-11 in /pub/linux/binaries/usr.bin
|
|
|
|
|
|
IV.06) I can do this as root but not as non-root, is it a bug?
|
|
|
|
ANSWER: Except for an early 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?
|
|
|
|
|
|
IV.07) "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 -k $* }
|
|
|
|
|
|
IV.08) 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 as follows:
|
|
- be sure that mount belongs to root, if not do 'chown root /bin/mount'
|
|
- set the setuid bit with 'chmod u+s /bin/mount'
|
|
BTW you have to do the same with umount (in order to be able to unmount)
|
|
Remark that it is NOT safe to allow anyone to perform mount/umount.
|
|
|
|
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~
|
|
|
|
|
|
IV.09) 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".
|
|
BTW the error numbering is explained in /usr/include/errno.h
|
|
|
|
|
|
IV.10) 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
|
|
even have to patch the ps-suite.
|
|
|
|
BTW: sometimes a patch makes recompiling ps necessary. Sometimes you
|
|
do a make clean.
|
|
|
|
NOTE: As of 0.99 there is now a ps package which uses the "/proc
|
|
filesystem". This is a meta-filesystem which has an entry for each
|
|
process that's running... create the directory /proc and do a
|
|
'mount -t proc /proc /proc' to see it, or else add the following
|
|
entry in your /etc/fstab:
|
|
|
|
none /proc proc
|
|
|
|
You can get the "procps" package from tsx-11.mit.edu in
|
|
/pub/linux/BETA/procps. The nice thing about this is: you don't have
|
|
to upgrade it for every kernel version (and thus ps -U is meaningless
|
|
if you use procps).
|
|
|
|
MKJ wrote in c.o.l.a:
|
|
|
|
tsx-11.mit.edu:/pub/linux/BETA/procps/procps.tar.Z is the latest
|
|
version of procps. Most of the reported bugs (i.e. all I can remember
|
|
at the moment ;-) have been fixed, a man page for ps has been added,
|
|
and several new programs have been added and/or fixed. A list of the
|
|
stuff provided:
|
|
ps
|
|
free (a real one, from Linus)
|
|
uptime (this needs work to be good, mine is a hack)
|
|
tload (a hack, but who cares?)
|
|
xload (from drew)
|
|
fuser (perl script prototype, hopefully the real thing in a
|
|
later release)
|
|
|
|
IV.11) Since Linux 0.96b I have a lot of core file all over
|
|
my disk. How can I sweep them away ?
|
|
|
|
ANSWER: Use the following command
|
|
find / -name core -exec rm {} \;
|
|
|
|
BTW: think twice before using this command, there might be a John Core
|
|
user on your system; this command will erase his mail :)
|
|
|
|
If you never want to see another core file, put this line into
|
|
your /etc/rc file:
|
|
for a bash user
|
|
ulimit -c 0
|
|
for a csh or tcsh user
|
|
limit coredumpsize 0
|
|
|
|
|
|
|
|
IV.12) I can only log-in as "root", is it normal ?
|
|
|
|
ANSWER: No, add "rm -f /etc/nologin" in your /etc/rc.local file
|
|
|
|
IV.13) Sometimes my Linux virtual console get messed up when I cat
|
|
a binary file. The characters shown are above ascii 127, any clue ?
|
|
|
|
ANSWER: (J. Stuckey stuckey@mrcnext.cso.uiuc.edu)
|
|
|
|
It's a vt-100 thing I think.
|
|
echo "^V^O"
|
|
should fix it. Control-V is the literal-next character that stty
|
|
reports for me, and Control-O is the "magic" character that returns
|
|
you to livability.
|
|
|
|
|
|
V. LINUX and DOS
|
|
=================
|
|
*** This section is co-written by Mark Komarinski, A. V. Le Blanc and
|
|
*** MM. Corsini. The official maintainer is Mark, if you have *any*
|
|
*** questions, mail him at komarimf@craft.camp.clarkson.edu
|
|
*** Last Update 03.08.93
|
|
|
|
|
|
V.01) Is is possible to access DOS from Linux?
|
|
|
|
ANSWER: Yes.
|
|
(1) The mtools package allows you to access DOS files;
|
|
it emulates the DOS commands CD, COPY, DEL, DIR, TYPE, and others.
|
|
(2) Since approximately version 0.97 of the kernel, you can mount
|
|
DOS file systems as part of your Linux directory tree, providing you
|
|
have an appropriate mount command.
|
|
(3) A DOS emulator is in alpha test, which will allow some DOS programs
|
|
and utilities to run under Linux.
|
|
|
|
|
|
V.02) Why use mtools if you can just mount a drive?
|
|
|
|
ANSWER: Mtools is good if you want to do something quickly. For
|
|
example, if you want to get directories on a bunch of floppies. The
|
|
mount procedure requires you to mount the drive, get a directory, then
|
|
umount it. Mtools lets you get the directory with one command.
|
|
|
|
(Dirk Hohndel:) Mtools is really fast when copying disks. I mount the
|
|
SLS directory of my SUN to my linux box and use mcopy to get the files
|
|
on the disks. 3 times faster than using xcopy under DOS
|
|
|
|
|
|
V.03) How do I get the mtools package set up correctly?
|
|
|
|
ANSWER: The mtools package is available in source form on most Linux
|
|
ftp sites. The most recent version (As of Sept 1992) is mtools.n2,
|
|
and there are linked binaries and library (.a) files available as
|
|
well (for example, as part of MCC interim releases of Linux).
|
|
In the n2 release of mtools, there is only one executable binary
|
|
which works differently depending on its name: you can create hard
|
|
or symbolic links to it named mcopy, mdel, mdir, mtype, etc; this
|
|
is how the Makefile in version n2 of mtools does it, and it saves
|
|
several hundred kilobytes of disk space. Finally, you need the
|
|
correct information in the file /etc/mtools, which is described below.
|
|
Mtools also comes with the SLS release of linux.
|
|
|
|
|
|
V.04) What is the format of the file /etc/mtools?
|
|
|
|
ANSWER: A complete entry in the file /etc/mtools contains the following
|
|
fields: drive, device, fat, cylinders, heads, sectors, offset. Two
|
|
examples of entries from /etc/mtools are
|
|
|
|
A /dev/fd0 12 80 2 15
|
|
C /dev/hda1 16 0 0 0
|
|
|
|
which defines the DOS disk A: as accessible through the device /dev/fd0,
|
|
having a 12-bit FAT, 80 cylinders, 2 heads, and 15 sectors per track;
|
|
DOS disk C: is accessible through the device /dev/hda1, has a 16-bit
|
|
FAT, and its geometry is simply that of the hard disk where it lives.
|
|
The last three numbers can be 0 if you wish; this allows mtools to
|
|
try to figure out the disk's geometry itself, and perhaps to fail.
|
|
A 12-bit FAT is common for floppies, but may occur in small hard
|
|
disk partitions. A 16-bit FAT is common for hard disks.
|
|
This is an extract of my /etc/mtools file:
|
|
A /dev/fd0 12 0 0 0 # 3.5 1.4 Meg (autodetect)
|
|
B /dev/fd1 12 0 0 0 # 5.25 1.2 Meg (autodetect)
|
|
C /dev/hda1 16 0 0 0 # 1st partition of my Disk
|
|
|
|
|
|
V.05) Where can I find out more about mtools?
|
|
|
|
ANSWER: There are two detailed README files in the mtools.n2 distribu-
|
|
tion. These files treat compiling and using mtools. There is a file
|
|
README.mtools which treats only using mtools, which is a part of the
|
|
MCC interim version of Linux.
|
|
|
|
|
|
V.06) How do I use the DOS file system?
|
|
|
|
ANSWER: The DOS file system is part of the kernel. If you have a
|
|
kernel of level .97.1 or above, and an appropriate mount command, type
|
|
|
|
mount -t msdos [-o conv=text] /dev/hda1 /dos
|
|
|
|
to mount the partition /dev/hda1 as an MS/DOS file system on the
|
|
directory /dos. You'll need a recent mount command, from at least
|
|
release 97 or later of the root disk. Recent mount commands also
|
|
accept the options conv=binary|text|auto (default is binary) to
|
|
specify that text end-of-lines in DOS files are to be converted to
|
|
UNIX end-of-lines (by omitting carriage return characters) in no cases
|
|
(binary) or in all cases (text) or in cases that don't have 'well-
|
|
known binary extensions' (e.g., .EXE or .COM) (auto).
|
|
|
|
|
|
V.07) When I mount an MS-DOS disk, I get two lines of what seem to
|
|
be error messages and the message: No bmap support. Is my disk bad?
|
|
|
|
ANSWER: No. Since the dosfs is still in ALPHA mode, the two lines are
|
|
used for displaying information about the disk that was mounted, just in
|
|
case you have problems. The 'No bmap support' message means that you
|
|
cannot run linux programs from that partition. This has been fixed in the
|
|
latest release (alpha.9)
|
|
|
|
|
|
V.08) I want to use the DOS file system with either conv=binary or
|
|
conv=auto, but I want to convert text files from DOS to UNIX format,
|
|
or from UNIX to DOS format.
|
|
|
|
ANSWER: Use the utility todos/fromdos which comes as part of the
|
|
dosfs package, currently (Sept 92) in released in version 8, or
|
|
use the flip utility by Rahul Dhesi.
|
|
|
|
|
|
V.09) Where can I find out more about the DOS file system?
|
|
|
|
ANSWER: There is a README file included in dosfs.XX.tar.Z (the current
|
|
value of XX is 10)
|
|
|
|
|
|
V.10) This sounds me like a chicken and eggs problem, how can I
|
|
install the mtools package at the very beginning.
|
|
|
|
ANSWER: You have to use rawrite or the mount procedure.
|
|
|
|
|
|
V.11) Could someone explain how to use rawrite?
|
|
|
|
ANSWER: Rawrite is a DOS util which write sequential sectors of
|
|
a formatted disk/floppy. When a floppy has been rawritten, you can
|
|
(under Linux) untar it (use x, v, z and f flags). As an example:
|
|
a) under Dos use rawrite
|
|
rawrite
|
|
source: kermit.z
|
|
destination: a
|
|
b) boot under Linux, and perform a tar
|
|
tar zxvf /dev/fd0
|
|
tar zxvp < /dev/fd0
|
|
|
|
You DO NOT NEED TO MOUNT a rawritten disk
|
|
|
|
|
|
V.12) 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.
|
|
|
|
|
|
V.13) 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 There are a few differences
|
|
between these and normal DOS assemblers.
|
|
|
|
|
|
V.14) What about the dos emulator (dosemu)?
|
|
|
|
ANSWER: Dosemu is in alpha testing now, so it is very unstable and crashes
|
|
easily. Some programs (such as earlier versions of Turbo Pascal; TP
|
|
5.5 too) seem to work fine, but other programs such as dir /p will
|
|
crash the emulator.
|
|
Look in your favorite FTP site for the dosemu kit. For a semi-complete
|
|
list of programs that do and do not work under the emulator, get the file
|
|
/pub/Linux/docs/emusucc.txt at sunsite.unc.edu or tsx-11.mit.edu.
|
|
|
|
|
|
V.15) I have a Stacker volume on my hard drive. Can I access that?
|
|
|
|
ANSWER: Yes, but you will have to do that through the dosemu program.
|
|
For more information on it, check out the file /pub/Linux/docs/stacker.doc
|
|
at sunsite.unc.edu
|
|
|
|
|
|
V.16) How about OS/2 HPFS partitions, or MacIntosh/Amiga floppies?
|
|
Can I mount any of them?
|
|
|
|
ANSWER: There is no support for any of those filesystems yet.
|
|
|
|
|
|
===================8<==========>8================
|
|
|
|
|
|
Newsgroups: comp.os.linux,comp.os.linux.announce,news.answers,comp.answers
|
|
Distribution: world
|
|
Followup-To: poster
|
|
From: corsini@labri.greco-prog.fr
|
|
Reply-To: linux@numero6.greco-prog.fr
|
|
Organization: Greco Prog. CNRS & LaBRI, Bordeaux France
|
|
Subject: Linux Frequently Asked Questions 3/4 [monthly posted]
|
|
Summary: Linux, a small and free unix-like for 386-AT computers.
|
|
|
|
Archive-name: linux-faq/part3
|
|
Last-Modified: 93/03/28
|
|
Version: 1.17
|
|
|
|
*********************************************************
|
|
* *
|
|
* Answers to Frequently asked questions about Linux *
|
|
* *
|
|
*********************************************************
|
|
|
|
This post contains Part 3 of the Linux FAQ (4 parts).
|
|
It must be read *after* the 2 first parts.
|
|
|
|
===================================8<====>8============================
|
|
CONTENTS (of this part)
|
|
|
|
VI. MISCELLANEOUS HINTS (part3)
|
|
VII. MORE HINTS (part3)
|
|
VIII. FEATURES (part3)
|
|
|
|
===================================8<====>8============================
|
|
|
|
|
|
|
|
VI. MISCELLANEOUS HINTS
|
|
=======================
|
|
*** This section is maintained by Matt Welsh (mdw@tc.cornell.edu). Please
|
|
*** mail me if you have any changes/updates/questions. Thanks -mdw
|
|
|
|
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 3 subsections: Misc/Device Major-Minor/Serial Information.
|
|
|
|
|
|
VI.A. Misc information
|
|
~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
VI.01) It seems that $#@! ported on linux don't run correctly, what
|
|
do I do about reporting bugs?
|
|
|
|
ANSWER: (Matt Welsh) It's possible that either the program itself has a bug
|
|
or that Linux has a problem that this program brings out. :) But first check
|
|
that the size of the file(s) corresponds that of the files(s) on the FTP
|
|
sites where it's available. If they're different, either you downloaded them
|
|
incorrectly (i.e. you forgot to turn on "bin") or whoever put them on the
|
|
FTP site uploaded them incorrectly.
|
|
|
|
If that's not the problem, then post to comp.os.linux asking about the
|
|
program, to verify that it is a bug. PLEASE: when posting possible "bug
|
|
reports" include all error and output information from running/compiling
|
|
the program. Just saying "it doesn't work" isn't very helpful. Also mention
|
|
your specific setup, Linux version, GCC version, etc. Some of these things
|
|
depend on running under certain versions and you may have missed that
|
|
information.
|
|
|
|
Note that my "ml-linux-bugs@dg-rtp.dg.com" bug reporting list has been
|
|
phased out. It turns out that Linux has so few bugs, most of which are
|
|
resolved on the newsgroup or through Linus before I can accumulate them
|
|
and post. :) In short: if there's a bug in Linux or in Linux-ported
|
|
software, it will usually be fixed in the next patchlevel or version.
|
|
|
|
|
|
VI.02) Has $#@! been ported to Linux?
|
|
|
|
ANSWER: First check out the FTP sites and read the monthly INFO-SHEET,
|
|
as well as the new "Linux News" and the META-FAQ's (all of which are
|
|
either available on the FTP sites and/or posted to the newsgroup as they're
|
|
written). Also check out the "Linux Project Registry" (posted to the
|
|
newsgroup and on the FTP sites) which lists ongoing/current Linux projects.
|
|
Also look in the "old" Linux digests and mailing-list archives, kept on
|
|
tsx-11.mit.edu and nic.funet.fi. Also, see if there's a GNU(*) version
|
|
of the program you're looking for (which are available everywhere).
|
|
Since Linux uses GCC as its native compiler, most GNU software ports
|
|
directly to Linux without problems. If all else fails, ask on the
|
|
mailing list or newsgroup if the program is ported and where it's
|
|
available.
|
|
|
|
|
|
(*) 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.
|
|
|
|
|
|
|
|
VI.03) I've ported $#@! to Linux, what should i do to add it in the
|
|
standard distribution?
|
|
|
|
ANSWER: (Matt Welsh) First read the previous Q/A, then talk to the
|
|
maintainers of the various releases (MCC interim, SLS, and so on)
|
|
about including your program with those releases. The best way to make
|
|
programs available to the rest of the world is to upload it to one of
|
|
the Linux FTP sites (such as tsx-11.mit.edu:/pub/incoming or
|
|
sunsite.unc.edu:/pub/Linux/Incoming).
|
|
|
|
BTW Whenever you submit binaries, please think that if you link them
|
|
with shared libraries, this might cause problems for those who (gasp!)
|
|
don't have the shared libraries installed. You can either link them
|
|
using -static, and if someone wants to build a shared version on their
|
|
own machine they can get the sources (which you should also make
|
|
available) and build it themself. Or else provide the shared lib.
|
|
|
|
|
|
VI.04) 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.
|
|
|
|
NOTE1: SIGBUS is not there, and can be safely commented out in general.
|
|
NOTE2: see section related to GCC, in the third part of this FAQ, for
|
|
more details.
|
|
|
|
|
|
VI.B. Major/Minor device number
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
*** This section is maintained by Rick Miller, any comments,
|
|
*** suggestions, remarks should be mailed to him at <rick@ee.uwm.edu>
|
|
*** Last Update: 17 Feb 1993 21:12:24 +0200
|
|
|
|
VI.05) What are the device minor/major numbers?
|
|
|
|
The Linux Device List
|
|
maintained by rick@ee.uwm.edu (Rick Miller, Linux Device Registrar)
|
|
February 17, 1993
|
|
|
|
Many thanks to richard@stat.tamu.edu, Jim Winstead Jr., and many others.
|
|
|
|
Majors:
|
|
0. Unnamed . (unknown) .... for proc-fs, NFS clients, etc.
|
|
1. Memory .. (character) .. ram, mem, kmem, null, port, zero, cmem
|
|
2. Floppy .. (block) ...... fd[0-1]<[dhDH]{360,720,1200,1440} or fd[01]
|
|
3. Hard Disk (block) ...... hd[a-b]<[0-8]>
|
|
4. Tty ..... (character) .. {p,t}ty<{S,[p-s][0-f]}><#>
|
|
5. tty ..... (character) .. tty, cua[0-63]
|
|
6. Lp ...... (character) .. lp[0-2] or par[0-2]
|
|
7. Tape .... (block) ...... t[0-?] (reserved for Non-SCSI tape drives)
|
|
8. Scsi Disk (block) ...... sd[a-h]<[0-8]>
|
|
9. Scsi Tape (block) ...... <n>rmt[0-1]
|
|
10. Mouse ... (character) .. bm, psaux (mouse)
|
|
11. CD-ROM .. (block) ...... scd[0-1]
|
|
12. QIC-tape? (character) .. rmt{8,16}, tape<{-d,-reset}>
|
|
13. XT-disk . (block) ...... xd[a-b]<[0-8]>
|
|
14. Audio ... (character) .. audio, dsp, midi, mixer, sequencer
|
|
|
|
Breakdown of minors by Majors:
|
|
------------------------------
|
|
0. Unnamed . (unknown) .... for proc-fs, NFS clients, etc.
|
|
Minors?
|
|
|
|
1. Memory .. (character) .. ram, mem, kmem, null, port, zero, cmem
|
|
0. /dev/ram
|
|
1. (block): RAM-Disk (character): /dev/mem
|
|
2. /dev/kmem
|
|
3. /dev/null
|
|
4. /dev/port
|
|
5. /dev/zero
|
|
6. /dev/cmem
|
|
|
|
2. Floppy .. (block) ...... fd[0-1]<[dhDH]{360,720,1200,1440}>
|
|
Minors are [drive + [4 * type]] where drive 0-3 == A:-D: (floppy)
|
|
and type is: 0: Autodetect 4: 720k in 3.5"
|
|
1: 360k in 5.25" 1.2M 5: 360k in 5.25" 1.2M
|
|
2: 1.2M in 5.25" 1.2M 6. 720k in 5.25" 1.2M
|
|
3: 360k in 3.5" 7. 1.44M in 3.5" 1.44
|
|
|
|
0. /dev/fd0: Autodetected first floppy.
|
|
1. /dev/fd1: Autodetected second floppy.
|
|
2. /dev/fd2: Autodetected third floppy.
|
|
3. /dev/fd3: Autodetected fourth floppy.
|
|
4. /dev/fd0d360: 360k in 5.25" 1.2M first drive
|
|
5. /dev/fd1d360: 360k in 5.25" 1.2M second drive
|
|
(You can work out the rest of the intermediates...)
|
|
8. /dev/fd0h1200: 1.2M in 5.25" 1.2M first drive
|
|
12. /dev/fd0D360 (/dev/fd0H360): 360k in 3.5" first drive
|
|
16. /dev/fd0D720 (/dev/fd0H720): 720k in 3.5" first drive
|
|
20. /dev/fd0h360: 360k in 5.25" 1.2M first drive
|
|
24. /dev/fd0h720: 720k in 5.25" 1.2M first drive
|
|
28. /dev/fd0H1440: 1.44M in 3.5" 1.44M first drive
|
|
|
|
Naming goes like this:
|
|
fd[drive][type][size] where:
|
|
[drive]=0-3: Just like DOS's "A:"-"D:".
|
|
[type]={d,h,D,H}: Enlighten me. All I can tell you
|
|
for certain is that the capital
|
|
letters represent 3.5" drives.
|
|
[size]={360,720,1200,1440} kilobytes.
|
|
|
|
3. Hard Disk (block) ...... hd[a-b]<[0-8]>
|
|
0. /dev/hda (/dev/hda0): The whole first HD, including its MBR.
|
|
1-4. /dev/sda{1-4}: Primary partitions on the first SCSI drive.
|
|
5-8. /dev/sda{5-8}: Extended partitions on the first SCSI drive.
|
|
64. /dev/hdb (/dev/hdb0): The whole second HD, including its MBR.
|
|
65-68. /dev/sdb{1-4}: Primary partitions on the second drive.
|
|
69-72. /dev/sdb{5-8}: Extended partitions on the second drive.
|
|
|
|
Notes: BE *VERY* CAREFUL WITH /dev/hda AND /dev/hdb!! These two
|
|
devices signify the *entire* *drive*, not just one partition.
|
|
The only things that use /dev/hda or /dev/hdb are things that
|
|
need to read/change the partition table (like fdisk).
|
|
|
|
Linux doesn't order anything. It perceives partitions in the
|
|
order in which they appear in the partition table. Thus,
|
|
/dev/hd?1 may follow /dev/hd?2 in the cylinder numbering.
|
|
|
|
The names of the hard drives are not the same as under Minix.
|
|
|
|
4. Tty ..... (character) .. {p,t}ty<{S,[p-s][0-f]}><#>
|
|
0. /dev/tty0: This is the currently active Virtual Console.
|
|
1-63. /dev/tty[1-63]: Specific virtual consoles.
|
|
64-127. /dev/ttyS[0-63]: Serial ports (dial-in mode).
|
|
128-191. /dev/pty[p-s][0-f]: PTY Masters.
|
|
192-255. /dev/tty[p-s][0-f]: PTY Slaves. ([0-f]=0123456789abcdef)
|
|
|
|
Notes: There are several constants set in the kernel sources which
|
|
can be changed to compile a more customized kernel. They're
|
|
found in [/usr/src]/linux/include/linux/tty.h:
|
|
|
|
NR_CONSOLES The number of virtual consoles.
|
|
NR_SERIALS The number of serial lines.
|
|
NR_PTYS The number of pty's.
|
|
|
|
5. tty ..... (character) .. tty, cua[0-63]
|
|
0. /dev/tty: the tty that owns the process calling it.
|
|
64-127. /dev/cua[0-63]: Serial ports (dial-out mode).
|
|
|
|
6. Lp ...... (character) .. lp{0-2} or par{0-2}
|
|
Parallel (printer) ports. (Increasable in include/linux/lp.h)
|
|
0. /dev/lp0
|
|
1. /dev/lp1: Same as MS-DOS's "LPT1:" on my machine...
|
|
2. /dev/lp2
|
|
|
|
Notes: The number of line printers is defined by LP_NO which is
|
|
found in [/usr/src]/linux/include/lp.h.
|
|
|
|
Even if you only have one printer port, Linux may still call
|
|
it /dev/lp1 (rather than /dev/lp0). Watch during boot-up to
|
|
see how it recognizes your printer port.
|
|
|
|
7. Tape .... (block) ...... t[0-?] (reserved for Non-SCSI tape drives)
|
|
This one's getting old. No minor numbers are yet assigned.
|
|
It's not even in the source code. Maybe it never will be...
|
|
|
|
8. Scsi Disk (block) ...... sd[0-?] or sd[0-?][0-?]
|
|
Minors numbers are [[16 * DiskNR] + partition]
|
|
|
|
The system autoconfigures at boot time, and the kernel simply
|
|
assigns numbers (DiskNR) to each disk as it finds them, starting with 0.
|
|
|
|
0. First HD (/dev/sda), whole drive including Master Boot Record.
|
|
1-4. Partitions on the first HD.
|
|
5-15. Logical partitions within an extended partition on first HD.
|
|
16. Second HD (/dev/sdb), whole drive including Master Boot Record.
|
|
17-20. Partitions on the second HD.
|
|
21-31. Logical partitions within an extended partition on second HD.
|
|
etc.
|
|
|
|
|
|
9. Scsi Tape (character) .. st[0-?]
|
|
|
|
For a SCSI tape, each physical device has two minor numbers
|
|
that are associated with it. If you have two tape drives, then
|
|
minors 0 and 1 will refer to the first and second drives and the
|
|
tape will be rewound when the device is closed. Minor numbers 128
|
|
and 129 (i.e. 128+n) also refer to the first and second physical
|
|
drives, but the tape will not be rewound after closing the device.
|
|
If you have one tape, you could create the devices with the
|
|
following commands:
|
|
|
|
mknod /dev/rmt0 c 9 0
|
|
mknod /dev/nrmt0 c 9 128
|
|
|
|
10. Mouse (character) .. bm, psaux (mouse)
|
|
(MGR may require that /dev/mouse be linked to one of these...)
|
|
NOTE THE CHANGES TO DIFFERENTIATE MOUSE TYPES!
|
|
(Please implement these in the distributions.)
|
|
0. /dev/logibm: (Logitec?) bus mouse
|
|
1. /dev/psaux: PS/2 mouse port
|
|
2. /dev/inportbm: MicroSoft "InPort" bus mouse
|
|
3. /dev/atibm: ATI XL bus mouse
|
|
|
|
If you don't feel like re-configuring your applications, you can
|
|
just leave the old "/dev/bm" lying around.
|
|
|
|
11. CD-ROM .. (block) ...... scd[0-1]
|
|
0. /dev/scd0: The first (detected) SCSI CD-ROM.
|
|
1. /dev/scd1: The second (detected) SCSI CD-ROM.
|
|
("There's not much more to it than that" says Eric Youngdale.)
|
|
|
|
12. QIC-tape? (character) .. rmt{8,16}, tape<{-d,-reset}>
|
|
(I really don't have much info on this one... )
|
|
6. /dev/rmt8: QIC-120
|
|
8. /dev/rmt16 (/dev/tape): QIC-150
|
|
136. /dev/tape-d: (It has something to do with being 128+8... ?)
|
|
255. /dev/tape-reset: For resetting only.
|
|
|
|
13. XT-disk . (block) ...... xd[a-b]<[0-8]>
|
|
XT (8-bit) hard disk controller devices.
|
|
Minor numbers are assigned in the same manner as for the
|
|
normal Hard Drive devices ("/dev/hd*").
|
|
|
|
14. Audio ... (character) .. audio, dsp, midi, mixer, sequencer
|
|
0. /dev/mixer: Mixer and Control Device
|
|
1. /dev/sequencer: FM-synthesizer and Midi
|
|
2. /dev/midi: (for future use)
|
|
3. /dev/dsp: Digitized voice (DAC/ADC)
|
|
4. /dev/audio: (Reserved for compatibility with Sun)
|
|
|
|
NOTE: all the numbers given are in decimal form (the one you can see if
|
|
you perform ls -l on /dev).
|
|
|
|
|
|
VI.06) Could some one give me indication about the meaning of the
|
|
IRQ's ?
|
|
|
|
|
|
ANSWER: (alawrenc@sobeco.com:)
|
|
Standard IRQ's :
|
|
IRQ 0 - Timer
|
|
IRQ 1 - Keyboard
|
|
IRQ 2 - Slave 8259 (AT)
|
|
IRQ 3 - COM 2 / COM 4
|
|
IRQ 4 - COM 1 / COM 3
|
|
IRQ 5 - (XT) Hard Disk, (AT) LPT2
|
|
IRQ 6 - Floppy Disk
|
|
IRQ 7 - LPT1
|
|
|
|
AT only IRQ 8 - Real Time Clock
|
|
IRQ 9 - Re-direct to IRQ 2
|
|
IRQ 10 - Not Defined
|
|
IRQ 11 - Not Defined
|
|
IRQ 12 - Not Defined
|
|
IRQ 13 - 80287
|
|
IRQ 14 - Hard Disk (AT)
|
|
IRQ 15 - Not Defined
|
|
|
|
VI.07) (Chuck Boyer) Could some one clear up the devices meaning?
|
|
|
|
ANSWER: (Jim Winstead Jr)
|
|
>port
|
|
|
|
This allows programs to access the hardware ports directly. Not
|
|
something you generally mess around with much.
|
|
|
|
>ptyp0-3
|
|
>ptypa...tty
|
|
|
|
These are the pseudo-tty 'master' devices. Each pty connection uses
|
|
a slave-master set of tty devices.
|
|
|
|
>tty0...
|
|
|
|
tty[1-8] are the virtual consoles associated with Alt-F[1-8]. tty0 is
|
|
the current virtual console (so writing something to tty0 goes to the
|
|
current vc).
|
|
|
|
>tty64 I've figured out is the modem connection
|
|
|
|
Yes, that would correspond to COM1 under DOS. However, the tty64 name
|
|
is obsolete - ttys[1-4] should be used instead.
|
|
|
|
>ttyp0...
|
|
>ttypa...
|
|
|
|
These are the pseudo-tty 'slave' devices.
|
|
|
|
>ttys1...
|
|
|
|
These are the serial devices. ttys1 corresponds to COM1 under DOS,
|
|
ttys2 corresponds to COM2, etc.
|
|
|
|
|
|
|
|
VI.C Special Serial
|
|
~~~~~~~~~~~~~~~~~~~
|
|
*** This section is maintained by Jim Gifford
|
|
*** (jgifford@attmail,world.std}.com
|
|
*** Last update October 1992.
|
|
|
|
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.)
|
|
Jim Gifford:
|
|
However, there are a few older (of mysterious origin) stty's that work
|
|
on stdout(I have one myself!)
|
|
|
|
VI.08) Is there a list somewhere where I can get help with serial
|
|
communications under Linux?
|
|
|
|
ANSWER: (Jim Gifford -- jgifford@world.std.com)
|
|
There is a 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
|
|
|
|
VI.09) 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.
|
|
|
|
VI.10) What are the major, minor numbers for the serial ports under linux?
|
|
|
|
ANSWER: Major 4, Minor :
|
|
64 /dev/ttys0 - com1
|
|
65 /dev/ttys1 - com2
|
|
66 /dev/ttys2 - com3
|
|
67 /dev/ttys3 - com4
|
|
|
|
VI.11) can anyone give me a sample /etc/inittab entry for login
|
|
from a pc attached to serial line /dev/ttys2?
|
|
|
|
ANSWER: "Humberto speaking :), updated by Rick Miller"
|
|
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:vt100:/etc/getty -m 1200 ttys2
|
|
(Replace "vt100" with the name of the /etc/termcap entry for the
|
|
terminal type you will use, or use "dumb" if you don't have one.)
|
|
|
|
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?
|
|
|
|
VI.12) How do I set parameters like parity for serial login?
|
|
|
|
ANSWER: Use stty and redirect input from the serial line.
|
|
ex: stty parodd < /dev/ttys2 which gives ttys2 odd parity.
|
|
type stty -a to get an idea of possible parameters.
|
|
Or 'man stty' as well :)
|
|
|
|
|
|
|
|
|
|
VII. MORE HINTS
|
|
===============
|
|
|
|
This part try to keep track of the different information
|
|
that appeared in comp.os.linux and on the list since beginning of
|
|
March. I tried to update it for KERNEL_VERSION, so there might be some
|
|
mistakes. Moreover take care to use the correct library and include
|
|
stuff, and the ad-hoc gcc you use !!!
|
|
|
|
|
|
VII.01) How can I backup my Hd under Linux ?
|
|
|
|
ANSWER: I know at least two ways. One possibility is tar and mtools,
|
|
another possibility is the diskbackup/diskrestore of Diamano Bolla
|
|
(digest37 vol. #2) which saves big hd to floppies using the
|
|
stdin/stdout. These utilities have been uploaded to the major sites in
|
|
file disksplit.tar.Z.
|
|
An example usage (Roger Binns) is:
|
|
|
|
tar cvf - bin dev usr etc .. | compress | diskbackup
|
|
|
|
and to restore:
|
|
|
|
diskrestore | uncompress | tar xvf -
|
|
|
|
BTW: if you are on Ethernet you could send your files via tar..|rsh (tar...)
|
|
or even via NFS to a host which is regularly backed up !
|
|
|
|
|
|
VII.02) Where is 'which' ?
|
|
|
|
ANSWER: It depends on the sh you are running:
|
|
in bash 'type -path'
|
|
in tcsh it's a builtin
|
|
|
|
for rc you can try the following (untested by me) script from
|
|
Kevin Brown:
|
|
|
|
#!/bin/sh
|
|
for i in `echo $PATH | sed 's/:/ /g'` ; do
|
|
for j in ""$@" ; do
|
|
if test -x "$i/$j" ; then
|
|
echo "$i/$j"
|
|
fi
|
|
done
|
|
done
|
|
|
|
VII.03) How to use setterm: for the novice?
|
|
|
|
ANSWER:The setterm utility provides access to most of Virtual Consoles
|
|
(VCs) functionality. You can set your screen up to blank at 10
|
|
minutes using:
|
|
setterm -blank 10
|
|
|
|
You can set colors, and clear the screen. For a full list of commands,
|
|
just type "setterm" with no arguments.
|
|
|
|
There are a few tricks with the screen dumper can really make VCs go a
|
|
long way. Here are a few of the common ones that I use:
|
|
|
|
setterm dump
|
|
|
|
Dumps the contents of the current VC to screen.dump (in the current dir).
|
|
|
|
setterm dump 4
|
|
|
|
Dumps the contents of VC 4 to screen.dump
|
|
|
|
setterm -file mydumpfile -dump 4
|
|
|
|
Dump the contents of VC 4 to the file mydumpfile
|
|
|
|
setterm -file /dev/tty0 -dump 4
|
|
|
|
Dumps the contents of VC 4 to the current VC.
|
|
|
|
setterm -file /dev/tty4 -dump
|
|
|
|
Dumps the contents of the current VC to VC 4.
|
|
|
|
setterm -file /dev/ttys1 -dump
|
|
|
|
Dumps the contents of the current VC to the serial port.
|
|
Handy if you are logged on and want to paste a screen full without
|
|
having to resort to doing a file transfer.
|
|
|
|
setterm -file mydumpfile -append 4
|
|
|
|
Appends to instead of overwriting the dump file. Useful if you
|
|
have several screens you wish to concatenate.
|
|
|
|
|
|
VII.04) I've tried clear/reset which exist on most of unix but it
|
|
doesn't work, have I missed something?
|
|
|
|
ANSWER: setterm -clear or setterm -reset will solve your missing. For
|
|
clear, you can also write a small script (which use the cl: part of
|
|
/etc/termcap wrt your TERM), or use bash where ctrl-l will do it for
|
|
you.
|
|
|
|
|
|
VII.05) I know there are VC, but where is the setterm stuff?
|
|
|
|
ANSWER: It's in the current distribution (i.e. on the images), the
|
|
source can be found in virtcons.tar.Z at nic.
|
|
|
|
|
|
VII.06) I know there are shared libraries; does there exist an easy
|
|
way to check an executable for sharing ?
|
|
|
|
ANSWER: (Claude Morin:) There exists at tsx-11 ldd.tar.Z If you follow
|
|
the instructions, you will be able to type "ldd <executable>" to List
|
|
the Dynamic Dependencies of the executables. In other words 'ldd'
|
|
prints the name of the shared libraries needed by the executable,
|
|
nothing appears for static one.
|
|
|
|
ANSWER: (Josh Yelon & HJ Lu) - very old binaries.
|
|
(J.Y.) An executable which shares a library is linked with an
|
|
(ordinary, non-shared) "stub" version of the library. One of the first
|
|
thing this stub does (when the executable is run) is to ask the kernel
|
|
to load the (big) "shared version" of the library (which is usually
|
|
named /lib/lib.XX.XX) The upshot of this is that in the code for the
|
|
stub (part of the executable), is the string "/lib/lib.XX.XX"; which
|
|
can be searched by using 'strings' or 'grep'.
|
|
(HJ. L.) if you have gcc2.11a or later the shared image is changed to
|
|
/lib/libxxxx_vyy_zzz. And you should better use nm to find
|
|
"__shared_lib" (nm failed on stripped executable). You can also write
|
|
a function for "file", which can even check the version number ....
|
|
|
|
VII.07) What is the rdev program provided in the images?
|
|
|
|
ANSWER: It's a program from Werner Almesberger of ETH. With no
|
|
argument it prints the first line of /etc/mtab. With one argument, a
|
|
boot-image, it prints the device configured as the root device, and
|
|
with two arguments, a boot image and a device, it sets the device as
|
|
default root in the specified image.
|
|
|
|
|
|
VII.08) How to start Linux from drive B?
|
|
|
|
ANSWER: There is a DOS utility called boot_b.exe (look at DOS ftp).
|
|
Another simple way is to open the box and invert the cables.
|
|
|
|
|
|
VII.09) The program boot_b works fine /but/ once the first disk is
|
|
read the system go back to the first drive, any hints?
|
|
|
|
ANSWER: Yes, change the bootimage in just the same way that you change
|
|
it to boot on the hard drive, execept that the major/minor pair is
|
|
different. All these information are in the file INSTALL-0.10.
|
|
Remember that if you use a sun or other endian machine, you will need
|
|
to reverse the byte order when you run the filter program (also in the
|
|
same file).
|
|
|
|
|
|
VII.10) How can I get Linux to boot directly from the harddisk?
|
|
|
|
ANSWER: (Rick) The best option right now is LILO version ALPHA.8. It
|
|
has been generally agreed that the days of using "shoelace" are at an
|
|
end. See Section III of this FAQ for LILO information.
|
|
|
|
VII.11) I use shoelace, but I want to change my root partition, what
|
|
is the process to get rid of it?
|
|
|
|
ANSWER: With Norton utility you can put back a standard boot sector.
|
|
Another possibility is to restore the old boot sector (the one you
|
|
should have backup *before* installing shoelace).
|
|
|
|
|
|
VII.12) Sometimes, when I want to remove a directory, I get an error
|
|
message, is it a (known) bug?
|
|
|
|
ANSWER: No, There is no bug at all, you probaly have another shell
|
|
on another VC whose working directory is either the one you try to
|
|
remove, either a subdirectory of it.
|
|
|
|
|
|
VII.13) I'm looking for init, getty, login, passwd stuff, where
|
|
can I find them?
|
|
|
|
ANSWER: You should find it in shadow.tar.Z (only sources), at least
|
|
at tsx in the usr.bin directory. Many people have reported some troubles
|
|
with the *OLD* shadow-passwd (shadow-bin.tar.Z and shadow-src.tar.Z, so
|
|
do not use them anymore); an alternative might be the mcc-interim
|
|
which contains standard passwd binary. There is also the Peter Orbaek's
|
|
admutil-1.?.tar.Z and poeigl-1.?.tar.Z which contains source for
|
|
shutdown, su, chsh, passwd and a system V init compatible.
|
|
|
|
|
|
VII.14) How can I setup a user account other than root ?
|
|
|
|
ANSWER: You can either use the adduser program, either do it manually.
|
|
In the later case, you have to:
|
|
a) edit /etc/passwd as root and add a line of the following format:
|
|
user:passwd:uid:gid:user name:home directory:login shell
|
|
|
|
user is the login name; uid is the numeric user id, it should be
|
|
unique; gid is the numeric group id, this number should correspond to
|
|
an entry in /etc/group. The passwd field should be left blank 'cause
|
|
it is stored in an encrypted form [to set this field just use the
|
|
passwd program].
|
|
example
|
|
faq::200:5:Marc-Michel:/home/faq:/bin/sh
|
|
b) Still as root, you shoud now create the home directory and set the
|
|
correct ownership.
|
|
mkdir /home/faq
|
|
chown faq /home/faq
|
|
chgrp 5 /home/faq
|
|
|
|
|
|
VII.15) I've been trying to get Linux to run on my [3/4]86 box. It
|
|
can't even boot. Any suggestions?
|
|
|
|
ANSWER: The most common error/problem is writing the bootimage to a
|
|
low density disk. It fits, but the bootstrap code will only recognize
|
|
high density disk. So try to format explicitely disk as high density:
|
|
- for 3.5", 'format a: /n:18 /t:80 '
|
|
- for 5.25", 'format a: /n:15 /t:80 '
|
|
|
|
|
|
VII.16) Does there exist games, languages (other than C), and
|
|
anything which make the system more friendly?
|
|
|
|
ANSWER: Yes, among other things there are rogue and yahtzee; TeX;
|
|
Prolog, Perl.. but in general, if you want some extra tool port it to
|
|
Linux this is also a good beta-testing exercice.
|
|
|
|
|
|
VII.17) Whenever I use uemacs 3.1X on a symlink, the symlink does
|
|
not exist anymore, why?
|
|
|
|
ANSWER: (Tristram Mabbs) Since ue3.10, uemacs uses 'safe save' mode,
|
|
writing the file to a temporary and moving it OVER the original. In
|
|
the process, this deletes the original. To prevent this just add the
|
|
following in your emacs '.rc' file: set $ssave FALSE
|
|
|
|
|
|
VII.18) I have an SVGA, but Linux detect an EGAc/EGAm; is it normal?
|
|
|
|
ANSWER: (Jim Winstead) This is correct actually. You have an EGA+ card
|
|
(SVGA) with a Color/Mono monitor. The only four possibilties are EGAc,
|
|
EGAm, *MDA and *CGA (according to the code in
|
|
kernel/chr_drv/console.c).
|
|
The true test, if Linux detects your video card, is if you press
|
|
<RETURN> at the "Press <RETURN> to see SVGA- ..." boot-time message.
|
|
If you have a SVGA recognized card, it will ask you to choose a
|
|
screen size. If not detected, the default is 80x50 mode.
|
|
BTW if you have no SVGA, press the <space> and you are in 80x25 mode.
|
|
|
|
If you have dowloaded the kernel, you can automatically skip this
|
|
query at boot-time if you set the SVGA_MODE variable in the main
|
|
Makefile before compiling a new bootimage.
|
|
|
|
|
|
VII.19) How can I change the keyboard repeat rate?
|
|
|
|
ANSWER: (Michael K Johnson) In boot/setup.S there are the lines:
|
|
! set the keyboard repeat rate to max
|
|
mov ax,#0x0305
|
|
mov bx,0x0000
|
|
int 0x16
|
|
|
|
If you don't want to change the repeat rate at all, just comment out
|
|
these lines. If you want something in the middle, change the
|
|
mov bx,0x000
|
|
by mov bx,0x??yy
|
|
where ??yy is determined by (Ralf Brown's interrupt list)
|
|
bh= delay value (0x00 = 250ms to 0x03= 1000ms (one sec))
|
|
this is the delay before the repeat is performed
|
|
bl= repeat rate (0x00 =30/sec to 0x1f=2/sec; 0x0c=10/sec [default])
|
|
|
|
|
|
VII.20) I compiled fdformat.c and ran it on 1.44Mb and 1.2Mb, the
|
|
results are unreadable, any clue?
|
|
|
|
ANSWER: (M. Pereckas) fdformat only low-level formats the disk. to use
|
|
the fdformatted disk with DOS filesystem, run mformat on the disk.
|
|
Mformat writes DOS filesystem information but is unable to low-format
|
|
:). In order to put a Linux filesystem on a (low)formatted disk you
|
|
have to mkfs it.
|
|
|
|
VII.21) Is it possible to disable the 3-fingers salute
|
|
(ctrl-alt-del) ?
|
|
|
|
ANSWER: Yes, in kernel/sys.c you can read the following:
|
|
|
|
/*
|
|
* this indicates wether you can reboot with ctrl-alt-del: the deault is yes
|
|
*/
|
|
static int C_A_D = 1;
|
|
|
|
there is also a small utility written by Linus in digest242 vol#2
|
|
|
|
|
|
VII.22) Could some one explain the information provided at boot-time?
|
|
|
|
ANSWER: (Jim Winstead Jr)
|
|
> serial port at 0x03f8 is a 16450
|
|
> serial port at 0x02f8 is a 16450 (what's that the uart chip?)
|
|
|
|
Right, the last number should either be 8250, 16450, 16550, or 16550a,
|
|
and on the two 16550 models, it will report that FIFO's have been
|
|
disable (16550) or enabled (16550a).
|
|
|
|
> 8 virtual consoles (that's how many alt-F's I can get going?
|
|
> but only F1-4 actually work)
|
|
|
|
You can get sessions running on Alt-F[1-8], but the 'standard'
|
|
/etc/inittab only runs getty/login on Alt-F[1-4]. You can start
|
|
sessions on the other consoles by using 'doshell' or adding lines to
|
|
/etc/inittab.
|
|
|
|
> 4 pty's (are these the consoles F1-4?)
|
|
|
|
No, those are 'pseudo' ttys, which programs like MGR use to simulate
|
|
tty connections. That's probably a gross over-simplification, but it
|
|
gives you the general idea, I think. :)
|
|
|
|
> p_init: lp1 exists (0) (is that the (l)ine (p)rinter?)
|
|
|
|
Right.
|
|
|
|
|
|
VII.23) What is the meaning of files ended by .T.Z (or .taz) ?
|
|
|
|
ANSWER: The suffix Z is for compressed files (to uncompress them use
|
|
the command `uncompress file.Z`).
|
|
The suffix T indicates a "tar file" the usual suffix is tar but, the
|
|
14 chars filename limit of the Minix filesystem makes it cumbersome to
|
|
use .tar.Z (to untar a file ended by .T, use the command
|
|
`tar options file.T` (see the man page for more details).
|
|
|
|
For the .taz file, change them as .T.Z and go-ahead.
|
|
|
|
VII.24) What is the meaning of files ended by .T.z (or .tpz) ?
|
|
|
|
ANSWER: The suffix z is for files compressed with the
|
|
gzip utility, which is being used more frequently because it provides
|
|
better compression. These can be uncompressed with the `gzip -d
|
|
file.z` command.
|
|
|
|
|
|
VII.25) I have upgraded the kernel from XX to YY (XX > YY), however the
|
|
login screen still says YY.
|
|
|
|
ANSWER: Just change the message in one of these files: /etc/issue and
|
|
/etc/motd. The former contains the message before the login, the later
|
|
is the one after you are logged in.
|
|
|
|
VII.26) What is doshell good for ?
|
|
|
|
ANSWER: It's an old program provided in the early Linux version (0.12)
|
|
when the getty was not already there, it spawns a shell on any tty's.
|
|
(Mattew Gream): I do this quite often ( getty on tty1, 2, 3 and my
|
|
rc.local spawns a shell on tty4 as follows
|
|
'/usr/bin/doshell /dev/tty4 /bin/tcsh &'
|
|
|
|
|
|
VII.27) I don't have the kernel sources, how can I change the keyboard
|
|
language?
|
|
|
|
ANSWER: You can use the fixkbd program written by Laurent JULLIARD
|
|
(Laurent_JULLIARD@grenoble.hp.com). Its purpose is to fix the keyboard
|
|
map used in your kernel image. It works more or less a la "rootdev"
|
|
(or rdev). It can be found on tsx-11.mit.edu in
|
|
/pub/linux/binaries/sbin/fixkbd.tar.Z.
|
|
|
|
|
|
VII.28) Does there exist a possibility to track down the source of
|
|
kernel pannic messages ?
|
|
|
|
ANSWER: Here's info from Linus on how to track down the source
|
|
of kernel panic messages. The values for EIP, address, and so on are
|
|
JUST EXAMPLES: the EIP, EFLAGS, etc. can be anything.
|
|
|
|
The lines after ">" were written by me; the responses by Linus.
|
|
|
|
> Unable to handle kernel paging request at address C000000A
|
|
|
|
This means something in the kernel tried to access kernel memory at
|
|
address 0x00A (the C0000000 offset is due to the kernel starting at
|
|
virtual address 0xC0000000). The first page of kernel address space is
|
|
unmapped to find these kinds of incorrect references (it's probably a
|
|
NULL dereference to a structure member at offset 0xA).
|
|
|
|
> Oops: 0002
|
|
|
|
Error code. This tells you if it's a read or write (forget which ritgh
|
|
now, and don't have any books handy)
|
|
|
|
> EIP: 0008:000290D2
|
|
|
|
This is where it happened: segment 0008 (kernel code segment) and offset
|
|
0x290D2 into the kernel. So to find this, you generally do something
|
|
like
|
|
|
|
nm /usr/src/linux/tools/system | sort | less
|
|
|
|
and search for the function that contains the address 0x290D2.
|
|
|
|
> EFLAGS: 00010087
|
|
> fs: 0017
|
|
|
|
Eflags and fs when the exception happened. You usually don't need this.
|
|
|
|
> base: C0000000, limit: 000A0000
|
|
> Pid: 0, process nr: 0
|
|
|
|
In what process the exception happened. This is the swapper, which also
|
|
means the thing is fatal (other processes you can just kill). That it's
|
|
in the swapper process probably means that it's an interrupt that did
|
|
it, as the swapper doesn't really do anything.
|
|
|
|
> 89 50 04 c7 03 00 00 00 00 c7
|
|
|
|
This is the instruction that resulted in the error. I usually
|
|
disassemble them by hand and see what it is, then I try to find out
|
|
exactly where in the function this assembly sequence comes up (probably
|
|
by compiling the .c file to a .s file and looking around).
|
|
Alternatively you can just run 'gdb' on /usr/src/linux/tools/system, but
|
|
gdb has some problems.
|
|
|
|
> task[0] (swapper) killed: unable to recover
|
|
> kernel panic: Trying to free up swapper memory space
|
|
> In swapper task - not syncing
|
|
|
|
This is just to tell you not to expect anything from the kernel any
|
|
more: linux cannot go on without the swapper task.
|
|
|
|
> How can I decode the numbers in the message?
|
|
> Also, note that sometimes the "Unable to handle..."
|
|
> message is followed by the "Oops: 0002" block, but
|
|
> the last message is sometimes something else (i.e. not
|
|
> always a "task[0] (swapper)...." message, but something
|
|
> from the TCP driver in this case.
|
|
|
|
It depends on where it happened. If it's an interrupt, it can
|
|
essentially happen in any task (all interrupts are handled in the task
|
|
that happens to be currently active), while "normal" code happens in the
|
|
task that calls it.
|
|
|
|
|
|
|
|
|
|
VIII. FEATURES
|
|
==============
|
|
|
|
VIII.01) I've read that linux has virtual consoles, what must I do to
|
|
get them?
|
|
|
|
ANSWER: Yes there are, you can access them with the left <alt>-key
|
|
together with <Fn>-key. With the Linux Images distribution, 4 consoles
|
|
are available, getty runs on them.
|
|
Notice that they are NOT accessible when running X (contrary to some
|
|
commercial unices).
|
|
|
|
VIII.02) When Linux boots, I get the following message "8 virtual
|
|
consoles"; how can I acess to the 5-8 vc's ?
|
|
|
|
ANSWER: If you want the getty to run on the 5-8, you should add the
|
|
corresponding entries in /etc/inittab. You can also just run sh on
|
|
them by using the doshell soft.
|
|
And then in either case, the ALT-F[5-8] will access the corresponding
|
|
vc.
|
|
|
|
VIII.03) What kind of shell is /bin/sh ?
|
|
|
|
ANSWER: It's the Bourne Again Shell, bash-1.12.3 and
|
|
compilation was straightforward, just "make"
|
|
that's all or nearly.
|
|
BTW There does exist different shells for Linux, these are:
|
|
bash, rc, zsh, tcsh and pdksh (a korn shell).
|
|
|
|
|
|
VIII.04) Does there exist a man page for **** ?
|
|
|
|
ANSWER: Download man.tar.Z from your favorite linux ftp site, there is
|
|
most of the fileutils man page -- either **** or g****, example there
|
|
is nothing on ld, but there is for gld :) --, check the whatis
|
|
database provided. The files in the cat1 dir are pre-formatted man
|
|
pages that the man program can use. Quite recently the man pages for
|
|
section 2 have been written (thanks Drew) and can be found, at least
|
|
at tsx-11 in /pub/linux/docs/man/man2.tar.Z
|
|
|
|
Also manpages are in the SLS on the b? disks.
|
|
|
|
BTW there is nroff and groff for Linux. Cawf 2.0 works just
|
|
fine for simple man pages, and a partial ms support too.
|
|
|
|
|
|
Moreover Michael Johnson is the coordinator for man pages under Linux,
|
|
he is looking for volunteers, so contact the DOC Channel.
|
|
|
|
VIII.05) Is there a simple man package (groff is too big):
|
|
|
|
ANSWER: "Cawf -man" also "fm -m" (Al Clark) tsx-11 in
|
|
/pub/linux/binaries/usr.bin/fm.tar.Z
|
|
|
|
|
|
VIII.06) What are the editors available in linux?
|
|
|
|
ANSWER: Right now there are uemacs-3.11, elvis-1.4 (1.5).
|
|
Gnu Emacs is there, read the section devoted to it in the 4th part of
|
|
this FAQ. Also the port of mg (micro gnu) has been done and can be
|
|
found at least at athos.rutgers.edu (128.6.4.4)
|
|
in pub/linux, mg is the binary and mg.tar.Z is the sources file. You
|
|
can also find a PD ed, and elvis has an ex mode. Finnally there are
|
|
joe, vile-3.11, elle (Elle Looks Like Emacs), Xedit and aXe.
|
|
|
|
VIII.07) Does there exist a printer package for Linux?
|
|
|
|
ANSWER: (R. Miller) Yes. The "plp" package is currently available
|
|
under the directory [/pub/linux]/BETA/plp on tsx-11 and its mirrors.
|
|
You may also print things manually like so: cat filename > /dev/lp1
|
|
(Note that though "/dev/lp0" exists, most people find that their
|
|
printer is on /dev/lp1. Use whatever the kernel says that it detects
|
|
in the boot-up messages.)
|
|
|
|
VIII.08) Are uucp, mail, and/or USENET news available for Linux?
|
|
|
|
ANSWER: (Vince Skakan)
|
|
Yes !!! At this time, the following (at least) have been
|
|
ported to Linux:
|
|
|
|
Package name version
|
|
------------ --------
|
|
taylor uucp 1.03
|
|
elm 2.3-pl11
|
|
smail 3.1.28
|
|
|
|
C-news 12/22/91
|
|
tin 1.1pl4
|
|
trn 2.2
|
|
nn 6.4.18
|
|
|
|
[...coming soon - Expect an announcement in the near future concerning
|
|
the packages above being made available in binary form in the SLS
|
|
distribution and in source form from sunsite.unc.edu and other Linux
|
|
archive sites...]
|
|
|
|
If you are interested in the last uucp features, join the UUCP channel
|
|
(see part1 of this FAQ for more details about the multi channels list).
|
|
|
|
VIII.09) How do I make swapping work?
|
|
|
|
ANSWER: Quite simply, you need the swapon and the mkswap binaries.
|
|
Then you can choose between a swap partition or a swap file.
|
|
The mkswap is used to write the "swap signature", whilst the swapon
|
|
binary is to activate the swapping.
|
|
|
|
First of all you need a partition :), I assume it's the second of your
|
|
first disk namely /dev/hda2, and it's 10MB big
|
|
A) swap partition:
|
|
you have to indicate it's a swap area, this is done via mkswap
|
|
(instead of mkfs) which needs the name of the partition and the size
|
|
in blocks (a block is 1Ko big); the optional -c flag is for bad block
|
|
checking. So for our example you should perform:
|
|
mkswap [-c] /dev/hda2 10000
|
|
Then you need to indicate that you want linux to use the swap area,
|
|
this is done via swapon. In general it is set in the /etc/rc file,
|
|
just put the following entry:
|
|
/bin/swapon /dev/hda2
|
|
It can also be achieved via the /etc/fstab file
|
|
B) swap file:
|
|
The process is quite close; you need a partition, and a swap file.
|
|
Assume that I prefer a swap area of 4MB (I want to keep some place in
|
|
/dev/hda2). I need first to "dd" the file.
|
|
dd if=/dev/hda2 of=/swap_file bs=1024 count=4096
|
|
bs stands for block size, and count is the number of blocks
|
|
then I have to put the "swap signature" on that file:
|
|
mkswap /swap_file 4096
|
|
At this point, you should 'sync', just to be sure the signature is
|
|
effective. And finally add an entry in the rc file:
|
|
/bin/swapon /swap_file
|
|
|
|
|
|
VIII.10) When I boot I get one of the following messages:
|
|
"Unable to find swap signature" or "Bad swap-space bitmap"
|
|
|
|
ANSWER: You probably forgot to make your swap-device, use the mkswap
|
|
command.
|
|
|
|
|
|
VIII.11) How do I know if it is swapping?
|
|
|
|
ANSWER: You will notice it :)) First of all, Linux tells you at boot
|
|
time, "Adding swap: XXX pages of swap space", and if you start running
|
|
out of memory, you will notice that the disk will work overtime, and
|
|
things slow down. Generally a 2Meg RAM will make the system swap
|
|
constantly while running gcc, 4 Meg will swap occasionnaly when
|
|
optimizing big files (and having other things active, such as make).
|
|
Also, the command 'free' (from the ps package) reports total enabled
|
|
swap space and current swap use.
|
|
|
|
|
|
VIII.12) How is it possible to remove a swap file?
|
|
|
|
ANSWER: Simply perform a rm on that file, and remove the swapon of
|
|
your /etc/rc file.
|
|
|
|
|
|
VIII.13) How is it possible to remove a swap device?
|
|
|
|
ANSWER: mkfs the device, and remove the swapon of your /etc/rc file.
|
|
|
|
VIII.14) How much swap space do I need ?
|
|
|
|
ANSWER: Linux does not perform real swapping, it's rather paging (see
|
|
below for a more complete explanation). The swap area is *added* to
|
|
the memory and can be viewed as virtual memory, so choose the size you
|
|
need, example:
|
|
|
|
8MB RAM + 6MB swap => 14MB virtual memory
|
|
|
|
VIII.15) Could someone explain the swap process on Linux?, is it
|
|
swapping or paging ?
|
|
|
|
ANSWER: (Linus) Linux uses swap as /additional/ memory, one page of
|
|
the swap-space is used for the good-page bitmap and the swapspace
|
|
signature.
|
|
In fact Linux does only paging, no swaping in the meaning "write out
|
|
one whole process to disk".
|
|
The reason it's called swapping is that Linux used paging for memory
|
|
management on a low level since the very beginning, but didn't page to
|
|
disk at all until 0.12.
|
|
|
|
VIII.16) Is demand paging different from paging and How ?
|
|
|
|
ANSWER: (Linus) Demand-paging is really "demand loading of
|
|
executables" and is totally independent of the page-swapping
|
|
algorithms, although they have similarities. When Linux strts up a
|
|
process, no actual code space is loaded: I let the page exceptions
|
|
load in the executable as needed. Thus Linux demand-loads the code and
|
|
initialized data it needs.
|
|
Demand-loading has very good points: (a) it simplifies the exec system
|
|
call; (b) it means page sharing between that have excuted the same
|
|
file is easy to implement; (c) it cuts down on the amount of memory
|
|
required. When Linux runs out of real memory, it starts to lock for
|
|
pages it can swap out, but if it notices that the page is clean, it
|
|
just forgets about it, and demand-loads it when it's needed again.
|
|
Thta means that swap-file isn't needed as much, especially when
|
|
running big binaries such as gcc, where the code-pages can be
|
|
demand-loaded as you wish.
|
|
|
|
Point (c) means that even without any swap space, you can usually run
|
|
slightly larger programs that your memory setup would actually permit.
|
|
I've noticed this while running X and doing a kernel compilation +
|
|
something else wshen I've forgotten to turn on swapping: free reports
|
|
0 page available but things still work, although performance is
|
|
slightly down...
|
|
|
|
VIII.17) Is there any way to tell how much swap space you are using
|
|
or have left?
|
|
|
|
ANSWER: The free program provided with the ps package handles this.
|
|
|
|
|
|
VIII.18) I have a 2Megs box, but "free" reports only 1Meg why?
|
|
|
|
ANSWER: (Linus:) "free" doesn't concern with the memory the kernel has
|
|
allocated for itself. In other words what you see is the *user* memory
|
|
available. The kernel has taken the low 1Meg for it's use (~250Ko for
|
|
it and the rest for buffer cache and kernel data structures); for big
|
|
memory machine it could be even 2Megs.
|
|
|
|
VIII.19) What tape drives work with Linux ?
|
|
|
|
ANSWER: (24 sept. P. Riipinen)
|
|
- There is a working QIC-02 device driver for Linux, supporting (at
|
|
least) Everex/Wangtek cards.
|
|
- There are additional patches for the QIC-02 to support Archive
|
|
SC402/499R. You can find them in /pub/linux/alpha/qic-02 at tsx-11
|
|
There are some bugs in the driver but you can backup.
|
|
- Newer drivers are all SCSI, so check the SCSI section in this FAQ.
|
|
|
|
VIII.20) Is there only the %$#@ keyboard ?
|
|
|
|
ANSWER: There are Dannish, Finnish, French, German, Uk, US and DVORAK
|
|
keyboards. Set it in the main Makefile of the kernel sources, then
|
|
(re)compile the kernel again. Make sure the files in kernel/chr_drv
|
|
directory are recompiled.
|
|
|
|
|
|
VIII.21) (special FINNISH/US) I booteed up with the new image and
|
|
everything work except that some keyboard keys produce wrong
|
|
characters. Does anyone know what is happening?
|
|
|
|
ANSWER: Since 0.95a images are US product (and so are US-keyboard
|
|
oriented), BUT linux sources are FINNISH product, and so the default
|
|
keyboard is set to be FINNISH. The solution is in the previous Q/A.
|
|
|
|
|
|
VIII.22) Does there exist shared libs ?
|
|
|
|
ANSWER: (H.J. Lu, hlu@eecs.wsu.edu, 09/01/92)
|
|
|
|
The shared library under Linux started at 0.12. Peter MacDonald
|
|
collaborating with Linus made the first generation of shared library,
|
|
which is the base of the classic shared library which is no longer widely
|
|
used.
|
|
|
|
The kernel support of shared library under Linux is system call
|
|
|
|
extern int uselib (const char *__filename);
|
|
|
|
which loads an executable image with fixed entry point into memory,
|
|
just like the ordinary executables.
|
|
|
|
In crt0.s, a function which can find out if and which shared images
|
|
are needed and loads them is invoked before `main ()' is called if
|
|
necessary. David Engel and I developed a way to tell the loader which
|
|
shared images have to be loaded, utilizing the similar technique used
|
|
in global constructor in g++ 2.x with the help from GNU binary
|
|
utilities.
|
|
|
|
In the classic Linux shared library, we build a big executable image
|
|
for several libraries and make sure no external variables outside of
|
|
the participating libraries are referenced. Then we can get the
|
|
absolute addresses of all the global variables defined in the
|
|
libraries used to build that executable image. After that, we make a
|
|
stub library for each participating library which just has the
|
|
absolute addresses of all the global variable in it.
|
|
|
|
For each shared image, there must be one and only one .o file, which
|
|
defines a global variable containing version, name and entry point of
|
|
the shared image, and a dummy global data. Among those libraries used
|
|
to build the shared image, there must be one library which will always
|
|
be referenced whenever any other library is referenced. We put this .o
|
|
file into the stub library for that library and add a special symbol
|
|
to each of the components of the stub library in order to make sure
|
|
that this .o file is always linked in if any of the participating
|
|
libraries are linked.
|
|
|
|
In gcc 2.2.2d, jump table, developed by David Engel, was introduced in
|
|
the shared library. At the beginning of each shared image, there is
|
|
a table in which every library function has a fixed entry address and
|
|
the instruction at that address is a jump which will lead to the
|
|
real library function. So we can change the library function without
|
|
changing the corresponding entry address of the jump table. For the
|
|
global data we put them at the beginning of data section of the shared
|
|
image. We have to separate them from text code and link them in fixed
|
|
order. It is very hard to maintain the same addresses for the global
|
|
data when library is changed. After the global data are set up properly
|
|
and some spaces are left for possible future changes (that is a very
|
|
tough procedure.), it isn't too difficult to maintain.
|
|
|
|
Starting with libc.4.3, a form of dynamic linking developed by Eric
|
|
Youngdale was introduced into the shared libraries. As part of this,
|
|
the tools that were used to generate the sharable libraries were
|
|
completely redone which made the job of building the libraries much
|
|
easier, and thus the libX*.so.3.0 libraries were made as DLL jumptable
|
|
libraries.
|
|
|
|
VIII.23) Why do I need dynamic linking.
|
|
|
|
ANSWER: The best way to illustrate this is with a simple example of
|
|
what happens without dynamic linking.
|
|
|
|
#include <stdio.h>
|
|
|
|
int errno;
|
|
FILE * foo;
|
|
|
|
main(){
|
|
foo = fopen("/usr/bin/foo","w");
|
|
printf("foo: %x errno: %d\\n",foo, errno);
|
|
}
|
|
|
|
Assume this program is run by a non-root user. Normally you would
|
|
expect that the open will fail because the user does not have
|
|
permission to write to /usr/bin - this means that fopen() would return
|
|
NULL, and errno would contain 13, which means EACCES - Permission
|
|
denied. If you link this to a normal jump table library, it prints
|
|
|
|
foo: 0 errno: 0
|
|
|
|
Now consider the following nearly identical program:
|
|
|
|
#include <stdio.h>
|
|
|
|
extern int errno;
|
|
FILE * foo;
|
|
|
|
main(){
|
|
foo = fopen("/usr/bin/foo","w");
|
|
printf("foo: %x errno: %d\\n",foo, errno);
|
|
}
|
|
|
|
The results for this program are:
|
|
|
|
foo: 0 errno: 13
|
|
|
|
Why does this happen???. First of all you must realize that in the
|
|
first program errno is not declared external, and thus storage will be
|
|
allocated in the data segment for the variable. Unfortunately there
|
|
is no way to tell libc this, and libc has it's own storage for errno.
|
|
Thus libc writes the result in one location and you are looking in the
|
|
other. In the second program errno is declared extern, and thus no
|
|
storage will be allocated. The linker will see the need for a
|
|
definition of errno, and it will find one in libc. Thus in the second
|
|
example the user program is reading the same memory location that the
|
|
library stored the answer in.
|
|
|
|
This is of course a simple example. There are more complicated
|
|
examples involving programs that want to redefine a library function
|
|
and these can lead to quite bizarre behavior which is difficult to debug.
|
|
|
|
With dynamic linking, both of the above programs yield the same
|
|
(correct) result.
|
|
|
|
VIII.24) How does dynamic linking work under linux?
|
|
|
|
ANSWER: Basically, to implement dynamic linking we need to route all
|
|
function calls to global functions through the jump table. We also
|
|
need to make sure that all global data is accessed indirectly through
|
|
a pointer. The actual libraries do not really look very much
|
|
different from the actual jump table libraries that we are currently
|
|
using, but there are additional pointers to the global data in the
|
|
sharable image that are used internally by the library to access all
|
|
global data. There are also additional symbols in the stub library
|
|
that are defined as the address of the various pointers, and are used
|
|
by the linker to help determine whether there is a pointer or a jmp
|
|
instruction that needs to be fixed up.
|
|
|
|
The linker has one new important task with dynamic linking.
|
|
It watches for duplicate definitions of symbols, and if the
|
|
second definition is in a sharable library, it makes a note of it as a
|
|
conflict that needs to be resolved at run time. The linker puts a list
|
|
of all of these conflicts into a table and makes it available to crt0
|
|
through the variable __SHARABLE_CONFLICTS_.
|
|
|
|
At run time, crt0 (through the function __dynamic_resolve)
|
|
will go through and fix up all of the pointers that need to be fixed.
|
|
Let us say for example that you define your own malloc function in a
|
|
program - in this case at run time the startup code will actually
|
|
modify the jmp instruction in the jump table so that it points to the
|
|
malloc function in your program, not the one in the library. The
|
|
library will never refer to the malloc function directly, but it will
|
|
always be referenced through the jump table - in this way we ensure
|
|
that there will only be one function named malloc that is used by a
|
|
given program.
|
|
|
|
If you were to run the first example program in the "Why do I
|
|
need dynamic linking" answer, then the pointer in the library that
|
|
corresponds to the variable errno will be modified so that it points
|
|
to the errno variable that is in your program. The library itself
|
|
will never use errno directly - it will always use it via the special
|
|
pointer variable. In this way we ensure that all references to the
|
|
variable errno both in your program and in the sharable library will
|
|
reference the same memory address.
|
|
|
|
VIII.25) Does Linux work for SCSI drives?
|
|
|
|
ANSWER: Yes since v0.96. At tsx-11.mit.edu in /pub/linux/ALPHA/scsi, you
|
|
will find the last SCSI alpha/beta version and also a special SCSI
|
|
FAQ, read it, it contains the latter information than the one provided
|
|
in the SCSI section. You should, also, contact the linux-scsi list or
|
|
directly drew@cs.colorado.edu
|
|
|
|
|
|
VIII.26) Linux is supposed to work with ESDI drive. However I have
|
|
trouble with my Magtron MT-4115E (Joincom controler), any clue?
|
|
|
|
ANSWER: (Linus) Some harddisk don't like linux (even though they
|
|
should). Maybe not a bug but a deficiency.
|
|
(Mika) I had to remove the printk "unexpected hd interrupt" statement
|
|
in hd.c because I was getting so many of those messages. Be warned
|
|
that if there is any read error the system just hangs, even the
|
|
ctrl-alt-del won't work. You should be able to use your ESDI drives if
|
|
you could live with those nuisances.
|
|
|
|
VIII.27) How does one go about applying a patch to Linux ?
|
|
|
|
ANSWER: (Drew Eckhardt) In the unix world most of distribution are in
|
|
source form. This includes the operating system. To apply a patch, you
|
|
apply it with the 'patch' program to the affected sources. The patch
|
|
program takes as input the differences between the old and the new
|
|
version. After patching you need to recompile the sources.
|
|
|
|
Assume I want to apply a patch enclosed in the file XXX. First of all
|
|
I will look at the top of XXX, where the file affected is identified.
|
|
This may have aleading path attached to it. Either cd out to the
|
|
"root" of the patch, ie if I see
|
|
linux/kernel/blk_drv/blk.h
|
|
|
|
I would cd into /usr/src
|
|
(assuming it's the place where I can find linux/kernel...)
|
|
and then patch as follows
|
|
patch -p0 < whatever_place/XXX
|
|
|
|
or, you can specify a number of path components to strip from the
|
|
path. If I am in the blk_drv directory patching would be
|
|
patch -p3 < whatever_place/XXX
|
|
|
|
|
|
VIII.28) There are a lot of patches available (ps patch, NFS patches,
|
|
CD-ROM patches ...) can I be fairly confident the subsequent patches will
|
|
work?
|
|
|
|
ANSWER: This is not true yet for the current version; but it will be
|
|
so I kept it :)
|
|
No you can't, patching is a real beta tester art :)). People are not
|
|
working on the same patched release, so you have to check if the
|
|
patches you already applied works on the same kernel part, if not,
|
|
/great/, just apply them. If yes, check if there is an order, patch
|
|
creator knows that, and (should) try to warn patch user (in other
|
|
words: beta tester) otherwise you should edit the patch files (and
|
|
possibly make a brief note to others on this list/newsgroup or even a
|
|
cdiff) before applying them, another solution is to keep cool and wait
|
|
for the next version of Linux where, in general, the modifications
|
|
have been done but this behavior is /not/ Linux helpful.
|
|
|
|
|
|
VIII.29) I got the patches on some ftp sites, and applied them to the
|
|
kernel and tried to compile. It didn't !!. Are the patches buggy?
|
|
|
|
ANSWER: Before remake, just do a make clean in the directories
|
|
involved by the patches. This will force a rebuild of the .o and .a
|
|
files.
|
|
If you have a RCS running on your source tree, did you checked a
|
|
patched version of the files changed before /any/ CO either by you or
|
|
make
|
|
|
|
Finally, make sure the patches succeded. Normally, failed patches on a
|
|
file FILE will leave a FILE# file. Moreover you will get a "chunk
|
|
failed" message. It is possible to capture the output while patching,
|
|
with the following:
|
|
|
|
patch -p0 < patchfile | 2>&1 patch.result | more
|
|
|
|
|
|
VIII.30) What is VFS?
|
|
|
|
ANSWER: (Ted) Linux 0.96 already has Virtual FileSystem, which means
|
|
that it acts as a filesystem switch. It makes it easy for someone to
|
|
design another filesystem format and include it in the Linux kernel
|
|
along with the standard minix filesystem format. So it /enables/
|
|
someone to design a robust filesystem which would have some nice
|
|
properties (no 14 chars file name limitation, nor 64Meg limit), and
|
|
could be included in the kernel in such a way that both the Minix and
|
|
the new one could be mounted at the same time. This solves the
|
|
uncompability problem; since the root disk could still use the Minix
|
|
filesystem, while the hardisk could be using the new one.
|
|
|
|
|
|
|
|
VIII.31) What's about Bus Mice ?
|
|
|
|
ANSWER: (Nathan I. Laredo) Since the Linux v0.96c-pl2 the kernel does
|
|
support LOGITECH and BUS MICE
|
|
If you are unsure that you have a bus mouse or not, check to see if
|
|
your mouse card has a selection for a sample rate switchable between
|
|
30Hz and 60Hz (or possibly 25/50Hz), if it does not, then it is NOT a
|
|
true bus mouse (InPort mice for example will not work with this
|
|
driver).
|
|
To create a bus mouse device:
|
|
mknod /dev/mouse c 10 0
|
|
|
|
|
|
VIII.32) What's about TeX ?
|
|
|
|
ANSWER: The primary site for Linux TeX is 129.78.66.1, this is
|
|
P. Williams' site in Australia. The stuff at tsx-11 was posted by
|
|
T. Dunbar who does support/maintain the dvilj stuff.
|
|
|
|
|
|
VIII.33) What's about LILO ?
|
|
|
|
ANSWER: (Werner Almesberger)
|
|
LILO - Generic Boot Loader for Linux ("LInux LOader")
|
|
|
|
This is an ALPHA test release of a new boot loader. Be sure to have
|
|
some means to boot your system from a different media if you install
|
|
LILO on your hard disk.
|
|
|
|
Features
|
|
--------
|
|
|
|
- does not depend on the file system. (Tested with Minix, EXT FS and MS-DOS
|
|
FS.)
|
|
- can be used to boot from floppies and from hard disks.
|
|
- can replace the master boot record.
|
|
- can boot non-Linux systems (MS-DOS, DR DOS, OS/2, ...) and unstripped
|
|
kernels.
|
|
- supports up to 16 different boot images that can be selected at boot
|
|
time. Root and swap disk/partition can be set independently for each
|
|
image.
|
|
- boot sector, file map and boot images can be all on different disks or
|
|
partitions.
|
|
|
|
|
|
Restrictions and known problems
|
|
-------------------------------
|
|
|
|
- SCSI disks are not fully supported yet. (Still waiting for some kernel
|
|
changes.) (Should work in current release - EY).
|
|
- booting other operating systems doesn't seem to work everywhere. If
|
|
everything but booting a non-Linux OS from LILO works on your system,
|
|
you should boot LILO by BOOTACTV and select the alternate OS with the
|
|
latter as a temporary work-around.
|
|
- booting non-Linux systems from the second hard disk ("D:") is not yet
|
|
supported.
|
|
|
|
Please send all bug reports to almesber@nessie.cs.id.ethz.ch
|
|
|
|
|
|
VIII.34) What's about MGR ?
|
|
|
|
ANSWER: (General Information grabbed from various sources)
|
|
There is a MGR channel available , contact the request adress with
|
|
help in the body: linux-activists-request@niksula.hut.fi
|
|
The stuff can be found at tsx-11 in pub/linux/packages/MGR
|
|
In brief:
|
|
|
|
MGR provides:
|
|
- multiple overlapping windows
|
|
- multiple fonts
|
|
- text and graphics in each windows
|
|
- a simple popup menu package
|
|
- a client/server model 'a la' X
|
|
- independance from any peculiar networking technology
|
|
|
|
MGR consist of a server process and some clients. Each client has his
|
|
own window, and can create subwindows. Clients communicate with the
|
|
server via a bidirectionnal channel. A C library is provided.
|
|
|
|
When a new window starts, it is as a terminal emulator running the
|
|
shell; for more information you can grab the mgr-man.out from
|
|
bellcore.com
|
|
|
|
The information hereafter appeared on the MGR channel on 19th Jan.
|
|
> From: u31b3hs@POOL.informatik.rwth-aachen.de
|
|
> Subject: MGR 0.53
|
|
>
|
|
>
|
|
> MGR, version 0.53 for Linux and SunOS (Coherent unfinished yet).
|
|
>
|
|
> Unpack the src* stuff under in /src/lbin/mgr and the usr* stuff in
|
|
> /usr/mgr. I splitted things that way for making it easier to ftp
|
|
> them and carry them home. If you don't like these paths, then use
|
|
> others, but remember to edit the Configfile after generating it.
|
|
> YOU NEED TO INSTALL ALL FILES FOR COMPILING.
|
|
>
|
|
> This is a beta release for programmers, there are no binaries. It
|
|
> makes my work available for people who either also work on MGR and
|
|
> like to get new sources and for adventerous beta testers. WARNING:
|
|
> I assume using Linux 0.99.2 and GCC 2.3.3.
|
|
>
|
|
> There is some new m4 code to generate menus. It is more powerful
|
|
> than menu(1), but a little harder to use.
|
|
>
|
|
> MGR is currently being ported to Coherent 4.0, but this version
|
|
> doesn't include everything yet. There is already a beta version
|
|
> running on Coherent, although not too stable yet.
|
|
>
|
|
> For questions, write to the mailing list, channel MGR. Please be
|
|
> sure to talk about the latest version of MGR plus having read the
|
|
> README files in the directories containing the problem.
|
|
>
|
|
> You got this stuff from ftp.thp.uni-koeln.de:pub/linux/mgr or from
|
|
> tsx-11.mit.edu:~ftp/pub/linux/packages/MGR, which is a mirror of the
|
|
> Cologne directory.
|
|
|
|
VIII.35) I have successfully compiled MGR, but when I try to run the
|
|
program I get "can't find mouse" or "already in use", any clue?
|
|
|
|
ANSWER: try the following "mgr -m /dev/ttys1" if the mouse is on
|
|
the serial 1. Another possibility is to link /dev/mouse with
|
|
/dev/ttys1 (assuming your mouse is on serial 1). Or if it's a bus
|
|
mouse, "mknod /dev/mouse c 10 0" once.
|
|
|
|
VIII.36) Any tips for MGR?
|
|
|
|
ANSWER: Well, I have tried it on my 386Sx Ega/Vga; the screen is Ok
|
|
but the Logitech mouse I have is not well recognized.
|
|
|
|
BTW check the major/minor number for pty's; they should be character
|
|
device with 4 as major and 128 and bigger as minor:
|
|
ptyp0 c 4 128
|
|
ptyp1 c 4 129
|
|
...
|
|
ttyp0 c 4 192
|
|
ttyp1 c 4 193
|
|
|
|
VIII.37) What's about X11 ?
|
|
|
|
ANSWER: See the section XII. devoted to X11 in this FAQ.
|
|
|
|
|
|
===================8<==========>8================
|
|
|
|
|
|
Newsgroups: comp.os.linux,comp.os.linux.announce,news.answers,comp.answers
|
|
Distribution: world
|
|
Followup-To: poster
|
|
From: corsini@labri.greco-prog.fr
|
|
Reply-To: linux@numero6.greco-prog.fr
|
|
Organization: Greco Prog. CNRS & LaBRI, Bordeaux France
|
|
Subject: Linux Frequently Asked Questions 4/4 [monthly posted]
|
|
Summary: Linux, a small and free unix-like for 386-AT computers.
|
|
|
|
Archive-name: linux-faq/part4
|
|
Last-Modified: 93/03/28
|
|
Version: 1.17
|
|
|
|
*********************************************************
|
|
* *
|
|
* Answers to Frequently asked questions about Linux *
|
|
* *
|
|
*********************************************************
|
|
|
|
This post contains Part 4 of the Linux FAQ (4 parts).
|
|
It must be read *after* the 3 first parts.
|
|
|
|
===================================8<====>8============================
|
|
CONTENTS (of this part)
|
|
|
|
IX. GCC MISC INFORMATION (part4)
|
|
X. SCSI SPECIAL (part4)
|
|
XI. NETWORKING and LINUX (part4)
|
|
XII. X11, THE MAXIMUM and MORE (part4)
|
|
XIII. EMACS for LINUX (part4)
|
|
|
|
===================================8<====>8============================
|
|
|
|
|
|
|
|
|
|
IX. GCC MISC INFORMATION
|
|
========================
|
|
|
|
**** Last update 93/03/26
|
|
|
|
|
|
IX.A. HLU Information
|
|
IX.B. OTHERS
|
|
|
|
|
|
IX.A. HLU Information
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
The official release of GCC for Linux is 2.3.3.
|
|
This section includes:
|
|
README.gccdisk
|
|
FAQ of gcc written by HLU
|
|
|
|
|
|
|
|
IX.01) I don't know how to install gcc stuff, is there special
|
|
places?
|
|
|
|
ANSWER: This is the README.gccdisk
|
|
|
|
Linux GNU C/C++ [HJ release]
|
|
|
|
Introduction
|
|
------------
|
|
This is GNU C/C++ 2.3.3. It is linked with jump table 4.2. You should use
|
|
it with the Linux C library disks since the C/C++ compiler has no shared
|
|
images, which are required by all the binaries in it. It consists of
|
|
2 minix disks, which will fit on either 5.25" or 3.5" floppies.
|
|
|
|
It is on tsx-11.mit.edu under pub/linux/GCC/gccdisk
|
|
|
|
|
|
Distribution File Format
|
|
------------------------
|
|
There are two files, each of which goes on one disk
|
|
|
|
A. Disk 1 (gcc233a.Z)
|
|
|
|
This contains gcc, cpp, cc1 and crt0.o/gcrt0.o. There are also some header
|
|
files in /usr/lib/gcc-lib/i386-linux/2.3.3/include.
|
|
|
|
B. Disk 2 (gcc233b.Z)
|
|
|
|
This disk contains cc1plus.
|
|
|
|
|
|
Installing on the Hard Drive
|
|
----------------------------------------
|
|
1. uncompress base[1|2].Z.
|
|
2. rawrite or dd each file to a formatted floppy disk.
|
|
|
|
Now you have made a copy of gcc 2.3.3 on two floppies. To copy each
|
|
floppy to your hd, you should mount the floppy and copy its contents to
|
|
your hard drive. You can do this by:
|
|
|
|
mount /dev/fd[0|1] /mnt
|
|
cd /mnt
|
|
for d in bin dev etc usr
|
|
do
|
|
if [ -d $d ]; then
|
|
cp -av $d /
|
|
fi
|
|
done
|
|
|
|
Note: This may overwrite some files on your hard disk.
|
|
|
|
Thanks.
|
|
|
|
H.J.
|
|
hlu@eecs.wsu.edu
|
|
12/31/92
|
|
|
|
|
|
IX.02) What compiler should I use for Linux?
|
|
|
|
ANSWER: You should only use the same version on tsx-11.mit.edu under
|
|
/pub/linux/GCC. If you want to use the testing release, first join
|
|
the GCC channel on the Linux mailing list, and then send a note to
|
|
hlu@eecs.wsu.edu. Don't use gcc older than the one on tsx-11.mit.edu.
|
|
|
|
IX.03) Where is the latest official gcc 2.xx for Linux?
|
|
|
|
ANSWER: It's on tsx-11.mit.edu under /pub/Linux/GCC and under
|
|
pub/linux/GCC. You may find it on the other sites. Since gcc 2.3.3,
|
|
you can compile it yourself out of box from any gnu ftp sites. Just
|
|
unpack the source code and do
|
|
|
|
configure [i386-linux|i486-linux]
|
|
|
|
You should follow the instructions in INSTALL.
|
|
|
|
IX.04) Where is the latest official Linux C library?
|
|
|
|
ANSWER: It's on tsx-11.mit.edu under /pub/Linux/GCC and under
|
|
pub/linux/GCC. You may find it on the other sites.
|
|
|
|
IX.05) What are the contents of them?
|
|
|
|
ANSWER: Please read the current release note and ChangeLog for
|
|
details.
|
|
|
|
IX.06) How do I install them?
|
|
|
|
ANSWER: Read README and release notes.
|
|
|
|
IX.07) What are the main differences with the old release?
|
|
|
|
ANSWER: Read README and release notes.
|
|
|
|
IX.08) Can I use the old version of gcc?
|
|
|
|
ANSWER: Please get rid of gcc older than gcc 2.2.2. Starting from
|
|
gcc 2.2.2, you can do
|
|
|
|
gcc -V xxxx
|
|
|
|
where xxxx is the version number. Please read `release.xxxx' for
|
|
detail. There is one catch in gcc 2.2.2d, setjmp/longjmp is changed,
|
|
so the old header files is not compatible with gcc 2.2.2. Before you
|
|
install gcc 2.2.2d, please do
|
|
|
|
cp /usr/include/setjmp.h /usr/lib/gcc-lib/i386-linux/2.2.2/include
|
|
|
|
where /usr/include/setjmp.h is come with gcc 2.2.2.
|
|
|
|
IX.09) Can I delete the old shared image in /lib?
|
|
|
|
ANSWER: Since the Linux C library version 4.3, we have introduced the
|
|
dynamically linked library. There is no need to keep old shared images
|
|
in /lib if none of your binaries are linked with the classic shared
|
|
library which has been obsolete. You can just keep one version of
|
|
the shared image in /lib which has the highest major and minor
|
|
release numbers for each shared library. The name of the shared image
|
|
is "xxxxxxxxxxxxxxx.so.major.minor".
|
|
|
|
IX.10) Is stdio ANSI compatible?
|
|
|
|
ANSWER: Yes, please test it.
|
|
|
|
IX.11) Is g++ in 2.xx?
|
|
|
|
ANSWER: Yes.
|
|
|
|
IX.12) Where can I get the gcc manual?
|
|
|
|
ANSWER: You can get man pages and manual come with the gcc source code
|
|
on any gnu ftp sites. You should find gcc-man.tar.z on tsx-11 which
|
|
has man pages for gcc.
|
|
|
|
IX.13) What options can I use for gcc?
|
|
|
|
ANSWER: Read the manual. There is one special flag for Linux, -static
|
|
tells gcc to use the static libraries. The default is the jump table
|
|
version of shared libraries.
|
|
|
|
IX.14) How can I debug the C code?
|
|
|
|
ANSWER: Read the gcc/gdb manuals. The simple way to do is
|
|
|
|
gcc -g foo foo.c
|
|
gdb foo
|
|
|
|
IX.15) Where is the source code of the new libc.a?
|
|
|
|
ANSWER: The same place you find this file. It is called
|
|
libc-xx.yy.tar.z.
|
|
|
|
IX.16) Why does g++ complain, even die?
|
|
|
|
ANSWER: You need "expr", which is in GNU shell utilities 1.6, echo (?)
|
|
and sed.
|
|
|
|
IX.17) How do I generate code for 486?
|
|
|
|
ANSWER: Add -m486 to CFLAGS.
|
|
|
|
IX.18) I heard malloc (0) wouldn't work with Linux, what should I
|
|
do?
|
|
|
|
ANSWER: It *does* work in a manner which POSIX allows; unfortunately,
|
|
pre-POSIX code frequently assumes that malloc(0) will not return
|
|
0 -- the standard version of malloc under Linux *does* return 0.
|
|
By including <stdlib.h>, you get a definition of malloc which behaves
|
|
more traditionally. If you define NO_FIX_MALLOC, then you will get
|
|
the default (non-traditional) form. If you are trying to develop POSIX
|
|
compliant code under Linux, you should probably define NO_FIX_MALLOC to
|
|
ensure that your code doesn't make assumptions about malloc() which
|
|
will not work on other systems. (Note: NO_FIX_MALLOC is specific to
|
|
Linux.)
|
|
|
|
(Provided by Phil.Richards@prg.oxford.ac.uk. Thanks.)
|
|
|
|
IX.19) Why does gcc say "xxxxx..h not found"?
|
|
|
|
ANSWER: see QUESTION: What are the contents of them?
|
|
|
|
IX.20) I really followed every step in the documentation, but when
|
|
I do "make", why does it say "don't how to make xxxxxx"?
|
|
|
|
ANSWER: The dependency in Makefile is dated, you need to make a new
|
|
one. Please get some guide on make and read Makefile. For the kernel
|
|
sources, please do
|
|
|
|
cd src/linux
|
|
make dep
|
|
|
|
IX.21) How do I compile programs under Linux?
|
|
|
|
ANSWER: The Linux C library is trying to be ANSI/POSIX compliant. It
|
|
is also very compatible with SYSV and BSD. The C library is loaded
|
|
with SYSV and BSD functions. There are three exceptions:
|
|
|
|
1. signal in Linux is POSIX.
|
|
2. tty in Linux is POSIX.
|
|
3. time functions are POSIX, plus a few BSD and SYSV extensions.
|
|
4. setjmp/longjmp functions are POSIX. But you can use -D__FAVOR_BSD
|
|
to make it BSD or use sigsigjmp/siglongjmp.
|
|
|
|
When you compile a program under Linux, your best bet is include all
|
|
the appropriate header files and use -Wall. All the usable functions
|
|
and global variables are declared in the corresponding header files.
|
|
YOU SHOULD NOT DEFINE ANY functions or global variables OF THE LINUX C
|
|
LIBRARY IN YOUR CODE IF YOU WANT TO USE THE SHARED LIBRARIES.
|
|
|
|
After saying all those, you now should know you can compile a program
|
|
with -D_POSIX_SOURCE or -D_GNU_SOURCE (read <features.h> for details).
|
|
With a few modifications you can even use -DSYSV, -DUSG or -DBSD. Some
|
|
codes need to define -DSTDC_HEADERS for ANSI C compiler like gcc here.
|
|
|
|
To use malloc () and calloc () safely under Linux, please include
|
|
|
|
<stdlib.h> and don't define NO_FIX_MALLOC.
|
|
|
|
BTW, gcc -traditional should work with gcc 2.2.2d or above.
|
|
|
|
Please also read ChangeLog for the latest enhancement.
|
|
|
|
Please read the header files for details. Maybe you should get a book
|
|
on POSIX. Any suggestion of the book list?
|
|
|
|
>From Steve Robbins -- steve@nyongwa.cam.org
|
|
|
|
--------
|
|
I like "POSIX Programmer's Guide", by Donald Lewine. Its essentially
|
|
a list of POSIX functions' man pages, with a very brief guide in the
|
|
beginning of a few things. It's published by O'Reilly & Associates,
|
|
Inc.
|
|
--------
|
|
|
|
IX.22) How can I get bsd style signal?
|
|
|
|
ANSWER: Use -D__USE_BSD_SIGNAL.
|
|
|
|
IX.23) Why does a program that should only poll for input become
|
|
a CPU hog?
|
|
|
|
ANSWER: The select() system call. The timeout parameter was classically
|
|
used read-only by the system. Some manual pages already notes three
|
|
years ago:
|
|
|
|
select() should probably return the time remaining from
|
|
the original timeout, if any, by modifying the time value
|
|
in place. This may be implemented in future versions of
|
|
the system. Thus, it is unwise to assume that the timeout
|
|
pointer will be unmodified by the select() call.
|
|
|
|
If you do not take this advice seriously you get a zero timeout written
|
|
back to your timeout structure, which means that future calls to
|
|
select() using the same timeout structure will immediately return.
|
|
|
|
Fix:
|
|
Put the timeout value into that structure every time you call select().
|
|
Change code like
|
|
|
|
struct timeval timeout;
|
|
timeout.tv_sec = 1; timeout.tv_usec = 0;
|
|
while (some_condition)
|
|
{ select(n,readfds,writefds,exceptfds,&timeout); }
|
|
|
|
to
|
|
|
|
struct timeval timeout;
|
|
while (some_condition)
|
|
{ timeout.tv_sec = 1; timeout.tv_usec = 0;
|
|
select(n,readfds,writefds,exceptfds,&timeout);
|
|
}
|
|
|
|
IX.24) When a program is stopped using Ctrl-Z and then restarted,
|
|
or in other situations that generate signals: Ctrl-C interruption,
|
|
termination of a child process etc. why does it complain about
|
|
"interrupted system call" or "write: unknown error" or things like that.
|
|
|
|
ANSWER: The system call the program was executing has been interrupted
|
|
to process the signal, and then it returned -1 and set errno = EINTR.
|
|
The program then was likely to draw bad conclusions from that.
|
|
|
|
Explanation: Your program has signal handlers installed, using
|
|
signal() or sigaction(). When the signal occurred, your signal handler
|
|
was invoked. In other Unix systems, this usually happens asynchronously
|
|
or in a few slow system calls:
|
|
|
|
When a signal is caught during the execution of system calls such as
|
|
read(2), write(2), open(2) or ioctl(2) on a slow device (such as a
|
|
terminal, but not a file), during a pause(2) system call or a wait(2)
|
|
system call that does not return immediately because a previously
|
|
stopped or zombie process already exists, the signal-catching
|
|
function is executed and the interrupted system call then returns a
|
|
-1 to the calling process with errno set to EINTR.
|
|
|
|
Linux (following POSIX) checks for signals and may execute signal
|
|
handlers
|
|
* asynchronously (at a timer tick),
|
|
* on return from *any* system call,
|
|
* during the execution of the following system calls:
|
|
select(),
|
|
pause(),
|
|
connect(), accept(),
|
|
read() on terminals or sockets or pipes or /proc files,
|
|
write() on terminals or sockets or pipes or line printer,
|
|
open() on FIFOs or PTYs or serial lines,
|
|
ioctl() on terminals,
|
|
fcntl() with command F_SETLKW,
|
|
wait4(),
|
|
syslog(),
|
|
any TCP or NFS operations.
|
|
[For other operating systems you may have to include the system calls
|
|
creat(), close(), getmsg(), putmsg(), msgrcv(), msgsnd(), recv(),
|
|
send(), wait(), waitpid(), wait3(), tcdrain(), sigpause(), semop()
|
|
to this list.]
|
|
|
|
In the last two cases and assuming the program's signal handler returns,
|
|
the system call returns -1 and sets errno to EINTR.
|
|
|
|
If the SA_INTERRUPT flag is not set for the corresponding signal,
|
|
however, in most cases the system call is automatically restarted
|
|
(continued) after execution of the signal handler, and your program
|
|
won't see any EINTR.
|
|
|
|
You may ask why this is not the default behavior when the default
|
|
Linux signal () is used to install the signal handler. This is because
|
|
POSIX adopted this. As for which one is better, it is a matter of
|
|
opinion.
|
|
|
|
Note that in some versions of BSD Unix the default behavior is to
|
|
restart system calls. To get system calls interrupted you have to use
|
|
the SA_INTERRUPT flag.
|
|
|
|
Fix:
|
|
Either add -D__USE_BSD_SIGNAL to your CFLAGS. Or for every signal
|
|
handler that you install with signal(), use sigaction() instead,
|
|
without setting SA_INTERRUPT.
|
|
|
|
Note that while this applies to most system calls, you must still check
|
|
for EINTR on read(), write(), ioctl(), select(), pause(), connect().
|
|
You may do it like this:
|
|
|
|
int result;
|
|
while (len > 0)
|
|
{ result = read(fd,buffer,len);
|
|
if (result < 0) break;
|
|
buffer += result; len -= result;
|
|
}
|
|
-->
|
|
int result;
|
|
while (len > 0)
|
|
{ result = read(fd,buffer,len);
|
|
if (result < 0) { if (errno != EINTR) break; }
|
|
else { buffer += result; len -= result; }
|
|
}
|
|
|
|
and
|
|
|
|
int result;
|
|
result = ioctl(fd,cmd,addr);
|
|
-->
|
|
int result;
|
|
do { result = ioctl(fd,cmd,addr); }
|
|
while ((result == -1) && (errno == EINTR));
|
|
|
|
|
|
|
|
|
|
IX.B. OTHERS
|
|
~~~~~~~~~~~~
|
|
|
|
IX.25) I seem to be unable to compile anything with gcc. Why?
|
|
|
|
ANSWER: If you have only 2 MB RAM, gcc will die silently without
|
|
compiling anything. You must have at least 4 MB to do compilations
|
|
|
|
BTW Since swapping is possible, I have heard that compilation works
|
|
with only 2Meg and a lot disk traffic :) Isn't it great?
|
|
|
|
|
|
IX.26) gcc complains about not finding crt0.o and the system
|
|
include files What am I doing wrong ?
|
|
|
|
ANSWER: The include files normal place is in /usr/include. lib*.a and
|
|
*.o should be in /usr/lib or /usr/local/lib
|
|
|
|
|
|
IX.27) I tried to port a /new/ version of gnu stuff. But in the
|
|
linking phase, gcc complains about the missing libg.a.
|
|
|
|
|
|
ANSWER: Yes this is well known for compiler version earlier than
|
|
2.2.2, throw away the flag -g that's all, anyway libg.a is /only/ for
|
|
debugging purpose.
|
|
|
|
|
|
IX.28) How to compile programs which may be debugged with gdb?
|
|
|
|
ANSWER: There are different ways to handle this problem. If
|
|
you have the gcc2.2.2 or later it's simple, use the -g flag. Otherwise
|
|
there are different possibilities:
|
|
1) As there is no libg.a, you should throw away the -g flag in link
|
|
phase, this means that the compilation must be done in two steps
|
|
example: instead of "gcc -g monprog.c -o monprog", use the following
|
|
"gcc -g -c monprog.c" and then "gcc -o monprog monprog.o"
|
|
Alas this method is not that good if you are using Makefile.
|
|
2) The other way is to create an empty libg.a as follows (Peter
|
|
MacDonald trick):
|
|
- create libfake.c containing libgfake() {}
|
|
- compile it with: gcc -c libfake.c
|
|
- create the libg.a with: ar r libg.a libfake.o
|
|
2bis) The more tricky Humberto method:
|
|
cd /usr/lib
|
|
ranlib libg.a
|
|
|
|
then gcc -g monprog.c -o monprog will produce a debuggable monprog
|
|
|
|
|
|
IX.29) When compiling some code, cc1 complains about some insn
|
|
code, what's that?
|
|
|
|
ANSWER: An insn is an internal representation that gcc uses when
|
|
compiling. The main part of gcc is to take ordinary c (or c++) code,
|
|
and compile it, while ding optimizations in insn part, which is
|
|
soft/hard independant. Then another part which is hard/Os dependant
|
|
takes the insns and translate it in assembly language. The fix is only
|
|
to turn off the optimization flag (-O).
|
|
|
|
|
|
IX.30) When compiling #$@!, I've got some problems with "SIGBUS"
|
|
signal that doesn't exist. Any clue ?
|
|
|
|
ANSWER: (Louis J. LaBash, Jr.) SIGBUS is a common problem, its not
|
|
needed, just comment it all out, something like:
|
|
|
|
#ifdef SIGBUS
|
|
.. normal sigbus code ..
|
|
#endif
|
|
|
|
IX.31) How can I write codes suitable for building shared library ?
|
|
|
|
ANSWER: (Eric Youngdale, eric@tantalus.nrl.navy.mil, 3/1/93)
|
|
|
|
In general there are very few restrictions as long as you are using the
|
|
new tools for building sharable libraries. Before the DLL libraries were
|
|
available there were all kinds of things you had to watch out for, but
|
|
currently you can more or less build a sharable library out of the box
|
|
without making any source code modifications. See the README in the
|
|
tools-m-n.tar.z distribution for more information on how to build a
|
|
sharable library.
|
|
|
|
|
|
|
|
X. SCSI SPECIAL
|
|
===============
|
|
*** This section is written by Drew Eckhardt, mail him for
|
|
*** information, questions related to this section.
|
|
*** Last update March 1993.
|
|
|
|
X.01) What hardware is supported?
|
|
|
|
ANSWER: The Adaptec 154x, Adaptec 174x, Future Domain 8xx (TMC
|
|
950 based boards?), 16x0, Seagate ST0x, Ultrastor 14F (Some of the
|
|
new ALPHA code makes attempts to deal with the 34F), and Western Digital
|
|
7000 are supported. Various Adaptec clones from Bustek and Future Domain are
|
|
known to work, in both ISA and EISA flavors.
|
|
|
|
Some of the SCSI drivers will not autodetect your SCSI host if the
|
|
BIOS is disabled, and there may be IRQ, DRQ, address restrictions
|
|
compiled into the distribution kernel.
|
|
|
|
Virtually all SCSI disks, CD ROMS, and tapes should work.
|
|
|
|
X.02) What hardware is not supported?
|
|
|
|
ANSWER: The Adaptec 152x, Always IN-2000, DTC, Mylex, and Ultrastor 24F,
|
|
PS/2 SCSI boards, and all SCSI ports on sound boards.
|
|
|
|
If you want to run Linux on this hardware, you'll have to get technical
|
|
docs on it, and write a driver yourself or bribe someone to do it.
|
|
|
|
X.03) How do I get SCSI information?
|
|
|
|
ANSWER: Subscribe to the SCSI channel of the linux-activists mailing list.
|
|
mail linux-activists@joker.cs.hut.fi
|
|
And put in the header.
|
|
X-MN-Admin: join SCSI
|
|
|
|
|
|
X.04) Where is the latest version maintained?
|
|
|
|
ANSWER: tsx-11.mit.edu:/pub/linux/ALPHA/scsi
|
|
|
|
Please join the SCSI channel of linux-activists@joker.cs.hut.fi before you
|
|
grab anything.
|
|
|
|
|
|
eric@tantalus.nrl.navy.mil (Eric Youngdale) added scatter/gather support
|
|
to the SCSI drivers, and changed around the internal structures to get
|
|
something that works as "version 2"
|
|
|
|
X.05) I've found one of the following bugs :
|
|
|
|
- I can't swap to a SCSI disk, or mount one as /
|
|
|
|
- I get a READ CAPACITY FAILED message on bootup.
|
|
|
|
- I have a removeable disk (ie Sysquest) and have problems when I change
|
|
media.
|
|
|
|
- I have a Seagate / Future Domain TMC-88x and the kernel panics with a
|
|
kernel paging message.
|
|
|
|
- I have an Adaptec 1742 and am experiencing data corruption
|
|
|
|
- I have an Insite floptical drive and it won't work.
|
|
|
|
- I have a TANDBERG TDC 3600 revision U07, SONYCD-ROM CDU-541 revision
|
|
4.3d, DENON DRD-25X revision V, or a SEAGATE ST296 revision
|
|
921 and the system hangs or reports multiple devices.
|
|
|
|
ANSWER: All of these bugs have been fixed, so UPGRADE. The first one
|
|
was due to a race condition. The fourth was caused by a kernel stack overflow.
|
|
The Adaptec problem was caused by a firmware bug in 1540 mode. The last two
|
|
were caused by SCSI devices that weren't compliant.
|
|
|
|
X.06) What do I do if I find a bug that still looks like a
|
|
bug after I've read the FAQ?
|
|
|
|
ANSWER: Your best bet is to send it to the SCSI channel of the mailing list,
|
|
where it will be seen by all of the people who've contributed to the
|
|
SCSI drivers.
|
|
|
|
In your bug report, please provide as much information as possible
|
|
regarding your hardware configuration, and all of the messages that
|
|
Linux prints when it boots. Your chances of getting the bug fixed increase
|
|
exponentially with the amount of information provided.
|
|
|
|
The bottom line is that if we can't reproduce your bug, and you can't
|
|
point at us what's broken, it won't get fixed.
|
|
|
|
X.07) What SCSI disks are supported?
|
|
|
|
ANSWER: Disks up to two terabytes in size will work, since the sd driver
|
|
switches to 10 byte reads when necessary.
|
|
|
|
Flopticals, Bernoulis, Sysquests, and other removeable media devices
|
|
are supported by the normal SCSI disk driver.
|
|
|
|
X.08) What about CD ROMS?
|
|
|
|
ANSWER: CD ROMS are supported. The ISO-9660 file system with Rockridge
|
|
extensions is supported. You will have to make sure that you have
|
|
configured the kernel to include the isofs filesystem or otherwise you
|
|
will not be able to use the cdrom.
|
|
|
|
X.09) What about SCSI tapes ?
|
|
|
|
ANSWER: Tapes are supported. You may wish to obtain the utility program mt,
|
|
which is usually available from tsx-11.mit.edu in pub/linux/ALPHA/scsi.
|
|
|
|
|
|
X.10) How do I partition the disk?
|
|
|
|
ANSWER: Use fdisk, efdisk, pfdisk or the DOS parititioning program of
|
|
your choice.
|
|
|
|
X.11) The linux partitioning programs don't work.
|
|
|
|
ANSWER: Some of these default to /dev/hd*, which are disks on
|
|
WD-1003 compatable controllers (IDE, MFM, RLL, ESDI, etc), rather
|
|
than /dev/sd* (SCSI disks). Your solutions are to
|
|
|
|
1. Call the partitioning program with a device name, ie
|
|
pfdisk /dev/sda
|
|
|
|
2. Make links from /dev/hd* to /dev/sd*.
|
|
|
|
X.12) My partitioning program can't figure out the disk geoemetry
|
|
|
|
The problem with partitioning SCSI disks and Linux is that Linux talks
|
|
directly to the SCSI interface. Each disk is viewed as the SCSI host
|
|
sees it : N blocks, numbered from 0 to N-1, all error free. There is
|
|
no portable way to get disk geometry.
|
|
|
|
However, DOS doesn't like things like this, it demmands that BIOS
|
|
present it with a normal Cylinder / Head / Sector coordinates. So,
|
|
BIOS does, and it comes up with some fabrication that fits what DOS
|
|
wants to see. You don't want to disagree with what BIOS thinks when
|
|
you write the partition table.
|
|
|
|
The newest SCSI code will return the mapped geometry for some host
|
|
adapter / disk combinations. Kernel release 0.99 and later should have
|
|
this capability.
|
|
|
|
QUESTION : I can't make a filesystem on /dev/hd*
|
|
|
|
ANSWER : /dev/hd* aren't your SCSI disks. /dev/sd* are.
|
|
See below for approproate major / minor numbers if they
|
|
do not exist on your root diskette.
|
|
|
|
|
|
X.13) What are the major / minor numbers for SCSI drives?
|
|
|
|
ANSWER: Because of the large number of devices that can be hung off of
|
|
a SCSI bus (as many as 56 if you use SCSI fanouts or bridge boards),
|
|
and the possibility of 16 partitions on a SCSI disk, we'd run out of
|
|
minor numbers if they were statically allocated - so a dynamic
|
|
numbering scheme is used.
|
|
|
|
Block device major 8 is used for SCSI drives, 11 for CD-ROMs.
|
|
Character device major 9 is used for SCSI tapes.
|
|
|
|
Minors are assigned in increments of 16 to SCSI disks as they are
|
|
found, scaning from host 0, ID 0 to host n, ID 7, excluding the host
|
|
ID. Most hosts use ID 7 for themselves.
|
|
|
|
A minor where minor mod 16 = 0 is the whole drive, where minor mod 16
|
|
is between 1 and 4, that partition, extended partitions dynamically
|
|
assigned from 5 to 15 inclusive. Note that the gendisk.c module
|
|
prints partition tables on initialization - you should be able to see
|
|
them there.
|
|
|
|
Example : I have three SCSI disks, set up as follows
|
|
Seagate ST02, ID=0
|
|
Seagate ST02, ID = 5
|
|
Adaptec 1542, ID = 0
|
|
|
|
The first disk on the seagate at ID 0 will become minors 0-15
|
|
inclusive, the second at ID5 16-31 inclusive, the disk on the
|
|
Adaptec 48-63.
|
|
|
|
X.14) My tape drive or other removeable media device isn't recognized
|
|
at boot time.
|
|
|
|
ANSWER: Try booting with a tape in the drive.
|
|
|
|
X.15) How do I reduce kernel bloat and eliminate the drivers I
|
|
don't want?
|
|
|
|
ANSWER: For kernel release 0.99 and later, just go to the to directory
|
|
in the kernel source tree, and type ``make config'', and answer the
|
|
questions. For older kernel distributions, simply #undef
|
|
CONFIG_DISTRIBUTION in include/linux/config.h, and define the macros
|
|
for the SCSI hosts you want enabled.
|
|
|
|
X.16) I get SCSI timeouts.
|
|
|
|
ANSWER: Make sure your board has interrupts enabled correctly.
|
|
|
|
X.17) The * driver doesn't work.
|
|
|
|
ANSWER: A source of difficulty is that you may be trying to run
|
|
the bus too fast. Try turning off the turbo switch for your machine,
|
|
or check the bus speed setting in your CMOS.
|
|
|
|
X.18) The Seagate / Future Domain TMC-88x driver doesn't work.
|
|
|
|
ANSWER: There are several possibilities
|
|
1) Is the board jumpered for IRQ5 ?
|
|
|
|
The factory settings are for MSDOS, and have interrupts disabled.
|
|
|
|
On the Seagate, Interrupts are controlled by the W3 (ST01) or JP3 (ST02)
|
|
jumper. Shorting pins F-G selects IRQ5.
|
|
|
|
2) Cached machines will not have problems if the Seagate's address
|
|
space (typically C8000 - CAFFFF) is not marked "non cacheable."
|
|
This applies to the i486 internal cache as well as i386/i486
|
|
external caches.
|
|
|
|
This can be set in the XCMOS of most machines. If you can't disable
|
|
cache for the Seagate's area (16K in size, starting at the base
|
|
address), then you must disable the cache entirely, otherwise
|
|
it won't work.
|
|
|
|
X.19) The Adaptec driver doesn't work.
|
|
|
|
ANSWER: A common source of difficulty is a conflict between two different
|
|
boards for an IRQ level, a DMA channel, or an I/O address. Check the
|
|
settings for the boards you have in your system (music boards are
|
|
known to use similar IRQ or I/O addresses as the Adaptec. In the new
|
|
scsi code the Adaptec can use any of the IRQ levels that it can be
|
|
strapped for, it can use I/O address 0x330 or 0x334, and it can use
|
|
DMA channels 5, 6 or 7.
|
|
|
|
|
|
X.20) When using a Seagate / Future Domain TMC-88x, why does my system
|
|
hang when syncing to disk?
|
|
|
|
ANSWER: The Seagate boards are an incredibly brain dead piece of hardware.
|
|
They can only generate an interrupt when a target raises the SEL signal.
|
|
So, as long as a target is connected, the Seagate driver must spin its
|
|
wheels waiting for the actual data transfer. Some devices agravate the
|
|
situation by connecting for long periods of time while not doing anything.
|
|
|
|
X.21) My system is dog slow (ie, 60k/sec)
|
|
|
|
ANSWER: SCSI commands have an incredible amount of overhead. For
|
|
every command, you need to arbitrate for the bus, select the target,
|
|
establish an I_T_L nexus, and send the command. Processing of that
|
|
command may take as much as 1ms on older devices. Add this overhead
|
|
to what you already have coming through the file system, buffer
|
|
cache, etc, and you have a real problem.
|
|
|
|
To work around this, we needed to maximize the amount of data that
|
|
could be transfered in a single command. So, we implemented
|
|
scatter-gather, which allows reads/writes from/to contiguous
|
|
disk sectors to non-contiguous buffers.
|
|
|
|
This typically gets you a 3-5 fold improvement in performance.
|
|
|
|
The current kernel only has scatter-gather support for
|
|
the Adaptec, Western Digital, and Future Domain 16xx boards.
|
|
However, Alpha code that provides scatter / gather for the Seagate
|
|
is available from headrest.woz.colorado.edu:/pub/linux/patches.seagate.Z,
|
|
for the Ultrastor from tsx-11.mit.edu:/pub/linux/ALPHA/scsi/ultrastor.fast.
|
|
|
|
|
|
|
|
|
|
XI. NETWORKING and LINUX
|
|
============================
|
|
*** This section should be maintained by Philip Copeland
|
|
*** (p_copela@csd.uwe.ac.uk).
|
|
|
|
|
|
XI.01) Where can I find useful information about networking for
|
|
Linux ?
|
|
|
|
ANSWER: Join the NET channel of the mailing list. Also, you need to
|
|
read the NET-FAQ by Phil Copeland, it's on sunsite and tsx-11 and
|
|
posted to c.o.l and the NET channel every couple of weeks.
|
|
|
|
Basically, all of the information on networking and TCP/IP for Linux
|
|
is in the NET-FAQ, because it's maintained seperately than this
|
|
document (and we don't want to waste the space reprinting it all
|
|
here--- it's big!).
|
|
|
|
The NET-FAQ has been completely rewritten as of Feb 1993. Get the new
|
|
version.
|
|
|
|
|
|
|
|
XII. X11 THE MAXIMUM and MORE
|
|
=============================
|
|
*** This section is maintained by Krishna Balasubramanian
|
|
*** <balasub@cis.ohio-state.edu>. Mail him if you have corrections,
|
|
*** additions, etc.
|
|
*** Last update: Sun, 21 Mar 93 17:14:00 -0500
|
|
|
|
|
|
XII.A. X386 GENERAL INFORMATION
|
|
XII.B. HARDWARE REQUIREMENTS: Supported Video cards, mice.
|
|
|
|
XII.C. LINUX DISTRIBUTION: Files required, Current version.
|
|
XII.D. LEARNING/USING X: Pointers to X documentation.
|
|
|
|
XII.E. DEBUGGING STARTUP PROBLEMS: Checklist, Screen restoration, Hanging.
|
|
XII.F. XCONFIG: Video mode settings and common errors in Xconfig.
|
|
|
|
XII.G. X-APPLICATIONS: Compiling X programs.
|
|
XII.H. BUGS
|
|
|
|
The X11 directories on linux systems are:
|
|
XLIB = /usr/X386/lib/X11/ (or /usr/lib/X11/)
|
|
XBIN = /usr/X386/bin/ (or /usr/bin/X11/)
|
|
XDOC = XLIB/etc/
|
|
|
|
cwxi = the comp.windows.x.i386unix newsgroup
|
|
Subscribe to this group if you are an xfree86 user.
|
|
|
|
|
|
XII.A. X386 GENERAL INFORMATION
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
XII.01) What is the X11 release supported by Linux?
|
|
|
|
ANSWER: It's the X11R5 (xfree86-1.2).
|
|
There are (currently separate) servers for 8514 and S3 chips.
|
|
|
|
XII.02) What is X386/xfree86?
|
|
|
|
ANSWER: X386 is the port of the X11 server to System V/386 that was
|
|
done by Thomas Roell (roell@informatik.tu-muenchen.de). It supports a
|
|
wide variety of VGA boards. X386 1.2 is included in MIT's X11R5
|
|
distribution.
|
|
|
|
The Linux X386 port was based on the stock distribution from X11R5,
|
|
from MIT and was done by Orest Zborowski (obz@sisd.kodak.com).
|
|
|
|
It has since moved to becoming part of the standard xfree86 distribution.
|
|
See the FAQ on cwxi for more information on xfree86.
|
|
|
|
XII.03) Where can I get X386 1.2 (X11R5)?
|
|
|
|
ANSWER: The X386 1.2 and xfree86 sources are available at any site that
|
|
distributes the X11R5 source (too numerous to list here, but includes
|
|
export.lcs.mit.edu)
|
|
|
|
|
|
XII.04) Any tips on compiling X11R5?
|
|
|
|
ANSWER:
|
|
- Dont do it.
|
|
- XFree86 is distributed with a link kit so you can optionally
|
|
include what you like in the server.
|
|
- Join the xfree86 beta team (how to? see cwxi FAQ)
|
|
- Instructions are in the README file in XDOC/ and the cwxi FAQ.
|
|
|
|
|
|
|
|
XII.B HARDWARE REQUIREMENTS:
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
Approx: at least 4 megs of ram + swap ...slooooww. 10 Meg disk for X.
|
|
Another 6-10 meg of disk for GCC if you want to compile X11 programs.
|
|
|
|
XII.05) What VGA boards are supported?
|
|
|
|
ANSWER:
|
|
et3000, et4000, gvga, pvga1a, wd890c00, tvga8900, ati ver. 5 or 6,
|
|
8514/A. (X386mono supports generic vga's and hercules).
|
|
|
|
Diamond cards are not supported and will not be supported. If
|
|
you are the unfortunate owner of such a card, you can probably
|
|
get the server up by booting in specific modes or using dos to
|
|
set your modes before warm booting into linux or using an
|
|
external clock setting program. You will have to bear with these
|
|
irks until you can convince diamond to alter their policy.
|
|
|
|
Standard x11v1.1 or xfree86 server:
|
|
ET3000 (for ex. GENOA 5300/5400)
|
|
ET4000 (Tricom, STB PWR Graph, Sigma Legend, etc.)
|
|
GVGA (Genoa 6400)
|
|
PVGA1A (Paradise VGA Professional)
|
|
WD90C00 (Paradise VGA 1024)
|
|
|
|
supported by xfree86:
|
|
TVGA TRIDENT 8900c, 9000, support is in xfree86
|
|
|
|
ATI ATI VGA WONDER XL and most ATI VGA WONDER PLUS
|
|
cards (chip version 5 or 6).
|
|
Courtesy Rik Faith (faith@cs.unc.edu)
|
|
|
|
Those with 8514 compatible cards may want to get
|
|
the X8514 server for speed (~2x xstones?).
|
|
|
|
MONO Any vga card should be able to use X386mono server. (At least
|
|
640x480 with 800x600 virtual). Use the vga2 section of Xconfig.
|
|
Support for hercules monochrome card (usable as 2nd display).
|
|
|
|
The following servers will usually not handle all the options supported by
|
|
xfree86. Read the documentation that comes with them carefully. They
|
|
will be merged with the xfree86 distribution in some time.
|
|
|
|
|
|
8514 ATI graphics ULTRA, ATI graphics Vantage
|
|
Should work with any VESA standard 8514/A register compatible
|
|
card? Courtesy Kevin Martin (martin@cs.unc.edu).
|
|
|
|
Scott Laird (lair@midway.uchicago.edu) writes:
|
|
I uploaded a new version of the X8514 X Server to sunsite and
|
|
tsx-11. It is in /pub/Linux/X11/X-servers/X8514/X8514scale.tar.Z
|
|
on sunsite. It's linked with version 4.2 of the jumptable libraries,
|
|
includes TCP/IP support, support for compressed bitmap fonts, Type 1
|
|
and Speedo scalable fonts. There's a README file in the same
|
|
directory that will answer more questions.
|
|
|
|
XS3 S3 chipset server (Jon Tombs jon@robots.ox.ac.uk)
|
|
Get the FAQ on ftp.robots.ox.ac.uk (pub/linux/S3 check sunsite).
|
|
|
|
Xega Generic 640x480x16 compatible server (originally for laptops).
|
|
This requires a microsoft mouse at /dev/mouse for now
|
|
and it does not use Xconfig so use environment variables
|
|
to define the font path etc. in .xinitrc:
|
|
export FONT_PATH=/usr/lib/X11/fonts/misc:/usr/lib/X11/fonts75dpi
|
|
Works better with courier fonts so add to .Xresources:
|
|
*Font: -*-courier-medium-r-*--10* ..or whatever..
|
|
A link kit is available at tsx-11 (you need gcc2.2.2).
|
|
in pub/linux/ALPHA/Xega/X386.ega.T.Z
|
|
(Obselete? Unusable? Anyone?)
|
|
|
|
|
|
WARNING: Do not try to bring up an Xserver that does not support your
|
|
hardware. There have been cases where damage has resulted from pushing
|
|
the monitor (specially fixed frequency monitors) beyond its specs.
|
|
|
|
|
|
XII.06) What Mouses are supported?
|
|
|
|
ANSWER: Serial : Logitech, Microsoft, MouseSystems .... compatibles ...
|
|
Busmouses : Logitech, microsoft, ATI_XL, PS/2 (aux).
|
|
|
|
|
|
XII.07) Does anyone have a working PS/2 mouse? Has anyone gotten the
|
|
"Mini-DIN" mouse on an HP Vectra 486/33T to work? The slight info I've
|
|
been able to find says it's PS/2 compatible.
|
|
|
|
ANSWER: First you need to create an entry in /dev for it:
|
|
|
|
mknod /dev/psaux c 10 1
|
|
|
|
There is no direct PS/2 mouse support in XFree86-1.1, so to use the
|
|
mouse with X you'll have to use the mconv mouse protocol conversion
|
|
utility, which can be found on nic.funet.fi, in
|
|
/pub/OS/Linux/utils/tools/mconv.c. This program converts the packets
|
|
sent by the PS/2 mouse into the corresponding ones from a Microsoft
|
|
mouse, so you can fool X telling it you have a Microsoft serial
|
|
mouse instead. Instructions for use are included in the source file.
|
|
(Johan Myreen jem@cs.hut.fi)
|
|
|
|
|
|
XII.08) I have trouble with my logitech Pilot mouse and X under
|
|
Linux, any clue ?
|
|
|
|
ANSWER: (Thomas Roell?) There are TWO lines of Logitech mice out there.
|
|
One is the programmable and uses MouseSystems protocol at startup.
|
|
X386 reprogramms them to use another protocol. If you specify
|
|
'Logitech' in the Xconfig, X386 assumes a mouse like C7 or S9 (notC7-M).
|
|
The second line is the MicroSoft compatible. Currently all newer
|
|
Logitech mice follows this practice, like the MouseMan. In that case
|
|
you have to say 'MicroSoft' or 'MouseMan'.
|
|
|
|
From: jliddle@rs6000.cmp.ilstu.edu (Jean Liddle)
|
|
I just purchased a new logitech mouseman, and yes, the new X-Windows
|
|
(XFree86 as opposed to X386) requires that you use the "microsoft" mousetype.
|
|
However, if you turn Third Button Emulation off, the middle button WILL work.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
XII.C. LINUX DISTRIBUTION
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
XII.09) What is the current version?
|
|
|
|
ANSWER: The newest public Linux release is xfree86-1.2.
|
|
It was compiled with gcc-2.3 (jump tables 4.3) and is available
|
|
for example at tsx-11 in pub/linux/packages/X11/XFree86-1.2/.
|
|
|
|
XII.10) What Files do I need to download?
|
|
|
|
ANSWER: For xfree86: There is a README file in the distribution directory.
|
|
Bring this down first and read it. Then get xbin, xman and xfonts.
|
|
You need xprog and xlibman only if you plan to compile X applications.
|
|
You need xkit if you want to relink the server.
|
|
|
|
**** You need The shared images libc.so.4 (4.3 or later) and libm.so.4 (4.0)
|
|
in /lib/. All the X11 binaries use these. These are available with the GCC
|
|
distribution or any new rootdisk. To compile programs you should
|
|
get gcc-2.3 or later and the 4.3 libraries.
|
|
|
|
To get a different server, see the notes in the previous section.
|
|
|
|
X11 directories in the archive sites are:
|
|
tsx-11 : pub/linux/packages/X11, pub/linux/usr.bin.X11
|
|
sunsite : pub/Linux/X11/ pub/Linux/Incoming/DLL?
|
|
|
|
|
|
XII.11) Where do the X11 files go? What are they?
|
|
|
|
ANSWER: The linux X binary distribution looks something like:
|
|
|
|
/usr/X386/
|
|
lib/
|
|
libX11.a ... (X libraries needed for compiling stuff).
|
|
X11/
|
|
config/ (template files for compiling ... xmkmf)
|
|
fonts/
|
|
misc/ , 75dpi/ ....
|
|
etc/ (documentation).
|
|
bin/ (X386, X386mono, xterm, X linked to X386).
|
|
include/X11/ (include files needed for compiling).
|
|
bitmaps/ (icons, bitmaps used by some applications).
|
|
man/
|
|
man1/, man3/, cat1/, cat3/
|
|
/lib
|
|
libX??.so.?? (Shared images needed by all X11 binaries).
|
|
|
|
|
|
Its best you do a tar -tvzf on the distribution you get or find
|
|
some means of extracting the distribution file list.
|
|
The support files include default/example Xconfig, xinitrc, twmrc
|
|
which you could copy to your HOME directory (as Xconfig, .xinitrc
|
|
and .twmrc) and edit them to define your hardware and X11 setup.
|
|
The directory XLIB/etc/ contains much documentation on how to
|
|
configure video modes.
|
|
|
|
Read the files XDOC/README and XDOC/README.Linux.
|
|
|
|
|
|
|
|
|
|
XII.D. LEARNING/USING X
|
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
XII.12) Where can I find the basic help for learning/using X ?
|
|
|
|
ANSWER: Try man X386; man Xserver; man xterm; man twm; man xinit
|
|
on any machine with X11. The man pages on xterm and twm will reflect
|
|
behaviour on Linux systems quite accurately. The others will give you
|
|
some bearing though not every option will work. These man pages are
|
|
part of the xfree86 distribution.
|
|
|
|
|
|
XII.13) What docs are available besides man pages?
|
|
|
|
ANSWER: The FAQ in comp.windows.x is extensive and has a bibliography.
|
|
There is also the Xt-FAQ. Both are available from export.lcs.mit.edu in
|
|
pub/contrib/. There is a collection of (mit) X11 documents on tsx-11
|
|
(pub/linux/doc/xdoc.tar.Z ?) or export (pub/R5-Untarred) if you are
|
|
interested in internals.
|
|
|
|
|
|
XII.14) How do I start up X?
|
|
|
|
ANSWER: Type 'startx' at the shell prompt. Before doing this you should:
|
|
0) Untar the xfree86 distribution from / (read XDOC/README, XDOC/README.Linux).
|
|
1) copy the file Xconfig.sample from the XLIB/ directory to your
|
|
HOME directory (/usr/root/Xconfig?) or to XLIB/Xconfig.
|
|
2) Edit Xconfig and set the video data for your card and monitor.
|
|
Use the clocks appropriate for your card and the modes appropriate
|
|
for your monitor for those clock values. To determine what values are
|
|
appropriate the Xconfig section below and the files in XDOC/.
|
|
3) Set the mouse device in Xconfig correctly....Use the busmouse entry
|
|
for Logitech only. For other busmouses use microsoft (try all :-).
|
|
4) Ensure that there is a termcap entry for xterm in /etc/termcap
|
|
(One is available in the subdir /doc/).
|
|
5) Ensure that the X11 binaries are in the path example:
|
|
add the line PATH=${PATH}:/usr/X386/bin to ~/.profile or
|
|
look at bash.ad in /doc/.
|
|
WARNING: NONE of the modes (in the Modes line in Xconfig) should use a
|
|
clock your monitor cannot handle.
|
|
Now type startx.
|
|
|
|
|
|
XII.15) How do I configure X .. colors, menu, keyboard?
|
|
|
|
ANSWER: makes me ... dizzy ...
|
|
server : video, keyboard
|
|
Xconfig : man X386, man Xserver, XDOC/VideoModes.doc
|
|
man X386keybd, man xset, man xmodmap.
|
|
|
|
resources: global and application preferences.
|
|
XLIB/xinit/.Xresources or ~/.Xresources : man xrdb?
|
|
|
|
twm : menus, title bars, colors .. look and feel.
|
|
~/.twmrc or XLIB/twm/system.twmrc : man twm
|
|
|
|
xinit : startup.
|
|
~/.xinitrc or XLIB/xinit/xinitrc -- man xinit
|
|
|
|
applications : XLIB/app-defaults/Xxx (also ~/.Xresources)
|
|
man xxx
|
|
|
|
You can start with files from any X11 setup. Backup the files
|
|
you change. See the FAQ on comp.windows.x.
|
|
|
|
|
|
XII.16) [suggested by Thomas Koenig]
|
|
How do I support national keyboards in X11 ?
|
|
|
|
ANSWER: Put a .Xmodmap file into the user's home directory specifying
|
|
which keys to use for what; or else replace the
|
|
/usr/lib/X11/xinit/.Xmodmap with the national keyboard keys
|
|
customized. Do man xmodmap for more details.
|
|
enclosed an excerpt of mine (french keyboard):
|
|
keycode 8 =
|
|
keycode 9 = Escape
|
|
keycode 10 = ampersand 1
|
|
keycode 11 = eacute 2 asciitilde
|
|
keycode 12 = quotedbl 3 numbersign
|
|
keycode 13 = apostrophe 4 braceleft
|
|
keycode 14 = parenleft 5 bracketleft
|
|
keycode 15 = minus 6 bar
|
|
keycode 16 = egrave 7 grave
|
|
keycode 17 = underscore 8 backslash
|
|
keycode 18 = ccedilla 9 asciicircum
|
|
keycode 19 = agrave 0 at
|
|
keycode 20 = parenright degree bracketright
|
|
keycode 21 = equal plus braceright
|
|
keycode 22 = BackSpace
|
|
keycode 23 = Tab
|
|
keycode 24 = A
|
|
........
|
|
|
|
|
|
|
|
|
|
|
|
XII.E. DEBUGGING STARTUP PROBLEMS:
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
XII.17) I cannot type in my xterm
|
|
|
|
ANSWER: /dev/console must have major=4, minor=0
|
|
rm -f /dev/console; ln /dev/console /dev/tty0
|
|
|
|
|
|
XII.18) What are some of the common omissions and errors?
|
|
|
|
ANSWER: (Peter)
|
|
1) Add /usr/X386/bin/ (or /usr/bin/X11) to your path.
|
|
|
|
2) Add the xterm termcap entry to /etc/termcap.
|
|
|
|
3) ln -s X386 X in the XBIN directory.
|
|
ln -s X386mono X (if you want to use the mono server).
|
|
|
|
4) Run X as root first. This avoids some trivial problems.
|
|
|
|
5) If you change the font path entry .... X386 is finicky about
|
|
the syntax.
|
|
|
|
6) Make sure your mouse entry in Xconfig points to a legitimate serial
|
|
device (or busmouse)... usually something like: microsoft "/dev/ttyS1"
|
|
serial devices have major # 4 minor 64,65 ... busmouses are major 10.
|
|
ls -l in /dev will show you the major and minor entries.
|
|
|
|
7) Need read/write/exec access to /tmp directory
|
|
|
|
8) Use startx 2> x.err to log your error messages. If the server sticks
|
|
and you have to reboot you'll probably loose this stuff... see notes
|
|
on `hanging' below.
|
|
|
|
9) You must have a free vt (eg. /dev/tty5 with no getty (see /etc/rc)).
|
|
|
|
10) Delete /tmp/.Xn-lock if recovering from a crash.
|
|
|
|
11) Note the new probeonly option for the server (man X386):
|
|
startx -- -pn -probeonly
|
|
|
|
12) See Xconfig problems and the device list below.
|
|
|
|
|
|
|
|
XII.19) Why is the server unable to find some of the fonts?
|
|
|
|
ANSWER: First check that the directories listed in the font path exist
|
|
and have font files in them. Some of the servers are not set up to use
|
|
compressed fonts. In such cases you have to uncompress the fonts in the
|
|
directory and run `mkfontdir .`. Read the man page on mkfontdir.
|
|
|
|
|
|
XII.20) My server "hangs" Why?
|
|
|
|
ANSWER: (Peter) Quite often it isn't a hang. If the server grabs the
|
|
screen(and enters graphics mode) and then dies, it may return you to
|
|
bash *without* restoring the screen. In other words, just because you
|
|
see no output, don't assume it's running/hanging. The way to test
|
|
this is to see if you can use a bash command to spin your disk. eg.:
|
|
sync; ls -l /bin.
|
|
|
|
Also - I *suspect* that (at least for me), you can kill the
|
|
server if you include the servernum option in the Xconfig (Obselete?)
|
|
|
|
You can kill the server when you want to by typing ctrl-alt-backspace.
|
|
Then a couple of ctrl-C 's in case your stuck in xinit.
|
|
|
|
The two line message
|
|
X386 version .....
|
|
(protocol Version ....
|
|
is returned from the X386 programme itself, so if you get
|
|
this (or if the screen blanks) X must be starting.
|
|
|
|
|
|
XII.21) When I started X11 I got "Cannot connect to
|
|
server" or "process does not exist", any clue ?
|
|
|
|
ANSWER: The cause might be wrong fontpath variable setup in your
|
|
Xconfig; uncomment and set the correct fontpath variable.
|
|
|
|
|
|
XII.22) Why cant I run more than 4 xterms?
|
|
How can I have more than 4 pty's ?
|
|
|
|
ANSWER: set the number in the header include/linux/tty.h and
|
|
recompile the kernel. Also make nodes :
|
|
mknod /dev/ptypxx 4 minor (where minor = 128 + xx)
|
|
mknod /dev/ttypxx 4 minor (minor = 192 + xx)
|
|
This is for before linux-0.97pl6.... for later versions
|
|
you only need to make the nodes.
|
|
|
|
|
|
|
|
XII.23) How does X11 start up?
|
|
|
|
ANSWER: The startup involves the server (XBIN/X), and some
|
|
programs like startx and xinit.
|
|
|
|
Typing startx runs the script XBIN/startx. Look through startx.
|
|
For explanation of the server arguments try man Xserver.
|
|
startx does little other than gather arguments and then call xinit.
|
|
|
|
xinit runs the server X (X is linked to X386) and the client programs
|
|
specified in ~/.xinitrc. xinit continues to run, and is often the
|
|
source of the error messages you see when you exit. If you get the
|
|
message "giving up", it means X has died (quite probably it died
|
|
immediately) and xinit has been unable to start clients from the
|
|
xinitrc script. (The scripts must be executable).
|
|
|
|
|
|
|
|
XII.24) How can I see what startx passes to xinit, and xinit to X?
|
|
|
|
ANSWER: Add the line: set -x near the top of startx.
|
|
|
|
To see what xinit passes to X, try: (Peter)
|
|
|
|
rm XBIN/X
|
|
- yes, if you have set it up correctly, X should only be a link
|
|
so it's safe to remove it.
|
|
|
|
then create a shell script XBIN/X containing:
|
|
#/bin/sh
|
|
echo $*
|
|
and run startx. You should see something like:
|
|
X :0
|
|
which is all xinit passes to X. If you don't see the :0, you may not
|
|
have your DISPLAY=":0" set correctly. THEN RESTORE X!! :
|
|
cd XBIN; rm X; ln -s X386 X
|
|
|
|
|
|
XII.25) What devices does X depend on:
|
|
|
|
ANSWER: check your device numbers with ls -l /dev. You should have:
|
|
|
|
5 0 tty
|
|
4 0 tty0
|
|
4 0 console
|
|
4 1 tty1 (etc) virtual consoles (vt's) : eg. startx -- vt8
|
|
1 1 mem
|
|
|
|
4 128 ptyp0 pseudo ttys used by xterm/emacs etc
|
|
4 129 ptyp1 (etc) to talk to unix programs.
|
|
4 192 ttyp0
|
|
4 193 ttyp1 (etc)
|
|
|
|
4 64 ttyS1 one of these is the mouse
|
|
4 65 ttyS2 or you have a busmouse.
|
|
10 x mouse busmouse x = 0 => logitech 1 => ps/2 (aux)
|
|
2 => microsoft 3 => ATI_XL.
|
|
/tmp/.X11-unix/Xn n = display number. Socket used by X11 programs to
|
|
talk to the server. This is created by X386.
|
|
/tmp/.Xn-lock n = display number. Lock file.
|
|
|
|
Note that unix programs dont expect standard names for serial devices
|
|
and mice. So you can give these devices any name as long as you tell
|
|
the server what its called (in Xconfig).
|
|
|
|
|
|
|
|
XII.F. Xconfig: Xconfig and Video mode settings.
|
|
~~~~~~~~~~~~~~~
|
|
XII.26) What do the mode names in Xconfig mean?
|
|
|
|
ANSWER: Mode names like "640x480" are used to match entries in
|
|
the modes line with the modeDB entry which actually defines the mode.
|
|
You can toggle between modes in the modes line with ctrl-alt-numericplus.
|
|
If you're experimenting with 640x480 you can define
|
|
modes "640x480a" "641x480b" "642x480c"
|
|
with different entries for each under ModeDB so you can toggle between
|
|
these three modes.
|
|
|
|
XII.27) How do I compute the numbers for the video modes?
|
|
|
|
ANSWER: See if there is an entry that matches your chip/monitor in
|
|
XDOC/modeDB.txt. Use the clock entries for your chip
|
|
and the mode entry for that clock appropriate for your monitor.
|
|
If you cant find a mode entry for a particular clock 'needed_clock'
|
|
but can find a mode entry (for your monitor) for a nearby clock value
|
|
'found_clock', scale all numbers in the modeDB entry by
|
|
(needed_clock/found_clock). Read XDOC/VideoModes.doc
|
|
|
|
|
|
XII.28) How can I determine the clocks on the video chip?
|
|
Where can I find clock.exe or clock.pas ?
|
|
|
|
ANSWER: The XFREE Team discourages the use of clocks.exe and wants it
|
|
to be removed from all docs, since the new Server is better at
|
|
guessing the clocks than clocks.exe.
|
|
|
|
You can get X to tell you what it finds by commenting the clocks entry
|
|
in Xconfig. Use 'startx -- -probeonly 2> x.err' to log the output.
|
|
If X starts up this file gets the clocks only after you exit.
|
|
|
|
I strongly advise using the 'modegen' spreadsheets to generate the
|
|
appropriate settings. If I remember correctly you can find them in
|
|
'pub/linux/packages/SLS/x4' called modegen.taz or something equally
|
|
as obvious ... Good luck. (Andy asb@cs.nott.ac.uk)
|
|
|
|
The clocks entry in Xconfig serves as an index. example:
|
|
clocks 1 2
|
|
ModeDB
|
|
1 640x480 .....
|
|
2 800x600 .....
|
|
means the first clock on the chip will be used for the 640x480 mode
|
|
and so on. Usually one uses the MHz value for the clock for convenience
|
|
instead of 1 2 you probably have 25 28 ... etc.
|
|
|
|
|
|
XII.29) What are the settings used with a trident-8900C?
|
|
|
|
ANSWER: To get X/SLS/Linux working with a trident-8900C :
|
|
|
|
1) From Frank Houston fh8n@uvacs.cs.Virginia.EDU
|
|
vga256
|
|
Virtual 1024 768
|
|
ViewPort 0 0
|
|
Modes "1024x768" "800x600" "640x480"
|
|
Use the VESA monitor timings from the modeDB in the example Xconfig.
|
|
You do not need to specify the chipset or clocks.
|
|
|
|
2) From: Henk Vandecasteele henkv@cs.kuleuven.ac.be
|
|
TRIDENT TVGA 8900C card with BIOS C2.11, A cheap color monitor AOC (CM-335)
|
|
with a maximum horizontal frequence of 39.5
|
|
vga256
|
|
Virtual 1024 1024
|
|
ViewPort 0 0
|
|
Modes "912x684" "800x600" "640x480"
|
|
# This mode drives my monitor to the limit (VESA timings for the rest).
|
|
"912x684" 45 912 944 1104 1136 684 684 690 712
|
|
|
|
|
|
XII.30) Oh what, Oh what, Oh what can I do with a trident 8900b?
|
|
|
|
ANSWER: (drew@cs.colorado.edu)
|
|
1. While the 8900b works with the Xfree 8900c driver, you must
|
|
specify a chipset line for the 8900c in your Xconfig.
|
|
|
|
2. The tridents are miserably slow in a Color mode. If you don't
|
|
mind black and white, you should use X386mono. Not only is it
|
|
faster, but it requires less video memory, and you'll be able
|
|
to run a 1k X 1k virtual desktop. Again, you must specify the
|
|
Chipset line to use the banked mono server for virtual
|
|
resolutions > ~800x600.
|
|
|
|
|
|
XII.31) What are common problems with Xconfig?
|
|
|
|
ANSWER: If X isn't firing at all, or even if it clears the screen and
|
|
crashes (see below) you almost certainly have a fault in Xconfig.
|
|
|
|
1. Note that the server X interprets Xconfig. (not xinit)
|
|
|
|
2. If you have a fault in Xconfig it is possible to crash or hang the
|
|
server without getting an error message. (older versions?)
|
|
|
|
3. leave the two paths at the top of Xconfig commented out when testing.
|
|
|
|
4. test with only one graphics mode included - one you are most sure of.
|
|
|
|
5. If you make a mistake in the mouse section, you will (I understand)
|
|
get an error message, so if you don't get some mouse error, try
|
|
elsewhere first. (eg "No such file or directory" indicates you have a
|
|
fault in the "/dev/ttyxx" line, or /dev/ttyxx doesn't exist.
|
|
|
|
6. *NB* X looks in your home directory first to find an Xconfig. make
|
|
certain it's using the one you've been working on!
|
|
|
|
7. you need double quotes (") around your chipset and modes: eg
|
|
chipset "et4000"
|
|
Modes "640x480" "640x480a" "800x600"
|
|
and around the /dev/ttyxx eg.:
|
|
microsoft "/dev/ttys1"
|
|
|
|
8. Check your VGA section and modeDB first.
|
|
|
|
9. ensure ModeDB clock speeds match the VGA section. Comment out any
|
|
unused lines in MODEDB.
|
|
|
|
eg clocks 25 36 00 00 00 00 00 00
|
|
|
|
then you *must* have (and only have) lines under modeDB corresponding
|
|
to speeds 25 and 36. If you have one with (say) 62 uncommented out in
|
|
the modeDB section in place of the 36 line, you will cause the server to
|
|
die immediately with no error message.
|
|
|
|
10. a syntax error (such as an unrecognised word) in Xconfig will cause
|
|
a death with no warning. (Obselete?)
|
|
|
|
11. videoram must equal the amount of display ram on your chip.
|
|
|
|
12. The virtual resolution screen must fit in the videoram.
|
|
eg: 512kB => 800x600 (for the 1 byte per pixel color server)
|
|
|
|
|
|
XII.32) What do I use in my Xconfig file to use the bus mouse?
|
|
Logitech doesn't work with my Logitech busmouse.
|
|
|
|
ANSWER: (Nathan I. Laredo)
|
|
Here are the mouse lines from my Xconfig:
|
|
|
|
BusMouse "/dev/mouse"
|
|
|
|
You may add a sample rate if you want, but chances are, unless the model
|
|
number on your mouse matches mine: PC-93-9MD it probably will cause your
|
|
machine to lock up, as I've gotten several reports saying that.
|
|
According to the X386 documentation, non-logitech mice do not support
|
|
a sample rate.
|
|
|
|
|
|
XII.33) Where can I get Xconfig-files for various hardware?
|
|
|
|
ANSWER: If you have access to e-mail, e-mail bcr@physics.purdue.edu
|
|
a message with the subject: help
|
|
If you do create a new Xconfig file or improve on an old one please mail
|
|
it to bcr@physics.purdue.edu to save others from having to duplicate
|
|
your work.
|
|
|
|
|
|
|
|
XII.G X-APPLICATIONS: Compiling X Programs.
|
|
~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
XII.34) Does anyone know where I can find the libobz.a library ?
|
|
|
|
ANSWER: This library contained the socket stuff, when X386 V0.1 was
|
|
released. Meanwhile it has found it's way into the kernel, so
|
|
remove -lobz from the link step in the Makefile. Any program
|
|
asking for libobz needs to be recompiled anyway.
|
|
|
|
|
|
XII.35) I get _setjmp undefined when linking xv from .a files.
|
|
|
|
ANSWER: You are trying to link a program compiled with gcc-2.2.2
|
|
and setjmp has changed sice then. Recompile xv from the source
|
|
using the latest gcc.
|
|
|
|
|
|
XII.36) How do I compile an X application that has an Imakefile?
|
|
|
|
ANSWER:
|
|
Type xmkmf to generate the Makefile.
|
|
Type make.
|
|
|
|
|
|
XII.37) How do I compile a program that has no Imakefile?
|
|
|
|
ANSWER: Use compiler options generated with programs that do have
|
|
Imakefiles. Look in XLIB/config/ for the linux definitions.
|
|
In particular you need -fwritable-strings.
|
|
|
|
XII.38) gcc complains the X libraries are not found or links static.
|
|
|
|
ANSWER: Check out the -nojump -static options of GCC ... read the GCC FAQ.
|
|
You can tell gcc what directories to search with -L.
|
|
|
|
|
|
XII.39) When using Makefiles generated by xmkmf why do I get many error
|
|
messages?
|
|
|
|
ANSWER: The old xmkmf under Linux doesn't like # comments in Imakefiles.
|
|
Therefore you must change the #'s to XCOMM. But be careful. Don't change
|
|
any pre-compiler directives. (mal11@po.CWRU.Edu Matthew A. Lewis)
|
|
|
|
|
|
|
|
|
|
XII.H BUGS:
|
|
~~~~~~~~~~~
|
|
|
|
Restoration of the text screen fails on some hardware. You can
|
|
get the program runx from the vgalib distribution (tsx-11
|
|
pub/linux/sources/libs/). Report the problem to the xfree86 team.
|
|
|
|
Cant compile Xaw programs without -static in versions x11v1.1 or older.
|
|
|
|
Color problems with Xega .... fixed in latest version on tsx-11 (Old).
|
|
|
|
from chuck@coplex.com (Chuck Sites) (Old?)
|
|
It is possible to run X386 on a Paradise VGA Plus. The X386.0 doc file
|
|
has a small misprint. The Chipset is not pvga. It's pvga1. Anyway,
|
|
under the line in /usr/X386/lib/X11/Xconfig VGA256, add, `chipset "pvga1"`.
|
|
You will need a 512k board. There seems to be a problem with 800x600 mode
|
|
that causes pixels to be misplaced in the center 1/3 of the screen. 640x480
|
|
works fine. Anybody out there might have a fix for that? You may want to use
|
|
X386mono with 800x600 instead
|
|
|
|
|
|
Fix for missing numlock control in xfree86-1.1.
|
|
use xmodmap to change the mapping:
|
|
clear mod1
|
|
add mod1 = Alt_L
|
|
keysym Alt_R = Mode_switch
|
|
add mod5 = Mode_switch
|
|
David (Dawes)
|
|
|
|
|
|
|
|
Sources for X11_FAQ:
|
|
Steve Kotsopoulos, Peter Hawkins, John Morris, MM. Corsini,
|
|
K. Balasubramanian.
|
|
Direct comments, questions, complaints to krishna at:
|
|
balasub@cis.ohio-state.edu
|
|
|
|
|
|
|
|
XIII. EMACS for LINUX
|
|
=====================
|
|
*** This section is maintained by Rick Sladkey (jrs@world.std.com)
|
|
*** Last Update March 1993.
|
|
|
|
|
|
XIII.A. GENERAL INFORMATION
|
|
XIII.B. GNU EMACS for LINUX
|
|
|
|
|
|
XIII.A. GENERAL INFORMATION
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
|
|
This is a short list of Frequently Asked Questions about GNU Emacs
|
|
under Linux. It does not address general questions about Emacs which
|
|
are not Linux specific. For general help about Emacs, 1) learn to use
|
|
and read the online documentation, 2) read the real Emacs FAQ found in
|
|
emacs/etc/FAQ, and 3) read the newsgroup gnu.emacs.help.
|
|
|
|
Rick Sladkey <jrs@world.std.com>
|
|
|
|
|
|
XIII.B. GNU EMACS for LINUX
|
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
XIII.01) What version of the compiler was used? Which shared libaries?
|
|
|
|
ANSWER: This describes version of GNU Emacs 18.59 for Linux 0.99.5 and above
|
|
compiled with GCC 2.2.3 using the libc.so.4.3 and libX11.so.3.0 shared
|
|
libraries.
|
|
|
|
XIII.02) Which files do I need?
|
|
|
|
ANSWER:
|
|
emacs-18.59b.tar.Z this file, sample default.el and diffs
|
|
for this version, the eight-bit patch,
|
|
iso-latin-1.el and eight-bit.el
|
|
emacs-etc-18.59b.tar.Z emacs support programs and misc info
|
|
emacs-bin-18.59b.tar.Z shared emacs binary and its doc file
|
|
x11emacs-bin-18.59b.tar.Z shared x11emacs binary and its doc file
|
|
|
|
XIII.03) How do I install them?
|
|
|
|
ANSWER: For the latter three files, just cd to /usr and untar them.
|
|
|
|
XIII.04) What if I want to compile Emacs myself?
|
|
|
|
ANSWER: It is fairly easy (and highly recommended) to compile Emacs
|
|
yourself if you have the the disk space. In this case you only need
|
|
the standard Emacs distribution (emacs-18.59.tar.Z from any GNU archive)
|
|
and the Linux diffs and support files (emacs-18.59b.tar.Z from a Linux
|
|
archive). The diffs are quite small and mostly amount to a
|
|
configuration file.
|
|
|
|
XIII.05) What about Epoch or Lucid Emacs? Are these available for Linux?
|
|
|
|
ANSWER: Yes. Thomas Dunbar has been maintaining Epoch for Linux and
|
|
Chipsy Sperber has compiled Lucid Emacs. Both of these work well
|
|
under Linux. Look in a Linux archive index for where to find them.
|
|
|
|
XIII.06) Does Linux Emacs support eight-bit input/output?
|
|
|
|
ANSWER: Yes. It is new with this version. It uses the so-called
|
|
"ctl-arrow" patch. See the file README.8bit for more information.
|
|
|
|
XIII.07) How much disk space is required?
|
|
|
|
ANSWER: Anywhere from 1 to 15 Meg. Emacs works reasonably well with no
|
|
support files at all. With a judicious selection from lisp/*.elc and
|
|
etc/*, quite a lot can be done using only 2 Meg. If you want all of
|
|
lisp/*.elc, info/*, and etc/* this will require 4 to 6 Meg. If you
|
|
unpack the whole source you need 8 Meg. If you collect info files
|
|
like rare coins and install a lot of big lisp packages then Emacs may
|
|
need its own partition. :-)
|
|
|
|
XIII.08) Why can't Emacs find its support files anymore?
|
|
|
|
ANSWER: This is because older versions of Emacs were compiled with
|
|
"/usr/local/emacs" based paths. The current version is compiled with
|
|
"/usr/emacs" paths. If you have a previous installation, just "mv
|
|
/usr/local/emacs /usr" and you're done. If you can't bear to part
|
|
with the "/usr/local" pathnames because of inertia then do "ln -s
|
|
/usr/local/emacs /usr" and you can have them both.
|
|
|
|
XIII.09) How do I get Emacs to recognize my cursor keys?
|
|
|
|
ANSWER: Simple. Don't use them. :-) Seriously, there are as many
|
|
ways to do this are there are elisp hackers but the preferred way is
|
|
to follow the pattern set by the other terminal definition files in
|
|
emacs/lisp/term/*.el. For just arrow keys you can just copy vt220.el
|
|
to console.el and that's it. For function keys and the others see
|
|
the sample default.el included with emacs-18.59b.tar.Z.
|
|
|
|
XIII.10) What packages are particularly useful under Linux?
|
|
|
|
ANSWER: Because info format is the documentation standard of the GNU
|
|
project and just about everything except the kernel comes from FSF,
|
|
you will find that Dave Gillespie's enhanced info package is very
|
|
useful. It allows multiple info directories, space bar paging, and
|
|
supports compressed info files. Please learn to use info. Imagine
|
|
Unix life without man.
|
|
|
|
Others that I highly recommend are Sebastian Kremer's enhanced
|
|
dired directory editor, Dave Gillespie's calc calculator, Masanobu
|
|
UMEDA's gnus for usenet news, and Kyle Jone's vm for mail.
|
|
|
|
All can be found in the OSU Emacs archive, ftp.cis.ohio-state.edu,
|
|
/pub/gnu/emacs/elisp-archive. See the real FAQ for more details.
|
|
|
|
XIII.11) Does Linux Emacs use the shared libraries?
|
|
|
|
ANSWER: Yes. It works fine with the DLL libraries and should not
|
|
require a new binary when the C or X libraries are updated.
|
|
|
|
XIII.12) Does Linux Emacs support the X Window System?
|
|
|
|
ANSWER: Yes. However, there are two binaries. One without X support
|
|
(about 485k) and one with X support (about 515k).
|
|
|
|
XIII.13) Do I need both Emacs if I don't always use X?
|
|
|
|
ANSWER: No. The X11 version works equally well inside or outside of X.
|
|
If you get the message "Check your DISPLAY variable" it means that
|
|
you have defined DISPLAY in your ~/.profile (or whatever). You can
|
|
fix this by starting Emacs with 'emacs -nw' or by removing the DISPLAY
|
|
variable from your ~/.profile and putting it in you ~/.xinitrc.
|
|
|
|
XIII.14) Why doesn't Emacs use the settings in my
|
|
.Xdefaults/.Xresources file?
|
|
|
|
ANSWER: You are probably using the word "emacs" and your X version of
|
|
emacs is called x11emacs. Either use the word "Emacs" in your resource
|
|
file or rename x11emacs to emacs. See above question on why this
|
|
is reasonable.
|
|
|
|
XIII.15) I read about some menu that is supposed to pop up when I
|
|
press some mouse button. Does this work with Linux Emacs?
|
|
|
|
ANSWER: Yes. This requires XMenu support to be compiled in. Former
|
|
versions did not support it because it did not work correctly.
|
|
|
|
XIII.16) Sometimes Emacs crashes with a SIGALRM message. What's
|
|
wrong?
|
|
|
|
ANSWER: The old answer about upgrading to a newer version of bash
|
|
was incorrect. The problem was in the implementation of sleep(3)
|
|
in the old C library. It is fixed as of libc-4.3.
|
|
|
|
|
|
===================8<==========>8================
|
|
|
|
|
|
|
|
SLS FAQ
|
|
------------------------------------------------------------------------------
|
|
Q: Why doesn't ???? work.
|
|
A: First read the man pages on ???? and look in this FAQ and the readme.
|
|
Relevant manpages can be located using "man -k ????".
|
|
|
|
Q: Why do I get "shell-init failed"?
|
|
A: chmod a+rx /
|
|
|
|
Q: Why do I get "can not find fixed font"
|
|
A: Look in /usr/lib/X11/fonts. Do the fonts.dir and fonts.alias = the fonts
|
|
there? If not, try mkfontdir.
|
|
|
|
Q: Why doesn't makewhatis work?
|
|
A: Because the man pages are compressed.
|
|
|
|
Q: Why do is see "magic match failed" on disk a3?
|
|
A: Ignore it it is normal. Sysinstall has to switch from Minix to Dos disks
|
|
at a3.
|
|
|
|
Q: Why do I see "no bmap support" when installing disks?
|
|
A: Ignore it it is normal. Dos disks generate this message when mounted.
|
|
|
|
Q: Why won't the install recognize my disks.
|
|
A: Perhaps you have a bad disk, a hardware problem, the download failed or
|
|
something else. Some versions of DOS don't seem to like linux. Try
|
|
formatting disks on someone elses DOS. Really, you are on your own here.
|
|
What I want done, is have the "file loop" patches added to a Linux system,
|
|
and then store the Images to SLS, with mountings to also access their
|
|
contents (someday). Meanwhile. bon chance.
|
|
|
|
Q: How do I upgrade SLS
|
|
A: If from .96, you don't. You must re-install from scratch. Otherwise,
|
|
read the ChangeLog file and download just the needed files manually.
|
|
|
|
Q: Can I install a new version of SLS over an old one?
|
|
A: Best not to. Save what you want somewhere and use mk[*]fs. SLS may
|
|
be best for base installs. Updates you can often get anywere on the net.
|
|
That is, unless you follow the upgrades to SLS religously.
|
|
|
|
Q: What version of X11 does SLS use?
|
|
A: XFree 1.2. Yes, it does use shared DLL jump libs.
|
|
|
|
Q: Can I install from the Hard drive?
|
|
A: Yes. Even from a Dos HD, but you can't use "doinstall". It goes like:
|
|
"sysinstall -instsrc /user -instroot /root -all"
|
|
|
|
Q: How can I set the video-mode automatically when booting?
|
|
A: Use "rdev -v /dev/fd0 1" to simulate typing '1', etc. (-1 sets default vga,
|
|
-3 set ask). Try "rdev -help" for more info.
|
|
|
|
Q: I have only 2Meg of ram...
|
|
A: Use hlu's root disk, in GCC
|
|
|
|
Q: How do I get TCP/IP or NFS working?
|
|
A: Get SLS .98p5 92/12/03 or later. Look at hostcvt.build in /etc/inet
|
|
|
|
Q: How come "mdir a:" don't recognize my 3.5 A: drive?
|
|
A: Edit /etc/mtools.
|
|
|
|
Q: Why does "sysinstall -special t" not work or, why the "*.tar" not found
|
|
messages, or why do I get "can't write to disk" on installations?
|
|
A: Get the new a4/menus.taz. It has a new sysinstall, that uses "-series".
|
|
|
|
Q: Why do I see "link failed" messages when I install?
|
|
A: Ignore them, they are harmless.
|
|
|
|
Q: How do I install disks afterwards?
|
|
A: sysinstall -disk. Try reading sysinstall for more info.
|
|
|
|
Q: How do I uninstall a package?
|
|
A: sysinstall -remove pkg. To see all pkgs, do "ls /install/installed"
|
|
|
|
Q: How do I find out what disk a package is on, if I uninstall it?
|
|
A: grep pkg /install/disks/*
|
|
|
|
Q: I just upgraded to [X11, gs, ..] and I get "can't load library /lib/lib*"
|
|
A: A new library must have come out. Get the new lib(s) to.
|
|
|
|
Q: How do I find which version of SLS I am using
|
|
A: uname -a
|
|
|
|
Q: How do I find out what is in a package?
|
|
A: Install it, look at it, uninstall it if not desired.
|
|
|
|
Q: What is the meaning life
|
|
A: it's coming in the next release.
|
|
------------------------------------------------------------------------------
|
|
|