Monday, February 4, 2008

ATAPI FAQ

Your most frequently asked questions about ATAPI/IDE CDROM drives.

Author: Mathew E. Kirsch
Systems Manager - Computing Graphics Engineering Technology
SUNY at Alfred, Alfred NY 14802
kirschm@snyalfva.cc.alfredtech.edu

Revisions:
1.0 - First public posting, 951010
1.1 - Added Q5 and Q6, 951011
1.2 - Added Q7, courtesy Steve Clarke; renamed the ATAPI CDROM FAQ
1.3 - Added Q8, due to number of people with this problem

Q1: Is the <Insert your brand/model here> IDE CDROM drive supported?

A1: Yes, of course it is. It is an ATAPI/IDE CDROM drive, meaning it utilizes the IDE hard drive interface that is present in most typical home PC's today. It has been like this since kernel version 1.1.85.

Q2: I already have two IDE hard drives. Will my ATAPI CDROM still work?

A2: Yes, but you need to have a second IDE interface card to make it work.
Unfortunately, not just any IDE card will work. The secondary interface
card that you choose must have jumper-selectable IRQs and base addresses,
or, you need to purchase a card that is specifically manufactured for
use as a secondary interface. One such card is the Data Technologies
model 2183. Its typically only $15, so its not a big expenditure on your
part. If you bought a Mitsumi with an interface card, use that one.
Another option is an EIDE card with dual IDE "ports", meaning it has two IDE/EIDE interfaces on the same card. I've been out of circulation for a while USENET-wise, but I heard that the 1.3.x kernels fully support EIDE interfaces.

Q3: I can't seem to find the driver for the FX400 in the kernel source,
what should I be looking for?

A3: There isn't a SPECIFIC driver for the Mitsumi FX400 (or for any other
ATAPI/IDE CDROM drive for that matter). What you need is the ATAPI
CDROM driver that has been included in the kernel source officially
since at least kernel version 1.1.85. It can be enabled just like any
other driver when you "make config" and recompile the kernel. Recompiling
the kernel is an entire FAQ in itself, so I won't cover it here.

Q4: What options should I enable so I can use my new
<insert brand name/model here> ATAPI CDROM?

A4: Here is an excerpt from the "make config" sequence:

*
* Please see drivers/block/README.ide for help/info on IDE drives
*
Use old disk-only driver for primary i/f (CONFIG_BLK_DEV_HD) [n] n
Use new IDE driver for primary/secondary i/f (CONFIG_BLK_DEV_IDE) [y] y
Include support for IDE/ATAPI CDROMs (CONFIG_BLK_DEV_IDECD) [n] y

As you can see, you do NOT want to use the old disk-only driver, and you
DO want to use the new IDE driver and include support for ATAPI CDROMs.
Also, make sure you enable ISO9660 filesystem support (the standard
CDROM filesystem type). Compile your kernel, and copy the compressed kernel,
vmlinuz, from /usr/src/linux/arch/i386/boot to / and do the same for
System.map. If you are using an older version of Slackware (older than 2.2),
you also need to run a short script to create the device nodes (in /dev)
for the two devices on that secondary interface. The script is located in
/usr/src/linux/drivers/block, and is called MAKEDEV.ide1.
Update LILO or loadlin (whichever you prefer to use) as needed,
reboot and away you (should) go. As long as you have your secondary IDE
interface on IRQ 15, and at port address 170h-177h (the defaults for the
DTC 2183 interface, but always double-check factory jumper settings, and
as always: when in doubt, ask someone), things should work admirably.
Linux should have no problem recognizing the secondary interface, and your
bootup sequence should look something like this:

hda: WDC AC1210F, 202MB w/64KB Cache, CHS=989/12/35, MaxMult=16
hdb: Maxtor 7345 AT, 329MB w/64KB Cache, CHS=790/15/57, MaxMult=32
hdc: FX400_02, ATAPI, CDROM drive
ide1: secondary interface on irq 15
ide0: primary interface on irq 14

This may seem a bit confusing, so I'll translate. The first line indicates
that my first hard drive (/dev/hda) is a Western Digital 202MB hard drive.
The second is a Maxtor 329MB drive. hda is the first drive on the first
interface, and hdb is the second drive on the first interface. hdc is the
first drive on the second interface, and hdd (not used on my system, yet :)
is the second drive on the second interfae. The third line, therefore,
indicates that there is an FX400 ATAPI CDROM located on the first device
of the second interface. The final two lines indicate that there are two
IDE interfaces, one on IRQ 15, one on IRQ 14. The drives you have will
show up differently, but the format will be the same. Remember where the
CDROM was recognized, as you will have to make a symbolic file link to the
/dev/cdrom device. Do this by typing (from anywhere):

ln -s /dev/hdc /dev/cdrom

Once booted, you should now be able to insert your favorite Slackware
distribution CDROM and mount it by typing:

mount /dev/cdrom /mnt

Pretty simple, eh?

Note that in some cases you may have to add the following line to your
/etc/lilo.conf or to your loadlin script (whichever you use):

append="hdc=cdrom" <--- for lilo.conf
hdc=cdrom <--- from the lilo "boot:" prompt

Q5: I've installed the drive as the only device on the secondary interface,
with the CDROM drive jumpered as SLAVE/SINGLE, and Linux won't
see it. What am I missing?

A5: Well, quite a lot, to be frank. 99.99% of the ATAPI CDROM drives
are shipped jumpered as SLAVE or SINGLE, and this simply will
not work with Linux. By the IDE standard, a single
drive on an interface must be jumpered as MASTER. There isn't (or
shouldn't be) a specification for SINGLE in the IDE standard.
Change the jumper on the back of the CDROM drive to MASTER,
and follow the directions in Question 4, and you should be set to go.

Q6: I've heard that putting my ATAPI CDROM and my IDE hard drive on the same
IDE channel slows down the hard drive. What is the story?

A6: From my personal experience (and the experience of several others who
commented on the subject), there is no truth to the rumor that putting
the CDROM and HDD on the same channel slows things down.
The rumor states that the MEDIA TRANSFER RATE is set to the speed of
the slowest device on the IDE channel. This is wrong.
The real rumor should be that the INSTRUCTION TRANSFER RATE is set
to the speed of the slower device on the IDE channel. Since the
instructions are handled in firmware (the logic chips on the control
boards on the drives) rather than on the spinning media, the only
reason the INSTRUCTION TRANSFER RATE would be slower on one device
is due to a poor design by the manufacturer.
You mileage may vary here, because the rumor may actually be true
if you're using certain IDE/EIDE controller boards. If you are
experiencing the slowdown when your CDROM and HDD are on the same
IDE channel, send the brand and model of your controller to me,
and I'll list it here.

Q7: I just got kernel 1.3.(19-30), and my ATAPI CDROM quit working. Why?

A7: Somebody reworked the IDE/ATAPI drivers for kernel versions
1.3.19 through 1.3.30, and they got broken in the process.
Don't ask me why, because as I see it, if it ain't broke, don't
fix it! Another view on the subject is: If you don't want to be a
guinea pig, don't get the odd-numbered (1.1.x, 1.3.x, 1.n.x) kernels.
Stick to the even numbered, or production kernels, like 1.2.13.

Q8: Why does my Mitsumi FX401 drive perform badly?

A8: Mitsumi recently (about August '95) replaced the FX400 with the FX401.
This model, although similar, has a few new minor features and a small speed
increase. Unfortunately, the timing of this drive is slightly different and
breaks the standard IDE/ATAPI controller in Linux 1.2.* - 1.3.26 with some
EIDE controllers. The symptoms are break activity of the CDROM drive followed
by about 10 seconds pause and an timeout/reset error message in a syslog
file. The only known solution to this problem is to upgrade to a new
development kernel 1.3.28 or later. The new code is stable in 1.3.30.
Unfortunately, this new code doesn't work with several other drives.
<thanks to steven.clarke@keble.oxford.ac.uk for Q7/A7>

Q9: I just got finished wiring up my Sound Blaster 16 IDE, and the ATAPI drive
isn't detected!

A9: The most likely result of your troubles has to do with the base addressing
of the IDE port on the Sound Blaster. This comes from the factory set to
use the TERTIARY (third. Yes, there is a third and fourth IDE port now, but
so far linux doesn't use them in the latest production kernel.) IDE port.
Remember that for linux to see a second IDE port, it has to be at the
secondary address (0x170-0x177, IRQ 15). This is the only way production
Linux will ever see your second interface and ATAPI CDROM.
You can also change a couple of lines in ide.c in the kernel source
to probe for your secondary IDE card at the tertiary address/IRQ, but
that's only for the adventurous.
A second cause of your problem may be the fact that when Creative Labs
manufactures a CDROM drive, they put the master/slave jumper on the
SLAVE pins. It is pretty likely that the CDROM drive is the only
device on the SoundBlaster IDE interface, and by the definition
of the IDE standard, a single device on any given interface MUST
be jumpered as MASTER. This doesn't bother DOS or any of the other
inferior operating systems, because they are forgiving with regard
to the manufacturer and user screw-ups. Linux is an operating system
for someone that knows their computer fairly well, and it adheres
to standards STRICTLY.
You will also have to reconfigure your ATAPI CDROM and SB16IDE in
DOS, Win 3.1x, Win 4.x, and OS/2, because the change of address won't
be realized by these inferior (IMHO) operating systems.

Epilogue: If you have any comments, questions, additions and/or corrections,
let me know. I can be reached at kirschm@snyalfva.cc.alfredtech.edu,
at my brother's email vp24njcb@ubvms.cc.buffalo.edu, or at a new site
kirschm@london.cgt.alfredtech.edu (hopefully by late August, this will be
my main address).
I will periodically update this listing with new questions, and
contributions, and I hope that it will eventually grow into a general
ATAPI FAQ.

Cheers

Read more ...

The Linux FAQ

David C. Merrill
david -AT- lupercalia.net

2003-09-19
Revision History
Revision 1.20 2001-12-04 Revised by: rk
Revision 2.0 2002-04-25 Revised by: dcm
Some reorganization and markup changes.
Revision 2.1 2003-05-19 Revised by: dcm
Fairly complete reorganization and conversion to WikiText.
Revision 2.1.1 2003-09-19 Revised by: dcm
Minor corrections.
Revision 2.1.2 2004-02-28 Revised by: dcm
Minor corrections.


This is the list of Frequently Asked Questions for Linux, the Free/Open
Source UNIX-like operating system kernel that runs on many modern computer
systems.

-----------------------------------------------------------------------------
Table of Contents
1. Introduction
1.1. About the FAQ
1.2. Asking Questions and Sending Comments
1.3. Authorship and Acknowledgments
1.4. Copyright and License
1.5. Disclaimer


2. General Information
3. The Linux Kernel
4. Disk Drives
5. Partitions And Filesystems
6. System Libraries
7. Linux Distributions
8. Booting the OS
9. Application Software Management
10. Directory And File Management
11. Connecting To A Network
12. Troubleshooting
13. Software Development
14. Solutions to Common Problems
15. Tips And Tricks
16. The X Window System
17. Frequently Encountered Error Messages
18. Online Resources
19. How To Get Further Assistance
19.1. If this Document Still Hasn't Answered Your Question....
19.2. What to Put in a Request for Help
19.3. How To Email Someone about Your Problem


A. GNU Free Documentation License
A.1. 0. PREAMBLE
A.2. 1. APPLICABILITY AND DEFINITIONS
A.3. 2. VERBATIM COPYING
A.4. 3. COPYING IN QUANTITY
A.5. 4. MODIFICATIONS
A.6. 5. COMBINING DOCUMENTS
A.7. 6. COLLECTIONS OF DOCUMENTS
A.8. 7. AGGREGATION WITH INDEPENDENT WORKS
A.9. 8. TRANSLATION
A.10. 9. TERMINATION
A.11. 10. FUTURE REVISIONS OF THIS LICENSE
A.12. Addendum



1. Introduction

1.1. About the FAQ

This document contains a collection of the answers to the most common
questions people ask about Linux.

It is available as WikiText source, DocBook XML, an ASCII text file, an HTML
World Wide Web page, Postscript, PDF, Plucker, and as a USENET news posting.

DocBook XML is generated from WikiText source using wt2db. HTML is generated
from the XML using the LDP's XSL customization layer on top of Norm Walsh's
standard DocBook XSL stylesheets. Text is generated from the HTML using lynx.
Most of these programs are found in most Linux distributions.

The Usenet version is posted regularly to news:news.answers, news:
comp.answers, and news:comp.os.linux.misc. It is archived at ftp://
rtfm.mit.edu/pub/usenet-by-hierarchy/comp/os/linux/misc.

The latest versions are available from the Linux Documentation Project.
-----------------------------------------------------------------------------

1.2. Asking Questions and Sending Comments

If you have any comments, or if you have a question about Linux that was not
answered here, feel free to send it to the maintainer: david -AT-
lupercalia.net. Place the letters FAQ in the subject of your message.

I won't guarantee to answer all questions, but I'll answer as many as I can.
Questions that I receive repeatedly will be added to the FAQ. If you wish to
refer to a question in the FAQ, please include the title of the question in
your email.

If you have an addition to the FAQ, by all means send it. Contributions may
be in any format, but I prefer comments in English to patch files. Context
diff is not my first language.
-----------------------------------------------------------------------------

1.3. Authorship and Acknowledgments

This FAQ is currently compiled and maintained by David Merrill, with
assistance and comments from Linux users all over the world. Over the years
it has passed through several hands, and I'd like to recognize all the folks
who have worked on it.

In addition to those of us who have been official maintainers, the FAQ is
full of individual contributions. The name of the contributor is listed along
with the contribution.

The FAQ was maintained by Robert Kiesling until January, 2002

Freddy Contreras, the_blur_oc@hotmail.com, designed and GPL'd the Linux
Frequently Asked Questions logos.

Special thanks are due to Matt Welsh, who moderated news:
comp.os.linux.announce and news:comp.os.linux.answers, coordinated the
HOWTO's and wrote substantial portions of many of them, Greg Hankins the
former Linux Documentation Project HOWTO maintainer, Lars Wirzenius and Mikko
Rauhala, the former and current moderators of news:comp.os.linux.announce,
Marc-Michel Corsini, who wrote the original Linux FAQ, and Ian Jackson, the
previous FAQ maintainer. Thanks also to Roman Maurer for his many updates and
additions, especially with European Web sites, translations, and general
miscellany.

Other contributors include:

* Doug Jensen djen@ispwest.com


Last but not least, thanks to Linus Torvalds and the other contributors to
Linux for giving us something to talk about!
-----------------------------------------------------------------------------

1.4. Copyright and License

Copyright (c) 2001 Robert Kiesling. Copyright (c) 2002, 2003 David Merrill.

Permission is granted to copy, distribute and/or modify this document under
the terms of the GNU Free Documentation License, Version 1.1 or any later
version published by the Free Software Foundation; with no Invariant
Sections, with no Front-Cover Texts, and with no Back-Cover Texts. A copy of
the license is provided in the appendix, GNU Free Documentation License.

The maintainer would be happy to answer any questions regarding the
copyright.

Unix is a trademark of AT&T Bell Laboratories. Linux is a trademark of Linus
Torvalds. Other trademarks belong to their holders.
-----------------------------------------------------------------------------

1.5. Disclaimer

While every attempt has been made to provide accurate and helpful
information, I make no promises or guarantees of any kind. Use this
information at your own risk.
-----------------------------------------------------------------------------

2. General Information

Q: What Is Linux?
Q: Is Linux Unix?
Q: Who Wrote Linux?
Q: How Is Linux Licensed?
Q: How Does One Pronounce Linux?
Q: How Many People Use Linux?

Q: What Is Linux?

A: The name "Linux" is used to refer to three similar yet slightly different
things, which can be confusing to all but the hardcore geek. The three usages
vary by how much of a complete software system the speaker is talking about.

At the lowest level, every Linux system is based on the Linux kernel ?? the
very low-level software that manages your computer hardware, multi-tasks the
many programs that are running at any given time, and other such essential
things. These low-level functions are used by other programs, so their
authors can focus on the specific functionality they want to provide. Without
the kernel, your computer is a very expensive doorstop. It has all of the
features of a modern operating system: true multitasking, threads, virtual
memory, shared libraries, demand loading, shared, copy-on-write executables,
proper memory management, loadable device driver modules, video frame
buffering, and TCP/IP networking.

Most often, the name "Linux" is used to refer to the Linux Operating System.
An OS includes the kernel, but also adds various utilities ?? the kinds of
programs you need to get anything done. For example, it includes a shell (the
program that provides a command prompt and lets you run programs), a program
to copy files, a program to delete files, and many other odds and ends. Some
people honor the request of Richard Stallman and the GNU Project, and call
the Linux OS GNU/Linux, because a good number of these utility programs were
written by the GNU folks.

Finally, software companies (and sometimes volunteer groups) add on lots of
extra software, like the XFree86 X Window System, Gnome, KDE, games and many
other applications. These software compilations which are based on the Linux
OS are called Linux distributions.

So, there are three Linuxes: the Linux kernel, the Linux OS, and the various
Linux distributions. Most people, however, refer to the operating system
kernel, system software, and application software, collectively, as "Linux",
and that convention is used in this FAQ as well.

See also the Wikipedia articles on the Linux kernel and the Linux operating
system.

Q: Is Linux Unix?

A: Officially an operating system is not allowed to be called a Unix until it
passes the Open Group's certification tests, and supports the necessary
API's. Nobody has yet stepped forward to pay the large fees that
certification involves, so we're not allowed to call it Unix. Certification
really doesn't mean very much anyway. Very few of the commercial operating
systems have passed the Open Group tests.

A: Unofficially, Linux is very similar to the operating systems which are
known as Unix, and for many purposes they are equivalent. Linux the kernel is
an operating system kernel that behaves and performs similarly to the famous
Unix operating system from AT&T Bell Labs. Linux is often called a
"Unix-like" operating system. For more information, see http://
www.unix-systems.org/what_is_unix.html.

[Bob Friesenhahn]

Q: Who Wrote Linux?

A: Linus Torvalds and a loosely knit team of volunteer hackers from across
the Internet wrote (and still are writing) Linux from scratch.

Q: How Is Linux Licensed?

A: Linus has placed the Linux kernel under the GNU General Public License,
which basically means that you may freely copy, change, and distribute it,
but you may not impose any restrictions on further distribution, and you must
make the source code available.

This is not the same as Public Domain. See the Copyright FAQ, ftp://
rtfm.mit.edu/pub/usenet/news.answers/law/copyright, for details.

Full details are in the file COPYING in the Linux kernel sources (probably in
/usr/src/linux on your system). There is a FAQ for the GPL at: http://
www.gnu.org/copyleft/gpl-faq.html.

The licenses of the utilities and programs which come with the installations
vary. Much of the code is from the GNU Project at the Free Software
Foundation, and is also under the GPL. Some other major programs often
included in Linux distributions are under a BSD license and other similar
licenses.

Note that discussion about the merits or otherwise of the GPL should be
posted to the news group gnu.misc.discuss, and not to the news:comp.os.linux
hierarchy.

For legal questions, refer to the answer: Where Are Linux Legal Issues
Discussed?.

Q: How Does One Pronounce Linux?

A: This question produces an outrageous amount of heated debate.

If you want to hear Linus himself say how he pronounces it, download
english.au or swedish.au from ftp://ftp.funet.fi/pub/Linux/PEOPLE/Linus/
SillySounds/. If you have a sound card or the PC-speaker audio driver you can
hear them by typing

$ cat english.au >/dev/audio

The difference isn't in the pronunciation of Linux but in the language Linus
uses to say, "hello".

For the benefit of those who don't have the equipment or inclination: Linus
pronounces Linux approximately as Leenus, where the ee is pronounced as in
"feet," but rather shorter, and the u is like a much shorter version of the
French eu sound in peur (pronouncing it as the u in "put" is probably
passable).

Q: How Many People Use Linux?

A: Linux is freely available, and no one is required to register with any
central authority, so it is difficult to know. Several businesses survive
solely on selling and supporting Linux. Linux newsgroups are some of the most
heavily read on Usenet. Accurate numbers are hard to come by, but the number
is almost certainly in the millions.

However, people can register as Linux users at the Linux Counter project,
which has been in existence since 1993. In May of 2003 the project counted
more than 134,000 users, but that is certainly only a small fraction of all
users. The operator of the Linux Counter estimated 18 million users, as of
May 2003.

Visit the Web site at http://counter.li.org/ and fill in the registration
form.

The current count is posted monthly to news:comp.os.linux.misc, and is always
available from the Web site.

[Harald Tveit Alvestrand]

A: In 1999, International Data Corporation released its first commercial
forecast of Linux sales. The report quantifies Linux vendor sales in 1996,
1997, and 1998, and forecasts through the year 2003.

To obtain the report, contact IDC at ctoffel@idc.com. Their Web site is http:
//www.itresearch.com/.
-----------------------------------------------------------------------------

3. The Linux Kernel

Q: What Platforms Does Linux Support?
Q: What Hardware Is Supported?
Q: Ports to Other Processors
Q: How Does Linux Kernel Versioning Work?
Q: Where Is the Latest Kernel Version on the Internet?
Q: Does Linux Support Threads or Lightweight Processes?
Q: What Version of Linux and What Machine Name Is This?
Q: What is a BogoMip?
Q: Does Linux Support USB Devices?
Q: Can Linux Use More than 3 Serial Ports by Sharing Interrupts?

Q: What Platforms Does Linux Support?

A: Linux runs on almost every general-purpose computer made in the last 10
years. It runs on systems as small as PDAs (for example, the Sharp Zaurus)
and on systems as large as IBM mainframes.

There are Linux distributions specifically for mobile and handheld platforms.
Information on the Linux distribution for the Compaq iPAQ is at http://
www.handhelds.org.

A: Linux was written originally for Intel processor based PC's, using the
hardware facilities of the 80386 processor and its successors to implement
its features. The 80386 family includes the 80486 and all of the Pentium
chips. However, there are now many ports to other hardware platforms. See
Ports to Other Processors.

Refer also to the Linux INFO-SHEET for more details as well as the answers to
Where Is the Documentation?, What Hardware Is Supported?, and Ports to Other
Processors, below.

Q: What Hardware Is Supported?

A: A minimal Linux installation requires a machine for which a port exists,
at least 2Mb of RAM, and a single floppy drive, but to do anything even
remotely useful, more RAM and disk space are needed. Refer to: Ports to Other
Processors, What are the Disk Space Requirements for Minimal, Server, and
Workstation Use?, and What are the Minimum and Maximum Memory Requirements?.

Intel CPU, PC-compatible machines require at least an 80386 processor to run
the standard Linux kernel.

Linux, including the X Window System GUI, runs on most current laptops. Refer
to the answer for: How Do I Find Out If a Notebook Runs Linux?. There are
numerous sources of information about specific PC's, video cards, disk
controllers, and other hardware. Refer to the INFO-SHEET, Laptop-HOWTO, and
the Unix-Hardware-Buyer-HOWTO. See Where Is the Documentation?.

Q: Ports to Other Processors

A: Ports are currently available for:

* Compaq Alpha AXP

* Sun SPARC and UltraSPARC

* Motorola 68000

* PowerPC

* PowerPC64

* ARM

* Hitachi SuperH

* IBM zSeries and S/390

* MIPS

* HP PA-RISC

* Intel IA-64

* DEC VAX

* AMD x86-64

* CRIS


A: There are always efforts underway to port Linux onto new processors. Linux
Online maintains a http://www.linux.org/projects/ports.html:list of ports
currently in development.

In addition, the following information is available about specific ports:

On Intel platforms, VESA Local Bus and PCI bus are supported.

MCA (IBM's proprietary bus) and ESDI hard drives are mostly supported. There
is further information on the MCA bus and what cards Linux supports on the
Micro Channel Linux Web page, http://www.dgmicro.com/mca. Refer also to the
answer for: Where Is the Linux Stuff on the World Wide Web?.

There is a port of Linux to the 8086, known as the Embeddable Linux Kernel
Subset (ELKS). This is a 16-bit subset of the Linux kernel which will mainly
be used for embedded systems, at: http://www.linux.org.uk/Linux8086.html.
Standard Linux does not run 8086 or 80286 processors, because it requires
task-switching and memory management facilities found on 80386 and later
processors.

Linux supports multiprocessing with Intel MP architecture. See the file
Documentation/smp.tex in the Linux kernel source code distribution.

An API specification and developers kit for the Crusoe Smart Microprocessor
developed by Transmeta Corporation are at http://www.transmeta.com.

A project has been underway for a while to port Linux to suitable
68000-series based systems like Amigas and Ataris. The Linux/m68K FAQ is
located at http://www.clark.net/pub/lawrencc/linux/faq/faq.html. The URL of
the Linux/m68k home page is http://www.linux-m68k.org/faq/faq.html.

There is also a linux-680x0 mailing list. See What Mailing Lists Are There?.

There is (or was) a FTP site for the Linux-m68k project on ftp://
ftp.phil.uni-sb.de/pub/atari/linux-68k, but this address may no longer be
current.

Debian GNU/Linux has ports to Alpha, Sparc, Motorola 68k, PowerPC, ARM, IBM S
/390, MIPS, HP PA-RISC, and IA-64. A Port to amd64 is being developed. There
are mailing lists for all of them. See http://www.debian.org/MailingLists/
for general information, then follow the "subscription" link, and find the
mailing list you are interested in.

One of the Linux-PPC project pages is http://www.linuxppc.org, and the
archive site is ftp://ftp.linuxppc.org/linuxppc.

There are two sites for the Linux iMac port: http://w3.one.net/~johnb/
imaclinux, and http://www.imaclinux.net:8080/content/index.html.

A port to the 64-bit DEC Alpha/AXP is at http://www.azstarnet.com/~axplinux/.
There is a mailing list at vger.redhat.com: see What Mailing Lists Are There?
.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines. The Linux-MIPS FTP sites are ftp://ftp.fnet.fr/
linux-mips and ftp://ftp.linux.sgi.com/pub/mips-linux. Interested people may
mail their questions and offers of assistance to linux@waldorf-gmbh.de.

There is (or was) also a MIPS channel on the Linux Activists mail server and
a linux-mips mailing list. See What Mailing Lists Are There?.

There are currently two ports of Linux to the ARM family of processors. One
of these is for the ARM3, fitted to the Acorn A5000, and it includes I/O
drivers for the 82710/11 as appropriate. The other is to the ARM610 of the
Acorn RISC PC. The RISC PC port is currently in its early to middle stages,
owing to the need to rewrite much of the memory handling. The A5000 port is
in restricted beta testing. A release is likely soon.

For more, up-to-date information, read the newsgroup news:comp.sys.acorn.misc
. There is a FAQ at http://www.arm.uk.linux.org.

The Linux SPARC project is a hotbed of activity. There is a FAQ and plenty of
other information available from the UltraLinux page, http://
www.ultralinux.org.

The Home Page of the UltraSPARC port ("UltraPenguin") is located at http://
sunsite.mff.cuni.cz/linux/ultrapenguin-1.0/, although the URL may not be
current.

There is also a port to SGI/Indy machines ("Hardhat"). The URL is http://
www.linux.sgi.com.

Q: How Does Linux Kernel Versioning Work?

A: At any given time, there are several "stable" versions of Linux, and one
"development" version. Unlike most proprietary software, older stable
versions continue to be supported for as long as there is interest, which is
why multiple versions exist.

Linux version numbers follow a longstanding tradition. Each version has three
numbers, i.e., X.Y.Z. The "X" is only incremented when a really significant
change happens, one that makes software written for one version no longer
operate correctly on the other. This happens very rarely -- in Linux's
history it has happened exactly once.

The "Y" tells you which development "series" you are in. A stable kernel will
always have an even number in this position, while a development kernel will
always have an odd number.

The "Z" specifies which exact version of the kernel you have, and it is
incremented on every release.

The current stable series is 2.4.x, and the current development series is
2.5.x. However, many people continue to run 2.2.x and even 2.0.x kernels, and
they als o continue to receive bugfixes. The development series is the code
that the Linu x developers are actively working on, which is always available
for public viewing, testing, and even use, although production use is not
recommended! This is part of the "open source development" method.

Eventually, the 2.5.x development series will be "sprinkled with holy penguin
pee" and become the 2.6.0 kernel and a new stable series will then be
established, and a 2.7.x development series begun. Or, if any really major
changes happen, it might become 3.0.0 instead, and a 3.1.x series begun.

Q: Where Is the Latest Kernel Version on the Internet?

A: The easiest way to update your kernel is to get the update directly from
the distribution which you are running.

A: If you need or want to configure and compile your own kernel, the web page
at http://www.kernel.org/ lists the current versions of the development and
production kernels.

If you want to download the source code, FTP to ftp.xx.kernel.org, where xx
is the two-letter Internet domain abbreviation of your country; e.g., us for
United States, ca for Canada, or de for Germany. Kernel versions 2.2.x are
archived in the directory pub/linux/kernel/v2.2, as are patches for the
prerelease versions. The kernel source code is archived as a .tar.gz file,
and as a .tar.bz2 file.

Follow the instructions in any of the standard references to compile the
kernel, as you would with any other custom kernel. The Documentation
subdirectory contains information by the authors of various subsystems and
drivers, and much of that information is not documented elsewhere.

If you want to participate in kernel development, make sure that you sign on
to the linux-kernel mailing list to find out what people are working on.
Refer to the answer: What Mailing Lists Are There?.

There is a story about the features of the 2.4 series kernels at http://
features.linuxtoday.com/stories/8191.html.

Q: Does Linux Support Threads or Lightweight Processes?

A: As well as the Unix multiprocessing model involving heavyweight processes,
which is of course part of the standard Linux kernel, there are several
implementations of lightweight processes or threads. Recent kernels implement
a thread model, kthreads. In addition, there are the following packages
available for Linux.

* GNU glibc2 for Linux has optional support for threads. The archive is
available from the same place as glibc2, ftp://ftp.gnu.org/pub/gnu/

* In ftp://sipb.mit.edu/pub/pthread/ or ftp://ftp.ibp.fr:/pub/unix/threads/
pthreads. Documentation isn't in the package, but is available on the
World Wide Web at http://www.mit.edu:8001/people/proven/home_page.html.
Newer Linux libc's contain the pthreads source. The GNU Ada compiler on
ftp://metalab.unc.edu/pub/Linux/devel/lang/ada/ contains binaries made
from that source code.

* In ftp://ftp.cs.washington.edu/pub/qt-001.tar.Z is QuickThreads. More
information can be found in the technical report, available on the same
site is /tr/1993/05/UW-CSE-93-05-06.PS.Z.

* In ftp://ftp.cs.fsu.edu/pub/PART/, an Ada implementation. This is useful
mainly because it has a lot of Postscript papers that you'll find useful
in learning more about threads. This is not directly usable under Linux.


Please contact the authors of the packages in question for details.

Q: What Version of Linux and What Machine Name Is This?

A: Type:

$ uname -a

Q: What is a BogoMip?

A: "BogoMips" is a combination of Bogus and Mips. MIPS stands for (depending
on who you ask) Millions of Instructions per Second, or Meaningless
Indication of Processor Speed.

The number printed at boot time is the result of a kernel timing calibration,
used for very short delay loops by some device drivers.

According to the BogoMips mini-HOWTO, the rating for your machine will be:

Common BogoMips Ratings

Processor BogoMips Comparison
--------- -------- ----------
Intel 8088 clock * 0.004 0.02
Intel/AMD 386SX clock * 0.14 0.8
Intel/AMD 386DX clock * 0.18 1 (definition)
Motorola 68030 clock * 0.25 1.4
Cyrix/IBM 486 clock * 0.34 1.8
Intel Pentium clock * 0.40 2.2
Intel 486 clock * 0.50 2.8
AMD 5x86 clock * 0.50 2.8
Mips R4000/R4400 clock * 0.50 2.8
Nexgen Nx586 clock * 0.75 4.2
PowerPC 601 clock * 0.84 4.7
Alpha 21064/21064A clock * 0.99 5.5
Alpha 21066/21066A clock * 0.99 5.5
Alpha 21164/21164A clock * 0.99 5.5
Intel Pentium Pro clock * 0.99 5.5
Cyrix 5x86/6x86 clock * 1.00 5.6
Intel Pentium II/III clock * 1.00 5.6
Intel Celeron clock * 1.00 5.6
Mips R4600 clock * 1.00 5.6
Alpha 21264 clock * 1.99 11.1
AMD K5/K6/K6-2/K6-III clock * 2.00 11.1
UltraSparc II clock * 2.00 11.1
Pentium MMX clock * 2.00 11.1
PowerPC 604/604e/750 clock * 2.00 11.1
Motorola 68060 clock * 2.01 11.2
Motorola 68040 Not enough data (yet).
AMD Athlon Not enough data (yet).
IBM S390 Not enough data (yet).

If the number is wildly lower, you may have the Turbo button or CPU speed set
incorrectly, or have some kind of caching problem (as described in Why Does
the System Slow to a Crawl When Adding More Memory?).

For values people have seen with other, rarer, chips, or to calculate your
own BogoMips rating, please refer to the BogoMips Mini-HOWTO, on ftp://
metalab.unc.edu/. See Where Is the Documentation?.

[Wim van Dorst]

Q: Does Linux Support USB Devices?

A: Linux supports a few dozen USB devices at present, and work is underway to
develop additional device drivers. There is a Web page devoted to the
subject, at http://www.linux-usb.org. There is also LDP documentation, at:
Where Is the Linux Stuff on the World Wide Web?.

Support for USB version 2.0 was recently added to development kernels, but is
not yet available in the 2.4 series.

Q: Can Linux Use More than 3 Serial Ports by Sharing Interrupts?

A: Yes, but you won't be able to use simultaneously two ordinary ports which
share an interrupt (without some trickery). This is a limitation of the ISA
Bus architecture.

See the Serial HOWTO for information about possible solutions and workarounds
for this problem.
-----------------------------------------------------------------------------

4. Disk Drives

Q: Does Linux Support SCSI Drives?
Q: Does Linux Support IDE Drives?
Q: Does Linux Support CD-ROM Drives?
Q: Does Linux Support DVD Drives?
Q: Why Doesn't the AHA1542C Card Work With Linux?
Q: How Can I Get Linux to Work With My Disk?

Q: Does Linux Support SCSI Drives?

A: Coming soon...

Q: Does Linux Support IDE Drives?

A: Coming soon...

Q: Does Linux Support CD-ROM Drives?

A: Coming soon...

Q: Does Linux Support DVD Drives?

A: Coming soon...

Q: Why Doesn't the AHA1542C Card Work With Linux?

A: The option to allow disks with more than 1024 cylinders, which the
AHA1542C card can recognize, is only required as a workaround for a
PC-compatible BIOS misfeature and should be turned off under Linux. For older
Linux kernels you need to turn off most of the advanced BIOS options all but
the one about scanning the bus for bootable devices.

Q: How Can I Get Linux to Work With My Disk?

A: If your disk is an IDE or EIDE drive, you should read the file /usr/src/
linux/drivers/block/README.ide (part of the Linux kernel source code). This
README contains many helpful hints about IDE drives. Many modern IDE
controllers do translation between "physical" cylinders/heads/sectors, and
"logical" ones.

SCSI disks are accessed by linear block numbers. The BIOS invents some
"logical" cylinder/head/sector fiction to support DOS.

Older IBM PC-compatible BIOS's will usually not be able to access partitions
which extend beyond 1024 logical cylinders, and will make booting a Linux
kernel from such partitions using LILO problematic at best.

You can still use such partitions for Linux or other operating systems that
access the controller directly.

It's recommend that you create at least one Linux partition entirely under
the 1024 logical cylinder limit, and boot from that. The other partitions
will then be okay.

Also there seems to be a bit of trouble with the newer Ultra-DMA drives. I
haven't gotten the straight scoop on thembut they are becoming a very common
problem at the SVLUG installfests. When you can get 8 to 12 Gig drives for
$200 to $300 it's no wonder.

[Jim Dennis]
-----------------------------------------------------------------------------

5. Partitions And Filesystems

Q: Does Linux Support Virtualized File Systems Like RAID?
Q: Can Linux Use the Same Hard Drive as MS-DOS? OS/2? 386BSD? Win95?
Q: How Do I Access Files on a MS-DOS Partition or Floppy?
Q: Does Linux Support Compressed Ext2 File Systems?
Q: Can Linux Use Stacked/DBLSPC/Etc. DOS Drives?
Q: Can Linux Access OS/2 HPFS Partitions?
Q: Can Linux Access Amiga File Systems?
Q: Can Linux Access BSD, SysV, Etc. UFS?
Q: Can Linux Access MacIntosh File Systems?
Q: How Do I Create a File System on a Floppy?
Q: Does Linux Support File System Encryption?
Q: How Do I Resize a Partition Non-Destructively?
Q: Where Is the Journalling File System on the Net?
Q: Why Isn't My Virtual Memory Swap Area Working?
Q: How Do I Add Temporary Swap Space?

Q: Does Linux Support Virtualized File Systems Like RAID?

A: The most recent Linux kernels support software RAID, and they will work
with RAID disk controllers.

An automounter for NFS partitions is part of most Linux distributions.

In addition, several virtual file system projects exist. One of them, the
Linux Logical Volume Manager, is located at http://linux.msede.com/lvm/.

Q: Can Linux Use the Same Hard Drive as MS-DOS? OS/2? 386BSD? Win95?

A: Yes. Linux supports many, many filesystems, including the standard MS-DOS
partitioning scheme, so it can share your disk with other operating systems.

Linux supports all known versions of the Microsoft FAT and VFAT file systems,
including those used by Windows 95, Windows 98, Windows NT, Windows 2000 and
Windows ME through loadable kernel modules. In a correctly configured system,
they should load automatically when the partitions are mounted.

Note, however, that many other operating systems may not be exactly
compatible. DOS's FDISK.EXE and FORMAT.EXE, for example, can overwrite data
in a Linux partition, because they sometimes incorrectly use partition data
from the partition's boot sector rather than the partition table.

In order to prevent programs from doing this, it is a good idea to zero out
under Linux the start of a partition you created, before you use MS-DOS or
whatever to format it. Type:

$ dd
if=/dev/zero of=/dev/hdXY bs=512 count=1

where hdXY is the relevant partition; e.g., /dev/hda1 for the first partition
of the first (IDE) disk.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS file system type built into the kernel or
mtools.

There is reportedly a GPL'd OS/2 device driver that will read and write Linux
ext2 partitions.

For information about FAT32 partition support, see http://bmrc.berkeley.edu/
people/chaffee/fat32.html.

See What Software does Linux Support? for details and status of the emulators
for DOS, MS Windows, and System V programs.

See also, "Can Linux access Amiga file systems?", "Can Linux access Macintosh
file systems?", "Can Linux access BSD, SysV, etc., UFS?", and "Can Linux
access SMB file systems?"

There are said to be NTFS drivers under development, which should support
compression as a standard feature.

Q: How Do I Access Files on a MS-DOS Partition or Floppy?

A: Use the DOS file system, type, for example:

$ mkdir /dos $
mount -t msdos -o conv=text,umask=022,uid=100,gid=100 /dev/hda3 /dos

If it's a floppy, don't forget to umount it before ejecting it!

You can use the conv=text/binary/auto, umask=nnn, uid=nnn, and gid=nnn
options to control the automatic line-ending conversion, permissions and
ownerships of the files in the DOS file system as they appear under Linux. If
you mount your DOS file system by putting it in your /etc/fstab, you can
record the options (comma-separated) there, instead of defaults.

Alternatively, you can use mtools, available in both binary and source form
on the FTP sites. See Where Are the Linux FTP Archives?.

A kernel patch (known as the fd-patches) is available which allows floppies
with nonstandard numbers of tracks and/or sectors to be used; this patch is
included in the 1.1 alpha testing kernel series.

Q: Does Linux Support Compressed Ext2 File Systems?

A: The ext2compr project provides a kernel patch Information about them is
located at http://e2ompr.memalpha.cx/e2compr/.

There is also a Web site for the e2compr patches. The code is still
experimental and consists of patches for the 2.0 and 2.1 kernels. For more
information about the project, including the latest patches, and the address
of the mailing list, look up the URL at http://debs.fuller.edu/e2compr/.

[Roderich Schupp, Peter Moulder

A: zlibc is a program that allows existing applications to read compressed
(GNU gzip'ed) files as if they were not compressed. Look at ftp://
metalab.unc.edu/pub/Linux/libs/. The author is Alain Knaff.

A: There is also a compressing block device driver, "DouBle," by Jean-Marc
Verbavatz, which can provide on-the-fly disk compression in the kernel. The
source-only distribution is located at ftp://metalab.unc.edu/pub/Linux/
patches/diskdrives/. This driver compresses inodes and directory information
as well as files, so any corruption of the file system is likely to be
serious.

A: There is also a package called tcx (Transparently Compressed Executables),
which allows you to keep infrequently used executables compressed and only
uncompress them temporarily when in use. It is located at ftp://
metalab.unc.edu/pub/Linux/utils/compress/.

Q: Can Linux Use Stacked/DBLSPC/Etc. DOS Drives?

A: Until recently, not very easily. You can access DOS 6.X volumes from the
DOS emulator ("What software does Linux support? "), but it's harder than
accessing a normal DOS volume via the DOS kernel option, a module, or mtools.

There is a recently added package, dmsdos, that reads and writes compressed
file systems like DoubleSpace/DriveSpace in MS-DOS 6.x and Win95, as well as
Stacker versions 3 and 4. It is a loadable kernel module. Look at ftp://
metalab.unc.edu/pub/Linux/system/filesystems/dosfs/.

Q: Can Linux Access OS/2 HPFS Partitions?

A: Yes, but Linux access to HPFS partitions is read-only. HPFS file system
access is available as an option when compiling the kernel or as a module.
See the Documentation/filesystems/hpfs.txt file in the kernel source
distribution. See How To Upgrade/Recompile a Kernel. Then you can mount HPFS
partition, using, for example:

$ mkdir /hpfs $ mount -t hpfs
/dev/hda5 /hpfs

Q: Can Linux Access Amiga File Systems?

A: The Linux kernel has support for the Amiga Fast File System (AFFS) version
1.3 and later, both as a compile-time option and as a module. The file
Documentation/filesystems/affs.txt in the Linux kernel source distribution
has more information.

See How To Upgrade/Recompile a Kernel.

Linux supports AFFS hard-drive partitions only. Floppy access is not
supported due to incompatibilities between Amiga floppy controllers and PC
and workstation controllers. The AFFS driver can also mount disk partitions
used by the Un*x Amiga Emulator, by Bernd Schmidt.

Q: Can Linux Access BSD, SysV, Etc. UFS?

A: Recent kernels can mount (read only) the UFS file system used by System V;
Coherent; Xenix; BSD; and derivatives like SunOS, FreeBSD, NetBSD, and
NeXTStep. UFS support is available as a kernel compile-time option and a
module.

See How To Upgrade/Recompile a Kernel.

Q: Can Linux Access MacIntosh File Systems?

A: There is a set of user-level programs that read and write the older
Macintosh Hierarchical File System (HFS). It is available at metalab.unc.edu/
pub/Linux/utils/disk-management/.

Access to the newer, HFS+ file systems is still under development.

Q: How Do I Create a File System on a Floppy?

A: If you are running recent Gnome or KDE desktops, you have a GUI tool that
makes formatting floppies easy.

A: To format a 3.5-inch, high density floppy at the command prompt:

$ fdformat /dev/fd0H1440
$ mkfs -t ext2 -m 0 /dev/fd0H1440 1440

For a 5.25 inch floppy, use /dev/fd0h1200 and 1200 as appropriate. For the B:
drive use /dev/fd1 instead of /dev/fd0.

The -m 0 option tells mkfs.ext2 not to reserve any space on the disk for the
superuserusually the last 10% is reserved for root.

The first command performs a low-level format. The second creates an empty
file system. You can mount the floppy like a hard disk partition and simply
cp and mv files, etc.

Device naming conventions generally are the same as for other unices. They
can be found in Matt Welsh's Installation and Getting Started guide. Refer to
Where Is the Documentation?. A more detailed and technical description is
Linux Allocated Devices by H. Peter Anvin, hpa@zytor.com, which is included
in LaTeX and ASCII form in the kernel source distribution (probably in /usr/
src/kernel/Documentation/), as devices.tex and devices.txt.

Q: Does Linux Support File System Encryption?

A: Yes. One file system, ppdd, is archived at http://pweb.de.uu.net/
flexsys.mtk/.

Q: How Do I Resize a Partition Non-Destructively?

A: Use the FIPS.EXE program, included with most Linux distributions,under
MS-DOS.

A: GNU parted, a partition editor, is stable enough for non-guru, mere-mortal
use with relative confidence. Source code for the latest version is at: ftp:/
/ftp.gnu.org/pub/gnu/parted/. There's also a boot disk image for resizing
root partitions and for running parted on non-Linux machines. The disk image
may be easier for beginners. Building from source could require some extra
configuration.

Parted also has tutorial-style, plain-text documentation for Linux and FAT
(MS-DOS) file systems.

A: Also, some commercial distributions come with their own partitioning
software, like Partition Magic.

Q: Where Is the Journalling File System on the Net?

A: Linux actually supports several journalling file systems. ext3 is now
included in current 2.4.x kernels.

A: The journalling file system named Reiserfs has just been released from
testing. It is said to make Linux even faster than Linux with the Ext2 file
system installed, particularly when dealing with many small files.

Complete information is available at http://devlinux.org/namesys/.

A: JFS is still under development.

Q: Why Isn't My Virtual Memory Swap Area Working?

A: When you boot (or enable swapping manually) you should see

Adding Swap: NNNNk swap-space

If you don't see any messages at all you are probably missing

swapon -av

(the command to enable swapping) in your /etc/rc.local or /etc/rc.d/* (the
system startup scripts), or have forgotten to make the right entry in /etc/
fstab:

/dev/hda2 none swap
sw

for example.

If you see:

Unable to find swap-space signature

you have forgotten to run mkswap. See the manual page for details; it works
much like mkfs.

Running the command free, in addition to showing free memory, should display:

total used free Swap: 10188 2960 7228

If typing cat /proc/swaps reveals only file or partition names, but no swap
space information, then the swap file or partition needs re-initialization.

Use fdisk (as root) to determine which partition on a hard drive has been
designated as the swap partition. The partition still needs to be initialized
with mkswap before enabling it with swapon.

[Andy Jefferson, Steve Withers]

Q: How Do I Add Temporary Swap Space?

A: In addition to a swap partition, Linux can also use a swap file. Some
programs, like g++, can use huge amounts of virtual memory, requiring the
temporary creation of extra space. To install an extra 64 MB of swap space,
for example, use the following shell commands:

# dd if=/dev/zero of=/swap bs=1024 count=65535
# mkswap /swap
# swapon /swap

The count= argument to dd determines how big the swap file will be. In this
example the swap file's name is /swap, but the name and location are,
generally, arbitrary, depending only on the file system's available space and
your having write permissions in the directory.

When you don't need the swap space any more, remove it with the following
statements:

# swapoff /swap
# rm /swap

Take a look also at the Installation HOWTO and Installation & Getting Started
for detailed instructions.

If that still doesn't provide enough swap space, refer to How To Have More
Than 128Mb of Swap.
-----------------------------------------------------------------------------

6. System Libraries

Q: Where Can I Find Linux System Specifications?
Q: What Is ld.so and How Do I Get It?
Q: How Do I Upgrade the Libraries without Trashing the System?
Q: What's All This about ELF? glibc?

Q: Where Can I Find Linux System Specifications?

A: As a start, look at the Linux Standards Base, http://www.linuxbase.org.
The site contains information about test software, file system organization,
and shared library naming conventions.

Q: What Is ld.so and How Do I Get It?

A: ld.so is the dynamic library loader. Each binary using shared libraries
used to have about 3K of start-up code to find and load the shared libraries.
Now that code has been put in a special shared library, /lib/ld.so, where all
binaries can look for it, so that it wastes less disk space, and can be
upgraded more easily.

ld.so can be obtained from http://tsx-11.mit.edu/pub/linux/packages/GCC/ and
mirror sites. The latest version at the time of writing is
ld.so.1.9.5.tar.gz.

/lib/ld-linux.so.1 is the same thing for ELF ("What's all this about ELF? ")
and comes in the same package as the a.out loader.

Q: How Do I Upgrade the Libraries without Trashing the System?

A:

Warning You should always have a rescue disk set ready when you perform this
procedure, in the likely event that something goes wrong!

This procedure is especially difficult if you're upgrading very old libraries
like libc4. But you should be able to keep libc4 on the same system with
libc5 libraries for the programs that still need them. The same holds true
for upgrading from libc5 to the newer-yet glibc2 libraries.

The problem with upgrading dynamic libraries is that the moment you remove
the old libraries, the utilities that you need to upgrade to the new version
of the libraries don't work. There are ways around around this. One is to
temporarily place a spare copy of the run time libraries, which are in /lib/,
in /usr/lib/, or /usr/local/lib/, or another directory that is listed in the
/etc/ld.so.conf file.

For example, when upgrading libc5 libraries, the files in /lib/ might look
something like:

libc.so.5 libc.so.5.4.33 libm.so.5 libm.so.5.0.9

These are the C libraries and the math libraries. Copy them to another
directory that is listed in /etc/ld.so.conf, like /usr/lib/:

$ cp -df /lib/libc.so.5* /usr/lib/
$ cp -df /lib/libm.so.5* /usr/lib/
$ ldconfig

Be sure to run ldconfig to upgrade the library configuration.

The files libc.so.5 and libm.so.5 are symbolic links to the actual library
files. When you upgrade, the new links will not be created if the old links
are still there, unless you use the -f flag with cp. The -d flag to cp will
copy the symbolic link itself, and not the file it points to.

If you need to overwrite the link to the library directly, use the -f flag
with ln.

For example, to copy new libraries over the old ones, try this. Make a
symbolic link to the new libraries first, then copy both the libraries and
the links to /lib/, with the following commands.

$ ln -sf ./libm.so.5.0.48 libm.so.5
$ ln -sf ./libc.so.5.0.48 libc.so.5
$ cp -df libm.so.5* /lib
$ cp -df libc.so.5* /lib

Again, remember to run ldconfig after you copy the libraries.

If you are satisfied that everything is working correctly, you can remove the
temporary copies of the old libraries from /usr/lib/ or wherever you copied
them.

Q: What's All This about ELF? glibc?

A: See the ELF HOWTO by Daniel Barlow. Note that this is not the file
move-to-elf, which is a blow-by-blow account of how to upgrade to ELF
manually.

Linux has two different formats for executables, object files, and object
code libraries, known as, "ELF". (The old format is called "a.out".) They
have advantages, including better support for shared libraries and dynamic
linking.

Both a.out and ELF binaries can coexist on a system. However, they use
different shared C libraries, both of which have to be installed.

If you want to find out whether your system can run ELF binaries, look in /
lib for a file named, libc.so.5. If it's there, you probably have ELF
libraries. If you want to know whether your installation actually is ELF you
can pick a representative program, like ls, and run file on it:

-chiark:~> file /bin/ls
/bin/ls: Linux/i386 impure executable (OMAGIC) - stripped

valour:~> file /bin/ls
/bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1, stripped

There is a patch to get 1.2.x to compile using the ELF compilers, and produce
ELF core dumps, at ftp://tsx-11.mit.edu/pub/packages/GCC/. You do not need
the patch merely to run ELF binaries. 1.3.x and later do not need the patch
at all.

The GNU glibc2 libraries are essentially more recent versions of ELF
libraries that follow most of the same processes for dynamic linking and
loading. Upgrade information is contained in How Do I Upgrade the Libraries
without Trashing the System?.
-----------------------------------------------------------------------------

7. Linux Distributions

Q: How Do I Get Started?
Q: What are the Disk Space Requirements for Minimal, Server, and Workstation
Use?
Q: What are the Minimum and Maximum Memory Requirements?
Q: What Is the Best Distribution, SCSI Card, Editor, CD-ROM Drive, etc?
Q: How Can I Get a Distribution?
Q: Where Are the Linux FTP Archives?
Q: How Do I Install Linux Using FTP?
Q: How Can I Get Linux Without FTP Access?
Q: How Do I Install Linux?

Q: How Do I Get Started?

A: If you are new to Linux, you should start by buying or downloading a
general-purpose Linux distribution. A distribution is a complete operating
system, including the Linux kernel and all the utilities and software you are
likely to need, ready to install and use. Most distributions include
thousands of software packages, including user-friendly desktops, office
suites, and games.

There are a handful of major Linux distributions, and as a beginner you are
probably safer using one of them. For information about them, and how they
are installed, see the Distributions-HOWTO from the Linux Documentation
Project. Also, a list of distributions is updated weekly at http://lwn.net.

Before you select which distribution you want to try, read their descriptions
carefully and compare them to your needs. Each distribution is tailored to a
particular type of user. Some are optimized to function as servers, some are
optimized for gaming, and some are optimized for desktop and office use.

There are a few distributions which are considered to be outstanding choices
for new users:

* Red Hat is particularly good for servers

* Mandrake is excellent as a desktop system

* SuSE is also excellent as a desktop system


There are also a large number of releases which are distributed less globally
that suit special local and national needs. Many of them are archived at ftp:
//ftp.tux.org.

Q: What are the Disk Space Requirements for Minimal, Server, and Workstation
Use?

A: Linux needs about 10Mb for a very minimal installation, suitable for
trying Linux, and not much else.

You can fit a typical server installation, including the X Window System GUI,
into 80Mb. Installing a small Debian GNU/Linux workstation takes from 500Mb
to 1GB, including kernel source code, some space for user files, and spool
areas.

Installing a commercial distribution that has a desktop GUI environment,
commercial word processor, and front-office productivity suite, will claim
15.1 GB of disk space, approximately.

A fully installed Debian GNU/Linux system could use several Gigabytes of disk
space.

Q: What are the Minimum and Maximum Memory Requirements?

A: Linux needs at least 4MB, and then you will need to use special
installation procedures until the disk swap space is installed. Linux will
run comfortably in 4MB of RAM, although running GUI apps is impractically
slow because they need to swap out to disk.

Some applications, like StarOffice, require 32 MB of physical memory, and
compiling C++ code can easily consume over 100 MB of combined physical and
virtual memory.

There is a distribution, "Small Linux", that will run on machines with 2MB of
RAM. Refer to the answer to: Where Are the Linux FTP Archives?.

A number of people have asked how to address more than 64 MB of memory, which
is the default upper limit in most standard kernels. Either type, at the BOOT
lilo: prompt:

mem=XXM

Or place the following in your /etc/lilo.conf file:
append="mem=XXM"

The parameter "XXM" is the amount of memory, specified as megabytes; for
example, "128M."

If an "append=" directive with other configuration options already exists in
/etc/lilo.conf, then add the mem= directive to the end of the existing
argument, and separated from the previous arguments by a space; e.g.:
# Example only; do not use.
append="parport=0x3bc,none serial=0x3f8,4 mem=XXM"

Be sure to run the "lilo" command to install the new configuration.

If Linux still doesn't recognize the extra memory, the kernel may need
additional configuration. Refer to the /usr/src/linux/Documentation/
memory.txt file in the kernel source as a start.

For further information about LILO, refer to the manual pages for lilo and
lilo.conf, the documentation in /usr/doc/lilo, the LILO-HOWTO, and the answer
for: How Do I Set the Boot-Time Configuration?, below.

Q: What Is the Best Distribution, SCSI Card, Editor, CD-ROM Drive, etc?

A: The "best" of anything depends on your particular needs. Discussions like
these frequently occur on Usenet. Most often they're flame bait. Answering is
generally a waste of time. Free software licensing is unrestrictive enough,
that, with a little experience, you can perform your own testing on your own
hosts.

A better way to phrase a specific inquiry might be: "Where can I find...."

Q: How Can I Get a Distribution?

A: If you can, please dig into your wallet and buy a copy of your
distribution. Linux distributions are extremely inexpensive - usually around
$30 for a complete system, and anywhere from $70 to around $150 for a larger
system with more server software or development tools. Even the $30 "basic"
systems contain the equivalent of thousands of dollars in proprietary tools,
and are an incredible value. The distributors invest many of your dollars
into further development, and most of them fund outside open source projects.

Commercial distributions are available from book and electronics stores, or
you can order from their websites.

If you use Debian GNU/Linux, which is a volunteer project and a non-profit,
you can donate directly to them instead.

A: There are some websites that sell Linux CD's very inexpensively. Try:

* http://www.cheapbytes.com


A: Every distribution provides a download on their home page. This is a
requirement of the licensing terms of the software, so if you cannot afford
to pay for your distribution, you can get a copy this way. Some people
compromise between paying and downloading, for example by buying each major
release (such as 6.0) but downloading the point releases (such as 6.1 and
6.2).

Also, archives of many of the distributions are on line at: ftp://ftp.tux.org
and http://planetmirror.com/pub/linux.

A: Some hardware vendors now ship systems with Linux pre-installed. However,
they sometimes make it very difficult to buy them - they offer Linux on only
a few systems, which are server machines, or they require you to go to a
special "Linux" section on their website.

Q: Where Are the Linux FTP Archives?

A: There are three main archive sites for Linux:

* ftp://ftp.funet.fi/pub/OS/Linux/ (Finland).

* http://ibiblio.org/pub/linux/ (US), with a nice WWW interface.

* ftp://tsx-11.mit.edu//pub/linux/ (US).


The best place to get the Linux kernel is ftp://ftp.kernel.org/pub/linux/
kernel/. Linus Torvalds uploads the most recent kernel versions to this site.

Of the U.S. distributions, Debian GNU/Linux is available at http://
www.debian.org/distrib/. Red Hat Linux's home site is ftp://ftp.redhat.com/,
and Linux Slackware's is ftp://ftp.freesoftware.com/.

The Small Linux distribution, which can run in 2 MB of RAM, is located at
http://smalllinux.netpedia.net/.

The contents of these sites is mirrored (copied, usually approximately daily)
by a number of other sites. Please use a site close to you will be faster for
you and easier on the network.

* ftp://ftp.sun.ac.za/pub/linux/sunsite/ (South Africa)

* ftp://ftp.is.co.za/linux/sunsite/ (South Africa)

* ftp://ftp.cs.cuhk.hk/pub/Linux/ (Hong Kong)

* ftp://sunsite.ust.hk/pub/Linux/ (Hong Kong)

* ftp://ftp.spin.ad.jp/pub/linux/ (Japan)

* ftp://ftp.nuri.net/pub/Linux/ (Korea)

* ftp://ftp.jaring.my/pub/Linux/ (Malaysia)

* ftp://ftp.nus.sg/pub/unix/Linux/ (Singapore)

* ftp://ftp.nectec.or.th/pub/mirrors/linux/ (Thailand)

* ftp://planetmirror.com/pub/linux (Australia) (Also take a look at http://
planetmirror.com/archives.php.)

* ftp://ftp.monash.edu.au/pub/linux/ (Australia)

* ftp://ftp.univie.ac.at/systems/linux/sunsite/ (Austria)

* ftp://ftp.fi.muni.cz/pub/Unix/linux/ (Czech Republic)

* ftp://ftp.funet.fi/pub/Linux/sunsite/ (Finland)

* ftp://ftp.univ-angers.fr/pub/Linux/ (France)

* ftp://ftp.iut-bm.univ-fcomte.fr/ (France)

* ftp://ftp.ibp.fr/pub/linux/sunsite/ (France)

* ftp://ftp.loria.fr/pub/linux/sunsite/ (France)

* ftp://ftp.dfv.rwth-aachen.de/pub/linux/sunsite/ (Germany)

* ftp://ftp.germany.eu.net/pub/os/Linux/Mirror.SunSITE/ (Germany)

* ftp://ftp.tu-dresden.de/pub/Linux/sunsite/ (Germany)

* ftp://ftp.uni-erlangen.de/pub/Linux/MIRROR.sunsite/ (Germany)

* ftp://ftp.gwdg.de/pub/linux/mirrors/sunsite/ (Germany)

* ftp://ftp.rz.uni-karlsruhe.de/pub/linux/mirror.sunsite/ (Germany)

* ftp://ftp.ba-mannheim.de/pub/linux/mirror.sunsite/ (Germany)

* ftp://ftp.uni-paderborn.de/pub/Mirrors/sunsite.unc.edu/ (Germany)

* ftp://ftp.uni-rostock.de/Linux/sunsite/ (Germany)

* ftp://ftp.rus.uni-stuttgart.de/pub/unix/systems/linux/MIRROR.sunsite/
(Germany)

* ftp://ftp.uni-tuebingen.de/pub/linux/Mirror.sunsite/ (Germany)

* ftp://ftp.kfki.hu/pub/linux/ (Hungary)

* ftp://linux.italnet.it/pub/Linux/ (Italy)

* ftp://ftp.unina.it/pub/linux/sunsite/ (Italy)

* ftp://giotto.unipd.it/pub/unix/Linux/ (Italy)

* ftp://cnuce-arch.cnr.it/pub/Linux/ (Italy)

* ftp://ftp.flashnet.it/mirror2/metalab.unc.edu/ (Italy)

* ftp://ftp.nijenrode.nl/pub/linux/ (Netherlands)

* ftp://ftp.LeidenUniv.nl/pub/linux/sunsite/ (Netherlands)

* ftp://ftp.nvg.unit.no/pub/linux/sunsite/ (Norway)

* ftp://sunsite.icm.edu.pl/pub/Linux/metalab.unc.edu/ (Poland)

* ftp://ftp.rediris.es/software/os/linux/sunsite/ (Spain)

* ftp://sunsite.rediris.es/software/linux/ (Spain)

* ftp://ftp.cs.us.es/pub/Linux/sunsite-mirror/ (Spain)

* ftp://ftp.etse.urv.es/pub/mirror/linux/ (Spain)

* ftp://ftp.etsimo.uniovi.es/pub/linux/ (Spain)

* ftp://ftp.luna.gui.es/pub/linux.new/ (Spain)

* ftp://ftp.metu.edu.tr/pub/linux/sunsite/ (Turkey)

* ftp://unix.hensa.ac.uk/mirrors/sunsite/pub/Linux/ (UK)

* ftp://ftp.maths.warwick.ac.uk/mirrors/linux/sunsite.unc-mirror/ (UK)

* ftp://ftp.idiscover.co.uk/pub/Linux/sunsite.unc-mirror/ (UK)

* ftp://sunsite.doc.ic.ac.uk/packages/linux/sunsite.unc-mirror/ (UK)

* ftp://ftp.io.org/pub/mirrors/linux/sunsite/ (Canada)

* ftp://ftp.cc.gatech.edu/pub/linux/ (US)

* ftp://ftp.freesoftware.com/pub/linux/sunsite/ (US)

* ftp://ftp.siriuscc.com/pub/Linux/Sunsite/ (US)

* ftp://ftp.engr.uark.edu/pub/linux/sunsite/ (US)

* ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ (US)

* ftp://linux.if.usp.br/pub/mirror/metalab.unc.edu/pub/Linux/ (Brazil)

* ftp://farofa.ime.usp.br/pub/linux/ (Brazil)


Please send updates and corrections to this list to the Linux FAQ maintainer,
see Asking Questions and Sending Comments. Not all of these mirror all of the
other "source" sites, and some have material not available on the "source"
sites.

Q: How Do I Install Linux Using FTP?

A: Most distributions are too large and complex to make FTP installation
practical. Installing a basic Linux system that doesn't have a GUI or major
applications is possible with FTP, however. The main non-commercial
distribution in use is Debian GNU/Linux, and this answer describes an
installation of a basic Debian system, to which you can add other Linux
applications and commercial software as necessary.

This answer describes installation on IBM-compatible machines with an Intel
x86 or Pentium processor. You will need a machine with at least a 80386
processor, 8 Mb of memory, and about 100 Mb of disk space. More memory and a
larger disk is necessary however, for practical everyday use.

For other hardware, substitute "-arm", "-ppc", "-m68k", or other abbreviation
in directory names for "-i386".

For detailed and hardware-specific information refer to: http://
www.debian.org/releases/stable/.

* Connect to http://ftp.debian.org/dists/stable/main/disks-i386/current/.
If you use anonymous FTP, connect to ftp://ftp.debian.org/debian/dists/
stable/main/disks-i386/current/.

* Choose the images-*/ subdirectory that matches the type of floppy drive
installed on your machine, if unsure try images-1.44/. Retrieve the
rescue.bin, root.bin, and driver-*.bin disk images. Once you have
installed those floppy images, the rest of the system can be retrieved
from a Debian mirror site, or installed from CD. If you have a Linux
machine, you can use dd to write the images to the diskettes. If you are
creating the installation diskettes on a MS-DOS machine, also download
the RAWRITE.EXE MS-DOS utility, which will copy the raw binary images to
floppy disks. Also download the install.en.txt document, which contains
the detailed installation instructions.

* Create the installation disk set on floppies using either dd under Linux
(e.g.: dd if=resc1440.bin of=/dev/fd0), or the RAWRITE.EXE utility under
MS-DOS. Be sure to label each installation diskette.

* Insert the rescue diskette into the floppy drive and reboot the computer.
If all goes well, the Linux kernel will boot, and you will be able start
the installation program by pressing Enter at the boot: prompt.

* Follow the on-screen instructions for partitioning the hard disk,
installing device drivers, the basic system software, and the Linux
kernel. If the machine is connected to a local network, enter the network
information when the system asks for it.

* To install additional software over the Internet, be sure that you have
installed the ppp module during the installation process, and run (as
root) the /usr/sbin/pppconfig utility. You will need to provide your user
name with your ISP, your password, the ISP's dial-up phone number, the
address(es) of the ISP's Domain Name Service, and the serial port that
your modem is connected to, /dev/ttyS0 /dev/ttyS3. Be sure also to
specify the defaultroute option to the PPP system, so the computer knows
to use the PPP connection for remote Internet addresses.

* You may have to perform additional configuration on the PPP scripts in
the /etc/ppp subdirectory, and in particular, the ISP-specific script in
the /etc/ppp/peers subdirectory. There are basic instructions in each
script. For detailed information, refer to the Debian/GNU Linux
installation instructions that you downloaded, the pppd manual page (type
man pppd), and the PPP HOWTO from the Linux Documentation project, http:/
/tldp.org/.

* Once you have a PPP connection established with your ISP (it will be
displayed in the output of ifconfig), use the dselect program to specify
which additional software you want to install. Use the apt [A]ccess
option to retrieve packages via anonymous FTP, and make sure to use the
[U]pdate option to retrieve a current list of packages from the FTP
archive.


Q: How Can I Get Linux Without FTP Access?

A: The easiest thing is probably to find a friend with FTP access. If there
is a Linux user's group near you, they may be able to help.

If you have a reasonably good email connection, you could try the FTP-by-mail
servers at ftpmail@ftp.sunet.se, or ftpmail@ftp.uni-stuttgart.de.

Linux is also available via traditional mail on CD-ROM. The file ftp://
metalab.unc.edu/pub/Linux/docs/HOWTO/Installation-HOWTO, and the file ftp://
metalab.unc.edu/pub/Linux/docs/HOWTO/Distribution-HOWTO contain information
on these distributions.

Q: How Do I Install Linux?

A: Once you obtain a distribution, it will contain instructions on
installation. Each distribution has its own installation program.

A: There is a very thorough installation guide on line at http://
heather.cs.ucdavis.edu/~matloff/linux.html

A: Some distributions (e.g., Debian GNU/Linux) can be installed via anonymous
FTP from various Linux archive sites, but unless you have cable, DSL, or some
other broadband Internet access, the size of the distribution makes this
impractical. See Where Are the Linux FTP Archives?.

Postings on the Usenet News groups, including the FAQ, are archived on http:/
/groups.google.com/. Search for news:comp.os.linux, news:alt.uu.comp.os.linux
and their subgroups, or whatever is appropriate, to retrieve articles from
the Linux News groups. See What News Groups Are There for Linux?.
-----------------------------------------------------------------------------

8. Booting the OS

Q: Can Linux Boot from MS-DOS?
Q: How Can Linux Boot from OS/2's Boot Manager?
Q: How Do I Set the Boot-Time Configuration?
Q: How Do I Get LILO to Boot the Kernel Image?
Q: Can I Remove LILO So the System Boots DOS Again?
Q: Why Does the System Check the Ext2fs Partitions Each Reboot?
Q: How Do I Make Sure the System Boots after Re-Installing the Operating
System?
Q: How To Make a Rescue Floppy

Q: Can Linux Boot from MS-DOS?

A: If LILO doesn't work, and if the machine has MS-DOS or Microsoft Windows,
you may be left with a computer that won't boot. This can also happen on an
upgrade to your Linux distribution. Re-installing LILO is the last thing that
the installation does.

It is vitally important when installing or upgrading Linux on a dual boot
machine, to have a MS-DOS or Windows rescue disk nearby so you can FDISK
-MBR. Then you can go about using LOADLIN.EXE instead of LILO.

This config.sys file is one possible way to invoke LOADLIN.EXE and boot
MS-DOS or Linux.

[menu] menuitem=DOS, Dos Boot menuitem=LINUX, Linux Boot

[LINUX] shell=c: edhatloadlin.exe c: edhatautobootvmlinuz vga=5 root=/dev

[DOS] STACKS = 0,0 rem all the other DOS drivers get loaded here.

This creates a menu where you can directly jump to LOADLIN.EXE before all of
the MS-DOS drivers get loaded.

The paths and options are peculiar to one machine and should be intuitively
obvious to the most casual observer. See the LOADLIN.EXE docs for options.
They are the same as LILO, and options are just passed to the kernel, anyhow.

[Jim Harvey]

Q: How Can Linux Boot from OS/2's Boot Manager?

A: #Create a partition using OS/2's FDISK.EXE (Not Linux's fdisk).

1. Format the partition under OS/2, either with FAT or HPFS. This is so that
OS/2 knows about the partition being formatted. (This step is not
necessary with OS/2 Warp 3.0.)

2. Add the partition to the Boot Manager.

3. Boot Linux, and create a file system on the partition using mkfs -t ext2
or mke2fs. At this point you may, if you like, use Linux's fdisk to
change the code of the new partition to type 83 (Linux Native)this may
help some automated installation scripts find the right partition to use.

4. Install Linux on the partition.

5. Install LILO on the Linux partition NOT on the master boot record of the
hard drive. This installs LILO as a second-stage boot loader on the Linux
partition itself, to start up the kernel specified in the LILO
configuration file. To do this, you should put

boot = /dev/hda2

(where /dev/hda2 is the partition you want to boot from) in your /etc/
lilo/config or /etc/lilo.config file.

6. Make sure that it is the Boot Manager partition that is marked active, so
that you can use Boot Manager to choose what to boot.


There is a set of HOWTO's on the subject of multi-boot systems at the LDP
Home Page, http://tldp.org.

Q: How Do I Set the Boot-Time Configuration?

A: You can configure Linux at the lilo: prompt either by typing the kernel
arguments at the BOOT lilo: prompt, or by adding an append= directive to the
/etc/lilo.conf file; for example, at the LILO prompt (example only):

BOOT lilo: parport=0x3bc,7
parport=0x3bc,none serial=0x3f8,4 serial=0x2f8,3

Example statement for /etc/lilo.conf:
append="parport=0x3bc,none serial=0x3f8,4 serial=0x2f8,3"

If you modify the /etc/lilo.conf file, be sure to run the lilo command to
install the new configuration.

Configuration notes for specific hardware devices are in the documentation of
the kernel source distribution, /usr/src/linux/Documentation in most
distributions.

Refer to the lilo and /etc/lilo.conf manual pages, as well as the LDP
BootPrompt-HowTo, see Where Is the Documentation?, and the documentation in /
usr/doc/lilo.

Q: How Do I Get LILO to Boot the Kernel Image?

A: From kernel versions 1.1.80 on, the compressed kernel image, which is what
LILO needs to find, is in arch/i386/boot/zImage, or arch/i386/boot/bzImage
when it is built, and is normally stored in the /boot/ directory. The /etc/
lilo.conf file should refer to the vmlinuz symbolic link, not the actual
kernel image.

This was changed to make it easier to build kernel versions for several
different processors from one source tree.

Q: Can I Remove LILO So the System Boots DOS Again?

A: The lilo program (not the complete LILO package), uses the command line
option -u to uninstall the LILO boot loader. You have to supply the device
name of the device you installed LILO on, for example:

lilo -u /dev/hda

This rewrites the original, pre-LILO master boot record back to the first
hard drive, from the boot record saved in /boot/boot.0300. If you installed
LILO to a partition as a secondary boot loader, for example, /dev/hda1, lilo
re-installs the original boot sector from the save file /boot/boot.0301.
Refer to the lilo manual page for details. Thanks to Villy Kruse for
reminding me to update this answer.

If you have an earlier version of LILO, you will have to use the DOS (MS-DOS
5.0 or later, or OS/2) FDISK /MBR (which is not documented). This will
overwrite the lilo boot loader with a standard MS-DOS Master Boot Record. If
you have DR-DOS 6.0, go into FDISK.EXE in the normal way and then select the
Re-write Master Boot Record option.

If you create a boot floppy during the Windows installation process, make
sure that it contains the programs FDISK.EXE, FORMAT.COM, and SYS.COM, and
use that to re-install MS-DOS on the hard disk.

If you don't have MS-DOS or DR-DOS, you need to have the boot sector that
LILO saved when you first installed it. You did keep that file, didn't you?
It's probably called boot.0301 or some such. Type:

dd if=boot.0301 of=/dev/hda bs=445 count=1

(or /dev/sda if you're using a SCSI disk). This may also wipe out your
partition table, so beware! If you're desperate, you could use

dd if=/dev/zero of=/dev/hda bs=512 count=1

This will erase your partition table and boot sector completely: you can then
reformat the disk using your favorite software. But this will render the
contents of your disk inaccessible you'll lose it all unless you're an
expert.

Note that the DOS MBR boots whichever (single!) partition is flagged as
"active." You may need to use fdisk to set and clear the active flags on
partitions appropriately.

Q: Why Does the System Check the Ext2fs Partitions Each Reboot?

A: Refer to EXT2-fs: warning: mounting unchecked file system.

Q: How Do I Make Sure the System Boots after Re-Installing the Operating
System?

A: This should work whether you're re-installing Linux or some other,
commercial, operating system:

* Insert a blank, formatted floppy in drive A:

* Save a copy of the boot hard drive's Master Boot Record to the floppy, by
executing the command:

#dd if=/dev/hda of=/dev/fd0 count=1

dd is a standard program on Linux systems. A MS-Windows compatible
version is available from ftp://ftp.gnu.org/, as well as many MS software
archives.

* Test that the floppy boots the system by rebooting with the floppy in the
A: drive.

* Then you should be able to install the other operating system (on a
different hard drive and/or partition, if you don't want to uninstall
Linux).

* After installation, boot Linux again from the floppy, and re-install the
MBR with the command: /sbin/lilo.


[Jacques Guy]

Q: How To Make a Rescue Floppy

A: Make a file system on it with bin, etc, lib and dev directorieseverything
you need. Install a kernel on it and arrange to have LILO boot it from the
floppy (see the LILO documentation, in lilo.u.*.ps).

If you build the kernel (or tell LILO to tell the kernel) to have a RAM disk
the same size as the floppy the RAM disk will be loaded at boot time and
mounted as root in place of the floppy.

See the Bootdisk HOWTO.
-----------------------------------------------------------------------------

9. Application Software Management

Q: How To Determine What Packages Are Installed on a System
Q: How Do I Find a Particular Application?
Q: What Software does Linux Support?
Q: Can Linux Use True Type Fonts?
Q: Can Linux Run Microsoft Windows Programs?
Q: How Do I Install GNU Software?
Q: Where Can I Get Java?
Q: Where Can I Find Kermit for Linux?
Q: Is There an ICQ Program That Runs under Linux?

Q: How To Determine What Packages Are Installed on a System

A: For distributions that use RPM format packages, use the command:

$ rpm -qa

You need to be logged in as root. You can save the output to a text file for
future reference, a command like:

$ rpm -qa >installed-packages

A: For Debian systems, the equivalent command is:

$ dpkg -l

A: For Slackware and Slackware based distributions, look in the directory /
var/log/packages.

[Steven J. Hathaway]

There is one file that describes the contents of each *.tgz package installed
on your system.

Q: How Do I Find a Particular Application?

A: Look first in the Linux Software Map. It's at: ftp://metalab.unc.edu/pub/
Linux/docs/linux-software-map/, and on the other FTP sites. A search engine
is available on the World Wide Web at http://www.boutell.com/lsm/.

Also check out the Freshmeat Web site: http://www.freshmeat.net, which is
where many new announcements of free software first appear. Freshmeat is
basically a site index that continuously updates the notices of new or
upgraded software for Linux, and maintains indexes of the announcements and
links to their URL's.

The FTP sites (Where Are the Linux FTP Archives?) often have ls-lR or INDEX
directory listings which you can search using grep or a text editor. The
directory listings files can be very large, however, making them unwieldy for
quick searches.

Also look at the Linux Project's Map: ftp://ftp.ix.de/pub/ix/Linux/docs/
Projects-Map.gz.

There's a search engine for Linux FTP archives at: http://lfw.linuxhq.com.

Searching for "Linux" on the World Wide Web provides copious references. (
Where Is the Linux Stuff on the World Wide Web?)

If you don't find anything, you could download the sources to the program
yourself and compile them. See (How Do I Port XXX to Linux?). If it's a large
package that may require some porting, post a message to news:
comp.os.linux.development.apps. The popularity of Linux makes this an
extremely unlikely occurrence. The great majority of software available on
other Unix-type systems has already been ported to Linux.

If you compile a large-ish program, please upload it to one or more of the
FTP sites, and post a message to news:comp.os.linux.announce (submit your
posting to linux-announce@news.ornl.gov.

If you're looking for an application program, the chances are that someone
has already written a free version. The news:comp.sources.wanted FAQ has
instructions for finding the source code.

Q: What Software does Linux Support?

A: Linux runs all of the standard open source utilities, like GCC, (X)Emacs,
the X Window System, all the standard Unix utilities, TCP/IP (including SLIP
and PPP), and all of the hundreds of programs that people have compiled or
ported to it.

There is a DOS emulator, called DOSEMU, that lets Linux run programs written
for DOS. The latest stable release is 0.98.3. The FTP archives are at ftp://
ftp.dosemu.org/dosemu. The Web site is http://www.dosemu.org.

The emulator can run DOS itself and some (but not all) DOS applications. Be
sure to look at the README file to determine which version you should get.
Also, see the DOSEMU-HOWTO (slightly dated at this point it doesn't cover the
most recent version of the program), at ftp://metalab.unc.edu/pub/Linux/docs/
HOWTO.

Work has been progressing on WINE, an emulator for Microsoft Windows
binaries. See Can Linux Run Microsoft Windows Programs?.

Intel Binary Compatibility Standard (iBCS2) emulator code for SVR4 ELF and
SVR3.2 COFF binaries can be included in the kernel as a compile-time option.
There is information at ftp://tsx-11.mit.edu/pub/linux/BETA/ibcs2/README. For
more information see the INFO-SHEET.

Some companies have commercial software available. They often announce their
availability on news:comp.os.linux.announce try searching the archives. See
Are the News Groups Archived Anywhere?.

Q: Can Linux Use True Type Fonts?

A: Yes. There are a number of True Type font servers for the X Window System.
One of them is xfsft. Its home page is http://www.dcs.ed.ac.uk/home/jec/
programs/xfsft/. There are also instructions for configuration.

A: Another True Type font server is xfstt

A: People have reported success with other True Type font servers. There are
links from the xfsft Home Page to them as well.

A: You can also compile True Type Font support into your X server directly.
Again, refer to the xfsft Home Page for details.

A: Debian users should consult the TT-Debian-HOWTO.

Q: Can Linux Run Microsoft Windows Programs?

A: If you need to run MS Windows programs, the safest bet is to dual-boot
Windows and Linux. LILO, the Linux boot loader, can boot one of several
operating systems from a menu. Booting Windows is obviously the most reliable
way to run all your Windows programs. See the LILO documentation for details
on dual booting. Also, LOADLIN.EXE (a DOS program to load a Linux, or other
OS, kernel is one way to make Linux co-exist with DOS. LOADLIN.EXE is
particularly handy when you want to install Linux on a 3rd or 4th drive on a
system (or when you're adding a SCSI drive to a system with an existing IDE).

In these cases, it is common for LILO's boot loader to be unable to find or
load the kernel on the "other" drive. So you just create a C:LINUX directory
(or whatever), put LOADLIN.EXE in it with a copy of your kernel, and use
that.

LOADLIN.EXE is a VCPI compliant program. Win95 will want to "shutdown into
DOS mode," to run it (as it would with certain other DOS protected-mode
programs).

Earlier versions of LOADLIN.EXE sometimes required a package called
REALBIOS.COM, which required a boot procedure on an (almost) blank floppy to
map the interrupt vectors (prior to the loading of any software drivers).
(Current versions don't seem to ship with it, and don't seem to need it).

[Jim Dennis]

A: WINE (WINE Is Not an Emulator), is a reimplementation of Windows APIs for
Linux and Unix. WINE is a great project with huge potential, but it is still
not ready for general distribution. The WINE team is still working toward a
1.0 release. However, it is already capable of running many Windows programs.
If you want to contribute to its development, look for the status reports in
the news:comp.emulators.ms-windows.wine newsgroup.

There is also a FAQ, compiled by P. David Gardner, at ftp://metalab.unc.edu/
pub/Linux/docs/faqs/Wine-FAQ/.

A: A proprietary program called VMWare is also available to let you run
Windows under a Linux "host" operating system. See the company's website at
http://www.vmware.com.

A: Another package that will help is Win4Lin, a proprietary package. Win4Lin
also allows you to run many Windows programs under *NIX.

Here is how one user reports on Win4Lin:
I just finished installing it on a new installation of
Mandrake 8.1 and I have found it to be very satisfactory. It
only cost $49 (received a special offer after registering at
their website for information). I installed it in just a
very few minutes, and it now allows me to run all of the
Windows applications programs I have been used to using for
a long time (Pagemaker, Lview, Paint Shop Pro, Explorer
etc.) in a window on one of my Linux KDE desktop screens ...
concurrently with all of my Linux tools.
--Josef Lowder

Q: How Do I Install GNU Software?

A: On a correctly configured system, installing a GNU software package
requires four steps:

1. With the source.tar.gz archive in the /usr/src/ directory, or wherever
you maintain your source files, untar and decompress the package with the
command:

tar zxvf package-name.tar.gz

2. Run the ./configure script in the untarred source archive's top-level
directory with whatever command line arguments you need. The options that
configure recognizes are usually contained in a file called INSTALL or
README.

3. Run make. This will build the source code into an executable program (or
programs) and may take a few minutes or a few hours, depending on the
speed of the computer and the size of the package.

4. Run make install. This will install the compiled binaries, configuration
files, and any libraries in the appropriate directories.


Q: Where Can I Get Java?

A: The Sun Microsystems Java runtime environments and developer's kits are at
http://java.sun.com

You can also get the source code, which is licensed by Sun Microsystems.

A: The home page of IBM's Jikes Java compiler is http://
www10.software.ibm.com/developerworks/opensource/jikes.

A: There is a version of Sun's HotJava browser for Linux at: http://
www.java.sun.com/products/hotjava/.

A: Kaffee, a free Java clone, is available from: http://www.kaffe.org.

A: There is a resource page of free and commercial Java packages at: http://
www.blackdown.org/java-linux.html.

A: Netscape Communicator comes with its own version of the Java Runtime
Environment, so if you need Java only to view Web graphics, you may already
have the runtime version of the Java Virtual Machine and libraries that you
need installed on your system. You can download Communicator from http://
www.netscape.com.

Q: Where Can I Find Kermit for Linux?

A: Kermit is distributed under a non-GPL copyright that makes its terms of
distribution somewhat different. The sources and some binaries are available
on ftp://kermit.columbia.edu.

The WWW Home Page of the Columbia University Kermit project is http://
www.columbia.edu/kermit/.

Q: Is There an ICQ Program That Runs under Linux?

A: Several ICQ clients are available on metalab.unc.edu. Refer to Where Are
the Linux FTP Archives?). ICQ itself does not have a Linux client, but there
is a Java client at http://www.mirabilis.com/download/.

Q; Where Can I Find lint for Linux?|lint-for-linux

A: Roughly equivalent functionality is built into GCC. Use the -Wall option
to turn on most of the useful extra warnings. See the GCC manual for more
details (type F1-i in Emacs and select the entry for GCC).

There is a freely available program called lclint that does much the same
thing as traditional lint. The announcement and source code are available at
ftp://ftp.sds.lcs.mit.edu/pub/lclint; on the World Wide Web, look at http://
lclint.cs.virginia.edu.
-----------------------------------------------------------------------------

10. Directory And File Management

Q: How Do I Undelete Files?
Q: How Do I Make Backups?
Q: Is There a Defragmenter for Ext2fs?

Q: How Do I Undelete Files?

A: In general, this is very hard to do on unices because of their
multitasking nature. Undelete functionality for the ext2fs file system is
being worked on, but don't hold your breath.

There are a number of packages available which instead provide new commands
for deleting and copying which move deleted files into a "wastebasket"
directory. The files can be recovered until cleaned out automatically by
background processing.

The Midnight Commander file manager provides an undelete facility that uses
Ext2 file system library functions and an undelete directory for each file
system. Commercial distribution packages of MC may or may not have this
feature enabled, so be sure to look in the source code distribution for
instructions on how to enable the undelete feature.

Alternatively, you can search the raw disk device which holds the file system
in question. This is hard work, and you will need to be logged in as root to
do this. But it can be done. Run grep on the raw device; e.g.:

grep -b 'bookmarks' /dev/hda

If the data has not been overwritten, you should be able to recover it with a
text editor.

[Dave Cinege, Daniel Novotny]

Q: How Do I Make Backups?

A: You can back up a directory hierarchy or complete file system to any media
using GNU tar or cpio, the standard *nix tools for this purpose. tar seems to
be the more commonly used program currently, and includes command line
options to make compressed, incremental, and multi-volume backups. Complete
information is contained in the documentation, which is in GNU Texinfo
format.

A: The free program, Amanda, receives a lot of mentions on Usenet. Its home
page is http://www.amanda.org.

A: Several commercial backup utilities also exist. They are often included in
commercial distributions.

Q: Is There a Defragmenter for Ext2fs?

A: Yes. There is defrag, a Linux file system defragmenter for ext2, Minix,
and old-style ext file systems. It is available at ftp://metalab.unc.edu/pub/
Linux/system/filesystems/defrag-0.70.tar.gz. Users of the ext2 file system
can probably do without defrag, because ext2 contains extra code to keep
fragmentation reduced even in very full file systems.
-----------------------------------------------------------------------------

11. Connecting To A Network

Q: How I Configure Dial-up PPP?
Q: How Do I Use Linux with a Cable Modem?
Q: Where Is Information about NFS Compatibility?
Q: What Does VFS Stand For?
Q: Can Linux Access SMB File Systems?

Q: How I Configure Dial-up PPP?

A: This information is mainly for people who do not have a wrapper utility
like kppp or pppconfig, or are not able to get those utilities to work
correctly. If you need to manually configure PPP to dial in to your ISP, you
will need the following information:

* The port that your modem is connected to: /dev/ttyS0-/dev/ttyS3, which
correspond to COM1-COM4 under MS-DOS.

* The phone number of your ISP's data connection.

* The user name and password that your ISP gave you.

* The IP addresses of the primary and possibly secondary Domain Name
Service that you will use when dialing in to the ISP. This assumes that
you will not be using a DNS that you installed on your system.

When you have all of this information, make sure that the programs pppd
and chat, at the very minimum, are installed correctly. In most current
distributions, they are installed in the /usr/sbin/ directory, and you
will need to be logged in as root to use them. In addition, the following
programs are also useful for configuring network connections, determining
network status, and diagnosing problems: /sbin/ifconfig, /sbin/route, /
bin/ping, /usr/sbin/traceroute. These are the basic steps that you need
to follow to configure PPP. You must be logged in as root.

* Make sure that the serial port and modem are operating correctly. Using a
program like minicomm or kermit, you should be able to send AT commands
to the modem and receive the OK string in response from the modem.

* Enter the primary and possibly secondary Domain Name Server IP addresses
in the /etc/resolv.conf file, using dotted quad notation, with the
nameserver label. For example:

order hosts,bind
nameserver 196.182.101.103
nameserver 196.182.101.104

The nameserver addresses in the example above are examples only. They
don't correspond to actual network hosts. The first line, order
hosts,bind, tells your networking software, when it resolves network
domain addresses, to first look in the /etc/hosts file, and then use the
bind service; i.e., the DNS servers, which are specified on the lines
that begin with nameserver.

* Locate the chat script that PPP will use to dial the modem and connect to
your ISP. In many systems, this is either in the /etc/chatscripts or /etc
/ppp directory, and will be called provider or something similar. You can
store a chat script anywhere, provided that you tell pppd to use it
rather than the default script. Refer to the chat and pppd manual pages,
and the information below, for details. Here is a sample chat script:

ABORT BUSY
ABORT "NO CARRIER"
ABORT VOICE
ABORT "NO DIALTONE"
"" ATDT<your_isp's_phone_number>
ogin <your_user_name>
word <your_password>

This is a chat program for a simple, script based login. The chat program
uses the pair of strings on each line as a match/response pair. When it
starts, it sends the string "ATDTyour_isp's_phone_number," where you have
substituted the actual phone number of course. It then waits for the
string ogin (a substring of the word login) and sends your user name. It
then waits for word (a substring of password) and sends your password. If
your ISP uses a different login and password prompts, and any additional
prompts, you will need to edit the script accordingly. Again, refer to
the chat manual page for details.

If your ISP uses PAP or CHAP authentication, you will need to edit the
pap-secrets or chap-secrets files in /etc/ppp directory as well. Refer to
the manual pages for these files, as well as the instruction in the files
themselves.

* The configuration of pppd, the program that maintains the actual
connection, is usually contained in two or three separate files. The
first is usually /etc/ppp/options, which contains options that all of
your system's PPP connections will use. (Yes, you can have more than one;
as many as your computer has serial ports, generally.)

Here is a sample /etc/ppp/options file:

#/etc/ppp/options
asyncmap
0
auth
crtscts
lock
noipx
# ---<End of File>---

The options may be given on one line or each on a separate line. Many
options files are much longer, and come with a description of each
option. Here, the options mean, in order, don't remap any characters
between the PPP client and server; always use password, PAP, or CHAP
authentication when making a connection; use the modem's hardware
handshake lines for flow control; lock the serial port when in use so no
other programs can access it; and do not use the IPX network protocol.

* For connection set-up on each individual serial port or PPP host, there
will either be an /etc/ppp/options.ttyS1, for example, options file for /
etc/ttyS1, or a file for your ISP in the /etc/ppp/peers directory. The
default is often called /etc/ppp/peers/provider. Here is a sample of the
default provider file:

noauth
connect "/usr/sbin/chat -v -f /etc/chatscripts/provider"
defaultroute
/dev/ttyS1
38400
persist

There might be an explanation of these and other options in the /etc/ppp/
peers/provider file itself. You can also refer to the pppd manual page
for details. Briefly, they mean: do not use PAP authentication for this
connection; use the chat program and the /etc/chatscripts/provider
script, which is described above, to dial the phone and log in; set the
network default route to the PPP connection (so when your network
software needs to resolve an network address that is not on your local
machine(s), it will use the PPP connection to the Internet); use /dev/
ttyS1 as the serial port for the connection; set the modem speed to
38400; and keep the pppd daemon running even if the connection fails.


That is all of the configuration you need. To actually start and stop PPP,
there are often /usr/bin/pon and /usr/bin/poff scripts (in Debian), or
something similar, and they are usually very simple, and only contain the
command:

$ /usr/sbin/pppd call ${1:-provider}

This will start pppd and use the call option to call the server that you type
on the command line, or the provider given in the /etc/ppp/peers/provider
file if you do not specify a remote server. After making the call and logging
in (about 30 seconds), you should be able to use the /sbin/ifconfig program
to determine that the connection really did establish a PPP interface (the
first will be ppp0, the second will be ppp1, etc., depending on how many
simultaneous PPP connections you have. If something goes wrong, you can look
at the /var/log/ppp.log file to determine what happened. You can also view
the log as the connection is being made, by "tailing" it in another window;
that is, viewing it as pppd logs the connection's status information. To do
this, use the command (again, as root):

$ tail -f /var/log/ppp.log

On some systems the PPP output is directed to /var/log/messages, in which
case your system may not have a dedicated PPP log file.

You should be also able to ping one of your ISP's domain names (e.g.,
mail.isp.com) and receive a response.

These are the most basic steps for configuring a PPP connection. You will
also need to take into account what other network connections may be present
(for example, if there's an Ethernet connection that has already been
assigned the default route), as well as various security measures at your
ISP's end. If you're having trouble making the dial-up connection, usually
the best way to determine what may be going wrong is to use Seyon, minicomm,
kermit, or some other program to dial and log in manually to the ISP, and
determine just exactly what you have to do to log in, then duplicate that in
the PPP scripts.

Most Linux documentation also has additional instructions for configuring PPP
connections.

Refer to Where Are the Linux FTP Archives? and Where Is the Documentation?.

Q: How Do I Use Linux with a Cable Modem?

A: The www.CablemodemInfo.com and xDSL Web page at http://
www.cablemodeminfo.com has a section devoted to Linux.

See also the Cable-Modem-HOWTO at the LDP.

Q: Where Is Information about NFS Compatibility?

A: See the NFS-HOWTO for up to date information.

A: This information is partly taken from Nicolai Langfeldt's excellent NFS
HOWTO, and is current as of 10/1/1999:

Most version 2.2.x kernels need a set of patches to install the knfsd
subsystem, maintained by H.J. Lu, to communicate efficiently (if at all) with
Sparc, IBM RS, and Alpha machines, and probably others. This package is
actually a collection of patches to the kernel sources. Better support for
non-Intel architectures is included in the 2.4 kernels.

There is also a user-space server. Although it lacks remote file locking, it
is easier to install. It may be equally efficient.

In the Documentation/Changes of recent kernel distributions, there is a list
of URL's for both the knfsd server and the user-space server.

In the case of older Solaris releases, the lack of statd or lockd on a client
or server machine may cause incompatibility. On some versions of Solaris,
statd can be used to exploit features of the automounter. Sun released a
patch to correct this, but statd still needs to be started by root on such
systems. On recent Solaris systems, refer to the information in /etc/dfs/
dfstab and the share(1M) manual page to enable volume sharing. In addition,
the rpcinfo program can tell you if statd or lockd are available on the local
or remote machines.

The linux-kernel mailing list has on-and-off discussions of the status of the
NFS subsystem, which appears to be changing rapidly.

[Nicolai Langfeldt, Robert Kiesling, Anders Hammarquist]

Q: What Does VFS Stand For?

A: Virtual File System. It's the abstraction layer between the user and real
file systems like ext2, Minix and MS-DOS. Among other things, its job is to
flush the read buffer when it detects a disk change on the floppy disk drive.

VFS: Disk change detected on device 2/0

Q: Can Linux Access SMB File Systems?

A: Linux supports read/write access of Windows for Workgroups and Windows NT
SMB volumes. See the file Documentation/filesystems/smbfs.txt of the Linux
kernel source distribution, and How To Upgrade/Recompile a Kernel.

There is also a suite of programs called Samba which provide support for WfW
networked file systems (provided they're for TCP/IP). Information is
available in the README file at metalab.unc.edu/pub/Linux/system/network/
samba/.

The SMB Web site is http://www.samba.org, and there is also a Web site at
samba.anu.edu.au/samba/.
-----------------------------------------------------------------------------

12. Troubleshooting

Q: What are these Nasty Messages about Inodes, Blocks, and the Like?
Q: Why Do FTP Transfers Seem to Hang?
Q: Why Does Free Dump Core?
Q: Why Does Netscape Crash Frequently?
Q: Why Won't My FTP or Telnet Server Allow Logins?
Q: How Do I Keep Track of Bookmarks in Netscape?
Q: Why Does the Computer Have the Wrong Time?
Q: Why Don't Setuid Scripts Work?
Q: Why Is Free Memory as Reported by free Shrinking?
Q: Why Does the System Slow to a Crawl When Adding More Memory?
Q: Why Won't Some Programs (e.g., xdm) Allow Logins?
Q: Why Do Some Programs Allow Logins with No Password?
Q: Why Does the Machine Run Very Slowly with GCC / X / ...?
Q: Why Does My System Only Allow Root Logins?
Q: Why Is the Screen Is All Full of Weird Characters Instead of Letters?
Q: If I Screwed Up the System and Can't Log In, How Can I Fix It?
Q: What if I Forget the root Password?
Q: What's This Huge Security Hole in rm!?!?!
Q: Why Don't lpr and/or lpd Work?
Q: Why Are the Timestamps on Files on MS-DOS Partitions Set Incorrectly?
Q: Why is My Root File System Read-Only?
Q: What Is /proc/kcore?
Q: Why Does fdformat Require Superuser Privileges?
Q: Why Doesn't My PCMCIA Card Work after Upgrading the Kernel?

Q: What are these Nasty Messages about Inodes, Blocks, and the Like?

A: You may have a corrupted file system, probably caused by not shutting
Linux down properly before turning off the power or resetting. You need to
use a recent shutdown program to do this for example, the one included in the
util-linux package, available on sunsite and tsx-11.

If you're lucky, the program fsck (or e2fsck or xfsck as appropriate if you
don't have the automatic fsck front-end) will be able to repair your file
system. If you're unlucky, the file system is trashed, and you'll have to
re-initialize it with mkfs (or mke2fs, mkxfs, etc.), and restore from a
backup.

NB: don't try to check a file system that's mounted read/writethis includes
the root partition, if you don't see

VFS: mounted root
... read-only

at boot time.

Q: Why Do FTP Transfers Seem to Hang?

A: FTP transfers that die suddenly are due, apparently, to some form of
overrunning buffer. It occurs both with Linux and Microsoft servers. On Linux
systems, the problem seems to occur most commonly with the distribution's
server software.

If you receive ftp: connection refused errors, then the problem is likely due
to a lack of authentication. Refer to Why Won't My FTP or Telnet Server Allow
Logins?.

One remedy is to be replacing the distribution FTP server with the Linux port
of the OpenBSD FTP server. The home page is: http://www.eleves.ens.fr:8080/
home/madore/programs/.

To install the BSD server, follow the installation instructions, and refer to
the manual pages for inetd and inetd.conf. (If you have the newer xinetd, see
below.) Be sure to tell inetd to run the BSD daemon alone, not as a
subprocess of, for example, tcpd. Comment out the line that begins ftp in the
/etc/inetd.conf file and replace it with a line similar to (if you install
the new ftpd in /usr/local/sbin/):
# Original entry, commented out. #ftp stream tcp nowait root /usr/sbin/tcpd
/usr/sbin/in.ftpd

# Replacement entry: ftp stream tcp nowait root /usr/local/sbin/ftpd -l

The replacement daemon will become effective after rebooting or sending (as
root) a SIGHUP to inetd, e.g.:

# kill -HUP inetd

To configure xinetd, create an entry in /etc/xinetd.d per the instructions in
the xinetd.conf manual page. Make sure, again, that the command-line
arguments for ftpd are correct, and that you have installed the /etc/ftpusers
and /etc/pam.d/ftp files. Then restart xinetd with the command: /etc/rc.d/
init.d/xinetd restart. The command should report "OK," and the restart will
be noted in the system message log.

Q: Why Does Free Dump Core?

A: In Linux 1.3.57 and later, the format of /proc/meminfo was changed in a
way that the implementation of free doesn't understand.

Get the latest version, from metalab.unc.edu, in /pub/Linux/system/Status/ps/
procps-0.99.tgz.

Q: Why Does Netscape Crash Frequently?

A: Netscape shouldn't crash, if it and the network are properly configured.
Some things to check:

* Make sure that the MOZILLA_HOME environment variable is correctly set. If
you installed Netscape under /usr/local/netscape/, for example, that
should be the value of MOZILLA_HOME. Set it from the command line (e.g,
"export MOZILLA_HOME="/usr/local/netscape"" under bash or add it to one
your personal or system initialization files. Refer to the manual page
for your shell for details.

* If you have a brand-new version of Netscape, try a previous version, in
case the run-time libraries are slightly incompatible. For example, if
Netscape version 4.75 is installed (type "netscape --version" at the
shell prompt), try installing version 4.7. All versions are archived at
ftp://ftp.netscape.com/.

* Netscape uses its own Motif and Java Runtime Environment libraries. If a
separate version of either is installed on your system, ensure that they
aren't interfering with Netscape's libraries; e.g., by un-installing
them.

* Make sure that Netscape can connect to its default name servers. The
program will appear to freeze and time out after several minutes if it
can't. This indicates a problem with the system's Internet connection;
likely, the system can't connect to other sites, either.


Q: Why Won't My FTP or Telnet Server Allow Logins?

A: This applies to server daemons that respond to clients, but don't allow
logins. On new systems that have Pluggable Authentication Modules installed,
look for a file named, "ftp," or "telnet," in the directory /etc/pam/ or /etc
/pam.d/. If the corresponding authentication file doesn't exist, the
instructions for configuring FTP and Telnet authentication and other PAM
configuration, should be in /usr/doc/pam-&version&. Refer also to the answer
for FTP server says: "421 service not available, remote server has closed
connection.".

If it's an FTP server on an older system, make sure that the account exists
in /etc/passwd, especially anonymous.

This type of problem may also be caused a failure to resolve the host
addresses properly, especially if using Reverse Address Resolution Protocol
(RARP). The simple answer to this is to list all relevant host names and IP
addresses in the /etc/hosts files on each machine. ( Refer to the example /
etc/hosts and /etc/resolv.conf files in Sendmail Pauses for Up to a Minute at
Each Command. If the network has an internal DNS, make sure that each host
can resolve network addresses using it.

If the host machine doesn't respond to FTP or Telnet clients at all, then the
server daemon is not installed correctly, or at all. Refer to the manual
pages: inetd and inetd.conf on older systems, or xinetd and xinetd.conf, as
well as ftpd, and telnetd.

Q: How Do I Keep Track of Bookmarks in Netscape?

A: This probably applies to most other browsers, too. In the Preferences/
Navigator menu, set your home page to Netscape's bookmarks.html file, which
is located in the .netscape (with a leading period) subdirectory. For
example, if your login name is smith, set the home page to:

file://home/smith/.netscape/bookmarks.html

Setting up your personal home page like this will present you with a nicely
formatted (albeit possibly long) page of bookmarks when Netscape starts. And
the file is automatically updated whenever you add, delete, or visit a
bookmarked site.

Q: Why Does the Computer Have the Wrong Time?

A: There are two clocks in your computer. The hardware (CMOS) clock runs even
when the computer is turned off, and is used when the system starts up and by
DOS (if you use DOS). The ordinary system time, shown and set by date, is
maintained by the kernel while Linux is running.

You can display the CMOS clock time, or set either clock from the other, with
/sbin/clock (now called hwclock in many distributions). Refer to: man 8 clock
or man 8 hwclock.

There are various other programs that can correct either or both clocks for
system drift or transfer time across the network. Some of them may already be
installed on your system. Try looking for adjtimex (corrects for drift),
Network Time Protocol clients like netdate, getdate, and xntp, or NTP
client-server suite like chrony. Refer to How Do I Find a Particular
Application?.

Q: Why Don't Setuid Scripts Work?

A: They aren't supposed to. This feature has been disabled in the Linux
kernel on purpose, because setuid scripts are almost always a security hole.
Sudo and SuidPerl can provide more security than setuid scripts or binaries,
especially if execute permissions are limited to a certain user ID or group
ID.

If you want to know why setuid scripts are a security hole, read the FAQ for
news:comp.unix.questions.

Q: Why Is Free Memory as Reported by free Shrinking?

A: The "free" figure printed by free doesn't include memory used as a disk
buffer cacheshown in the buffers column. If you want to know how much memory
is really free add the buffers amount to free. Newer versions of free print
an extra line with this info.

The disk buffer cache tends to grow soon after starting Linux up. As you load
more programs and use more files, the contents get cached. It will stabilize
after a while.

Q: Why Does the System Slow to a Crawl When Adding More Memory?

A: This is a common symptom of a failure to cache the additional memory. The
exact problem depends on your motherboard.

Sometimes you have to enable caching of certain regions in your BIOS setup.
Look in the CMOS setup and see if there is an option to cache the new memory
area which is currently switched off. This is apparently most common on a
'486.

Sometimes the RAM has to be in certain sockets to be cached.

Sometimes you have to set jumpers to enable caching.

Some motherboards don't cache all of the RAM if you have more RAM per amount
of cache than the hardware expects. Usually a full 256K cache will solve this
problem.

If in doubt, check the manual. If you still can't fix it because the
documentation is inadequate, you might like to post a message to news:
comp.os.linux.hardware giving all of the details make, model number, date
code, etc., so other Linux users can avoid it.

Q: Why Won't Some Programs (e.g., xdm) Allow Logins?

A: You are probably using non-shadow password programs and are using shadow
passwords.

If so, you have to get or compile a shadow password version of the programs
in question. The shadow password suite can be found at ftp://tsx-11.mit.edu/
pub/linux/sources/usr.bin/shadow/. This is the source code. The binaries are
probably in linux/binaries/usr.bin/.

Q: Why Do Some Programs Allow Logins with No Password?

A: You probably have the same problem as in Why Won't Some Programs (e.g.,
xdm) Allow Logins?, with an added wrinkle.

If you are using shadow passwords, you should put a letter x or an asterisk
in the password field of /etc/passwd for each account, so that if a program
doesn't know about the shadow passwords it won't think it's a passwordless
account and let anyone in.

Q: Why Does the Machine Run Very Slowly with GCC / X / ...?

A: You may have too little real memory. If you have less RAM than all the
programs you're running at once, Linux will swap to your hard disk instead
and thrash horribly. The solution in this case is to not run so many things
at once or buy more memory. You can also reclaim some memory by compiling and
using a kernel with fewer options configured. See How To Upgrade/Recompile a
Kernel.

You can tell how much memory and swap you're using with the free command, or
by typing:

$ cat /proc/meminfo

If your kernel is configured with a RAM disk, this is probably wasted space
and will cause things to go slowly. Use LILO or rdev to tell the kernel not
to allocate a RAM disk (see the LILO documentation or type man rdev).

Q: Why Does My System Only Allow Root Logins?

A: You probably have some permission problems, or you have a file /etc/
nologin.

In the latter case, put rm -f /etc/nologin in your /etc/rc.local or /etc/rc.d
/* scripts.

Otherwise, check the permissions on your shell, and any file names that
appear in error messages, and also the directories that contain these files,
up to and including the root directory.

Q: Why Is the Screen Is All Full of Weird Characters Instead of Letters?

A: You probably sent some binary data to your screen by mistake. Type echo
'c' to fix it. Many Linux distributions have a command, reset, that does
this.

If that doesn't help, try a direct screen escape command: echo 'Ctrl-V Ctrl-O
'.

This resets the default font of a Linux console. Remember to hold down the
Control key and type the letter, instead of, for example, Ctrl, then V. The
sequence Ctrl-V Esc C.

causes a full screen reset. If there's data left on the shell command line
after typing a binary file, press Ctrl-C a few times to restore the shell
command line.

Another possible command is an alias, sane, that can work with generic
terminals:

$ alias sane='echo -e " c";tput is2;
> stty sane line 1 rows $LINES columns $COLUMNS'

The alias is enclosed with open quotes (backticks), not single quotes. The
line break is included here for clarity, and is not required.

Make sure that $LINES and $COLUMNS are defined in the environment with a
command similar to this in ~/.cshrc or ~/.bashrc,

$ LINES=25; export $LINES; $COLUMNS=80; export $COLUMNS

using the correct numbers of $LINES and $COLUMNS for the terminal.

Finally, the output of stty -g can be used to create a shell script that will
reset the terminal:

1. Save the output of stty -g to a file. In this example, the file is named
termset:

$ stty -g >termset

The output of stty -g (the contents of termset) will look something like:

500:5:bd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:73

2. Edit termset to become a shell script; adding an interpreter and stty
command:

#!/bin/bash stty 500:5:bd:8a3b:3:1c:7f:15:4:0:1:0:11:13:1a:0:12:f:17:16:0:0:73

3. Add executable permissions to termset and use as a shell script:

$ chmod +x termset $ ./termset


[Floyd L. Davidson, Bernhard Gabler]

Q: If I Screwed Up the System and Can't Log In, How Can I Fix It?

A: You did create an emergency floppy (or floppies), right? Reboot from an
emergency floppy or floppy pair. For example, the Slackware boot and root
disk pair in the install subdirectory of the Slackware distribution.

A: There are also two, do-it-yourself rescue disk creation packages in ftp://
metalab.unc.edu/pub/Linux/system/recovery/. These are better because they
have your own kernel on them, so you don't run the risk of missing devices
and file systems.

Get to a shell prompt and mount your hard disk with something like

$ mount -t ext2 /dev/hda1 /mnt

Then your file system is available under the directory /mnt and you can fix
the problem. Remember to unmount your hard disk before rebooting (cd
somewhere else first, or it will say it's busy).

Q: What if I Forget the root Password?

A:

Warning Incorrectly editing any of the files in the /etc/directory can
severely screw up a system. Please keep a spare copy of any files in
case you make a mistake.

If your Linux distribution permits, try booting into single-user mode by
typing single at the BOOT lilo: prompt. With more recent distributions, you
can boot into single-user mode when prompted by typing linux 1, linux single,
or init=/bin/bash.

If the above doesn't work for you, boot from the installation or rescue
floppy, and switch to another virtual console with Alt-F1 -- Alt-F8, and then
mount the root file system on /mnt. Then proceed with the steps below to
determine if your system has standard or shadow passwords, and how to remove
the password.

Using your favorite text editor, edit the root entry of the /etc/passwd file
to remove the password, which is located between the first and second colons.
'''Do this only if the password field does not contain an x, in which case
see below.'''

root:Yhgew13xs:0:0: ...

Change that to:

root::0:0: ...

If the password field contains an x, then you must remove the password from
the /etc/shadow file, which is in a similar format. Refer to the manual
pages: man passwd, and man 5 shadow.

[Paul Colquhuon, Robert Kiesling, Tom Plunket]

Q: What's This Huge Security Hole in rm!?!?!

A: No there isn't. You are obviously new to unices and need to read a good
book to find out how things work. Clue: the ability to delete files depends
on permission to write in that directory.

Q: Why Don't lpr and/or lpd Work?

A: First make sure that your /dev/lp* port is correctly configured. Its IRQ
(if any) and port address need to match the settings on the printer card. You
should be able to dump a file directly to the printer:

$ cat the_file >/dev/lp1

If lpr gives you a message like myname@host: host not found" it may mean that
the TCP/IP loopback interface, lo, isn't working properly. Loopback support
is compiled into most distribution kernels. Check that the interface is
configured with the ifconfig command. By Internet convention, the network
number is 127.0.0.0, and the local host address is 127.0.0.1. If everything
is configured correctly, you should be able to telnet to your own machine and
get a login prompt.

Make sure that /etc/hosts.lpd contains the machine's host name.

If your machine has a network-aware lpd, like the one that comes with LPRng,
make sure that /etc/lpd.perms is configured correctly.

Also look at the Printing HOWTO. "Where can I get the HOWTO's and other
documentation? ".

Q: Why Are the Timestamps on Files on MS-DOS Partitions Set Incorrectly?

A: There is a bug in the program clock (often found in /sbin). It miscounts a
time zone offset, confusing seconds with minutes or something like that. Get
a recent version.

Q: Why is My Root File System Read-Only?

A: To understand how you got into this state, see EXT2-fs: warning: mounting
unchecked file system.

Remount it. If /etc/fstab is correct, you can simply type:

mount -n -o remount /

If /etc/fstab is wrong, you must give the device name and possibly the type,
too: e.g.

mount -n -o remount -t ext2 /dev/hda2 /

Q: What Is /proc/kcore?

A: None of the files in /proc are really therethey're all, "pretend," files
made up by the kernel, to give you information about the system and don't
take up any hard disk space.

/proc/kcore is like an "alias" for the memory in your computer. Its size is
the same as the amount of RAM you have, and if you read it as a file, the
kernel does memory reads.

Q: Why Does fdformat Require Superuser Privileges?

A: The system call to format a floppy can only be done as root, regardless of
the permissions of /dev/fd0*. If you want any user to be able to format a
floppy, try getting the fdformat2 program. This works around the problems by
being setuid to root.

Q: Why Doesn't My PCMCIA Card Work after Upgrading the Kernel?

A: The PCMCIA Card Services modules, which are located in /lib/modules/
version/pcmcia, where version is the version number of the kernel, use
configuration information that is specific to that kernel image only. The
PCMCIA modules on your system will not work with a different kernel image.
You need to upgrade the PCMCIA card modules when you upgrade the kernel.

When upgrading from older kernels, make sure that you have the most recent
version of the run-time libraries, the modutils package, and so on. Refer to
the file Documentation/Changes in the kernel source tree for details.

Important: If you use the PCMCIA Card Services, do not enable the Network
device support/Pocket and portable adapters option of the kernel
configuration menu, as this conflicts with the modules in Card Services.

Knowing the PCMCIA module dependencies of the old kernel is useful. You need
to keep track of them. For example, if your PCMCIA card depends on the serial
port character device being installed as a module for the old kernel, then
you need to ensure that the serial module is available for the new kernel and
PCMCIA modules as well.

The procedure described here is somewhat kludgey, but it is much easier than
re-calculating module dependencies from scratch, and making sure the upgrade
modules get loaded so that both the non-PCMCIA and PCMCIA are happy. Recent
kernel releases contain a myriad of module options, too many to keep track of
easily. These steps use the existing module dependencies as much as possible,
instead of requiring you to calculate new ones.

However, this procedure does not take into account instances where module
dependencies are incompatible from one kernel version to another. In these
cases, you'll need to load the modules yourself with insmod, or adjust the
module dependencies in the /etc/conf.modules file. The Documentation/
modules.txt file in the kernel source tree contains a good description of how
to use the kernel loadable modules and the module utilities like insmod,
modprobe, and depmod. Modules.txt also contains a recommended procedure for
determining which features to include in a resident kernel, and which to
build as modules.

Essentially, you need to follow these steps when you install a new kernel.

* Before building the new kernel, make a record with the lsmod command of
the module dependencies that your system currently uses. For example,
part of the lsmod output might look like this:

Module Pages Used by
memory_cs 2 0
ds 2 [memory_cs] 3
i82365 4 2
pcmcia_core 8 [memory_cs ds i82365] 3
sg 1 0
bsd_comp 1 0
ppp 5 [bsd_comp] 0
slhc 2 [ppp] 0
serial 8 0
psaux 1 0
lp 2 0

This tells you for example that the memory_cs module needs the ds and
pcmcia_core modules loaded first. What it doesn't say is that, in order
to avoid recalculating the module dependencies, you may also need to have
the serial, lp, psaux, and other standard modules available to prevent
errors when installing the pcmcia routines at boot time with insmod. A
glance at the /etc/modules file will tell you what modules the system
currently loads, and in what order. Save a copy of this file for future
reference, until you have successfully installed the new kernel's
modules. Also save the lsmod output to a file, for example, with the
command: lsmod >lsmod.old-kernel.output.

* Build the new kernel, and install the boot image, either zImage or
bzImage, to a floppy diskette. To do this, change to the arch/i386/boot
directory (substitute the correct architecture directory if you don't
have an Intel machine), and, with a floppy in the diskette drive, execute
the command:

$ dd if=bzImage of=/dev/fd0 bs=512

if you built the kernel with the make bzImage command, and if your floppy
drive is /dev/fd0. This results in a bootable kernel image being written
to the floppy, and allows you to try out the new kernel without replacing
the existing one that LILO boots on the hard drive.

* Boot the new kernel from the floppy to make sure that it works.

* With the system running the new kernel, compile and install a current
version of the PCMCIA Card Services package, available from
metalab.unc.edu as well as other Linux archives. Before installing the
Card Services utilities, change the names of /sbin/cardmgr and /sbin/
cardctl to /sbin/cardmgr.old and /sbin/cardctl.old. The old versions of
these utilities are not compatible with the replacement utilities that
Card Services installs. In case something goes awry with the
installation, the old utilities won't be overwritten, and you can revert
to the older versions if necessary. When configuring Card Services with
the make config command, make sure that the build scripts know where to
locate the kernel configuration, either by using information from the
running kernel, or telling the build process where the source tree of the
new kernel is. The make config step should complete without errors.
Installing the modules from the Card Services package places them in the
directory /lib/modules/version/pcmcia, where version is the version
number of the new kernel.

* Reboot the system, and note which, if any, of the PCMCIA devices work.
Also make sure that the non-PCMCIA hardware devices are working. It's
likely that some or all of them won't work. Use lsmod to determine which
modules the kernel loaded at boot time, and compare it with the module
listing that the old kernel loaded, which you saved from the first step
of the procedure. (If you didn't save a listing of the lsmod output, go
back and reboot the old kernel, and make the listing now.)

* When all modules are properly loaded, you can replace the old kernel
image on the hard drive. This will most likely be the file pointed to by
the /vmlinuz symlink. Remember to update the boot sector by running the
lilo command after installing the new kernel image on the hard drive.

* Also look at the questions, How do I upgrade/recompile my kernel? and
Modprobe can't locate module, "XXX," and similar messages.


-----------------------------------------------------------------------------
13. Software Development

Q: How Do I Compile Programs?
Q: How Do I Port XXX to Linux?
Q: Can I Use Code or a Compiler Compiled for a 486 on a 386?
Q: What Does gcc -O6 Do?
Q: What Do I Do About Errors Trying to Compile the Kernel?
Q: How Do I Make a Shared Library?
Q: Why Are My Programs So Large?
Q: How To Prevent Errors when Linking Programs with Math Functions
Q: How To Program XYZ Under Linux
Q: How To Upgrade/Recompile a Kernel
Q: What Is a .gz File? And a .tgz? And .bz2? And... ?
Q: Where Are linux/*.h and asm/*.h?
Q: Configuring Emacs' Default Settings

Q: How Do I Compile Programs?

A: Most Linux software is written in C and compiled with the GNU C compiler.
GCC is a part of every Linux distribution. The latest compiler version,
documentation, and patches are on ftp://ftp.gnu.org/pub/gnu/.

Programs that are written in C++ must be compiled with the GNU G++ compiler,
which is also included in Linux distributions and available from the same
place as GCC.

To build version 2.0.x kernels, you will need GCC version 2.7.2.x,
approximately. Trying to build an early Linux kernel with a different
compiler, like GCC 2.8.x, EGCS, or PGCC, may cause problems because of GCC
related code dependencies. Kernel versions 2.2, 2.4, and the 2.5 development
kernels should compile correctly with more recent compilers.

Information on the EGCS compiler is at http://www.gnu.org/software/gcc/
gcc.html.

Note that at this time, the kernel developers are not answering bug requests
for earlier kernels, but instead are concentrating on developing 2.5.x
version kernels and maintaining 2.2.x and 2.4.x version kernels.

[J.H.M. Dassen, Axel Boldt]

Q: How Do I Port XXX to Linux?

A: In general, *nix programs need very little porting. Simply follow the
installation instructions. If you don't know and don't know how to find out
the answers to some of the questions asked during the installation procedure,
you can guess, but this tends to produce buggy programs. In this case, you're
probably better off asking someone else to do the port.

If you have a BSD-ish program, you should try using -I/usr/include/bsd and
-lbsd on the appropriate parts of the compilation lines.

Q: Can I Use Code or a Compiler Compiled for a 486 on a 386?

A: Yes, unless it's the kernel.

The -m486 option to GCC, which is used to compile binaries for x486 machines,
merely changes certain optimizations. This makes for slightly larger binaries
that run somewhat faster on a 486. They still work fine on a 386, though,
with a small performance hit.

However, from version 1.3.35 the kernel uses 486 or Pentium-specific
instructions if configured for a 486 or Pentium, thus making it unusable on a
386.

GCC can be configured for a 386 or 486; the only difference is that
configuring it for a 386 makes -m386 the default and configuring for a 486
makes -m486 the default. In either case, these can be overridden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/ n.n.n/specs.

There is an alpha version of GCC that knows how to do optimization well for
the 586, but it is quite unreliable, especially at high optimization
settings. The Pentium GCC can be found on ftp://tsx-11.mit.edu/pub/linux/
ALPHA/pentium-gcc/.

The ordinary 486 GCC supposedly produces better code for the Pentium using
the -m386, or at least slightly smaller.

Q: What Does gcc -O6 Do?

A: Currently, the same as -O2 (GCC 2.5) or -O3 (GCC 2.6, 2.7). Any number
greater than that does the same thing. The Makefiles of newer kernels use -O2
, and you should probably do the same.

Q: What Do I Do About Errors Trying to Compile the Kernel?

A: See the previous question regarding the header files.

Remember that when you apply a patch to the kernel, you must use the -p0 or
-p1 option: otherwise, the patch may be misapplied. See the patch manual page
for details.

ld: unrecognized option -qmagic means that you should get a newer linker,
from ftp://tsx-11.mit.edu/pub/linux/packages/GCC/, in the file
binutils-2.8.1.0.1.bin.tar.gz.

Q: How Do I Make a Shared Library?

A: For ELF,

$ gcc -fPIC -c *.c
$ gcc -shared -Wl,-soname,libfoo.so.1 -o libfoo.so.1.0 *.o

For a.out, get tools-n.nn.tar.gz from tsx-11.mit.edu/pub/linux/packages/GCC/
src/. It comes with documentation that will tell you what to do. Note that
a.out shared libraries are a very tricky business. Consider upgrading your
libraries to ELF shared libraries. See the ELF HOWTO, at ftp://
metalab.unc.edu/pub/Linux/docs/HOWTO/.

Q: Why Are My Programs So Large?

A: With an ELF compiler (What's All This about ELF? glibc?), the most common
cause of large executables is the lack of an appropriate .so library link for
one of the libraries you're using. There should be a link like libc.so for
every library like libc.so.5.2.18.

With an a.out compiler the most common cause of large executables is the -g
linker (compiler) flag. This produces (as well as debugging information in
the output file) a program which is statically linkedone which includes a
copy of the C library instead of a dynamically linked copy.

Other things worth investigating are -O and -O2, which enable optimization
(check the GCC documentation), and -s (or the strip command) which strip the
symbol information from the resulting binary (making debugging totally
impossible).

You may wish to use -N on very small executables (less than 8K with the -N),
but you shouldn't do this unless you understand its performance implications,
and definitely never with daemons.

Q: How To Prevent Errors when Linking Programs with Math Functions

A: Older run-time libraries included the math library in the C run-time
library. It was not necessary to specify the math library separately when
compiling. If the compiler generates a message like this when linking a
program that uses math functions:

/tmp/ccDUQM4J.o: In function "main":
/tmp/ccDUQM4J.o(.text+0x19): undefined reference to "sqrt"
collect2: ld returned 1 exit status

You need use the -lm option with GCC to link with the math libraries:

# gcc -o program program.c -lm

Make sure also to use the statement #include <math.h> in the source file.

[Florian Schmidt]

Q: How To Program XYZ Under Linux

A: Read the manuals, or a good book on Unix and the manual pages (type man
man). There is a lot of GNU Info documentation, which is often more useful as
a tutorial. Run Emacs and type F1-i, or type info info if you don't have or
don't like Emacs. Note that the Emacs libc node may not exactly describe the
latest Linux libc, or GNU glibc2. But the GNU project and LDP are always
looking for volunteers to upgrade their library documentation.

Anyway, between the existing Texinfo documentation, and the manual pages in
sections 2 and 3, should provide enough information to get started.

As with all free software, the best tutorial is the source code itself.

The latest release of the Linux manual pages, a collection of useful GNU Info
documentation, and various other information related to programming Linux,
can be found on metalab.unc.edu/pub/Linux/docs/man-pages/.

Q: How To Upgrade/Recompile a Kernel

A: See the Kernel HOWTO or the README files which come with the kernel
release on ftp://ftp.cs.helsinki.fi/pub/Software/Linux/Kernel/ and mirrors.
See Where Are the Linux FTP Archives?. You may already have a version of the
kernel source code installed on your system, but if it is part of a standard
distribution it is likely to be somewhat out of date (this is not a problem
if you only want a custom configured kernel, but it probably is if you need
to upgrade.)

With newer kernels you can (and should) make all of the following targets.
Don't forget that you can specify multiple targets with one command.

$ make clean dep install modules modules_install

Also remember to update the module dependencies.

$ depmod -a

This command can be run automatically at boot time. On Debian/GNU Linux
systems, the command is part of the /etc/init.d/modutils script, and can be
linked appropriately in the /etc/rcx.d/ directories. For more information on
depmod, see the manual page.

Make sure you are using the most recent version of the modutils utilities, as
well as all other supporting packages. Refer to the file Documentation/
Changes in the kernel source tree for specifics, and be sure to consult the
README file in the modutils package.

Remember that to make the new kernel boot you must run lilo after copying the
kernel into your root partition. The Makefile in some kernels have a special
zlilo target for this; try:

$ make zlilo

On current systems, however, you can simply copy the zImage or bzImage file
(in arch/i386/boot/ to the /boot/ directory on the root file system, or to a
floppy using the dd command. Refer also to the question, How do I get LILO to
boot the kernel image?

Kernel version numbers with an odd minor version (ie, 1.1.x, 1.3.x) are the
testing releases; stable production kernels have even minor versions (1.0.x,
1.2.x). If you want to try the testing kernels you should probably subscribe
to the linux-kernel mailing list. See What Mailing Lists Are There?.

The Web site http://www.kernelnotes.org/ has lots of information and links to
other sites that provide information about Linux kernel updates.

Also refer to the answers for, Why Doesn't My PCMCIA Card Work after
Upgrading the Kernel? and How Do I Get LILO to Boot the Kernel Image?.

A: Alternatively, on Debian GNU/Linux systems, get a kernel source package
from the Debian archive or from a Debian GNU/Linux CD. Then, follow the
directions in the README file that is located in the kernel-package
subdirectory.

Q: What Is a .gz File? And a .tgz? And .bz2? And... ?

A: .gz (and .z) files are compressed using GNU gzip. You need to use gunzip
(which is a symlink to the gzip command that comes with most Linux
installations) to unpack the file.

.taz, .tar.Z, and .tz are tar files (made with tar) and compressed using
compress. The standard *nix compress is proprietary software, but free
equivalents like ncompress exist.

.tgz (or .tpz) is a tar file compressed with gzip.

.bz2 is a file compressed by the more recently introduced (and efficient)
bzip2.

.lsm is a Linux Software Map entry, in the form of a short text file. Details
about the LSM project and the LSM itself are available in the subdirectory on
ftp://metalab.unc.edu/pub/Linux/docs/.

.deb is a Debian Binary Package - the binary package format used by the
Debian GNU/Linux distribution. It is manipulated using dpkg and dpkg-deb
(available on Debian systems and from: http://ftp.debian.org/pool/main/d/dpkg
/. If you use anonymous FTP, connect to: ftp://ftp.debian.org/debian/pool/
main/d/dpkg/).

.rpm is a Red Hat RPM package, which is used in the Red Hat and similar
distributions.

.sit is a compressed Macintosh archive made with StuffIt, a commercial
program. Aladdin Systems Inc., the manufacturer of StuffIt, has a free
expander utility that will uncompress these archives. You can download it at
http://www.aladdinsys.com/expander/.

The file command can often tell you what a file is.

If you find that gzip complains when you try to uncompress a file, you
probably downloaded it in ASCII mode by mistake. You must download most
things in binary mode: get, to download the file.

Q: Where Are linux/*.h and asm/*.h?

A: The files /usr/include/linux/ and /usr/include/asm/ are often soft links
to the directories where the kernel headers are. They are usually under /usr/
src/kernel*/.

If you don't have the kernel sources, download them. Refer to the answer for
How To Upgrade/Recompile a Kernel.

Then, use rm to remove any garbage, and ln to create the links:

$ rm -rf /usr/include/linux /usr/include/asm
$ ln -sf /usr/src/linux/include/linux /usr/include/linux
$ ln -sf /usr/src/linux/include/asm-<architecture> /usr/include/asm

The assembly language files reside in architecture-specific directories, so
you need to link /usr/src/include/asm to /usr/src/linux/include/asm-i386 on
PC compatible systems, to /usr/src/linux/include/asm-sparc on Sun Sparc
systems, to /usr/src/linux/include/asm-ppc on PPC systems, and so on.

You'll also find that you may need to do "make config" as in a newly-unpacked
kernel source tree, to create linux/autoconf.h.

Q: Configuring Emacs' Default Settings

A: Create a file in your home directory named .emacs with the Emacs Lisp
commands that you want to run every time Emacs starts up. You won't see the
file in the directory listing. (The leading '.' tells ls not to display it,
unless you use the -a command line switch with ls.)

Any kind of Emacs Lisp statement will work in the .emacs file, including
entire defuns. Emacs uses lisp variables and statements extensively, and many
of the editing functions are written in Emacs Lisp. For example, to enable
word wrapping whenever you edit a file that ends with .txt, add the following
statement. This is from the Emacs Texinfo help document ( F1-i, then m Emacs
Return):
(add-hook text-mode-hook
'(lambda () (auto-fill-mode1)))

This adds a statement that calls a hook function whenever a text editing mode
is entered for that buffer. The value of text-mode-hook, which is a variable,
to auto-fill-mode, which is a function.

If you want to turn off the menu bar at the top of each Emacs frame, add this
statement:
(menu-bar-mode -1)

And if you want to include an Emacs Lisp program that someone has written,
like msb.el (an enhanced, pop-up buffer menu), make sure the lisp file is in
a directory where Emacs can find it (usually it will be named Site-lisp), and
add these statements in the .emacs file:
(require 'msb)
(msb-mode 1)

Most tasks have several possible solutions in Emacs Lisp. Any task that can
be programmed in Emacs Lisp is valid in the .emacs file. For more
information, consult the Texinfo documentation. There is also a FAQ list for
Emacs (refer to: What other FAQ's are there for Linux? ).
-----------------------------------------------------------------------------

14. Solutions to Common Problems

Q: How Do I Remove (or Change) the Colors in the ls Display?
Q: Why Won't a Program Work in the Current Directory?
Q: How Do I Find Out If a Notebook Runs Linux?
Q: Can Can I Resume an Interrupted Download?

Q: How Do I Remove (or Change) the Colors in the ls Display?

A: If ls is displaying in color and you haven't told it to, you probably have
an alias configured for it. Some distributions ship this way by default.

The shell command, unalias ls, should completely unset the configuration that
some distributions provide as standard.

To permanently make this change, check your initialization script, .bashrc.

A: To change the colors, rather than removing them, refer to the ls man page
(man ls).

Q: Why Won't a Program Work in the Current Directory?

A: Because the current directory (i.e., .) is not in the search path, for
security reasons, as well as to insure that the correct program versions are
used. If an intruder is able to write a file to a world-writable directory,
like /tmp, presumably he or she would be able to execute it if the directory
were in the search path. The solution to this is to include the directory in
the command; e.g., ./myprog, instead of myprog. Or add the current directory
to your PATH environment variable; e.g., export PATH=".:"$PATH using bash,
although this is discouraged for the reasons mentioned above.

Q: How Do I Find Out If a Notebook Runs Linux?

A: There's no fixed answer to this question, because notebook hardware is
constantly updated, and getting the X display, sound, PCMCIA, modem, and so
forth, working, can take a good deal of effort.

Most notebooks currently on the market, for example, use "Winmodems," which
often do not work with Linux because of their proprietary hardware
interfaces. Even notebooks which are certified as "Linux compatible," may not
be completely compatible.

Information about installing Winmodems in general is contained in the
Winmodems-and-Linux-HOWTO. Refer to Where Is the Documentation?.

You can find the most current information, or ask other users about their
notebook experiences, on the linux-laptop mailing list, which is hosted by
the vger.redhat.com server. Refer to What Mailing Lists Are There?.

A mailing list for Linux on IBM Thinkpads has its home page at http://
www.topica.com/lists/linux-thinkpad/.

Another Thinkpad mailing list is hosted by http://www.bm-soft.com/. Send
email with the word help in the body of the message to
majordomo@www.bm-soft.com.

There is a Web page about Linux on IBM Thinkpads at http://peipa.essex.ac.uk/
tp-linux/.

The Linux Laptop home page is at http://www.cs.utexas.edu/users/kharker/
linux-laptop/.

For information about interfacing peripherals like Zip and CD-ROM drives
through parallel ports, refer to the Linux Parallel Port Home Page, at http:/
/www.torque.net/linux-pp.html.

If you need the latest version of the PCMCIA Card Services package, it is (or
was) located at ftp://cb-iris.stanford.edu/pub/pcmcia/, but that host no
longer seems to be available. Recent distributions are on ftp://
metalab.unc.edu/pub/Linux/kernel/pcmcia/. You will also need to have the
kernel source code installed as well. Be sure to read the PCMCIA-HOWTO, which
is included in the distribution.

Q: Can Can I Resume an Interrupted Download?

A: You can use the reget command of the standard ftp client program after
reconnecting to pick up where you left off.

Clients like ncftp support resumed FTP downloads, and wget supports resumed
FTP and HTTP downloads.
-----------------------------------------------------------------------------

15. Tips And Tricks

Q: How Do I Format Man Pages without man or groff?
Q: How To Scroll Backwards in Text Mode
Q: How To Get Email to Work
Q: Sendmail Pauses for Up to a Minute at Each Command
Q: How To Enable and Select Virtual Consoles
Q: How To Set the Time Zone
Q: What Is a core File?
Q: How To Enable or Disable Core Dumps
Q: How To Remap a Keyboard to UK, French, Etc.
Q: How To Get NUM LOCK to Default to On
Q: How To Set (Or Reset) Initial Terminal Colors
Q: How To Have More Than 128Mb of Swap

Q: How Do I Format Man Pages without man or groff?

A: The man2html program translates groff text to HTML, which you can view
with a Web browser. The man2html program, and many like it, are availble on
the Web. Look for them with your favorite search engine.

The unformatted manual pages are stored in subdirectories of /usr/man, /usr/
local/man, and elsewhere.

If you want to view text, use nroff and less. Both of these programs have
MSDOS versions with an implementation of the man macro package available as
well. An example would be:

$ nroff -man /usr/man/man1/ls.1 | less

If you know where to find a good implementation of the man macros without
installing groff, please let the FAQ maintainer know.

If the manual page filename ends in .gz, then you'll need to uncompress it
before formatting it, using gzip -d or gunzip. A one-line example would be:

$ gzip -dc /usr/man/man1/ls.1.gz | nroff -man | less

Q: How To Scroll Backwards in Text Mode

A: With the default US keymap, you can use Shift with the PgUp and PgDn keys.
(The gray ones, not the ones on the numeric keypad.) With other keymaps, look
in /usr/lib/keytables. You can remap the ScrollUp and ScrollDown keys to be
whatever you like.

The screen program, http://vector.co.jp/vpack/browse/person/an010455.html
provides a searchable scrollback buffer and the ability to take "snapshots"
of text-mode screens.

Recent kernels that have the VGA Console driver can use dramatically more
memory for scrollback, provided that the video card can actually handle 64 kb
of video memory. Add the line:

#define VGA_CAN_DO_64B

to the start of the file drivers/video/vgacon.c. This feature may become a
standard setting in future kernels. If the video frame buffer is also enabled
in the kernel, this setting may not affect buffering.

In older kernels, the amount of scrollback is fixed, because it is
implemented using the video memory to store the scrollback text. You may be
able to get more scrollback in each virtual console by reducing the total
number of VC's. See linux/tty.h.

[Chris Karakas]

Q: How To Get Email to Work

A: For sending mail via SMTP (Simple Mail Transfer Protocol) and receiving
mail from an ISP's POP (Post Office Protocol) server, you can use a desktop
client like Netscape Communicator or KDE kmail. You will need to enter the
names of the SMTP and POP servers in the preferences of the respective
application, as well as your E-mail address (e.g., username@example.com), and
your dial-up password. The same applies to Usenet News. Enter the name of the
NNTP (Network News Transfer Protocol) server in your News client's
preferences section. You may also have to provide the IP addresses of the
ISP's primary and secondary name servers.

If you have a traditional MTA (Mail Transport Agent) like Sendmail, Smail,
qmail, or Exim, you'll need to follow the instructions in each package.
Basically, configuration entails determining which host machine, either on
your local LAN or via dial-up Internet, is the "Smart Host", if you're using
SMTP. If you're using the older UUCP protocol, then you'll need to consult
the directions for configuring UUCP, and also make sure that your ISP's
system is configured to relay mail to you.

Information about Internet hosting, and News and E-mail in general, is
available on the Usenet News group news.announce.newusers, and those FAQ's
are also archived at ftp://rtfm.mit.edu/pub/usenet/.

Q: Sendmail Pauses for Up to a Minute at Each Command

A: Make sure that Sendmail can resolve your hostname to a valid (i.e.,
parsable) domain address. If you are not connected to the Internet, or have a
dial-up connection with dynamic IP addressing, add the fully qualified domain
name to the /etc/hosts file, in addition to the base host name; e.g., if the
host name is bilbo and the domain is bag-end.com:

192.168.0.1 bilbo.bag-end.com bilbo

And make sure that either the /etc/host.conf or /etc/resolv.conf file
contains the line:

order hosts,bind

Caution Do not change the localhostentry in /etc/hosts, because many programs
depend on it for internal message-passing.

Sendmail takes many factors into account when resolving domain addresses.
These factors, collectively, are known as, "rulesets", in sendmail jargon.
The program does not require that a domain address be canonical, or even
appear to be canonical. In the example above, bilbo. (note the period) would
work just as well as bilbo.bag-end.com. This and other modifications apply
mainly to recent versions.

Prior to version 8.7, sendmail required that the FQDN appear first in the /
etc/hosts entry. This is due to changes in the envelope address masquerade
options. Consult the sendmail documents.

If you have a domain name server for only a local subnet, make sure that "."
refers to a SOA record on the server machine, and that reverse lookups (check
by using nslookup) work for all machines on the subnet.

Finally, FEATURE configuration macro options like nodns, always_add_domain,
and nocanonify, control how sendmail interprets host names.

The document, Sendmail: Installation and Operation Guide, included in the doc
/ subdirectory of Sendmail source code distributions, discusses briefly how
Sendmail resolves Internet addresses. Sendmail source code archives are
listed at: http://www.sendmail.org/

[Chris Karakas]

Q: How To Enable and Select Virtual Consoles

A: In text mode, press the left Alt-F1 to Alt-F12 to select the consoles tty1
to tty12; Right Alt-F1 gives tty13 and so on. To switch out of X you must
press Ctrl-Alt-F1, etc; Alt-F5 or whatever will switch back.

However, If you have a non-PC compatible system, please see the note below.

If you want to use a VC for ordinary login, it must be listed in /etc/
inittab, which controls which terminals and virtual consoles have login
prompts. The X Window System needs at least one free VC in order to start.

Note The key sequence is actually CtrlMetaFN. On PC compatible systems, the
right and left Altkeys are really synonymous with the keysymbols
Meta_Land Meta_R. If the binding is different, you can determine what
keys produce Meta_Land Meta_Rwith xkeycapsor a similar application.

[David Charlap]

Q: How To Set the Time Zone

A: Change directory to /usr/lib/zoneinfo/. Get the time zone package if you
don't have this directory. The source is available in ftp://metalab.unc.edu/
pub/Linux/system/admin/time/.

Then make a symbolic link named localtime pointing to one of the files in
this directory (or a subdirectory), and one called posixrules pointing to
localtime. For example:

$ ln -sf US/Mountain localtime
$ ln -sf localtime posixrules

This change will take effect immediatelytry date.

If the system uses Red Hat-style configuration files, the respective time
zone info files are /usr/share/zoneinfo and /etc/localtime.

The manual pages for tzset or tzselect describe setting the time zone. Some
programs recognize the TZ environment variable, but this is not
POSIX-correct.

You should also make sure that your Linux kernel clock is set to the correct
GMT time. Type date -u and check that the correct UTC time is displayed. See
Why Does the Computer Have the Wrong Time?.

Q: What Is a core File?

A: A core file is created when a program terminates unexpectedly, due to a
bug, or a violation of the operating system's or hardware's protection
mechanisms. The operating system kills the program and creates a core file
that programmers can use to figure out what went wrong. It contains a
detailed description of the state that the program was in when it died.

If would like to determine what program a core file came from, use the file
command, like this:

$ file core

That will tell you the name of the program that produced the core dump. You
may want to write the maintainer(s) of the program, telling them that their
program dumped core.

[Eric Hanchrow]

Q: How To Enable or Disable Core Dumps

A: By using the ulimit command in bash, the limit command in tcsh, or the
rlimit command in ksh. See the appropriate manual page for details.

This setting affects all programs run from the shell (directly or
indirectly), not the whole system.

If you wish to enable or disable core dumping for all processes by default,
you can change the default setting in linux/sched.h. Refer to definition of
INIT_TASK, and look also in linux/resource.h.

PAM support optimizes the system's environment, including the amount of
memory a user is allowed. In some distributions this parameter is
configurable in the /etc/security/limits.conf file. For more information,
refer to the Linux Administrator's Security Guide. See Where Is the
Documentation?.

Q: How To Remap a Keyboard to UK, French, Etc.

A: For recent kernels, get /pub/Linux/system/Keyboards/kbd-0.90.tar.gz from
ftp://metalab.unc.edu/. Make sure you get the appropriate version; you have
to use the right keyboard mapping package for your kernel version.

For older kernels you have to edit the top-level kernel Makefile, in /usr/src
/linux/.

You may find more helpful information in The Linux Keyboard and Console
HOWTO, by Andries Brouwer, at ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/.

Q: How To Get NUM LOCK to Default to On

A: Use the setleds program, for example (in /etc/rc.local or one of the /etc/
rc.d/* files):
for t in 1 2 3 4 5 6 7 8
do
setleds +num < /dev/tty$t > /dev/null
done

setleds is part of the kbd package ("How do I remap my keyboard to UK,
French, etc.? ").

Alternatively, patch your kernel. You need to arrange for KBD_DEFLEDS to be
defined to (1 << VC_NUMLOCK) when compiling drivers/char/keyboard.c.

Q: How To Set (Or Reset) Initial Terminal Colors

A: The following shell script should work for VGA consoles:
for n in 1 2 4 5 6 7 8;
do
setterm -fore yellow -bold on -back blue -store > /dev/tty$n
done

Substitute your favorite colors, and use /dev/ttyS$n for serial terminals.

To make sure they are reset when people log out (if they've been changed):

Replace the references to getty (or mingetty or uugetty or whatever) in /etc/
inittab with references to /sbin/mygetty.
#!/bin/sh setterm -fore yellow -bold on -back blue -store > $1
exec /sbin/mingetty $@

[Jim Dennis]

Q: How To Have More Than 128Mb of Swap

A: Use several swap partitions or swap files. Linux kernels before version
2.2 supported up to 16 swap areas, each of up to 128Mb. Recent versions do
not have this limitation.

Very old kernels only supported swap partition sizes up to 16Mb.

Linux on machines with 8KB paging, like Alpha and Sparc64, support a swap
partition up to 512MB. The 128MB limitation comes from PAGE_SIZE*BITSPERBYTE
on machines with 4KB paging, but is 512KB on machines with 8KB paging. The
limit is due to the use of a single page allocation map.

The file mm/swapfile.c has all of the gory details.

[Peter Moulder, Gordon Weast]
-----------------------------------------------------------------------------

16. The X Window System

Q: Does Linux Support X?
Q: How To Get the X Window System to Work
Q: Where To Find a Ready-Made XF86Config file
Q: What Desktop Environments Run on Linux?
Q: xterm Logins Show Up Strangely in who, finger
Q: How to Start a X Client on Another Display

Q: Does Linux Support X?

A: Yes. Linux uses XFree86 (the current version is 4.0, which is based on
X11R6). You need to have a video card which is supported by XFree86. See the
XFree86 HOWTO for more details.

Most Linux distributions nowadays come with an X installation. However, you
can install or upgrade your own, from ftp://metalab.unc.edu/pub/Linux/X11/
and its mirror sites, or from http://www.xfree86.org/.

Q: How To Get the X Window System to Work

A: The answers to this question can, and do, fill entire books. If the
installation program wasn't able to configure the X server correctly, Linux
will most likely try to start the X display, fail, and drop back into
text-only terminal mode.

First and foremost, make certain that you have provided, as closely as
possible, the correct information to the installation program of your video
hardware: the video card and monitor. Some installation programs can
correctly guess a "least common denominator" screen configuration, like a
640-by-480 VESA-standard display, but there are many possible video hardware
configurations that may not be able to display this standard.

The X Window System configuration file is called (usually) /etc/XF86Config, /
etc/X11/XF86Config, or /usr/X11R6/lib/X11/XF86Config.

If you need to manually configure the X server, there are several possible
methods:

* Try to use the XF86Setup program, which can help identify the correct X
server and monitor timings for the video hardware.

* Make sure that the X server has the correct options. If you log in as the
superuser, you should be able to use X --probeonly to get a listing of
the video card chipset, memory, and any special graphics features. Also,
refer to the manual page for the X server. (E.g.; man X), and try running
the X server and redirecting the standard error output to a file so you
can determine, after you can view text on the screen again, what error
messages the server is generating; e.g., X 2>x.error.

* With that information, you should be able to safely refer to one of the
references provided by the Linux Documentation Project. ("Where can I get
the HOWTO's and other documentation? ") There are several HOWTO's on the
subject, including a HOWTO to calculate video timings manually if
necessary. Also, the Installation and Getting Started guide has a chapter
with a step-by-step guide to writing a XF86Config file.


Also, make sure that the problem really is an incorrect XF86Config file, not
something else like the window manager failing to start. If the X server is
working correctly, you should be able to move the mouse cursor on the screen,
and pressing Ctrl-Alt-Backspace will shut down the X server and return to the
shell prompt in one of the virtual terminals.

Q: Where To Find a Ready-Made XF86Config file

A: If you can't seem to get X working using the guidelines above, refer to
the XFree86 HOWTO, recent versions of Installation and Getting Started, and
the instructions for the XF86Setup program.

The contents of the XF86Config file depend on the your exact combination of
video card and monitor. It can either be configured by hand, or using the
XF86Setup utility. Read the instructions that came with XFree86, in /usr/
X11R6/lib/X11/etc. The file you probably need to look at most is
README.Config.

You should not use the sample XF86Config.eg file which is included with newer
versions of XFree86 verbatim, because the wrong video clock settings can
damage your monitor.

Please don't post to news:comp.os.linux.x asking for an XF86Config, and
please don't answer such requests.

If you have a laptop, look at the Linux Laptop Web page at How Do I Find Out
If a Notebook Runs Linux?. Many of the installation notes also have the
XF86Config file for the display. If you have a desktop machine, there are a
few sample XF86Config files at ftp://metalab.unc.edu/. Refer also to the
XFree86 FAQ http://www.xfree.org/FAQ/ and the monitor timings list http://
www.xfree.org/#resources/, and in the /usr/X11R6/lib/X11/ directory of your X
distribution.

Q: What Desktop Environments Run on Linux?

A: Linux with XFree86 supports the KDE, GNOME, and commercial CDE desktop
environments, and extended window managers like WindowMaker. Each uses a
different set of libraries and provides varying degrees of MS Windows-like
look and feel.

Information on KDE is available from http://www.kde.org/. The KDE environment
uses the Qt graphics libraries, available from Trolltech at http://
www.trollTech.com. The desktop uses its own window manager, kwm, and provides
a MS Windows-like look and feel.

The GNOME home page is http://www.gnome.org. The environment uses the free
GTK libraries, available from http://www.gtk.org, and window managers like
Enlightenment, http://www.enlightenment.org and SawFish, http://
www.sawfish.org/. There's also a Web page for Red Carpet, a GNOME
installation and upgrade utility that functions much like Debian's apt-get
utility with a friendly GUI front end. It's at http://www.ximian.com/products
/redcarpet.

The commercial CDE environment uses the Motif libraries and a variation of
the Motif mwm window manager, dtwm, and provides a suite of desktop and
session-management utilities. Several vendors have made the source code of
Motif available and provided binary packages for Linux distributions. As a
starting point, download and installation information is available at http://
www.opengroup.org/openmotif/.

A free version of Motif, called LessTiF, is available from http://
www.lesstif.org/.

WindowMaker, http://www.windowmaker.org/ is a window manager that has many
desktop environment-like features. It provides support for GNUstep, http://
www.gnustep.org/, a clone of the commercial NeXTStep environment.

Q: xterm Logins Show Up Strangely in who, finger

A: The xterm that comes with XFree86 2.1 and earlier doesn't correctly
understand the format that Linux uses for the /var/adm/utmp file, where the
system records who is logged in. It therefore doesn't set all the information
correctly.

The xterms in XFree86 3.1 and later versions fix this problem.

Q: How to Start a X Client on Another Display

A: To start a X client on another system that has a running X server, use the
following commands:

* Use xhost on the server system to allow the client system use the
display. If the server's IP address is 192.168.20.1, enter the command:

$ xhost + 192.168.20.1

* On the client system, open a telnet connection to the server system.

* In the telnet session, start a xterm in the background with the -display
and -e options. For example, if the IP address of the machine running the
server is 192.168.20.1 and the client program name is named clientapp,
use the following command:

$ xterm -display 192.168.20.1 -e clientapp &


[Pierre Dal Farra]
-----------------------------------------------------------------------------

17. Frequently Encountered Error Messages

Q: Modprobe Can't Locate Module, XXX, and Similar Messages
Q: Unknown Terminal Type linux and Similar
Q: INET: Warning: old style ioctl... called!
Q: ld: unrecognized option '-m486'
Q: GCC Says, Internal compiler error.
Q: Make Says, Error 139.
Q: Shell-Init: Permission Denied when I Log In
Q: No Utmp Entry. You Must Exec ... when Logging In
Q: Warning--bdflush Not Running
Q: Warning: obsolete routing request made
Q: EXT2-fs: warning: mounting unchecked file system
Q: EXT2-fs warning: maximal count reached
Q: EXT2-fs warning: checktime reached
Q: df Says, Cannot read table of mounted file systems.
Q: fdisk Says, "Partition X has different physical/logical..."
Q: fdisk: Partition 1 does not start on cylinder boundary
Q: fdisk Says Partition n Has an Odd Number of Sectors
Q: Mtools Utilities Say They Cannot Initialize Drive X
Q: At the Start of Booting: Memory tight
Q: The System Log Says, end_request: I/O error, ....
Q: You don't exist. Go away.
Q: Operation not permitted.
Q: programname: error in loading shared libraries: lib xxx..so. x: cannot
open shared object file: No such file or directory.
Q: init: Id "x" respawning too fast: disabled for 5 minutes .
Q: FTP server says: "421 service not available, remote server has closed
connection."

Q: Modprobe Can't Locate Module, XXX, and Similar Messages

A: These types of messages mostly occur at boot time or shutdown. If
modprobe, insmod, or rmmod complain about not being able to find a module,
add the following to the /etc/modules.conf or /etc/modutils/aliases file,
whichever is present on your system.

$ alias <module-name> off

And use the name of the module that appears in the error message.

[J.H.M. Dassen]

Q: Unknown Terminal Type linux and Similar

A: In early kernels the default console terminal type has changed from
console to linux. You must edit /etc/termcap to change the line reading:

console|con80x25:

to

linux|console|con80x25:

(there may be an additional dumb in there - if so it should be removed.)

To get the editor to work you may need type:

$ TERM=console

(for bash and ksh), or

$ setenv TERM console

for csh or tcsh.

Some programs use /usr/lib/terminfo instead of /etc/termcap. For these
programs you should upgrade your terminfo package, which is part of ncurses.

The same is true for X terminal displays. If your distribution sets the TERM
to something strange like xterm-24-color, you can simply reset it to a
generic value from the command line:

$ TERM="xterm"; export TERM

Q: INET: Warning: old style ioctl... called!

A: You are trying to use the old network configuration utilities. The new
ones can be found on ftp://ftp.linux.org.uk/pub/linux/Networking/PROGRAMS/
NetTools/ (source only, I'm afraid).

Note that they cannot be used just like the old-style programs. See the NET-2
HOWTO for instructions on how to set up the old-style networking programs
correctly. Even better, see the NET-3 HOWTO and upgrade your networking
software.

Q: ld: unrecognized option '-m486'

A: You have an old version of ld. Install a newer binutils package that
contains an updated ld. Look on tsx-11.mit.edu in /pub/linux/packages/GCC/
for binutils-2.6.0.2.bin.tar.gz.

Q: GCC Says, Internal compiler error.

A: If the fault is repeatable (i.e., it always happens at the same place in
the same file - even after rebooting and trying again, using a stable kernel)
you have discovered a bug in GCC. See the GCC Info documentation (type F1-i
in Emacs, and select GCC from the menu) for details on how to report the
error. Make sure you have the latest version, though.

Note that this is probably not a Linux-specific problem. Unless you are
compiling a program many other Linux users also compile, you should not post
your bug report to any of the comp.os.linux groups.

If the problem is not repeatable, you may be experiencing memory corruption.
Refer to the answer for Make Says, Error 139..

Q: Make Says, Error 139.

A: Your compiler (GCC) dumped core. You probably have a corrupted, buggy, or
old version of GCC - get the latest release or EGCS. Alternatively, you may
be running out of swap space. Refer to Why Does the Machine Run Very Slowly
with GCC / X / ...?.

If this doesn't fix the problem, you are probably having problems with memory
or disk corruption. Check that the clock rate, wait states, and refresh
timing for your SIMMS and cache are correct (hardware manuals are sometimes
wrong, too). If so, you may have some marginal SIMMS, or a faulty motherboard
or hard disk or controller.

Linux is a very good memory tester - much better than MS-DOS based memory
test programs.

Reportedly, some clone x87 math coprocessors can cause problems. Try
compiling a kernel with math emulation (see How To Upgrade/Recompile a Kernel
). The no387 kernel command line flag on the LILO prompt to force the kernel
to use math emulation, or it may be able to work and still use the '387, with
the math emulation compiled in but mainly unused.

More information about this problem is available on the Web at http://
www.bitwizard.nl/sig11/.

Q: Shell-Init: Permission Denied when I Log In

A: Your root directory and all the directories up to your home directory must
be readable and executable by everybody. See the manual page for chmod or a
book on Unix for how to fix the problem.

Q: No Utmp Entry. You Must Exec ... when Logging In

A: Your /var/run/utmp is screwed up. You should have

/var/run/utmp

in your /etc/rc.local or /etc/rc.d/*. See If I Screwed Up the System and
Can't Log In, How Can I Fix It?. Note that the utmp may also be found in /var
/adm/ or /etc/ on some older systems.

Q: Warning--bdflush Not Running

A: Modern kernels use a better strategy for writing cached disk blocks. In
addition to the kernel changes, this involves replacing the old update
program which used to write everything every 30 seconds with a more subtle
daemon (actually a pair), known as bdflush. Get bdflush-n.n.tar.gz from the
same place as the kernel source code (see How To Upgrade/Recompile a Kernel)
and compile and install it. bdflush should be started before the usual
boot-time file system checks. It will work fine with older kernels as well,
so there's no need to keep the old update around.

Q: Warning: obsolete routing request made

A: This is nothing to worry about. The message means that your version route
is a little out of date, compared to the kernel. You can make the message go
away by getting a new version of route from the same place as the kernel
source code. See How To Upgrade/Recompile a Kernel.

Q: EXT2-fs: warning: mounting unchecked file system

A: You need to run e2fsck (or fsck -t ext2 if you have the fsck front end
program) with the -a option to get it to clear the dirty flag, and then
cleanly unmount the partition during each shutdown.

The easiest way to do this is to get the latest fsck, umount, and shutdown
commands, available in Rik Faith's util-linux package (see Where Are the
Linux FTP Archives?). You have to make sure that your /etc/rc*/ scripts use
them correctly.

NB: Don't try to check a file system that's mounted read/write. This includes
the root partition if you don't see

VFS: mounted root ... read-only

at boot time. You must arrange to mount the root file system read/only to
start with, check it if necessary, and then remount it read/write. Almost all
distributions do this. If your's doesn't, read the documentation that comes
with util-linux to find out how to do this.

Note that you need to specify the -n option to mount so it won't try to
update /etc/mtab, since the root file system is still read-only, and this
will otherwise cause it to fail.

Q: EXT2-fs warning: maximal count reached

A: This message is issued by the kernel when it mounts a file system that's
marked as clean, but whose "number of mounts since check" counter has reached
the predefined value. The solution is to get the latest version of the ext2fs
utilities (e2fsprogs-0.5b.tar.gz at the time of writing) from the usual
sites. See Where Are the Linux FTP Archives?.

The maximal number of mounts value can be examined and changed using the
tune2fs program from this package.

Q: EXT2-fs warning: checktime reached

A: Kernels from 1.0 onwards support checking a file system based on the
elapsed time since the last check as well as by the number of mounts. Get the
latest version of the ext2fs utilities. See EXT2-fs warning: maximal count
reached.

Q: df Says, Cannot read table of mounted file systems.

A: There is probably something wrong with your /etc/mtab or /etc/fstab files.
If you have a reasonably new version of mount, /etc/mtab should be emptied or
deleted at boot time (in /etc/rc.local or /etc/rc.d/*), using something like

$ rm -f /etc/mtab*

Some old Linux distributions have an entry for the root partition in /etc/
mtab made in /etc/rc* by using rdev. That is incorrectthe newer versions of
mount do this automatically.

Some old distributions also have a line in /etc/fstab that looks like:

/dev/sdb1 /root ext2 defaults

The entry for /root should read simply /.

Q: fdisk Says, "Partition X has different physical/logical..."

A: If the partition number (X, above) is 1, this is the same problem as in
fdisk: Partition 1 does not start on cylinder boundary.

If the partition begins or ends on a cylinder numbered greater than 1024,
this is because the standard DOS disk geometry information format in the
partition table can't cope with cylinder numbers with more than 10 bits. You
should see How Can I Get Linux to Work With My Disk?.

Q: fdisk: Partition 1 does not start on cylinder boundary

A: The version of fdisk that comes with many Linux systems creates partitions
that fail its own validity checking. Unfortunately, if you've already
installed your system, there's not much you can do about this, apart from
copying the data off the partition, deleting and remaking it, and copying the
data back.

You can avoid the problem by getting the latest version of fdisk, from Rik
Faith's util-linux package (available on all the usual FTP sites).
Alternatively, if you are creating a new partition 1 that starts in the first
cylinder, you can do the following to get a partition that fdisk likes.

* Create partition 1 in the normal way. A p listing will produce the
mismatch complaint.

* Type u to set sector mode and do p again. Copy down the number from the
End column.

* Delete partition 1.

* While still in sector mode, re-create partition 1. Set the first sector
to match the number of sectors per track. This is the sector number in
the first line of the p output. Set the last sector to the value you
wrote down in the step above.

* Type u to reset cylinder mode and continue with other partitions.

Ignore the message about unallocated sectors. They refer to the sectors
on the first track apart from the Master Boot Record, and they are not
used if you start the first partition in track 2.


Q: fdisk Says Partition n Has an Odd Number of Sectors

A: The PC disk partitioning scheme works in 512-byte sectors, but Linux uses
1K blocks. If you have a partition with an odd number of sectors, the last
sector is wasted. Ignore the message.

Q: Mtools Utilities Say They Cannot Initialize Drive X

A: This means that mtools is having trouble accessing the drive. This can be
due to several things.

Often this is due to the permissions on floppy drive devices (/dev/fd0* and /
dev/fd1*) being incorrect. The user running mtools must have the appropriate
access. See the manual page for chmod for details.

Most versions of mtools distributed with Linux systems (not the standard GNU
version) use the contents of a file /etc/mtools to determine which devices
and densities to use, in place of having this information compiled into the
binary. Mistakes in this file often cause problems. There is often no
documentation about this.

For the easiest way to access your MS-DOS files (especially those on a hard
disk partition) see How do I access files on my DOS partition or floppy?
Noteyou should never use mtools to access files on an msdosfs mounted
partition or disk!

Q: At the Start of Booting: Memory tight

A: This means that you have an extra-large kernel, which means that Linux has
to do some special memory-management magic to be able to boot itself from the
BIOS. It isn't related to the amount of physical memory in your machine.
Ignore the message, or compile a kernel containing only the drivers and
features you need. See How To Upgrade/Recompile a Kernel.

Q: The System Log Says, end_request: I/O error, ....

A: This error message, and messages like it, almost always indicate a
hardware error with a hard drive.

This commonly indicates a hard drive defect. The only way to avoid further
data loss is to completely shut own the system. You must also make sure that
whatever data is on the drive is backed up, and restore it to a non-defective
hard drive.

This error message may also indicate a bad connection to the drive,
especially with home brew systems. If you install an IDE drive, always use
new ribbon cables. It's probably is a good idea with SCSI drives, too.

In one instance, this error also seemed to coincide with a bad ground between
the system board and the chassis. Be sure that all electrical connections are
clean and tight before placing the blame on the hard drive itself.

[Peter Moulder, Theodore Ts'o]

Q: You don't exist. Go away.

A: This is not a viral infection. It comes from programs like write, talk,
and wall, if your invoking UID doesn't correspond to a valid user (probably
due to /etc/passwd being corrupted), or if the session (pseudoterminal,
specifically) you're using isn't properly registered in the utmp file
(probably because you invoked it in a funny way).

Q: Operation not permitted.

A: One or more of the file's or directory's attribute bits are set
incorrectly. If the I bit is set, for example, you won't be able to change
file permissions with chmod.

The solution is to use lsattr to display file and directory attributes, and
chattr to set and unset them. The programs' documentation is contained in
their manual pages.

[Paul Campbell]

Q: programname: error in loading shared libraries: lib xxx..so. x: cannot
open shared object file: No such file or directory.

A: A message like this, when the program that you're trying to run uses
shared libraries, usually means one of two things: the program was either
compiled on a machine that had a different set of libraries or library paths
than yours; or you've upgraded your libraries but not the program.

Executable programs that are linked with dynamic libraries, expect the full
pathname of each of the library files it requires. So do the shared
libraries, if they rely on other libraries. This is so the shared object
dependencies remain as unambiguous as possible, and also as a security
measure.

Short of recompiling the executable file for the libraries on the
systemprobably the most desirable alternative in the long run - you can try
to determine which libraries the executable file needs with the command: ldd
programname. The output will be a list of the shared libraries on the system
that the program needs to run, as well as the missing libraries. You can then
add the library packages, or if the libraries already exist in a different
directory, you can create a symbolic link so the program can find it. For
example, if the program requires /usr/lib/libncurses.so.2, and your machine
has /lib/libncurses.so.2, you can create a link where the program expects to
find the library; e.g.:

# cd /usr/lib &amp;&amp; ln -s /lib/libncurses.so.2 .

You should note, however, that creating library links like these should be
considered a security risk, and the additional links you create will not be
compatible with future upgrades. It's simply a quick fix for backward
compatibility.

Also, it may take some guesswork to determine in exactly which of the system
library directories the program expects to find a shared library file,
because ldd will not list the paths of libraries it can't find. A program
most likely will tell the run-time linker, /lib/ld.so, to look for shared
libraries in /lib, /usr/lib, /usr/local/lib, or /usr/X11R6/lib, if it's an X
client. But that doesn't mean that libraries can't be installed elsewhere. It
helps to have some idea of the original library configuration before
proceeding.

Also be sure to run ldconfig after creating the symbolic link, so that ld.so
has an updated view of the system's libraries. You should also make certain
that all of the library directories are listed in /etc/ld.so.conf, and
perhaps in the LD_LIBRARY_PATH environment variable.

Q: init: Id "x" respawning too fast: disabled for 5 minutes .

A: In most distributions this means that the system is booting by default
into runlevel 5, which is supposed to respawn (re-start again after it's been
exited) a graphical login via xdm, kdm, gdm, or whatever, and the system
can't locate the program.

However, Id can also indicate the absence or misconfiguration of another
program, like mingetty, if init tries to respawn itself more than 10 times in
2 minutes.

Id "x" is the number in the leftmost column of the /etc/inittab file:

# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
2:2345:respawn:/sbin/mingetty tty2
3:2345:respawn:/sbin/mingetty tty3
4:2345:respawn:/sbin/mingetty tty4
5:2345:respawn:/sbin/mingetty tty5
6:2345:respawn:/sbin/mingetty tty6

Commenting the offending line out and then fixing the errant program and
testing on the command line will allow you to see any error messages that go
to standard error output (console) if the errors are not going to the system
log file. Uncomment the line and restart init with kill -SIGHUP 1 or telinit
q to cause init to reinitialize and reread the /etc/inittab file.

Some systems, however, rewrite /etc/inittab when booting. In that case, refer
to the init man page, and/or the settings in /etc/sysconfig/init.

Refer to the init and /etc/inittab man pages for detailed information.

[Carl King]

Q: FTP server says: "421 service not available, remote server has closed
connection."

A: If an FTP server won't allow logins, it is probably configured correctly,
but the problem is probably with authorizing users at login. FTP servers in
current distributions often authorize users with the Pluggable Authentication
Modules library, in which case there should be an authorization file /etc/
pam.d/ftp. A generic authorization file looks like this. (The line break on
the first "auth" line is for readability. The entry is actually a single,
long line).

#%PAM-1.0
auth required /lib/security/pam_listfile.so item=user
sense=deny file=/etc/ftpusers onerr=succeed
auth required /lib/security/pam_pwdb.so shadow nullok
auth required /lib/security/pam_shells.so
account required /lib/security/pam_pwdb.so
session required /lib/security/pam_pwdb.so

Also, make sure the /etc/ftpusers file, or whatever users file is named in
the first "auth" line, is configured correctly.

Btw, the sample ftp file above is actually the ftpd/ftp.pam.sample file from
the ftpd-BSD-0.3.1.tar.gz package. Many thanks to David A. Madore for this
much needed port.
-----------------------------------------------------------------------------

18. Online Resources

Q: Where Is the Documentation?
Q: Where Is the Linux Stuff on the World Wide Web?
Q: What News Groups Are There for Linux?
Q: What Other FAQ's and Documentation Are There for Linux?
Q: How To Get Information without Usenet Access
Q: What Mailing Lists Are There?
Q: Are the News Groups Archived Anywhere?
Q: Where Are Linux Legal Issues Discussed?
Q: Where is Information about Unmaintained Free Software Projects?
Q: What Online/Free Periodicals Exist for Linux?
Q: Where Can I To Find Information About Security Related Issues?

Q: Where Is the Documentation?

A: Look in the following places, and the sites that mirror them.

* The Linux Documentation Project at http://tldp.org publishes hundreds of
documents on using Linux.

* ftp://ftp.funet.fi/pub/OS/Linux/doc/HOWTO/

* ftp://tsx-11.mit.edu/pub/linux/docs/HOWTO/

* ftp://metalab.unc.edu/pub/Linux/docs/HOWTO/


For a list of Linux FTP sites, refer to the answer for: Where Are the Linux
FTP Archives?.

If you don't have access to FTP, try the FTP-by-mail servers:

* ftpmail@decwrl.dec.com

* ftpmail@doc.ic.ac.uk

* ftp-mailer@informatik.tu-muenchen.de


A complete list of HOWTO's is available in the HOWTO-INDEX at http://
www.tldp.org/HOWTO/HOWTO-INDEX/howtos.html. The mini-HOWTO's are indexed at
http://www.tldp.org/HOWTO/HOWTO-INDEX/mini.html.

In addition, translations are available from ftp://metalab.unc.edu/pub/Linux/
docs/HOWTO/translations/ and mirrors worldwide. The HOWTO's and other
documentation have been translated into the following languages:

* Chinese (zh)

* Croatian (hr)

* French (fr)

* German (de)

* Hellenic (el)

* Indonesian (id)

* Italian (it)

* Japanese (ja)

* Korean (ko)

* Polish (pl)

* Slovenian (sl)

* Spanish (es)

* Swedish (sv)

* Turkish (tr)


Additional documents are always in preparation. Please get in touch with the
coordinators if you are interested in writing one. Contact and submission
information is at http://tldp.org/mailinfo.html.

There is also a LDP HOWTO page at http://howto.tucows.org/.

The Guide Series produced by the Linux Documentation Project is available
from http://tldp.org. Please read them if you are new to Unix and Linux.

And, of course, a number of people have written documentation independently
of the LDP:

* Linux Administrators Security Guide, by Kurt Seifried. http://
www.freek.com/lasg/.

* Newbie's Linux Manual. http://tldp.org/nlm/.

* One-Page Linux Manual. http://www.powerup.com.au/~squadron/.

* Rute Users Tutorial and Exposition. http://rute.sourceforge.net

* Short beginners' manual for Linux. Also available in Dutch. http://
www.stuwww.kub.nl/people/b.vannunen/linux-man.php3.

* Virtual Frame buffer HOWTO, by Alex Buell. http://
www.tahallah.demon.co.uk/programming/prog.html

* X11 & TrueType Fonts, by Peter Kleiweg. http://www.let.rug.nl/~kleiweg/.


Documentation for kernel developers is on-line: http://
kernelbook.sourceforge.net.

To find out about Linux memory management, including performance tuning, see
Rik van Riel's Web page at http://humbolt.geo.uu.nl/Linux-MM/.

The Linux Consultants-Guide has a directory of Linux consultants.

Gary's Encyclopedia lists over 4,000 Linux related links. Its URL is http://
members.aa.net/~swear/pedia/index.html.

There is also a FAQ specifically for the Red Hat Linux distribution, at http:
//www.best.com/~aturner/RedHat-FAQ/faq_index.html.

Q: Where Is the Linux Stuff on the World Wide Web?

A: In addition to the Linux Documentation Project Home Page: http://tldp.org,
there are many pages that provide beginning and advanced information about
Linux.

These two pages provide a good starting point for general Linux information:
Linux International's Home Page, at http://www.li.org, and the Linux Online's
Linux Home Page at http://www.linux.org.

Both of these pages provide links to other sites, information about general
information, distributions, new software, documentation, and news.

Documentation for kernel developers is on-line: http://
kernelbook.sourceforge.net.

The tutorial, Unix is a Four Letter Word..., is located at http://
people.msoe.edu/~taylor/4ltrwrd/. It is a general introduction to Unix
operating systems and is not Linux specific.

Additionally, here is a certainly incomplete list of Web pages devoted to
Linux:

* AboutLinux.com: http://www.aboutlinux.com

* Adventures in Linux Programming: http://members.tripod.com/rpragana/

* Dave Central Linux Software Archive: http://linux.davecentral.com

* debianHELP http://www.debianhelp.org

* Erlug Webzine (Italian): http://www.erlug.linux.it

* Free Unix Giveaway List: http://visar.csustan.edu/giveaway.html Lists
offers of free Linux CDs. Also available via E-mail:
axel@visar.csustan.edu, with the Subject: "send giveaway_list"

* Information on Linux in corporate environments: http://
www.smartstocks.com/linux.html

* Jeanette Russo's Linux Newbie Information: http://www.stormloader.com/
jrusso2/index.html

* JustLinux.com: http://www.justlinux.com

* Linux Cartoons: http://www.cse.unsw.edu.au/~conradp/linux/cartoons/

* LinuxArtist.org: http://www.linuxartist.org

* Linuxinfor.com - Online Linux Resources: http://www.linuxinfor.com

* linuXChiX.org: http://www.linuxchix.org

* LinuxDevices.com: The Embedded Linux Portal: http://www.linuxdevices.com

* Linux Educational Needs Posting Page: http://www.slip.net/~brk/
linuxedpp.htm

* Linux in Business: Case Studies: http://www.bynari.com/collateral/
case_studies.html

* Linux Hardware Database Laptop Superguide: http://lhd.zdnet.com/db/
superguide.php3?catid=18

* Linux Inside: http://linuxinside.org

* Linux Links: http://www.linuxlinks.com

* Linux Memory Management Home Page: http://humbolt.geo.uu.nl/Linux-MM/

* Linux Newbie Project: http://kusma.hypermart.net/

* Linux on the Thinkpad 760ED: http://www.e-oasis.com/linux-tp.html

* LinuxOrbit: http://www.linuxorbit.com

* Linux Parallel Port Home Page: http://www.torque.net/linux-pp.html

* Linux MIDI & Sound Applications: http://sound.condorow.net

* Linux Start: http://www.linuxstart.com

* Linux Tips and Tricks Page: http://www.patoche.org/LTT/

* Linux Today PR: http://www.linuxpr.com

* Mandrakeuser.Org: http://mandrakeuser.org

* My Linux Contributions by Richard Gooch: http://www.atnf.csiro.au/~rgooch
/linux/

* Micro Channel Linux Web Page: http://www.dgmicro.com/mca/

* Parallel port scanners and SANE: http://www2.prestel.co.uk/hex/
scanners.html

* Pascal Central: http://www.pascal-central.com

* PegaSoft Portal: http://www.vaxxine.com/pegasoft/portal/

* PocketLinux. http://www.pocketlinux.com

* Red Hat and ISDN4Linux: http://www.webideal.de

* SearchLinux: http://www.searchlinux.com/

* The Free Linux CD Project: http://www.freelinuxcd.org

* The Site for People Learning Perl: http://learn.perl.org

* USB Linux Home Page: http://peloncho.fis.ucm.es/~inaky/uusbd-www/

* VLUG: The Virtual Linux Users Group: http://www.vlug.com


Searching for Linux on Web Search Engines will provide copious references to
Linux Web sites. Try:

* Yahoo! http://www.yahoo.com/

* Altavista http://www.altavista.com/

* Google http://www.google.com/


Google also has a Linux-specific section at http://www.google.com/linux/.

Further information about about Web search engines is in the Web and Internet
Search Engine Faq: http://www.infobasic.com/pagefaq.html.

Refer also to the answer for: What Other FAQ's and Documentation Are There
for Linux?.

Q: What News Groups Are There for Linux?

A: Comp.os.linux.announce is the moderated announcements group. You should
read this if you intend to use Linux. It contains information about software
updates, new ports, user group meetings, and commercial products. It is the
only newsgroup that may carry commercial postings. Submissions for that group
should be e-mailed to linux-announce@news.ornl.gov.

Comp.os.linux.announce is archived at: http://www.iki.fi/mjr/linux/cola.html,
and ftp://src.doc.ic.ac.uk/usenet/comp.os.linux.announce/.

Also worth reading are the following other groups in the news:comp.os.linux
and news:alt.uu.comp.os.linux hierarchies you may find many common problems
too recent for the documentation but are answered in the newsgroups.

* news:alt.uu.comp.os.linux

* news:alt.uu.comp.os.linux.questions

* news:alt.os.linux

* news:alt.os.linux.mandrake

* news:comp.os.linux.admin

* news:comp.os.linux.advocacy

* news:comp.os.linux.alpha

* news:comp.os.linux.answers

* news:comp.os.linux.development

* news:comp.os.linux.development.apps

* news:comp.os.linux.development.system

* news:comp.os.linux.embedded

* news:comp.os.linux.hardware

* news:comp.os.linux.help

* news:comp.os.linux.m68k

* news:comp.os.linux.misc

* news:comp.os.linux.network

* news:comp.os.linux.networking

* news:comp.os.linux.portable

* news:comp.os.linux.powerpc

* news:comp.os.linux.questions

* news:comp.os.linux.redhat

* news:comp.os.linux.security

* news:comp.os.linux.setup

* news:comp.os.linux.test

* news:comp.os.linux.x

* news:comp.os.linux.x.video


Remember that Linux is POSIX compatible, and most all of the material in the
news:comp.unix and news:comp.windows.x groups will be relevant. Apart from

hardware considerations, and some obscure or very technical low-level issues,
you'll find that these groups are good places to start.

Information about e-mail clients (MUA's), mail transfer agents (MTA's), and
other related software are in the comp.mail.* groups, especially:

* news:comp.mail.misc

* news:comp.mail.pine

* news:comp.mail.sendmail


Questions and information about News reading software are in:

* news:news.software.readers.


Please read If this Document Still Hasn't Answered Your Question.... before
posting. Cross posting between different news:comp.os.linux groups is rarely
a good idea.

There may well be Linux groups local to your institution or areacheck there
first.

See also How To Get Information without Usenet Access.

Other regional and local newsgroups also existyou may find the traffic more
manageable there:

* news:fr.comp.os.linux (France).

* news:de.comp.os.linux (Germany).

* news:aus.computers.linux (Australia).

* news:hr.comp.linux (Croatia).

* news:it.comp.linux (Italy).


A search of http://groups.google.com/ can provide an up-to-date list of News
groups.

[Axel Boldt, Robert Kiesling]

Q: What Other FAQ's and Documentation Are There for Linux?

A: There are a number of special interest FAQ's on different subjects related
to system administration and use, and also on miscellaneous topics like
Flying Saucer Attacks (the music) and support for recovering sysadmins.

The official Usenet FAQ archives are: ftp://rtfm.mit.edu/pub/usenet/.

The Internet FAQ Consortium provides a searchable archive at: http://
www.faqs.org/. The site also maintains a current archive of Internet Request
For Comment (RFC), Best Current Practices (BCP), and For Your Information
(FYI) documents.

Here are some FAQ's and documents that might be especially useful, and their
network addresses:

* A FAQ for new users: http://homes.arealcity.com/swietanowski/LinuxFAQ/

* A Linux FAQ in Spanish is available at: http://www.abierta.org/faq.htm Un
FAQ (preguntas mas frecuentes) en Espa&#241;ol se halla disponible en http://
www.abierta.org/faq.htm

* AfterStep FAQ: http://www.linuxinfor.com/en/astepfaq/AfterStep-FAQ.html

* BASH Frequently Asked Questions: ftp://ftp.cwru.edu/pug/bash/FAQ/

* de.comp.os.unix.linux.infos - FAQ: http://www.dcoul.de/

* Frequently Asked Questions about Open Source: http://www.opensource.org/
faq.html

* Ftape-FAQ: http://www.linuxinfor.com/en/ftapefaq/Ftape-FAQ.html

* GNU Emacs: http://www.lerner.co.il/emacs/faq-body.shtml

* GNU Linux in Science and Engineering: http://www.comsoc.org/vancouver/
scieng.html

* GNU Troff (groff) Info: http://www.cs.pdx.edu/~trent/gnu/groff/

* Gnus 5.x: http://www.ccs.neu.edu/software/contrib/gnus/

* KDE FAQ: http://www.kde.org/faq.html

* GNU General Public License FAQ: http://www.gnu.org/copyleft/gpl-faq.html

* Linux PPP FAQ: http://www.linuxinfor.com/en/pppfaq/PPP-FAQ.html

* Linux-Raid FAQ: http://www.linuxinfor.com/en/raidfaq/index.html

* List of Periodic Information Postings: ftp://rtfm.mit.edu/pub/usenet/
news.answers/periodic-postings/

* News.newusers.announce FAQ http://web.presby.edu/~nnqadmin/nan/

* Online Linux Resources: http://www.linuxinfor.com/en/docfaq.htm

* O'Reilly & Associates Openbook Project: http://www.oreilly.com/openbook/

* Sendmail: http://www.sendmail.org/faq/

* Sendmail: Installation and Operation Guide: Formatted and me source
versions are in the doc/ subdirectory of Sendmail source code
distributions. http://www.sendmail.org/

* Technical FAQ for Linux Users: http://www-106.ibm.com/developerworks/
library/l-faq/?n-l-7261

* Web Internet Search Engine: http://www.infobasic.com/pagefaq.html

* Wu-ftpd: http://www.wu-ftpd.org/man/ (really a collection of man pages),
with HOWTO's at: http://www.wu-ftpd.org/HOWTO/

* XTERM Frequently Asked Questions. http://dickey.his.com/xterm/
xterm.faq.html


Q: How To Get Information without Usenet Access

A: A digest of comp.os.linux.announce is available by mailing the word
"subscribe" (without the quotes) as the body of a message to
linux-announce-REQUEST@news-digests.mit.edu. Subscribing to this list is a
good idea, as it carries important information and documentation about Linux.

Please remember to use the *-request addresses for your subscribe and
unsubscribe messages; mail to the other address is posted to the news group.

Q: What Mailing Lists Are There?

A: The Linux developers now mainly use the Majordomo server at
majordomo@vger.redhat.com. Send a message with the word "lists" (without the
quotes) in the body to get a list of lists there. Add a line with the word,
"help," to get the standard Majordomo help file that lists instructions for
subscribing and unsubscribing to the lists.

Currently, the kernel list is archived at: http://www.uwsg.indiana.edu/
hypermail/linux/kernel/, and http://www.lib.uaa.alaska.edu/linux-kernel/
archive/

Please do not post off-topic material to the mailing lists. Most of them are
used by Linux developers to talk about technical issues and future
developments. They are not intended for new users' questions, advertisements,
or public postings that are not directly related to the mailing list's
subject matter. Comp.os.linux.announce is the place for all public
announcements. This is a common Internet policy. If you don't observe this
guideline, there's a good chance that you'll be flamed.

There is a linux-newbie list where, "no question is too stupid."
Unfortunately, it seems that few experienced users read that list, and it has
very low volume.

There are numerous Linux related mailing lists at http://www.onelist.com/. Go
to the categories page and choose "Linux." There are also mailing list
subscription links at: http://oslab.snu.ac.kr/~djshin/linux/mail-list/

The Mailing Lists Available in Usenet page is: http://paml.net/. The list
information is also on: ftp://rtfm.mit.edu/, and is posted to the groups:
news.announce.newgroups, news.lists, and news.groups, among others.

Q: Are the News Groups Archived Anywhere?

A: The Usenet Linux news groups are archived at http://groups.google.com/.

ftp://metalab.unc.edu/pub/Linux/docs/linux-announce.archive contains archives
of news:comp.os.linux.announce. These are mirrored from ftp://
src.doc.ic.ac.uk/usenet/, which also archives news:comp.os.linux, news:
comp.os.linux.development.apps, and news:comp.os.linux.development.system.

Q: Where Are Linux Legal Issues Discussed?

A: On the linux-legal mailing list, of course. You can subscribe to it, as
with many of the other Linux related lists, by sending a message with the
word "help" in the body of the message to majordomo@vger.redhat.com.

Q: Where is Information about Unmaintained Free Software Projects?

A: There are Web pages at: http://unmaintained.sourceforge.net, and: http://
www.orphansource.org/.

Please try to contact the original author(s) via e-mail, or the person who
listed the software as unmaintained, before even thinking to place a license
on the package.

Q: What Online/Free Periodicals Exist for Linux?

A: There are a number of recent additions to the list of periodicals devoted
to Linux and free software:

* geek news. http://geeknews.cjb.net/. Headlines for articles about Linux,
like the news:comp.os.linux.announce and Techweb postings, and general
interest, like Associated Press stories.

* Linux Gazette. http://www.linuxgazette.com/. This is the longest-running
of the on-line periodicals, and the only one that publishes source code.

* LinuxToday. http://www.linuxtoday.com. News and opinion related to the
Linux community, updated daily.

* Linux Weekly News. http://lwn.net. News about the Linux community,
updated weekly.

* Slashdot. http://www.slashdot.org. News about the free software community
and culture.

* Freshmeat. http://www.freshmeat.net/. Notices of new and updated software
for Linux and other free OS's.


Please send additions to this list to the FAQ maintainer, see Asking
Questions and Sending Comments.

Q: Where Can I To Find Information About Security Related Issues?

A: There's a page of Linux related security information at: http://
www.linuxsecurity.com/.

Another site is: http://www.rootshell.com/, which has information about
Internet security and privacy issues.

For information about the Weekly Linux Security Digest email newsletter and
numerous security related databases, look at http://securityportal.com/.
-----------------------------------------------------------------------------

19. How To Get Further Assistance

19.1. If this Document Still Hasn't Answered Your Question....

Please read all of this answer before posting. I know it's a bit long, but
you may be about to make a fool of yourself in front of 50,000 people and
waste hundreds of hours of their time. Don't you think it's worth spending
some of your time to read and follow these instructions?

If you think an answer is incomplete or inaccurate, please e-mail David
Merrill. See Asking Questions and Sending Comments.

Read the appropriate Linux Documentation Project books. Refer to Where Is the
Documentation?.

If you're a Unix or Linux newbie, read the FAQ for news:comp.unix.questions,
news:news.announces.newusers, and those for any of the other news:comp.unix
groups that may be relevant.

Linux has so much in common with commercial unices, that almost everything
you read there will apply to Linux. The FAQ's, like all FAQ's, be found on
ftp://rtfm.mit.edu/pub/usenet/ (the mail-server@rtfm.mit.edu can send you
these files, if you don't have FTP access). There are mirrors of rtfm's FAQ
archives on various sites. Check the Introduction to *.answers posting, or
look in news-answers/introduction in the directory above.

Check the relevant HOWTO for the subject in question, if there is one, or an
appropriate old style sub-FAQ document. Check the FTP sites.

Try experimenting - that's the best way to get to know Unix and Linux.

Read the documentation. Check the manual pages (type man man if you don't
know about manual pages. Also try man -k subject and apropos subject. They
often list useful and relevant, but not very obvious, manual pages.

Check the Info documentation (type F1-i, i.e. the F1 function key followed by
"i" in Emacs). This isn't just for Emacs. For example, the GCC documentation
lives here as well.

There will also often be a README file with a package that gives installation
and/or usage instructions.

Make sure you don't have a corrupted or out-of-date copy of the program in
question. If possible, download it again and re-install ityou probably made a
mistake the first time.

Read news:comp.os.linux.announce. It often contains very important
information for all Linux users.

General X Window System questions belong in news:comp.windows.x.i386unix, not
in news:comp.os.linux.x. But read the group first (including the FAQ), before
you post.

Only if you have done all of these things and are still stuck, should you
post to the appropriate news:comp.os.linux newsgroup. Make sure you read the
next question first. "( What to put in a request for help. )"
-----------------------------------------------------------------------------

19.2. What to Put in a Request for Help

Please read the following advice carefully about how to write your posting or
E-mail. Making a complete posting will greatly increase the chances that an
expert or fellow user reading it will have enough information and motivation
to reply.

This advice applies both to postings asking for advice and to personal E-mail
sent to experts and fellow users.

Make sure you give full details of the problem, including:

* What program, exactly, you are having problems with. Include the version
number if known and say where you got it. Many standard commands tell you
their version number if you give them a --version option.

* Which Linux release you're using (Red Hat, Slackware, Debian, or
whatever) and what version of that release.

* The exact and complete text of any error messages printed.

* Exactly what behavior you expected, and exactly what behavior you
observed. A transcript of an example session is a good way to show this.

* The contents of any configuration files used by the program in question
and any related programs.

* What version of the kernel and shared libraries you have installed. The
kernel version can be found by typing uname -a, and the shared library
version by typing ls -l /lib/libc*.

* Details of what hardware you're running on, if it seems appropriate.


You are in little danger of making your posting too long unless you include
large chunks of source code or uuencoded files, so err on the side of giving
too much information.

Use a clear, detailed Subject line. Don't put things like "doesn't work",
"Linux", "help", or "question" in it ?? we already know that. Save the space
for the name of the program, a fragment of an error message, or summary of
the unusual behavior.

Put a summary paragraph at the top of your posting.

At the bottom of your posting, ask for responses by email and say you'll post
a summary. Back this up by using Followup-To: poster. Then, actually post the
summary in a few days or a week or so. Don't just concatenate the replies you
received, summarize them. Putting the word "SUMMARY" in your summary's
Subject line is also a good idea. Consider submitting the summary to news:
comp.os.linux.announce.

Make sure your posting doesn't have an inappropriate References: header line.
This marks your article as part of the thread of the article referred to,
which will often cause it to be junked by readers, along with the rest of a
boring thread.

You might like to say in your posting that you've read this FAQ and the
appropriate HOWTO'sthis may make people less likely to skip your posting.

Remember that you should not post E-mail sent to you personally without the
sender's permission.
-----------------------------------------------------------------------------

19.3. How To Email Someone about Your Problem

Try to find the author or developer of whatever program or component is
causing you difficulty. If you have a contact point for your Linux
distribution, you should use it.

Please put everything in your E-mail message that you would put in a posting
asking for help.

Finally, remember that, despite the fact that most of the Linux community are
very helpful and responsive to E-mailed questions, you're likely asking for
help from unpaid volunteers, so you have no right to expect an answer.
-----------------------------------------------------------------------------

A. GNU Free Documentation License


Version 1.2, November 2002

Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
-----------------------------------------------------------------------------

A.1. 0. PREAMBLE

The purpose of this License is to make a manual, textbook, or other written
document "free" in the sense of freedom: to assure everyone the effective
freedom to copy and redistribute it, with or without modifying it, either
commercially or noncommercially. Secondarily, this License preserves for the
author and publisher a way to get credit for their work, while not being
considered responsible for modifications made by others.

This License is a kind of "copyleft", which means that derivative works of
the document must themselves be free in the same sense. It complements the
GNU General Public License, which is a copyleft license designed for free
software.

We have designed this License in order to use it for manuals for free
software, because free software needs free documentation: a free program
should come with manuals providing the same freedoms that the software does.
But this License is not limited to software manuals; it can be used for any
textual work, regardless of subject matter or whether it is published as a
printed book. We recommend this License principally for works whose purpose
is instruction or reference.
-----------------------------------------------------------------------------

A.2. 1. APPLICABILITY AND DEFINITIONS

This License applies to any manual or other work that contains a notice
placed by the copyright holder saying it can be distributed under the terms
of this License. The "Document", below, refers to any such manual or work.
Any member of the public is a licensee, and is addressed as "you".

A "Modified Version" of the Document means any work containing the Document
or a portion of it, either copied verbatim, or with modifications and/or
translated into another language.

A "Secondary Section" is a named appendix or a front-matter section of the
Document that deals exclusively with the relationship of the publishers or
authors of the Document to the Document's overall subject (or to related
matters) and contains nothing that could fall directly within that overall
subject. (For example, if the Document is in part a textbook of mathematics,
a Secondary Section may not explain any mathematics.) The relationship could
be a matter of historical connection with the subject or with related
matters, or of legal, commercial, philosophical, ethical or political
position regarding them.

The "Invariant Sections" are certain Secondary Sections whose titles are
designated, as being those of Invariant Sections, in the notice that says
that the Document is released under this License.

The "Cover Texts" are certain short passages of text that are listed, as
Front-Cover Texts or Back-Cover Texts, in the notice that says that the
Document is released under this License.

A "Transparent" copy of the Document means a machine-readable copy,
represented in a format whose specification is available to the general
public, whose contents can be viewed and edited directly and
straightforwardly with generic text editors or (for images composed of
pixels) generic paint programs or (for drawings) some widely available
drawing editor, and that is suitable for input to text formatters or for
automatic translation to a variety of formats suitable for input to text
formatters. A copy made in an otherwise Transparent file format whose markup
has been designed to thwart or discourage subsequent modification by readers
is not Transparent. A copy that is not "Transparent" is called "Opaque".

Examples of suitable formats for Transparent copies include plain ASCII
without markup, Texinfo input format, LaTeX input format, SGML or XML using a
publicly available DTD, and standard-conforming simple HTML designed for
human modification. Opaque formats include PostScript, PDF, proprietary
formats that can be read and edited only by proprietary word processors, SGML
or XML for which the DTD and/or processing tools are not generally available,
and the machine-generated HTML produced by some word processors for output
purposes only.

The "Title Page" means, for a printed book, the title page itself, plus such
following pages as are needed to hold, legibly, the material this License
requires to appear in the title page. For works in formats which do not have
any title page as such, "Title Page" means the text near the most prominent
appearance of the work's title, preceding the beginning of the body of the
text.
-----------------------------------------------------------------------------

A.3. 2. VERBATIM COPYING

You may copy and distribute the Document in any medium, either commercially
or noncommercially, provided that this License, the copyright notices, and
the license notice saying this License applies to the Document are reproduced
in all copies, and that you add no other conditions whatsoever to those of
this License. You may not use technical measures to obstruct or control the
reading or further copying of the copies you make or distribute. However, you
may accept compensation in exchange for copies. If you distribute a large
enough number of copies you must also follow the conditions in section 3.

You may also lend copies, under the same conditions stated above, and you may
publicly display copies.
-----------------------------------------------------------------------------

A.4. 3. COPYING IN QUANTITY

If you publish printed copies of the Document numbering more than 100, and
the Document's license notice requires Cover Texts, you must enclose the
copies in covers that carry, clearly and legibly, all these Cover Texts:
Front-Cover Texts on the front cover, and Back-Cover Texts on the back cover.
Both covers must also clearly and legibly identify you as the publisher of
these copies. The front cover must present the full title with all words of
the title equally prominent and visible. You may add other material on the
covers in addition. Copying with changes limited to the covers, as long as
they preserve the title of the Document and satisfy these conditions, can be
treated as verbatim copying in other respects.

If the required texts for either cover are too voluminous to fit legibly, you
should put the first ones listed (as many as fit reasonably) on the actual
cover, and continue the rest onto adjacent pages.

If you publish or distribute Opaque copies of the Document numbering more
than 100, you must either include a machine-readable Transparent copy along
with each Opaque copy, or state in or with each Opaque copy a
publicly-accessible computer-network location containing a complete
Transparent copy of the Document, free of added material, which the general
network-using public has access to download anonymously at no charge using
public-standard network protocols. If you use the latter option, you must
take reasonably prudent steps, when you begin distribution of Opaque copies
in quantity, to ensure that this Transparent copy will remain thus accessible
at the stated location until at least one year after the last time you
distribute an Opaque copy (directly or through your agents or retailers) of
that edition to the public.

It is requested, but not required, that you contact the authors of the
Document well before redistributing any large number of copies, to give them
a chance to provide you with an updated version of the Document.
-----------------------------------------------------------------------------

A.5. 4. MODIFICATIONS

You may copy and distribute a Modified Version of the Document under the
conditions of sections 2 and 3 above, provided that you release the Modified
Version under precisely this License, with the Modified Version filling the
role of the Document, thus licensing distribution and modification of the
Modified Version to whoever possesses a copy of it. In addition, you must do
these things in the Modified Version:

* A. Use in the Title Page (and on the covers, if any) a title distinct
from that of the Document, and from those of previous versions (which
should, if there were any, be listed in the History section of the
Document). You may use the same title as a previous version if the
original publisher of that version gives permission.

* B. List on the Title Page, as authors, one or more persons or entities
responsible for authorship of the modifications in the Modified Version,
together with at least five of the principal authors of the Document (all
of its principal authors, if it has less than five).

* C. State on the Title Page the name of the publisher of the Modified
Version, as the publisher.

* D. Preserve all the copyright notices of the Document.

* E. Add an appropriate copyright notice for your modifications adjacent to
the other copyright notices.

* F. Include, immediately after the copyright notices, a license notice
giving the public permission to use the Modified Version under the terms
of this License, in the form shown in the Addendum below.

* G. Preserve in that license notice the full lists of Invariant Sections
and required Cover Texts given in the Document's license notice.

* H. Include an unaltered copy of this License.

* I. Preserve the section entitled "History", and its title, and add to it
an item stating at least the title, year, new authors, and publisher of
the Modified Version as given on the Title Page. If there is no section
entitled "History" in the Document, create one stating the title, year,
authors, and publisher of the Document as given on its Title Page, then
add an item describing the Modified Version as stated in the previous
sentence.

* J. Preserve the network location, if any, given in the Document for
public access to a Transparent copy of the Document, and likewise the
network locations given in the Document for previous versions it was
based on. These may be placed in the "History" section. You may omit a
network location for a work that was published at least four years before
the Document itself, or if the original publisher of the version it
refers to gives permission.

* K. In any section entitled "Acknowledgements" or "Dedications", preserve
the section's title, and preserve in the section all the substance and
tone of each of the contributor acknowledgements and/or dedications given
therein.

* L. Preserve all the Invariant Sections of the Document, unaltered in
their text and in their titles. Section numbers or the equivalent are not
considered part of the section titles.

* M. Delete any section entitled "Endorsements". Such a section may not be
included in the Modified Version.

* N. Do not retitle any existing section as "Endorsements" or to conflict
in title with any Invariant Section.

If the Modified Version includes new front-matter sections or appendices
that qualify as Secondary Sections and contain no material copied from
the Document, you may at your option designate some or all of these
sections as invariant. To do this, add their titles to the list of
Invariant Sections in the Modified Version's license notice. These titles
must be distinct from any other section titles.

You may add a section entitled "Endorsements", provided it contains
nothing but endorsements of your Modified Version by various parties--for
example, statements of peer review or that the text has been approved by
an organization as the authoritative definition of a standard.

You may add a passage of up to five words as a Front-Cover Text, and a
passage of up to 25 words as a Back-Cover Text, to the end of the list of
Cover Texts in the Modified Version. Only one passage of Front-Cover Text
and one of Back-Cover Text may be added by (or through arrangements made
by) any one entity. If the Document already includes a cover text for the
same cover, previously added by you or by arrangement made by the same
entity you are acting on behalf of, you may not add another; but you may
replace the old one, on explicit permission from the previous publisher
that added the old one.

The author(s) and publisher(s) of the Document do not by this License
give permission to use their names for publicity for or to assert or
imply endorsement of any Modified Version .


-----------------------------------------------------------------------------
A.6. 5. COMBINING DOCUMENTS

You may combine the Document with other documents released under this
License, under the terms defined in section 4 above for modified versions,
provided that you include in the combination all of the Invariant Sections of
all of the original documents, unmodified, and list them all as Invariant
Sections of your combined work in its license notice.

The combined work need only contain one copy of this License, and multiple
identical Invariant Sections may be replaced with a single copy. If there are
multiple Invariant Sections with the same name but different contents, make
the title of each such section unique by adding at the end of it, in
parentheses, the name of the original author or publisher of that section if
known, or else a unique number. Make the same adjustment to the section
titles in the list of Invariant Sections in the license notice of the
combined work.

In the combination, you must combine any sections entitled "History" in the
various original documents, forming one section entitled "History"; likewise
combine any sections entitled "Acknowledgements", and any sections entitled
"Dedications". You must delete all sections entitled "Endorsements."
-----------------------------------------------------------------------------

A.7. 6. COLLECTIONS OF DOCUMENTS

You may make a collection consisting of the Document and other documents
released under this License, and replace the individual copies of this
License in the various documents with a single copy that is included in the
collection, provided that you follow the rules of this License for verbatim
copying of each of the documents in all other respects.

You may extract a single document from such a collection, and dispbibute it
individually under this License, provided you insert a copy of this License
into the extracted document, and follow this License in all other respects
regarding verbatim copying of that document.
-----------------------------------------------------------------------------

A.8. 7. AGGREGATION WITH INDEPENDENT WORKS

A compilation of the Document or its derivatives with other separate and
independent documents or works, in or on a volume of a storage or
distribution medium, does not as a whole count as a Modified Version of the
Document, provided no compilation copyright is claimed for the compilation.
Such a compilation is called an "aggregate", and this License does not apply
to the other self-contained works thus compiled with the Document , on
account of their being thus compiled, if they are not themselves derivative
works of the Document. If the Cover Text requirement of section 3 is
applicable to these copies of the Document, then if the Document is less than
one quarter of the entire aggregate, the Document's Cover Texts may be placed
on covers that surround only the Document within the aggregate. Otherwise
they must appear on covers around the whole aggregate.
-----------------------------------------------------------------------------

A.9. 8. TRANSLATION

Translation is considered a kind of modification, so you may distribute
translations of the Document under the terms of section 4. Replacing
Invariant Sections with translations requires special permission from their
copyright holders, but you may include translations of some or all Invariant
Sections in addition to the original versions of these Invariant Sections.
You may include a translation of this License provided that you also include
the original English version of this License. In case of a disagreement
between the translation and the original English version of this License, the
original English version will prevail.
-----------------------------------------------------------------------------

A.10. 9. TERMINATION

You may not copy, modify, sublicense, or distribute the Document except as
expressly provided for under this License. Any other attempt to copy, modify,
sublicense or distribute the Document is void, and will automatically
terminate your rights under this License. However, parties who have received
copies, or rights, from you under this License will not have their licenses
terminated so long as such parties remain in full compliance.
-----------------------------------------------------------------------------

A.11. 10. FUTURE REVISIONS OF THIS LICENSE

The Free Software Foundation may publish new, revised versions of the GNU
Free Documentation License from time to time. Such new versions will be
similar in spirit to the present version, but may differ in detail to address
new problems or concerns. See [http://www.gnu.org/copyleft] http://
www.gnu.org/copyleft/.

Each version of the License is given a distinguishing version number. If the
Document specifies that a particular numbered version of this License "or any
later version" applies to it, you have the option of following the terms and
conditions either of that specified version or of any later version that has
been published (not as a draft) by the Free Software Foundation. If the
Document does not specify a version number of this License, you may choose
any version ever published (not as a draft) by the Free Software Foundation.
-----------------------------------------------------------------------------

A.12. Addendum

To use this License in a document you have written, include a copy of the
License in the document and put the following copyright and license notices
just after the title page:

Copyright YEAR YOUR NAME. Permission is granted to copy, distribute and/
or modify this document under the terms of the GNU Free Documentation
License, Version 1.1 or any later version published by the Free Software
Foundation; with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST. A
copy of the license is included in the section entitled "GNU Free
Documentation License".

If you have no Invariant Sections, write "with no Invariant Sections" instead
of saying which ones are invariant. If you have no Front-Cover Texts, write
"no Front-Cover Texts" instead of "Front-Cover Texts being LIST"; likewise
for Back-Cover Texts.

If your document contains nontrivial examples of program code, we recommend
releasing these examples in parallel under your choice of free software
license, such as the GNU General Public License, to permit their use in free
software.

Read more ...

The Linux BLFAQ

Neil Zanella <nzanella@ganymede.cs.mun.ca>
v0.2.5, Sep 30 2000

Copyright Notice:
Copyright (c) 1998-2000 by Neil Zanella. This document may be distributed under
the terms set forth in the LDP license at
<http://www.linuxdoc.org/COPYRIGHT.html>

Intro:
Welcome to the Brief Linux FAQ (BLFAQ)!
This document contains a list of some frequently asked Linux questions and their answers. It is meant to provide general help to Linux users, especially newbies.

I invite you to modify and add to this list but if you do so please be sure to mail me so that I can include your changes in future releases. Finally, I hope that this document will prove helpful to all Linux users, newbies especially.

Current releases of this document can be found at:
<ftp://metalab.unc.edu/pub/Linux/docs/faqs/BLFAQ>

FAQs:
--------------------------------------------------------------------------------
Q: I am trying to use the text based ftp program to download some stuff via
anonymous ftp from an ftp site. I have never done this before and the ftp
server doesn't seem to be letting me log in. Do I need a special user name
and password to do this?

A: To use anonymous ftp services log in with user name "anonymous" without
quotations and your full e-mail address as your password.
Some ftp sites will also accept the words "ftp" or "guest" instead of the
word "anonymous" as user name.

--------------------------------------------------------------------------------
Q: I plan to use the FIPS program to shrink a FAT32 partition (such as one used
by MS-Windows 95/98) and hence create space for my Linux operating system.
Can this be done?

A: Yes, but in order to do so you will need a version of FIPS at least as recent
as FIPS 1.5c. You can get the latest version of FIPS by anonymous ftp from
the official FIPS web site at <http://www.igd.fhg.de/~aschaefe/fips/>.

--------------------------------------------------------------------------------
Q: I am using the DOS Fdisk utility to destructively repartition my hard drive.
How should I deal with the question pertaining to whether or not I should
"enable large disk support"?

A: That question really has to do with whether you want to use a FAT32 or a
FAT16 file system with your DOS/Windows partition. Linux will coexist equally
well with both file systems except that in order to see a FAT32 file system
from your Linux partition you will need a version of the kernel at least
as recent as 2.0.35 .

--------------------------------------------------------------------------------
Q: I have upgraded to kernel 2.0.35 or later but still can't see my FAT32
partition. What went wrong?

A: You must ensure that you have an entry for your DOS partition in your
/etc/fstab file resembling the line:

/dev/hda1 /dos vfat auto,user,rw 0 0

Once the line is there you can just issue the command "umount -a;mount -a"
to mount your DOS partition under the /dos directory.

--------------------------------------------------------------------------------
Q: I am trying to install Linux via CD-ROM. I have made space for Linux on my
hard drive but inserting the Linux CD into the CD-ROM drive and rebooting
has no effect.

A: You must configure your BIOS settings so that booting from the CD-ROM
drive is enabled and so that the boot sequence forces the computer to
boot from the CD-ROM drive instead of from some other device such as
a hard drive or floppy drive. On most systems the BIOS settings can be
accessed by entering a keystroke shortly after the computer powers up.
The required keystroke varies from system to system and typical values
include <del>, <f2>, and <ctrl>-<esc>.

--------------------------------------------------------------------------------
Q: I have completed the installation process but upon reboot I get a LI
prompt or a bunch of zeros and ones.

A: If your machine is somewhat old and you have an IDE (or EIDE) hard drive then
you must install your root partition completely below cylinder 1023
which means below 512 MB of disk space. On SCSI drives this means
your root partition must be contained within approximately one GB.
If your machine is fairly new and your BIOS supports it you may be able to
get around this problem by enabling LBA mode in the BIOS settings.

--------------------------------------------------------------------------------
Q: I can log in and out of my system but how do I shut it down / reboot it?

A: There are various ways. The most popular ones are logging in as root and
issuing the command "/sbin/shutdown -h now" or "/sbin/halt" to shut it
down or "/sbin/shutdown -r now" or "/sbin/reboot" to reboot.
On most systems while using a text based console pressing the <ctrl>, <alt>
and <del> keys simultaneously will also reboot the system.

--------------------------------------------------------------------------------
Q: I have shut down my system with the "halt" command and gotten to a message
saying "System Halted" but why is my computer still on?

A: If you want it to power off on shutdown then you must recompile the kernel to
enable support for that feature by selecting the appropriate entry in the
APM options.

--------------------------------------------------------------------------------
Q: My new video card is listed at <http://www.linux.org/> as a card which the
X Window System supports under Linux but I cannot get it to work.

A: Make sure that you have the newest version of XFree86 and that you installed
the right X Server. If all else fails you might want to try selecting the
generic SVGA server as your X Server.

--------------------------------------------------------------------------------
Q: I have successfully installed the X Window System and use the startx
command to run it from a text based virtual console. How can I have the X
Window System run at all times so that I don't have to use the startx
command?

A: If you are running Red Hat then you can edit the file /etc/inittab on
your system and replace the entry

id:3:initdefault:

with the entry

id:5:initdefault:

and reboot.
On other systems you might have to change the number 5 (the run level) to
another number like 4. How to choose the correct run level should be clear
by reading the comments in the file /etc/inittab . Alternatively, you might
have to change a link in /etc/rc[2345].d . Run levels 2-5 don't have really
strong conventions behind them like 0, 1, and 6 do. It depends on the
distribution.

--------------------------------------------------------------------------------
Q: When I use the X Window system and open multiple windows I find that my
screen size is insufficient. How can I use more virtual screen space?

A: Most window managers running under X Window have a built in feature known as
a pager which allows you to have more virtual screen space.

--------------------------------------------------------------------------------
Q: I would like to have xdm run multiple local displays on my system and switch
back and forth by pressing <ctrl><alt><F*> where * is a number between
1 and 12.

A: If you wanted to run 6 virtual consoles accessible by pressing the keys
<ctrl><alt><F7> through <ctrl><alt><F12> then you could put the following
entries in the file /usr/X11R6/lib/X11/xdm/Xservers

:0 local /usr/X11R6/bin/X vt07 :0
:1 local /usr/X11R6/bin/X vt08 :1
:2 local /usr/X11R6/bin/X vt09 :2
:3 local /usr/X11R6/bin/X vt10 :3
:4 local /usr/X11R6/bin/X vt11 :4
:5 local /usr/X11R6/bin/X vt12 :5

I would limit myself to only a few of these though as X seems to eat up
quite a lot of memory when multiple displays are running.

--------------------------------------------------------------------------------
Q: I hate the sound of the bell. I would prefer to disable it perhaps enabling
the visual bell as an alternative.

A: If you are running X then you can simply type "xset -b" without quotation
marks at the command prompt. Alternatively, if you are running the bash
shell then you can add the command "xset -b 2> /dev/null" without quotation
marks at the end of your .bash_profile file in your home directory to have
the audible bell disabled each time you log in.
For more information see the Visual-Bell-mini-HOWTO at
<http://www.linux.org/>

--------------------------------------------------------------------------------
Q: I have access to a remote Unix machine that has some commercial software that
uses X which I would like to run remotely on my display. How do I do it?

A: First connect to the remote machine using dip or whatever you use. If the
remote machine is called grasshopper.uvw.edu and your machine is called
kiwi.fruit.org then first type

xhost +grasshopper.uvw.edu

from your own machine's shell prompt while running X. If you telnet to the
remote machine and you're using a modem to connect then your machine name
on the Internet may be different from your actual machine name at home
so be sure to use the finger command on the remote machine with your remote
user name as an argument to find out what your machine name is on the
Internet. Assuming your machine name has not changed you must type

export DISPLAY=kiwi.fruit.org:0.0

on the remote machine if it uses the Korn shell or the equivalent if it uses
another shell. You should be now ready to fire up the remote application
from your machine.

--------------------------------------------------------------------------------
Q: I am sick of having to type in my password interactively each time I want to
start a shell on a remote server. Is there a way to avoid this.

A: Surprisingly yes. Simply replace the words "remote-host", "username", and
"password" in the following expect script and do a "chmod +x name-of-script".
You can then simply invoke the script to log into the remote host.

#!/usr/bin/expect
eval spawn telnet remote-host
set timeout 20
expect ogin:
send "username\r"
expect assword:
send "password\r"
sleep 2
interact

Alternatively you can try out the ktelnet program.

--------------------------------------------------------------------------------
Q: Is it possible to make recursive downloads to mirror ftp or web sites or
just download a file, perhaps while not even logged in?

A: Yes, use the wget program. See <ftp://sunsite.auc.dk/pub/infosystems/wget/>
for the latest version of the software.

--------------------------------------------------------------------------------
Q: I use the lp or lpr programs to print ASCII files and man pages. Is there
any way that I can get more text on one page, hence less pages of output?

A: Yes. If you have a printer which can print postscript files you could
try the a2ps program. Make sure you specify the -M option for the paper's
size and the -m option in case you're printing man pages. For example to
convert the xterm man page to postscript you can use

man xterm | a2ps -M Letter -m -o xterm.ps

--------------------------------------------------------------------------------
Q: I have more than 64 MB of RAM but when I use the "free" command to check
the amount of available memory on my system only slightly less than 64MB
show up. How do I get Linux to recognize the additional RAM?

A: Linux uses the BIOS to detect the amount of available RAM. At the present
time there are two separate function calls available to do the job. Any
version of Linux prior to 2.1.x uses the old call which is limited to 64M.
The newer call (used by 95/NT and Linux 2.1.x) can return more than 64M.
This problem should be fixed in the next stable release of the Linux kernel
(release 2.2.0). For now it is possible to have Linux detect all of your
RAM by adding the line:

append = "mem=128M"

to the file /etc/lilo.conf if you use LILO or to the end of the respective
LOADLIN file if you use LOADLIN. This will enable 128MB of RAM, for example.
You will need to rerun LILO for the changes to take effect. The next time you
boot up, Linux will see all of your memory.

--------------------------------------------------------------------------------
Q: I have used the rm command to delete a file. Is it possible to undelete the
file and hence recover its contents?

A: In theory there is a way to undelete a file if you are using the ext2fs
file system (most common). In practice, it is rarely possible. To prevent
significant loss of data in this manner you must ensure that your system
is backed up regularly. Alternatively if you had installed the program
midnight commander before deleting and compiled a version with undelf
then you could use cd undel:/dev/hda8 to see your deleted files (without
names). Alternatively, some users like to have a shell script that moves
a file to a directory like /tmp each time it is removed or just before
it is overwritten. If you are really desperate, read the Ext2fs-Undeletion
mini-HOWTO, which might work.

--------------------------------------------------------------------------------
Q: I am trying to run a script file named script or test but I am getting some
unexpected results.

A: The names script and test are names of executable programs on your system so
you should not use them for your own executables. If you got unexpected
it's because the system binaries got to be executed before your own binaries.

--------------------------------------------------------------------------------
Q: I (re/)installed windows on the same hard drive as Linux but now I no longer
get the LILO prompt and can't boot into Linux. What should I do?

A: Most likely windows overwrote the MBR (Master Boot Record) hence deleting
LILO. If you manually installed the kernel and used "make zdisk" then you
can boot from the floppy, otherwise you can download a boot/root floppy
distribution of Linux like the one at <http://www.toms.net/rb/> or some
other one. Once you get to your hard drive don't forget to rerun /sbin/lilo
so that you won't have to boot from the floppy again. If you are using a
floppy that boots its own file system then you must first mount your hard
drive with something like "mount /dev/hda1 /mnt" and change to the hard
drive with "chroot /mnt /bin/sh" before rerunning "/sbin/lilo".

--------------------------------------------------------------------------------
Q: I removed Linux from my system, but now DOS won't boot because LILO is still
there. How do I remove LILO?

A: If you have a version of DOS at least as recent as DOS 5.0 then you can
insert your DOS boot diskette and boot from it. At the DOS prompt, type

fdisk /mbr

to remove LILO from the Master Boot Record (MBR).

--------------------------------------------------------------------------------
Q: I want to add '.' to root's PATH, to allow me to not have to put ./ in
front of every local command I type. But I hear this is a bad thing. Why?

A: Adding '.' to root's PATH would be a security risk. Imagine the case where a
malicious user creates a file called /tmp/ls containing a command sequence
such as

# Caution: This script removes everything from the Linux file system.
cat /tmp/ls
rm -Rf /

and you as root wander into /tmp and want to see what files are there. If
the . occurs in root's path before /bin then typing ls at the shell prompt
will execute the malicious command instead. Alternatively, the malicious
command could be named mroe, ls-l, caat, lss, or similar in which case a
typo on root's behalf would cause it to be executed even if . is the last
entry in root's path. Finally, the malicious command may be set to copy
/bin/bash to a hidden spot and change permissions of the copy to
suid ( -rws---r-x ) so that anyone executing the hidden copy would have
root permissions.

--------------------------------------------------------------------------------
Q: I can't execute my script/program. I can list the file with ls -l and
it is there with the correct permissions:

ls -l mumble
-rwxrw-r-- 1 me user 104 Feb 14 15:46 mumble

but when I type mumble at the command prompt I get the response:

bash: mumble: command not found

A: Most probably the current directory (CWD) is not in your path. The best
thing to do in such situations is probably to type the full path to the
script/program followed by the name of the script/program .
If you are work in a directory that you alone use and which is not shared
then you might want to take the risk of editing your PATH variable to
contain CWD. Alternatively you could keep all your executables in a directory
called ~/bin and put it in your path. You can look at your path by typing
echo $PATH at the shell prompt.

echo $PATH
/usr/local/bin:/bin:/usr/bin:/usr/X11R6/bin:/home/me/bin

--------------------------------------------------------------------------------
Q: Why can't I telnet or rsh in to my Linux system as Root?

A: This is a security feature meant to protect you. Malicious users must
know a valid user password, as well as the root password in order to
get in to the system and do anything as root. Log in as a user, and
use the su command to then become root. Better still is to use the ssh
command (if installed) which encrypts your session to prevent anyone
from seeing the root password.
If your network is totally local (you have only a terminal connected
to a serial port), you can edit /etc/securetty to add that port as one
considered secure enough for root to log in.

--------------------------------------------------------------------------------
Q: Why can't I ftp as root?

A: This is a security feature meant to protect you. No user listed in
/etc/ftpuser is allowed to use ftp. Always ftp as a regular user.

--------------------------------------------------------------------------------
Q: I've tried to create a shell script and made it setuid root so the users
can execute it. But no matter what I do, it doesn't execute with root
privilege. Why?

A: Shell scripts are a notorious security hole. To protect you, the kernel
purposely ignores setuid and setgid in scripts. Create a C or Pearl
program to do the task.

--------------------------------------------------------------------------------
Q: Why should I create ordinary user accounts. I'm the only user on this
machine. Why not just work as root?

A: Root, commonly called the super-user, is for system administration tasks
only. The normal protection mechanisms are eliminated for this account
(indeed for any user with UID or GID equal to 0). So if you make any
little mistake (for example the classic "rm * myfile" -- note the
space between the wild-card and myfile) the system will do _exactly_
what you told it to do, not what you meant it to do. In the classic mistake
above, the system will remove all files in the current directory, then
complain because it can't remove 'myfile' which doesn't exist.

--------------------------------------------------------------------------------
Q: I am able to establish a dial up connection but when I use telnet to
connect to remote hosts telnet understands IP address but not host names.
What can I do to have telnet and other programs understand host names?

A: You should be able to get rid of this problem by adding an entry for a
name server in the file /etc/resolv.conf . If you have more than one name
server then you should put your primary dns first as nameserver entries
get read from top to bottom. The 'search' or 'domain' line should have
your isp's domain name. Your /etc/resolv.conf should look something like:

search virtual-impact.com
domain virtual-impact.com
nameserver 205.162.94.51
nameserver 205.162.88.33
nameserver 134.153.2.90

--------------------------------------------------------------------------------
Q: I don't like having to type the full host name when using telnet.
How can I resolve this problem?

A: Edit the file /etc/hosts and add entries like the following:

127.0.0.1 localhost localhost.localdomain
134.153.1.200 riemann riemann.math.mun.ca
134.153.39.1 ganymede ganymede.cs.mun.ca
134.153.1.1 garfield garfield.cs.mun.ca
134.153.2.151 plato plato.ucs.mun.ca
129.128.88.12 vega vega.math.ualberta.ca

--------------------------------------------------------------------------------
Q: I am logged into a host. I would like to find out its IP address
and a few other ones. How can I do this?

A: You could use the hosts command as follows:

ganymede $ host ganymede.cs.mun.ca
ganymede.cs.mun.ca has address 134.153.39.1
ganymede.cs.mun.ca mail is handled (pri=5) by garfield.cs.mun.ca
ganymede $

The programs nslookup and /sbin/ifconfig can also be used for this
purpose.

--------------------------------------------------------------------------------
Q: How can I have the "useradd" or "adduser" command automatically place some
default files in a user's directory when that user is added to the system?

A: Edit the contents of the files located under /etc/skel to suit your needs.
These files will be added to a user's home directory each time that user
is added.

--------------------------------------------------------------------------------
Q: I am trying to build a new kernel. Why is it that "make menuconfig" does not
display any colors when running under an xterm?

A: You could either use "make xconfig" or if you have the terminfo library
installed you could say "export TERM=xterm-color" or something similar.
Look at the entries in the terminfo library to chooses an appropriate value
for the TERM environment variable.

--------------------------------------------------------------------------------
Q: I am trying to get X to read my window manager's configuration file but with
no success.

A: If you start X with "startx" or "xinit" then you need a startup file
called "~/.xinitrc" otherwise if you start your X session with a session
manager such as "xdm" then you need a startup file called "~/.xsession".
The startup file should contain the command to execute your window manager.
You must make your startup file executable with "chmod +x ~/.xinitrc" or
"chmod +x ~/.xsession". For more information look at the files located
under /etc/X11 and /usr/X11R6/lib/X11 as well as your window manager's
documentation files.

--------------------------------------------------------------------------------
Q: Are the modules part of the Linux kernel or are they distributed separately?

A: They come with the kernel. There used to be an old package called
modules-x.y.z.tar.gz that you could download. This did not consist of the
modules themselves but the module utilities needed to handle modules.
For obvious reasons this package was renamed to modutils-x.y.z.tar.gz.

--------------------------------------------------------------------------------
Q: What is the quickest and safest way to recompile the kernel?

A: In short, as root issue the following commands after downloading a kernel:

# mv linux-x.y.z.tar.gz /usr/src; cd /usr/src
# rm -f linux; tar zxpvf linux-x.y.z.tar.gz
# mv linux linux-x.y.z; ln -s linux-x.y.z linux
# cd linux
# make menuconfig
# make dep
# make clean
# make bzImage (or better, insert a floppy and do a "make bzdisk").
# make bzlilo (or if this doesn't work,
cp /usr/src/linux-x.y.z/arch/i386/boot/bzImage /boot/vmlinuz
Edit /etc/lilo.conf and change the image label to point to
/boot/vmlinuz-x.y.z and rerun /sbin/lilo)
reboot (here you may use the disk you made if something goes wrong)
# cd /usr/src/linux
# make modules; make modules_install

This should do it.

--------------------------------------------------------------------------------
Q: I am trying to set up a home page. How do I go about doing that and where
should I put my web files to view them on my Linux box?

A: If you are running the Apache web server then look in
/etc/httpd/conf/srm.conf . There you should see lines like:

UserDir public_html
DirectoryIndex index.html index.shtml index.cgi

This means that your web files should be stored under a directory called
~/public_html and the first file to be read when a user accesses your web
site with http://x1.x2.x3.x4/~<your-username> must be one of ~/index.html ,
~/index.shtml , or ~/index.cgi . If you have an entry like:

127.0.0.1 localhost

in your /etc/hosts directory (ie. you have loopback enabled) than you can
make sure everything is OK by pointing your browser to
http://127.0.0.1/~<your-username> . Of course all files must have the right
permissions, in particular you probably want to do
a "chmod a+x ~/public_html" and a "chmod a+r index.html".
If you are not on the Internet this enables you to edit a whole web site on
a Linux box without having to be dialed up to your ISP. You can later upload
the pages to the Internet. This method will pay off in browser speed when
editing your web page.

--------------------------------------------------------------------------------
Q: I would like to have more lines and/or columns displayed when I use the text
consoles. Is there a way I can do this?

A: Yes. If you are using LILO to boot your system then you can do it by
inserting the vga option in your /etc/lilo.conf file. For example a line
saying "vga=ask" will let you choose the text mode at boot time (type
"man lilo.conf" for more details). Don't forget to rerun /sbin/lilo after
you modify /etc/lilo.conf .
Alternatively you could get the SVGATextMode program by anonymous ftp from
<ftp://metalab.unc.edu/pub/linux/utils/console/>.

--------------------------------------------------------------------------------
Q: I have two Linux boxes but they're not networked. What's a good way to
transfer data from one to another.

A: Get a bunch of floppies (one might be enough) and use:

$ tar cvMf /dev/fd0 <file/directory to be archived>

move the floppies to the other PC's floppy drive and do a:

$ tar xvMf /dev/fd0

Alternatively you can use the "split" command to split your file into many
files of a particular size with the "-b" option, copy them to a floppy
with a DOS file system with "mcopy", move the floppies to the other PC, copy
them to the hard drive and redirect the output of "cat" to merge them.

--------------------------------------------------------------------------------
Q: What's the cheapest way to network two Linux boxes?

A: Probably your best bet is to get an Interlink/Laplink/Bi-Directional cable
to connect the parallel ports. This method makes use of the PLIP protocol.
This will allow your PCs to communicate at a speed of approximately 47kB
per second. This is of course somewhat slower than a connection that makes
use of Ethernet cards. See the relevant HOWTOs and mini HOWTOs for more
detail.

--------------------------------------------------------------------------------
Q: I am running X. What's an easy way to put an image file in the background.

A: If you have "xv" installed then you may want to use:

xv -root -max -quit <absolute-path-to-image-file/image-file>

As "xv" is shareware you may want to try "qiv" which you may obtain from
<http://www.klografx.net/qiv/>.

--------------------------------------------------------------------------------
Q: I have read the Brief Linux FAQ (BLFAQ) but could not find what I was
looking for. Where else should I look?

A: Other places include links under <http://www.linux.org/> including the Linux
FAQ (LFAQ) and the various HOWTOs and mini-HOWTOs. Other sites of interest
might include <http://www.xfree86.org/> for X related things and
<ftp://metalab.unc.edu/> if you're looking for interesting applications to
run under Linux.

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

A big thank you to all those people who contributed to this FAQ.
Send me e-mail for corrections and enhancements.

--
maintained by: Neil Zanella
e-mail: nzanella@ganymede.cs.mun.ca

Read more ...

The Sig11 FAQ

Signal 11 while compiling the kernel

This FAQ describes what the possible causes are for an effect that
bothers lots of people lately. Namely that a linux(*)-kernel (or any
other large package for that matter) compile crashes with a "signal
11". The cause can be software or (most likely) hardware. Read on to
find out more.
(*) Of course nothing is Linux specific. If your hardware is flaky,
Linux, Windows 3.1, FreeBSD, Windows NT and NextStep will all crash.
If you are not reading this at http://www.bitwizard.nl/sig11/, that's
where you can find the most recent version.
For those of you who prefer reading this in French, the French
translation can be found at
http://www.linux-france.com/article/sig11fr/.
Email me at R.E.Wolff@BitWizard.nl if you find any spelling errors,
worthwhile additions or with an "it also happened to me" story. (Note
that I reject some suggested additions on my belief that it is
technical nonsense).



The Sig11 FAQ

QUESTION

My kernel compile crashes with
gcc: Internal compiler error: program cc1 got fatal signal 11

What is wrong with the compiler? Which version of the compiler do I
need? Is there something wrong with the kernel?

ANSWER

Most likely there is nothing wrong with your installation, your
compiler or kernel. It very likely has something to do with your
hardware. There are a variety of subsystems that can be wrong, and
there is a variety of ways to fix it. Read on, and you'll find out
more. There is one big exception to this "rule". Red Hat 5.0. There is
more near the end.
_________________________________________________________________

QUESTION

Ok it may not be the software, How do I know for sure?

ANSWER

First lets make sure it is the hardware that is causing your trouble.
When the "make" stops, simply type "make" again. If it compiles a few
more files before stopping, it must be hardware that is causing you
troubles. If it immediately stops again (i.e. scans a few directories
with "nothing to be done for xxxx" before bombing at exactly the same
place), try
dd if=/dev/HARD_DISK of=/dev/null bs=1024k count=MEGS

Change HARD_DISK to "hda" to the name of your harddisk (e.g. hda or
sda. Or use "df ."). Change the MEGS to the number of megabytes of
main memory that you have. This will cause the first several megabytes
of your harddisk to be read from disk, forcing the C source files and
the gcc binary to be reread from disk the next time you run it. Now
type make again. If it still stops in the same place I'm starting to
wonder if you're reading the right FAQ, as it is starting to look like
a software problem after all.... Take a peek at the "what are the
other possibilities" question..... If without this "dd" command the
compiler keeps on stopping at the same place, but moves to another
place after you use the "dd" you definitely have a disk->ram transfer
problem.

QUESTION

What does it really mean?

ANSWER

Well, the compiler accessed memory outside its memory range. If this
happens on working hardware it's a programming error inside the
compiler. That's why it says "internal compiler error". However when
the hardware occasionally flips a bit, gcc uses so many pointers, that
it is likely to end up accessing something outside of its addressing
range. (random addresses are mostly outside your addressing range, as
not very many people have a significant part of 4G as main memory...
:-) It seems that nowadays, everybody with "signal 11" problems gets
directed to this page. If you're developping your own software or have
software that hasn't been debugged quite enough, "signal 11" (or
segmentation fault) is still a strong hint that there is something
wrong with the program. Only when you can cause a "known working"
program like "gcc" to crash on a dataset (e.g. the Linux-kernel) that
has also been well-tested, then it becomes a hint that there is
something wrong with your hardware.
_________________________________________________________________

QUESTION

Ok. I may have a hardware problem what is it?

ANSWER

If it happens to be the hardware it can be:
* Main memory. Your main memory might be getting an occasional bit
wrong. If this happens on the "writes", you won't see any parity
errors. There are several ways to fix it:
+ The memory speed might be too slow. Increase the number of
wait states in the BIOS.
This could be caused by the AMIBIOSs autoconfig option: it
may only know about 486s running upto 80 MHz, whereas you
currently buy 100 MHz versions. -- Pat V.
+ The memory speed might be too slow. Get faster DRAM SIMMs.
For example current ASUS motherboards require 60 ns DRAM if
you have a 100, or 133 MHz processor (Take a look in your
motherboard's manual). I've heard reports that 70 ns also
works, reliability problems like random sig11's belong to the
possibilities.... (I wouldn't take the risk) -- Andrew
Eskilsson (mpt95aes@pt.hk-r.se)
+ There is a bad chip on one of the SIMMs. If you own more than
1 bank of memory you might be able to pull SIMMs and see if
the problem goes away. Be careful for STATIC!!!
+ We handled a hard one here the last week. It turned out that
ALL 4 16Mb SIMMs were broken in that they dropped a bit
around once per hour. This was sufficient to crash the
machine in about a day, or crash a kernel compile in about an
hour. A new set of SIMMs works perfectly. It took a long
while to diagnose this one, because all 4 of the SIMMs were
affected equally, so leaving half of the memory out didn't
change things.
Mark Kettner (kettner@cat.et.tudelft.nl) reports that his
system was capable of running my memory test for 2300 times
faultlessly, but then detected around 10 errors. It then
continued detecting no faults for a few hundred runs
again..... In his case running kernel compiles was a much
more efficient way of detecting the health of the system (in
the most stable configuration the system could compile around
14 kernels before going bzurk). His solution was to "trade
in" the old memory for a so called "memory upgrade". The
shopkeeper then "tests" in their memory tester, which OKs the
memory. he then got a good discount on the new memory :-).
+ It seems that some 30-72 pin converters can cause memory
errors. (It hasn't been proven whether the 4 SIMMS in the
converter had gone bad, or if the SIMM converter was at
fault. The SIMMS had been functioning perfectly for years
before they were moved into the converter....) -- Naresh
Sharma (n.sharma@is.twi.tudelft.nl). Paul Gortmaker
(paul.gortmaker@anu.edu.au) adds that the SIMM converters
should have at least 4 bypass capacitors to keep the power
supply of the SIMMs clean.
+ If the refresh of the DRAM isn't functioning properly, the
DRAMs will slowly lose their information. Some (486)
motherboards stop refreshing correctly when you turn on
"hidden refresh". There seems to be a program called "dram"
around that can also mess up your refresh to cause sig11
problems. -- Hank Barta (hank@pswin.chi.il.us), Ron Tapia
(tapia@nmia.com)
+ The number of waitstates could be too low. Increase the
number of waiststates in the BIOS for a fix. The Intel
Endeavour board doesn't allow you to increase the memory
waitstates. This can supposedly be fixed by flashing a MR
BIOS into the motherboard. -- David Halls
(david.halls@cl.cam.ac.uk)
* Cache memory. Your cache memory might be getting an occasional bit
wrong. Caches are usually not equipped with parity. You can
diagnose that this is the case by turning off the cache in the
BIOS. If the problem goes away it is probably the cache. There are
several ways to fix it:
+ The cache memory speed might be too slow. Increase the number
of wait states in the BIOS.
+ The cache memory speed might be too slow. Get faster SRAM
chips.
+ There is a bad chip in your cache. It is unlikely that you
can swap chips as easily as with SIMMs. Be careful for
STATIC!!! -- Joseph Barone (barone@mntr02.psf.ge.com)
+ The cache might be set to "write back" while there is a bug
in the write back implementation of your chipset. The
motherboard where this happened was a "MV020 486VL3H" (with
20M RAM) -- Scott Brumbaugh (scottb@borris.beachnet.com)
(Mail address doesn't work. Scott: Get back at me with a
valid return address)
+ The motherboard may require a jumper to switch between Cache
On A Stick and the old-fashioned dip chip cache. (JP16 on Rev
2.4 ASUS P/I-P55TP4XE motherboards)
* Disk transfers. A block coming from disk might incur an occasional
bit error.
+ If you have this problem, you are most likely to have to do
the "dd" command to "move" the problem from one place to the
next....
+ Some IDE harddisks cannot handle the "irq_unmasking" option.
This may only show under load. And it could show as a sig11.
+ Do you have a kalok 31xx? Throw it in the garbage. (or sell
it to a DOS user)
+ SCSI? Termination? A short bus might still work (unreliably
that is) with bad termination. A long bus might get errors
anyway. Can you turn on parity on the host and the DISK?
* Overclocking. Some vendors (or private people) think it is
possible to overclock some CPUs. Some of them may work others
don't. You might want to try turning off turbo (note that most
pentium motherboards no longer support a non-turbo mode) and see
if the problem goes away. Check the speed of your CPU compared
(printed on it, carefully remove the fan if necessary) with what
the motherboard jumpers or BIOS settings say.... It seems that
even Intel may make mistakes in this area. I now have several
reliable reports that official pentium would sig11 at their rated
speed, but not at a lower speed. As for some speeds the
motherboard is only stressed HARDER for a slower processor speed,
(120 MHz-> motherboard runs at 60MHz, 100MHz-> motherboard runs at
66MHz), I think it is unlikely that this has anything to do with
the motherboard. Moreover a new 120MHz processor is now
functioning correctly. -- Samuel Ramac (sramac@vnet.ibm.com). This
is not unique to Intel or any of its competitors.
* CPU temperature. A high speed processor might overheat without the
correct heat sink. This can also be caused by a failing fan. (My
personal '486 has a fan that takes a few minutes to get up to
speed. It probably will never really FAIL because it's now
decommisioned :-). The CPU can become erratic if "pushed" by
compiling a kernel. This problem becomes worse if you disable
"HALT" on the LILO command line. Linux tries to power-down the CPU
by executing the "halt" instruction when the system is idle. This
preserves power, and therefore the CPU temperature drops when the
system is idle. You therefore might not notice this problem when
simply editing, and it might only surface after hours of CPU
intensive jobs when the ambient temp is high. If you have a
Pentium with Fdiv bug, it is advisable to trade it in at Intel.
They will send you a new one that preconfigured with an official
Intel-approved FAN. Also note that most normal glues are very bad
thermal conductors. There is special thermal glue available that
should be used when a fan needs to be glued to a CPU. -- Arno
Griffioen (arno@ixe.net), -- W. Paul Mills (wpmills@midusa.net) --
Alan Wind (wind@imada.ou.dk)
Intel says that the allowable temperature ranges for the outside
of your CPU is:
0 to +85 C: Intel486 SX, Intel486 DX, IntelDX2, IntelDX4 processor
0 to +95 C: IntelDX2, IntelDX4 OverDrive® processors
0 to +80 C: 60 MHz Pentium® processor
0 to +70 C: 66 to 166 MHz Pentium processor
For information on how to measure this and some confirmation of
what I say here, see:
http://pentium.intel.com/procs/support/faqs/iarcfaq.htm
(Especially questions Q5, Q6 and Q12. The document is getting
slightly outdated, but it is still very accurate. It seems the
questions move around a bit every now and then as well.)
* CPU voltage. Some motherboards allow you to select the CPU
voltage. Some motherboards badly document the jumper settings that
manage this. It seems that a 5V processor might still work most of
the time at 3.3 volts..... -- Karl Heyes (krheyes@comp.brad.ac.uk)
* RAM voltage. It seems that vendors are preparing for 3.3V RAM now.
Most memory is still 5V. (but be careful.... 3.3v RAM will break
at 5V.....)
* Local bus overloading. At 25 MHz you're allowed to have 3
VesaLocalBus (VLB) cards, At 33MHz only two, at 40MHz only one and
guess what at 50MHz NONE! (i.e. you are allowed to run your system
with a 50MHz local bus, but then you're not allowed to use any VLB
cards). Some systems start acting flaky when you overload the VLB.
Even when your VLB isn't overloaded (over the limits stated
above), the system may lose a few nanoseconds of margin by adding
an extra VLB card, so you might need to add a cache wait state or
something after you've added a new VLB card.... -- Richard
Postgate (postgate@cafe.net)
* Power management. Some laptops (and nowadays also "green" pc's)
have power management features. These might interfere with Linux.
One feature might save a memory image to HD and restore the RAM
when you press a key. This sounds like fun, but Linux device
drivers don't expect that the hardware has been turned off between
two acesses. Some may recover, but others not. Try turning it off,
or enabeling "APM support" in your kernel. -- Elizabeth Ayer
(eca23@cam.ac.uk)
* The CPU itself. Several people are reporting that they have found
nothing to blame except the CPU. This could also have been an
incompatibility between the CPU and the motherboard. A wave of
reports concerning Intel CPUs has passed (Feb '97). A new wave of
reports is coming in that are blaming Cyrix/IBM 6x86 CPUs.
Although it could indeed be the CPU, it could also be that your
motherboard is incompatible with your CPU. At least I've seen a
motherboard manual mention that it isn't compatible with older
6x86's. My own experience is that these devices aren't bad at all,
and on a kernel compile I benchmarked a P166+ to be equivalent
with a P155 (1.3 times faster than a P120).

The Memory hole. Many modern motherboards allow you to use old ISA
video cards with one or two megabytes of linear frame buffer. To
achieve this, they have to map out the memory just below 16Mb. Nobody
actually ever used this feature, but if you turn the memory hole (or
LFB support in some BIOSes) on, your machine will certainly be
flaky..... -- Paul Connolly (pconnolly@macdux.com.au)
_________________________________________________________________

QUESTION

RAM timing problems? I fiddled with the bios settings more than a
month ago. I've compiled numerous kernels in the mean time and nothing
went wrong. It can't be the RAM timing. Right?

ANSWER

Wrong. Do you think that the RAM manufacturers have a machine that
makes 60ns RAMs and another one that makes 70ns RAMs? Off course not!
They make a bunch, and then test them. Some meet the specs for 60 ns,
others don't. Those might be 61 ns if the manufacturer would have to
put a number to it. In that case it is quite likely that it works in
your computer when for example the temperature is below 40 degrees
centigrade (chips become slower when the temp rises. That's why some
supercomputers need so much cooling).

However "the coming of summer" or a long compile job may push the
temperature inside your computer over the "limit". -- Philippe Troin
(ptroin@compass-da.com)
_________________________________________________________________

QUESTION

I got suckered into not buying ECC memory because it was slightly
cheaper. I feel like a fool. I should have bought the more expensive
ECC memory. Right?

ANSWER

Buying the more expensive ECC memory and motherboards protects you
against a certain type of errors: Those that occur randomly by passing
alpha particles.
Because most people can reproduce "signal 11" problems within half an
hour using "gcc" but cannot reproduce them by memory testing for hours
in a row, that proves to me that it is not simply a random alpha
particle flipping a bit. That would get noticed by the memory test
too. This means that something else is going on. I have the impression
that most sig11 problems are caused by timing errors on the CPU <->
cache <-> memory path. ECC on your main memory doesn't help you in
that case. When should you buy ECC? a) When you feel you need it. b)
When you have LOTS of RAM. (Why not a cut-off number? Because the
cut-off changes with time, just like "LOTS".) Some people feel very
strong about everybody using ECC memory. I refer them to reason "a)".
_________________________________________________________________

QUESTION

Memory problems? My BIOS tests my memory and tells me its ok. I have
this fancy DOS program that tells me my memory is OK. Can't be memory
right?

ANSWER

Wrong. The memory test in the BIOS is utterly useless. It may even
occasionally OK more memory than really is available, let alone test
whether it is good or not.
A friend of mine used to have a 640k PC (yeah, this was a long time
ago) which had a single 64kbit chip instead of a 256kbit chip in the
second 256k bank. This means that he effectively had 320k working
memory. Sometimes the BIOS would test 384k as "OK". Anyway, only
certain applications would fail. It was very hard to diagnose the
actual problem....
Most memory problems only occur under special circumstances. Those
circumstances are hardly ever known. gcc Seems to exercise them. Some
memory tests, especially BIOS memory tests, don't. I'm no longer
working on creating a floppy with a linux kernel and a good memory
tester on it. Forget about bugging me about it......
The reason is that a memory test causes the CPU to execute just a few
instructions, and the memory access patterns tend to be very regular.
Under these circumstances only a very small subset of the memories
breaks down. If you're studying Electrical Engineering and are
interested in memory testing, a masters thesis could be to figure out
what's going on. There are computer manufacturers that would want to
sponsor such a project with some hardware that clients claim to be
unreliable, but doesn't fail the production tests......
_________________________________________________________________

QUESTION

Does it only happen when I compile a kernel?

ANSWER

Nope. There is no way your hardware can know that you are compiling a
kernel. It just so happens that a kernel compile is very tough on your
hardware, so it just happens a lot when you are compiling a kernel.
* People have seen "random" crashes for example while installing
using the slackware installation script.... -- dhn@pluto.njcc.com
* Others get "general protection errors" from the kernel (with the
crashdump). These are usually in /var/adm/messages. --
fox@graphics.cs.nyu.edu
_________________________________________________________________

QUESTION

Nothing crashes on NT, Windows 95, OS/2 or DOS. It must be something
Linux specific.

ANSWER

First of all, Linux stresses your hardware more than all of the above.
Some OSes like the Microsoft ones named above crash in unpredictable
ways anyway. Nobody is going to call Microsoft and say "hey, my
windows box crashed today". If you do anyway, they will tell you that
you, the user, made an error (see the interview with Bill Gates in a
German magazine....) and that since it works now, you should shut up.
Those OSes are also somewhat more "predictable" than Linux. This means
that Excel might always be loaded in the exact same memory area.
Therefore when the bit-error occurs, it is always excel that gets it.
Excel will crash. Or excel will crash another application. Anyway, it
will seem to be a single application that fails, and not related to
memory.
What I am sure of is that a cleanly installed Linux system should be
able to compile the kernel without any errors. Certainly no sig-11
ones. (** Exception: Red Hat 5.0 with a Cyrix processor. See
elsewhere. **)
Really Linux and gcc stress your hardware more than other OSes. If you
need a non-linux thingy that stresses your hardware to the point of
crashing, you can try winstone. -- Jonathan Bright
(bright@informix.com)
_________________________________________________________________

QUESTION

Is it always signal 11?

ANSWER

Nope. Other signals like four, six and seven also occur occasionally.
Signal 11 is most common though.

As long as memory is getting corrupted, anything can happen. I'd
expect bad binaries to occur much more often than they really do.
Anyway, it seems that the odds are heavily biased towards gcc getting
a signal 11. Also seen:
* free_one_pmd: bad directory entry 00000008
* EXT2-fs warning (device 08:14): ext_2_free_blocks bit already
cleared for block 127916
* Internal error: bad swap device
* Trying to free nonexistent swap-page
* kfree of non-kmalloced memory ...
* scsi0: REQ before WAIT DISCONNECT IID
* Unable to handle kernel NULL pointer dereference at virtual
address c0000004
* put_page: page already exists 00000046
invalid operand: 0000
* Whee.. inode changed from under us. Tell Linus
* crc error -- System halted (During the uncompress of the Linux
kernel)
* Segmentation fault
* "unable to resolve symbol"
* make [1]: *** [sub_dirs] Error 139
make: *** [linuxsubdirs] Error 1
* The X Window system can terminate with a "caught signal xx"

The first few ones are cases where the kernel "suspects" a
kernel-programming-error that is actually caused by the bad memory.
The last few point to application programs that end up with the
trouble.

-- S.G.de Marinis (trance@interseg.it)
-- Dirk Nachtmann (nachtman@kogs.informatik.uni-hamburg.de)
_________________________________________________________________

QUESTION

What do I do?

ANSWER

Here are some things to try when you want to find out what is wrong...
note: Some of these will significantly slow your computer down. These
things are intended to get your computer to function properly and
allow you to narrow down what's wrong with it. With this information
you can for example try to get the faulty component replaced by your
vendor.
* Jumper the motherboard for lower CPU and bus speed.
* Go into the BIOS and tell it "Load BIOS defaults". Make sure you
write the disk drive settings down beforehand.
* Disable the cache (BIOS) (or pull it out if it's on a "stick").
* boot kernel with "linux mem=4M" (disables memory above 4Mb).
* Try taking out half the memory. Try both halves in turn.
* Fiddle with settings of the refresh (BIOS)
* Try borrowing memory from someone else. Preferably this should be
memory that runs Linux flawlessly in the other machine...
(Sillicon graphics Indy machines are also nice targets to borrow
memory from)
* If you want to verify if a solution really works try the
following:
tcsh
cd /usr/src/linux
make zImage
foreach i (0 1 2 3 4 5 6 7 8 9)
foreach j (0 1 2 3 4 5 6 7 8 9)
make clean;make zImage > log."$i"$j
end
end
All the resulting logfiles should be the same. (The first "make
zImage" makes sure that the dependencies are already
generated.....) This takes around 24 hours on a 100MHz pentium
with 16Mb of memory. (and about 3 months on a 386 with 4Mb :-).

The hardest part is that most people will be able to do all of the
above except borrowing memory from someone else, and it doesn't make a
difference. This makes it likely that it really is the RAM. Currently
RAM is the most pricy part of a PC, so you rather not have this
conclusion, but I'm sorry, I get lots of reactions that in the end
turn out to be the RAM. However don't despair just yet: your RAM may
not be completely wasted: you can always try to trade it in for
different or more RAM.
_________________________________________________________________

QUESTION

I had my RAMs tested in a RAM-tester device, and they are OK. Can't be
the RAM right?

ANSWER

Wrong. It seems that the errors that are currently occuring in RAMS
are not detectable by RAM-testers. It might be that your motherboard
is accessing the RAMs in dubious ways or otherwise messing up the RAM
while it is in YOUR computer. The advantage is that you can sell your
RAM to someone who still has confidence in his RAM-tester......
_________________________________________________________________

QUESTION

What are other possibilities?

ANSWER

Others have noted the following possibilities:
* Red Hat 5.0 crashes for some people while installing. Others are
only running into problems when compiling the kernel. It seems
that the gcc that comes with Red Hat 5.0 is odd in the respect
that it crashes on Cyrix processors when compiling the kernel.
This is VERY odd. I would think that the only way that this can be
the case is whent he Cyrix has a bug that has gone undetected all
this time, and reliably gets triggered when THAT gcc compiles the
Linux kernel. Anyway, if you just want compile a kernel, you
should get
ftp://ftp.redhat.com/home/wanger/gcc/gcc-2.7.2.3-9.i386.rpm . (I
had to change the URL twice in a week. If it changes again, you'll
just have to click your way to the errata at starting at
http://www.redhat.com/) I don't know of a workaround if your
system crashes while installing, except for installing a minimal
base and then adding packages using 'glint' or 'rpm'.
* Compiling a 2.0.x kernel with a 2.8.x gcc or any egcs doesn't
work. There are a few bugs in the kernel that don't show up
because gcc 2.7.x does a lowsy job optimizing it. gcc 2.8.x and
egcs just dump some of the code because we didn't tell it not to.
Anyway, you usually get a kernel that seems to work but has funny
bugs. For example X may crash with a signal 11. Oh, and before you
ask, no it's not going to be fixed. Don't bother Alan or Linus
about this OK? -- Hans Peter Verne (h.p.verne@kjemi.uio.no)
* The pentium-optimizing-gcc (the one with the version number ending
in "p") fails with the default options on certain source files
like floppy.c in the kernel. The "triggers" are in the kernel,
libc and in gcc itself. This is easily diagnosed as "not a
hardware problem" because it always happens in the same place. You
can either disable some optimizations (try -fno-unroll-loops
first) or use another gcc. -- Evan Cheng (evan@top.cis.syr.edu)
(In other words: gcc 2.7.2p crashes with sig11 on floppy.c .
Workaround-1: Use plain gcc. Workaround-2: Manually compile
floppy.c with "-O" instead of "-O2". )
* A badly misconfigured gcc -- some parts from one version, some
from another. After a few weeks I ended up re-installing from
scratch to get everything right. -- Richard H. Derr III
(rhd@Mars.mcs.com).
* Gcc or the resulting application may terminate with sig11 when a
program is linked against the SCO libraries (which come with
iBCS). This occurs on some applications that have -L/lib in their
LDFLAGS....
* When compiling a kernel with an ELF compiler, but configured for
a.out (or the other way around, I forgot) you will get a signal 11
on the first call to "ld". This is easily identified as a software
problem, as it always occurs on the FIRST call to "ld" during the
build. -- REW
* An Ethernet card together with a badly configured PCI BIOS. If
your (ISA) Ethernet card has an aperture on the ISA bus, you might
need to configure it somewhere in the BIOS setup screens.
Otherwise the hardware would look on the PCI bus for the shared
memory area. As the ISA card can't react to the requests on the
PCI bus, you are reading empty "air". This can result in
segmentation faults and kernel crashes. -- REW
* Corrupted swap partition. Tony Nugent (T.Nugent@sct.gu.edu.au)
reports he used to have this problem and solved it by an mkswap on
his swap partition. (Don't forget to type "sync" before doing
anything else after an mkswap. -- Louis J. LaBash Jr.
(lou@minuet.siue.edu))
* NE2000 card. Some cheap Ne2000 cards might mess up the system. --
Danny ter Haar (dth@cistron.nl) I personally might have had
similar problems, as my mail server crashed hard every now and
then (once a day). It now seems that 1.2.13 and lots of the 1.3.x
kernels have this bug. I haven't seen it in 1.3.48. Probably got
fixed somewhere in the meantime.... -- REW
* Power supply? No I don't think so. A modern heavy system with two
or three harddisk, both SCSI and IDE will not exceed 120 Watts or
so. If you have loads of old harddisks and old expansion cards the
power requirements will be higher, but still it is very hard to
reach the limits of the power supply. Of course some people manage
to find loads of old full-size harddisks and install them into
their big-tower. You can indeed overload a powersupply that way.
-- Greg Nicholson (greg@job.cba.ua.edu) A faulty power supply CAN
of course deliver marginal power, which causes all of the
malfunctioning that you read about in this file.... -- Thorsten
Kuehnemann (thorsten@actis.de)
* An inconsistent ext2fs. Some circumstances can cause the kernel
code of the ext2 file system to result in Signal 11 for Gcc. --
Morten Welinder (terra@diku.dk)
* CMOS battery. Even if you set the BIOS as you want it, it could be
changing back to "bad" settings under your nose if the CMOS
battery is bad. -- Heonmin Lim (coco@me.umn.edu)
* No or too little swap space. Gcc doesn't gracefully handle the
"out of memory" condition. -- Paul Brannan (brannanp@musc.edu)
* Incompatible libraries. When you have a symlink from "libc.so.5"
pointing to "libc.so.6", some applications will bomb with sig11.
-- Piete Brooks (piete.brooks@cl.cam.ac.uk).
_________________________________________________________________

QUESTION

I don't believe this. To whom has this happened?

ANSWER

Well for one it happened to me personally. But you don't have to
believe me. It also happened to:
* Johnny Stephens (icjps@asuvm.inre.asu.edu)
* Dejan Ilic (d92dejil@und.ida.liu.se)
* Rick Tessner (rick@myra.com)
* David Fox (fox@graphics.cs.nyu.edu)
* Darren White (dwhite@baker.cnw.com) (L2 cache)
* Patrick J. Volkerding (volkerdi@mhd1.moorhead.msus.edu)
* Jeff Coy Jr. (jcoy@gray.cscwc.pima.edu) (Temp problems)
* Michael Blandford (mikey@azalea.lanl.gov) (Temp problems: CPU fan
failed)
* Alex Butcher (Alex.Butcher@bristol.ac.uk) (Memory waitstates)
* Richard Postgate (postgate@cafe.net) (VLB loading)
* Bert Meijs (L.Meijs@et.tudelft.nl) (bad SIMMs)
* J. Van Stonecypher (scypher@cs.fsu.edu)
* Mark Kettner (kettner@cat.et.tudelft.nl) (bad SIMMs)
* Naresh Sharma (n.sharma@is.twi.tudelft.nl) (30->72 converter)
* Rick Lim (ricklim@freenet.vancouver.bc.ca) (Bad cache)
* Scott Brumbaugh (scottb@borris.beachnet.com)
* Paul Gortmaker (paul.gortmaker@anu.edu.au)
* Mike Tayter (tayter@ncats.newaygo.mi.us) (Something with the
cache)
* Benni ??? (benni@informatik.uni-frankfurt.de) (VLB Overloading)
* Oliver Schoett (os@sdm.de) (Cache jumper)
* Morten Welinder (terra@diku.dk)
* Warwick Harvey (warwick@cs.mu.oz.au) (bit error in cache)
* Hank Barta (hank@pswin.chi.il.us)
* Jeffrey J. Radice (jjr@zilker.net) (Ram voltage)
* Samuel Ramac (sramac@vnet.ibm.com) (CPU tops out)
* Andrew Eskilsson (mpt95aes@pt.hk-r.se) (DRAM speed)
* W. Paul Mills (wpmills@midusa.net) (CPU fan disconnected from CPU)
* Joseph Barone (barone@mntr02.psf.ge.com) (Bad cache)
* Philippe Troin (ptroin@compass-da.com) (delayed RAM timing
trouble)
* Koen D'Hondt (koen@dutlhs1.lr.tudelft.nl) (more kernel error
messages)
* Bill Faust (faust@pobox.com) (cache problem)
* Tim Middlekoop (mtim@lab.housing.fsu.edu) (CPU temp: fan
installed)
* Andrew R. Cook (andy@anchtk.chm.anl.gov) (bad cache)
* Allan Wind (wind@imada.ou.dk) (P66 overheating)
* Michael Tuschik (mt2@irz.inf.tu-dresden.de) (gcc2.7.2p victim)
* R.C.H. Li (chli@en.polyu.edu.hk) (Overclocking: ok for months...)
* Florin (florin@monet.telebyte.nl) (Overclocked CPU by vendor)
* Dale J March (dmarch@pcocd2.intel.com) (CPU overheating on laptop)
* Markus Schulte (markus@dom.de) (Bad RAM)
* Mark Davis (mark_d_davis@usa.pipeline.com) (Bad P120?)
* Josep Lladonosa i Capell (jllado@arrakis.es) (PCI options
overoptimization)
* Emilio Federici (mc9995@mclink.it) (P120 overheating)
* Conor McCarthy (conormc@cclana.ucd.ie) (Bad SIMM)
* Matthias Petofalvi (mpetofal@ulb.ac.be) ("Simmverter" problem)
* Jonathan Christopher Mckinney (jono@tamu.edu) (gcc2.7.2p victim)
* Greg Nicholson (greg@job.cba.ua.edu) (many old disks)
* Ismo Peltonen (iap@bigbang.hut.fi) (irq_unmasking)
* Daniel Pancamo (pancamo@infocom.net) (70ns instead of 60 ns RAM)
* David Halls (david.halls@cl.cam.ac.uk)
* Mark Zusman (marklz@pointer.israel.net) (Bad motherboard)
* Elizabeth Ayer (eca23@cam.ac.uk) (Power management features)
* Thorsten Kuehnemann (thorsten@actis.de)
*
* (Email me with your story, you might get to be mentioned here...
:-) ---- Update: I like to hear what happened to you. This will
allow me to guess what happens most, and keep this file as
accurate as possible. However I now have around 500 different
Email addresses of people who've had sig-11 problems. I don't
think that it is useful to keep on adding "random" people's names
on this list. What do YOU think?
_________________________________________________________________

I'm interested in new stories. If you have a problem and are unsure
about what it is, it may help to Email me at R.E.Wolff@BitWizard.nl .
My curiosity will usually drive me to answering your questions until
you find what the problem is..... (on the other hand, I do get pissed
when your problem is clearly described above :-)

Read more ...

Connect to MS SQL 6.x+ via Openlink/PHP/ODBC mini-HOWTO


Zili Zhang, silen@silen.net
v2.0b, 15 July 1999(http://www.silen.net/openlink-php-odbc.txt)
v1.0b, 5 June 1999(http://www.silen.net/openlink-php-odbc.old.txt)

How to connect to MS SQL 6.x+ database server via ODBC functions of
PHP3(3.0.1x or above) compiled
with Openlink drivers under Linux.

1. Disclaimer
2. Changlog
3. Introduction
4. Openlink
5. PHP
6. Example
7. FAQ


1. Disclaimer
The following document is offered in good faith as comprising only safe
configuration
and procedures. No responsibility is accepted by the author for any loss
or damage
caused in any way to any person or equipment, as a direct or indirect
consequence of
following these instructions.

2. ChangeLog
v2.0b
A. iODBC is not required to make things work.
B. No missing *.h files, so do not need to modify unified_odbc.h of
PHP.
C. Example code changes, discarding odbc_num_rows() function.
D. Explicit announce support for MS SQL 7.0.
E. FAQ section added.

3. Introduction
In the Unix world, people may hate to be invoked with any M$ related
software. However,
in the real world, the boss may require you to store data in a MS SQL
database on NT
and run web application on Linux. What to do? Quit the job or sit down
to read this
document? If you choose latter, I will give you a detailed installation
guide so that
you can keep the job for a while. It is a How-to guide, not a Why-so
guide. So don't ask
me why abc instead of cba. I don't know either. :>

PHP is becoming more and more popular in web programmers, mainly because
it can be configured
to connect to various databases like Oracle, MySQL, Solid and so on. But
for a MS SQL
server, the problem is different. Though you can use PHP's Sybase-ct
support features
to directly connect to MSSQL, many people(at least me) prefers to
connect via ODBC.

Utilizing Openlink ODBC middleware, you can use those ODBC_xxxx
functions to connect to all the database Openlink has a driver for. You
have to install
Openlink Linux client and Server middleware and re-compile PHP
to support ODBC functions. In the end, I made a script sample for
reference.

4. Openlink
This step is a little bit complicated. You have to done works on both
sides of your
Linux client machine and NT server.
4.1 On the client end:
a. From ftp://www.openlinksw.com/, download install.sh and likoxglc.taz
(for a libc6 system) or likoxxxx.taz(for a libc5 system).
b. mkdir /usr/local/openlink
c. copy install.sh and likoxglc.taz into /usr/local/openlink
d. cd /usr/local/openlink
e. sh install.sh, the install script will ask you the owner and group of
the program.
It will extract things to odbcsdk directory under /usr/local/openlink
and copy a
.odbc.ini into the owner's home directory.

4.2 On the server end:
a. From http://www.openlinksw.com/, download ntadm65x.zip into your NT
server.
b. unzip ntadm65x.zip
c. cd disk1 directory of where you unzip the package.
d. execute setup and follow the instructions to install the Openlink
middleware.
e. remember to start Openlink request broker from start menu or service
control
panel.

4.3 Configuration before test
a. keep the .odbc.ini in your home directory.
b. copy the udbc.ini file from the bin directory of Openlink middleware
install
directory to the /etc directory of client.
c. customize /etc/udbc.ini. In [dsn_sql6] section, change the host,
database, username
and password entries to fit your server settings. Here is part of my
/etc/udbc.ini:
[dsn_sql6]
Host = 10.0.0.1
ServerType = sql6
;ServerOptions =
Database = pubs
;FetchBufferSize = 30
UserName = sa
Password = xxxxxxx
d. add in your environment
LD_LIBRARY_PATH='/usr/local/openlink/odbcsdk/lib' and export
it. In csh shell, type: setenv LD_LIBRARY_PATH
/usr/local/openlink/odbcsdk/lib

4.4 Test with odbctest
a. cd /usr/local/openlink/odbcsdk/examples
b. ./odbctest
c. type dsn=dsn_sql6
d. when 'sql>' appears, you can execute your sql clauses to test the
connection.

5. PHP
Now we have Openlink and can go to PHP compilation. Note for this
version, PHP
3.0.10 or above is required to make things work.
a. From http://www.php.net, download php-3.0.11.tar.gz
b. gzip -dc php-3.0.11.tar.gz|tar -xof -
c. cd php-3.0.11
d. ./configure --with-openlink (--with-mysql --with-gd=/usr/local/gd1.3
--enable-track-vars) my configuration is to run PHP as CGI mode, support
mysql, gd
as well. Your configuration may be different.
e. make --silent(don't mind if there are warning messages)
f. make install
These will install php executable into /usr/local/bin. Before you
execute php, copy
the library files under /usr/local/openlink/odbcsdk/lib into /usr/lib to
make it easier
for php to find openlink libraries(I know there are better methods :>).

6. Example
Please refers to PHP manual for ODBC functions. Here is my example code
odbc.php3:
(Note that odbc_num_rows() will not return anything, so you must
repeately call
odbc_fetch_row() to get that number.)
/* some environment variables, you can test to comment them out to see
if things
* still work.
*/
putenv("LD_LIBRARY_PATH=/usr/local/openlink/odbcsdk/lib");
putenv("UDBCINI=/etc/udbc.ini");
putenv("ODBCINI=/root/.odbc.ini");
putenv("DebugFile=/tmp/udbc.out"); // debug trace output

$dsn="DSN=dsn_main"; // note 'DSN=' is required
$user="sa";
$password="xxxxxxx";

$sql="SELECT * FROM titles";

/* directly execute mode */
if ($conn_id=odbc_connect("$dsn",$user,$password)){
echo "connected to DSN: $dsn

";
if($result_id=odbc_do($conn_id, $sql)) {
echo "executing '$sql'

";
$num_fields=odbc_num_fields($result_id);
if($num_fields>0){
echo "Number of fields:
$num_fields
";
for($i=1;$i<=$num_fields;$i++){

$field_name[$i-1]=odbc_field_name($result_id,$i);
}
$num_rows=0;
while(odbc_fetch_row($result_id)){
for($i=1;$i<=$num_fields;$i++){

$result[$num_rows][$field_name[$i-1]]=odbc_result($result_id,$i);
}
$num_rows++;
}
echo "Number of rows: $num_rows
";
}else{
echo "not a field returned.

";
}
echo "Results:
";
for($i=0;$i&lq;sizeof($result);$i++){
while(list($key,$value)=each($result[$i])){
echo "$i:$key=$value
";
}
}
echo "freeing result

";
odbc_free_result($result_id);
}else{
echo "can not execute '$sql'

";
}
echo "closing connection $conn_id";
odbc_close($conn_id);
}else{
echo "can not connect to DSN: $dsn

";
}

?>

7. FAQ
a. Q: does this exact procedure work for MSSQL 7.0?
A: Yes, Openlink will upgrade their software to 7.0, but I don't know
when.

b. Q: I didn\'t know that MSSQL knows how to return the number of rows
in the
result, can it?
A: In methods of 1.0b, yes. In 2.0b, no.

c. Q: i followed your "openlink-php-odbc.txt" step by step to install
the
openlink drivers
but i stop by step 4.2 (install ntadm65x.zip).
After installed ntadm65x i try to start the OpenLink Request Broker
i got the error

unable to open the service control manager <5>
press RETURN to exit oplrqb

Could you please tell me how can i fix that Problem ?

A: This should be a problem with NT itself. try restart the computer
and then start openlink service from Control Panel/service manager.

Read more ...

Swap Space Mini HOWTO

by H. Peter Anvin
Copyright © 1994, 1995 H. Peter Anvin

VERSION: 1.3 Date: 19 Jun 1995

This Linux Mini-HOWTO describes how to share your Linux swap partition
with Windows.

Modifications by Rahul U. Joshi Date: 26 Nov 1999

- Added Windows 95/98 specific details.
- Added Red hat Linux specific details.
- Modified the msinfo program.
- Added sections 5 to 10.
- Split up the swap initalization and halt into two shell scripts.
- Modified the scripts to handle signature verification more than once.
- Added details about new type swap areas.


Legal:
Unless otherwise stated, Linux HOWTO documents are copyrighted
by their respective authors. Linux HOWTO documents may be
reproduced and distributed in whole or in part, in any medium
physical or electronic, as long as this copyright notice is
retained on all copies. Commercial redistribution is allowed
and encouraged; however, the author would like to be notified of
any such distributions.

All translations, derivative works, or aggregate works
incorporating Linux HOWTO documents must be covered under this
copyright notice. That is, you may not produce a derivative
work from a HOWTO and impose additional restrictions on its
distribution. Exceptions to these rules may be granted under
certain conditions; please contact the Linux HOWTO coordinator
at the address given below.

In short, we wish to promote dissemination of this information
through as many channels as possible. However, we do wish to
retain copyright on the HOWTO documents, and would like to be
notified of any plans to redistribute the HOWTOs.

If you have any questions, please contact Tim Bynum, the Linux
HOWTO coordinator, at linux-howto@sunsite.unc.edu via email.

Table of Contents

1. Introduction

2. What you need

3. Procedure

3.1 Turn off swapping and create a DOS partition
3.2 Tell Windows the location of the new swap file
3.3 Back up the Total Special Sectors
3.4 Modify the initalization and shutdown scripts to handle
our new configuration
3.5 Reenable swapping

4. A couple of notes

5. What are we exactly doing ?

6. The swapinit.sh script

7. The swaphalt.sh script

8. The msinfo.sh script

9. The original msinfo file

10. Acknowledgements

1. Introduction


Many people use both Linux and MS-Windows. The ability to do so is an
important part of "the Linux revolution"; i.e. letting people
experiment with (and get hooked on) Linux while still being able to
run their off-the-shelf software. Since both Linux and MS-Windows use
virtual memory with swap to disk, a frequently occurring question in
comp.os.linux.setup is how to share swap spaces, in order to reduce the
amount of disk space needed.

There are several methods for sharing swap spaces, the one described
in this document is probably the most complicated one but is the only
one I have encountered that allows maximum performance for both
environments without the risk of trashing a disk partition.

NOTE: If you have used a previous version of this document and have
had problems with swap space not getting properly restored (Windows
claims your permanent swap file is corrupt), try the slightly revised
shutdown script in this version.

2. What you need

This procedure have a few requirements that need to be filled. I
strongly recommend that you fill these requirements *anyway*, as there
are several problems with older versions.

* MS-DOS 5.0 or newer and MS-Windows 3.1/3.11
OR
MS-Windows 95/98

* A shutdown/init that knows to run a file on shutdown.
(The SysVinit-2.50 package can do this, for example.
SysVinit-2.50 is available from sunsite.unc.edu in
/pub/Linux/system/Daemons. Almost all current distributions
use this init package.)


3. The procedure


NOTE: This procedure has been written keeping in mind Red hat Linux 6.0
Although this procedure in general is applicable for all Linux
distributions, the details may vary. You are welcome to add the
details for your distribution. Many users will already have a
swap partition devoted to Linux. I assume you have one.


3.1. Turn off swapping and create a DOS partition

* Boot Linux. Turn off swapping by editing the /etc/fstab file and
commenting the line that describes your swap partition.

* Using fdisk under Linux, delete the swap partition in order to create
free space on the disk.

* Boot DOS. Create a DOS partition (using FDISK) the size = the size
swap space you want. If you cannot create the partition (probably
because DOS FDISK says that all the space in extended partition is
allocated to the logical drive), you can use fdisk or cfdisk under
Linux to create the partition. You can even just change the type of
your swap partition from 82h (Linux Swap) to 06h (FAT16). In that
case you don't need to delete the swap partition, just change the
type.

* Once you have created the partition, Boot DOS if you are not already
in DOS. DOS will be assigned a drive letter to your new partition.
Use that drive letter instead of X whenever these instructions lists
a command like "LABEL X:" or "COPY FOO X:DUMMY.DAT"

* Format this partition using the DOS FORMAT command.
FORMAT X:

* Set the volume label on this partition to "SWAP SPACE" using the DOS
LABEL command. Verify it by the DIR command. Please do this as a
separate step. Some versions of FORMAT do not seem to put the
volume label in the boot sector as it should. [Note: some people
has written me saying the volume label is stored in the root
directory. Yes, but at least since DOS 5.0 it has also been in the
boot sector.]
LABEL X:
DIR X:

* At this stage, you have a DOS partition ready for use for swapping.




3.2. Tell Windows the location of the new swap file

* For Windows 3.1 users --
---------------------

-Start Windows. Go to the Control Panel, select "386 Enhanced".
Select "Virtual Memory" and create a Windows Permanent swap file on
drive X: of maximum size (Windows will tell you the maximum size).
Windows may complain saying it will not use a swap file that big.
Ignore the message and create the file anyway.

-Exit Windows.

* For Windows 95/98 users --
-----------------------
-Start Windows. Go to the Control Panel (Start Settings Control
panel). Double click the System icon. In the resulting System
Properties dialog box, select the Performance tab. Now click the Virtual
Memory button. This will bring up the Virtual Memory dialog box. Select
"Let me specify my own virtual memory settings". Select the drive you
intend to share as swap space with Linux (X:). Keep the Maximum and
Minimum values as selected by Windows. Click OK. Windows will prompt you
to restart your computer. Do it.

-When you restart Windows, you will see that the win386.swp file has been
created on the X: drive. In addition, there is also the Recycled folder.
Since you don't intend to store any other files on this drive and also
a single file on this partition will be convienent, tell Windows not to
maintain Recycle Bin for this (X:) drive. On the Desktop, left click the
Recycle Bin icon, and in the resulting pop-up menu, click Properties.
This will bring up the Recycle Bin Properties dialog box. Click the
Global tab and select "Configure drives independently". Now click the
tab for X: drive (which will have the label SWAP SPACE). In this dialog
box, move the slider for "Maximum size of Recycle Bin" to 0 percent.
The "Space Reserved" entry should now read as 0 bytes. Click OK.
Restart your computer.

* Norton utilities for Win95 users --
--------------------------------
In addition to the above steps, you may want to do the following if you
have Norton Utilities for Win95 installed. In the Recycle Bin Properties
dialog box, click the Norton Protection tab. Select the drive X: and
uncheck the "Enable protection" and the "Pruge protected files after ...
days" check boxes. Click OK.

* Disk Cleanup troubles you ?
---------------------------
If you have Disk Cleanup installed, then ocassionally Windows comes
out with a "Low disk space on drive X:". Since we are using the entire
X: drive for swapping, there is no need to have any free space on X:.
To prevent this dialog box from appearing, start Disk Cleanup (point
to Start Programs Accessories System Tools Disk Cleanup). In
the resulting dialog box, select the X: drive and click OK. The "Disk
Cleanup for drive X:" dislog box appears. Click the "Settings" tab and
uncheck the "If this drive runs low on disk ... blah blah blah" check
box.

* From this stage onwards, Windows will assume that it's swap file is on
drive X:. So the drive X: must be intact each time you boot Windows.




3.3. Back up the Total Special Sectors

* Boot Linux, then log in as root.

* Use the fdisk command to find the name of the partition and its size
in blocks. Create a symbolic link from /dev/winswap to this
partition. If the partition is hda7, then type:
ln -s /dev/hda7 /dev/winswap

[NOTE TO PURISTS: Please use a symlink. The name of this partition
is going to go into several configuration files and inconsistencies
could be fatal.]

* Find the "Total Special Sectors" for the swap drive.
These are nothing but the total number of sectors required for the boot
sector, FAT and root directory. There are a number of ways to find this
number. Simplest copy the msinfo.sh file from section 8 using your
favourite editor. Give the following commands at the shell prompt

# cp Swap-Space-HOWTO msinfo.sh
# chmod +x msinfo.sh

(Much easier if you use one of the editors with KDE or GNOME)

Now, open the msinfo.sh file in the editor and delete everything except
the msinfo.sh file in section 8. Now run this file as

# ./msinfo.sh /dev/winswap

The program will print the some information about the swap partition.
Take note at the number saying "Total special sectors", and verify
that the volume label says "SWAP SPACE". If it does not, reboot DOS
and re-do the LABEL command.

* Note: You can also find the "Total Special Sectors" using tools
that can display the Boot sector like the Norton Disk Editor or
minfo from mtools under Linux. For Norton Disk Editor, select
"Boot Sector" from the Object menu. Note down the following
entries :

Reserved Sectors at beginning = r
FAT copies = f
Root directory entries = d
Sectors per FAT = s

Now the "Total Special Sectors" is given by

T = r + (s * f) + (d / 16)

However, using the above program is more convienent.

* [Optional step] Windows may occasionally leave some space on the
partition, even if it is told not to. Don't attempt to use this
space, since it will be erased any time you run Linux. If you want
to avoid accidentally using it (and lose data), you can create a
dummy file that fills that space by using the following commands:
mkdir /mnt
mount -t msdos /dev/winswap /mnt
dd if=/dev/zero of=/mnt/dummy.fil
umount /mnt

The dd command will report "No space left on device". This is
exactly what you want.

* Type on the shell prompt:

# dd if=/dev/winswap bs=512 count=XXX gzip -9 > /etc/winswap.gz
^^^
Replace
... where XXX is replaced with the "Total special sectors" number.

Here we are saving the Total Special Sectors in a compressed form
in the file /etc/winswap.gz


3.4. Modify the initalization and shutdown scripts to handle our new
configuration

* Now, we will modify our initalization scripts so that swap space will
be create on the partition each time Linux starts and the DOS/Windows
special sectors will be restored each time Linux shut downs.

* Instead of placing the command for handling the details directly in
the initalization scripts, we will prepare two seperate files called
swapinit.sh and swaphalt.sh. One sample of these files that should
work under Redhat Linux is given in sections 6 and 7. You can choose
to place these files under any directory, preferably /etc/rc.d/init.d.
Create the two files in this directory and copy into then the scripts
given in sections 6 and 7. One simple way is to copy this HOWTO in these
files as,

# cp Swap-Space-HOWTO /etc/rc.d/init.d/swapinit.sh
# cp Swap-Space-HOWTO /etc/rc.d/init.d/swaphalt.sh

and then using your favourite editor, delete all execpt the required
part. Now make these file "executable" by giving the following
commands

# chmod +x swapinit.sh
# chmod +x swaphalt.sh

* Run fdisk and find the size of the swap partition in blocks. In both
the above files (swap????.sh) replace the YYYYY by this number.

* Check the name of the shutdown file. For SysVinit this is the file
listed in the following line of /etc/inittab; add it if you don't
have it.

# Runlevel 0 means shut down the system
l0:0:wait:/etc/brc

(Under Red hat Linux, this file probably will be /etc/rc.d/init.d/halt)
If you are not in a position to find it out, browse through the /etc
directory and find the initialization file that contains the "swapon -a"
command. Only this much for now !
For the remainder of this file, I will assume the filename was
/etc/rc.d/init.d/halt (halt for short).


* Check the name of your system initalization file. For SysVinit, this
is the file listed in the following line of /etc/inittab.

# System initalization
si::sysinit:/etc/rc.d/rc.sysinit

In case of your distribution, your file may be different. I assume
that the file is /etc/rc.d/rc.sysinit (rc.sysinit for short)


* Add the following piece of code to your initalization file
(rc.sysinit), in place of the "swapon -a" command. You may consider
not deleting but just commenting the original commands so that if
something goes wrong, we can restore the script to it's initial state.

If your swapon is in /etc, replace /sbin/swapon with /etc/swapon.
If it is in /bin, replace with /bin/swapon. Do the same for mkswap.

# -----------------------------------------------------------------------
# removed by yourname
# Start up swapping.
# action "Activating swap partitions" swapon -a
# -----------------------------------------------------------------------

# ----------------------------------------------------------------------
# added by yourname
# Verify and initialize swap space
#
/etc/rc.d/init.d/swapinit.sh
# ----------------------------------------------------------------------


* A simple way to paste the text is to start two Virtual Consoles. Log as
a root in both cases. Use your favourite editor to open this HOWTO on
one console and the script to be modified on other console. Now select
the above code with your mouse and switch to the other console. Place
the cursor at the desired position to paste and press the right mouse
button. The selected text will be copied.

* Add the following piece of code to your shutdown file (halt).Put this
after any command that might need swap to be in place. Normally, your
halt file will have the "swapoff -a" command. First replace the -a by
/dev/winswap. Then immediately after that section, add the following
commands.

# ------------------------------------------------------------------------
# Modified by yourname
# replaced "swapoff -a" by "swapoff /dev/winswap"
#
# Turn off swap, then unmount file systems.
runcmd "Turning off swap and accounting" swapoff /dev/winswap
[ -x /sbin/accton ] && /sbin/accton
# ------------------------------------------------------------------------

# ------------------------------------------------------------------------
# Added by yourname
# check swap signature and restore Windows swap info
/etc/rc.d/init.d/swaphalt.sh
# ------------------------------------------------------------------------


3.5. Reenable swapping

* Uncomment the line in /etc/fstab that you commented earlier. (Not
really necessary, since we now do not refer to fstab for swap
partitions). Reboot Linux. You should now have swapping on the new
swap device.


_____________________________________________________________________________


4. A couple of notes

* There is no need to add /dev/winswap to your /etc/fstab file. In
fact, it is probably wise not to do so (except possibly as a
comment).

* If your Linux session crashes or otherwise exits without running
/etc/rc.d/init.d/halt, you will need to reboot and exit Linux before
swapping in Windows will work. It is also possible to FORMAT X: and
re-create the Windows swapfile. The only way around this would be to
put the equivalent of the /.../halt commands in the DOS AUTOEXEC.BAT file.
I have tried to write some programs to do this, but at this stage
nothing concrete is ready. One way is to first save the Total Special
sectors in a file say C:\EDRIVE.TSS. This file, in addition to the TSS's
will also contain the Cylinder/Head/Sector (CHS) address of the first
sector on X: (This can be found out on Linux using cfdisk). The restore
program will write all the saved data to consecutive sectors beginning
with this sector. The template AUTOEXEC.BAT file in this case would by

@ECHO OFF
IF EXIST X:\WIN386.SWP GOTO SKIPRSTR
ECHO Swap file not found, proceeding to restore ...
echo y > C:\YES
LOCK X: <> NUL
RESTORE C:\EDRIVE.TSS
UNLOCK X: > NUL
DEL C:\YES

:SKIPRSTR



* One way to restore your Windows swap partition is to start Linux,
disable swapping as described above, and then use the following
command :

# swapoff -a
# zcat /etc/winswap.gz > /dev/winswap
# reboot

* If DOS' FDISK reports the partition as a "logical DOS drive", it has
a number of 5 (as in /dev/hda5) or higher. It is *NOT* the
partition labelled "extended" which has a number of 4 or less!! If
your Linux fdisk does not display logical partitions, you have a
broken Linux fdisk (Slackware 2.2 included a broken fdisk, for
example.) You can try "cfdisk" if your distribution has it, or you
will have to get a working fdisk.

* Please do not mail me unless you have checked and re-checked that
you copied your scripts correctly. More than half of the problems
reported with this Mini-HOWTO have been due to typos when copying
the scripts. (Use cut-and-paste if you can!). Even a spacing error
can cause an error. For example, if at the startup you get the messages

Verifying swap space...Linux signature found
swapon: /dev/winswap invalid argument

Then, surely there has been a typing mistake in your scripts. Please
check your scripts.

* Sometimes, the swap partition is detected to have neither Linux nor
Windows info and the "No signature found" error appears. I exactly
don't know why this happens, but for that case, I have written the
code in swap????.sh files to try six times before reporting an error.
Normally, the DOS signature should be found on the first try, but many
a times on my system it is found on iteration 2, 5 or not at all after
12 iterations. You may consider increasing the number of tries to some
value like 12 or 24, there is no harm in doing so. Once on my system,
the script could not detect the signatures even after 50 iterations !
If such a situation arises, you may consider making a symbolic link
to the swapinit.sh file in your root home directory, and execute it at
startup.

# ln -s /etc/rc.d/init.d/swapinit.sh swapinit.sh
# ./swapinit.sh

* What if the swap partition is a FAT32 ?
No, you can't have a swap partition with a FAT32 file system. First of
all, Linux can use a maximum of 128MB of swap space on a single swap
partition. Thus, if your swap partition is larger than 128MB, you are
wasting your disk space. And Windows will refuse to convert a partition
of 128MB into a FAT32 file system.

* The new style swap space
Linux knows about two styles of swap areas, the old style and the new
style. By default, you will be using the old style swap space with a
signature "SWAP-SPACE". If you want to use the new style swap space,
then first of all change "SWAP-SCAPE" in all the above scripts to
"SWAPSPACE2". Also add an option -v1 in the mkswap command in the
swapinit.sh script, as follows

/sbin/mkswap -v1 /dev/winswap YYYYY

Also, run the following commands from the shell prompt :

# swapoff /dev/winswap
# mkswap -v1 /dev/winswap YYYYY
# swapon /dev/winswap

It seems that under new style swap space, your usable swap partition can
be as large as 2GB on i386 platforms. This means that you can now have a
swap partition larger than 512MB which Windows can format as a FAT32
partition . Someone help on how do we save the "Total Special Sectors"
under a FAT32 partition.

_____________________________________________________________________________


5. What are we exactly doing ?

* Both Windows and Linux use swap space. When an OS is shut down, the
contents of the swap space are just garbage, the OS doesn't bother
about what is in it. Now what is the point in devoting a 60MB partition
for swap space to Linux and about 32MB of disk space separately to
Windows when only one of them is going to run at a time. So we want
Linux and Windows to share the same hard disk space as swap space.

* The problem is that Linux uses a partition as a swap space and Windows
uses a file as a swap space. ( Although it is possible to create a swap
file for Linux, it is not recommended. See "Linux Installation and
Getting Started" by Mett Walsh). Now if Linux uses the same partition
on which Windows stores it's swap file, it will overwrite the boot
sector, FAT and other data tables that Windows assumes to exist on every
drive. Thus, Windows will not be in a position to find the swap file on
startup and will create the win386.swp file in the windows directory.
Thus, even if by chance, your Linux crashes, Windows will be in a
position to start. In such a case ( with Windows swap file in the
Windows directory), just restore the DOS/Windows swap info by
restarting Linux and the start Windows. Now Windows will be using
the swap file on drive X: so you can safely delete the win386.swp
file in the windows directory.

* The remedy is to store those critical data tables once on the Linux
partition in some file. Then every time Linux starts, check whether
the swap space was last used by Linux or Windows (using the label you
gave to your partition). If it was Linux, just enable swapping else
first make a swap partition on the X: drive using "mkswap /dev/winswap"
and then enable swapping.

* When you shut down Linux, it is important to restore the swap partition
to the DOS format, so that Windows can start properly. For that purpose
we add the

/bin/zcat /etc/winswap.gz > /dev/winswap

command to the halt file.

_____________________________________________________________________________


6. The swapinit.sh script

This shell script initalizes the swap space on the partition. The
code for signature setection has been repeated thrice because many a
times the signature is properly detected only on the second or the
third try.

(Adapted from the original Swap-Space-HOWTO by H. Peter Anvin)

#!/bin/sh
#
# /etc/rc.d/init.d/swapinit.sh - activate the swap partition
#
# written by Rahul U. Joshi
# Verify and initialize swap space
#

echo -n 'Verifying swap space... '

loopcount=0

# flag to indicate whether the partition has been activated or not
activated=0

# check for signatures 6 times before giving up
while [ $loopcount -lt 6 ]
do

if [ "`/bin/dd 2>/dev/null if=/dev/winswap bs=1 count=10 skip=4086`" = 'SWAP-SPACE' ]; then
echo "Linux signature found, iteration $loopcount"
echo "Activating swap partitions"
swapon /dev/winswap
activated=1
break

elif [ "`/bin/dd 2>/dev/null if=/dev/winswap bs=1 count=11 skip=43`" = 'SWAP SPACE ' ]; then
echo "DOS signature found, iteration $loopcount"
echo "Making swap partition"
mkswap /dev/winswap 62464
echo "Activating swap partitions"
swapon /dev/winswap
activated=1
break

else
let loopcount=loopcount+1
fi

done


if [ $activated -ne 1 ] ; then
echo "Swap signature not found after $loopcount tries"
echo "No swapping partitions activated"
exit 1
fi


_____________________________________________________________________________


7. The swaphalt.sh script

This script first checks the Linux swap signature and then restores the
Windows filesystem on it.

(Adapted from the original Swap-Space-HOWTO by H. Peter Anvin)


#!/bin/sh
#
# swaphalt.sh This file is executed through the /etc/rc.d/init.d/halt
# script after swapping and accounting has been turned off.
#
# Author: Rahul U. Joshi
#

# check swap partition signature and restore Windows swap info

loopcount=0

# flag to indicate whether the swap info has been restored or not
restored=0

# check for swap signature 3 times before giving up
while [ $loopcount -lt 3 ]
do

if [ "`/bin/dd 2>/dev/null if=/dev/winswap bs=1 count=10 skip=4086`" = 'SWAP-SPACE' ]; then
echo "Restoring DOS/Windows swap info , iteration $loopcount"
/bin/zcat /etc/winswap.gz > /dev/winswap
restored=1
break
else
loopcount=loopcount+1
fi

done

if [ $restored -ne 1 ] ; then
echo "Swap signature not found after $loopcount tries"
echo "Skipping restoring"
fi


_____________________________________________________________________________


8. The msinfo.sh script

This shell script analyses the boot sector of the given partition and
displays some information along with the "Total Special Sectors" in a
message box. It assumes that the filesystem on the given partition is a
FAT16. If not, it will print an error message and exit. To run it, you
need the "dialog" package installed (Included with RedHat Linux). If
you have not installed it, you may find it at
.

Invoke the program as

# msinfo



#!/bin/sh
#
# msinfo.sh This shell script displays the boot sector of the
# given partition.
#
# Author: Rahul U. Joshi
#
# Modifications Removed the use of expr and replaced it by the let
# command.


# check for command line arguments
if [ $# -ne 1 ]; then
echo "Usage: msinfo "
exit 1
fi

# check whether the input name is a block device
if [ ! -b $1 ]; then
echo "msinfo: $1 is not a block device"
exit 1
fi

# create two temporary files for use
TMPFILE=`mktemp -q /tmp/$0.XXXXXX`
if [ $? -ne 0 ]; then
echo "msinfo: Can't create temp file, exiting..."
exit 1
fi

TXTFILE=`mktemp -q /tmp/$0.XXXXXX`
if [ $? -ne 0 ]; then
echo "msinfo: Can't create temp file, exiting..."
rm -f $TMPFILE
exit 1
fi

back_title="`printf "%78s" "msinfo, Information about FAT16 filesystem -- Rahul Joshi"`"

dialog --title "Boot sector of $1" --backtitle "$back_title" --infobox "\nAnalysing boot sector for $1\nPlease wait ..." 14 60

# truncate TXTFILE to zero length
echo > $TXTFILE

# get Formatting DOS version
dd 2>/dev/null if=$1 bs=1 count=8 skip=3 dd 2>/dev/null of=$TMPFILE
printf >>$TXTFILE "%30s : %s\n" "Formatting DOS version" "`cat $TMPFILE`"


# get file system
dd 2>/dev/null if=$1 bs=1 count=8 skip=54 dd 2>/dev/null of=$TMPFILE
printf >>$TXTFILE "%30s : %s\n" "Filesystem" "`cat $TMPFILE`"

# check if filesystem in a FAT16
if [ "`cat $TMPFILE`" != "FAT16 " ]; then
dialog --title "Boot sector of $1" --backtitle "$back_title" --infobox "\nCan't find a FAT16 filesystem on $1" 14 60
exit 2
fi

# get volume label in boot sector
dd 2>/dev/null if=$1 bs=1 count=11 skip=43 dd 2>/dev/null of=$TMPFILE
printf >>$TXTFILE "%30s : %s\n" "Volume label in boot sector" "`cat $TMPFILE`"


# get Sector size
dd 2>/dev/null if=$1 bs=1 count=2 skip=11 od -An -tdS dd 2>/dev/null of=$TMPFILE
printf >>$TXTFILE "%30s : %d\n" "Sector size" `cat $TMPFILE`
sector_size=`cat $TMPFILE`


# get Reserved sectors
dd 2>/dev/null if=$1 bs=1 count=2 skip=14 od -An -tdS dd 2>/dev/null of=$TMPFILE
printf >>$TXTFILE "%30s : %d\n" " Reserved sectors" `cat $TMPFILE`
reserved_sectors=`cat $TMPFILE`


# get FAT sectors
dd 2>/dev/null if=$1 bs=1 count=1 skip=16 od -An -tdS dd 2>/dev/null of=$TMPFILE
fat_count=`cat $TMPFILE`

dd 2>/dev/null if=$1 bs=1 count=2 skip=22 od -An -tdS dd 2>/dev/null of=$TMPFILE
sectors_per_fat=`cat $TMPFILE`

# calculate the no of sectors allocated for FAT's
let fat_sectors=fat_count*sectors_per_fat

printf >>$TXTFILE "%30s : %u (%u x %u) \n" "FAT sectors" "$fat_sectors" "$fat_count" "$sectors_per_fat"


# get root directory sectors
dd 2>/dev/null if=$1 bs=1 count=2 skip=17 od -An -tdS dd 2>/dev/null of=$TMPFILE
root_sectors=`cat $TMPFILE`

# calculate the no of sectors allocated for root directory
let root_sectors=root_sectors*32/sector_size

printf >>$TXTFILE "%30s : %u\n" "Root directory sectors" "$root_sectors"


# get Total special sectors
let total=reserved_sectors+fat_sectors+root_sectors
printf >>$TXTFILE "%30s : %u\n" "Total special sectors" "$total"


# display the information in a message box
dialog --title "Boot sector of $1" --backtitle "$back_title" --msgbox "`cat $TXTFILE`" 14 60

# delete temporary files
rm -f $TMPFILE
rm -f $TXTFILE

# end of msinfo.sh



_____________________________________________________________________________


9. The original msinfo file

Here is the msinfo file required to find the "Total Special Sectors". It
was included by the original author of this HOWTO in an encoded form. First
copy the text from the line "begin 755 msinfo.gz" to the line "end" into a
temporary file say temp.uu. Then uudecode this file, and finally gunzip to get
msinfo file.

# uudecode temp.uu
# gunzip msinfo.gz

Now run the program using the command

# ./msinfo /dev/winswap

The program displays the boot sector information for given partition as well
as the "Total Special Sectors" for the drive.

10. Acknowledgements


This Mini-HOWTO has been derived from the Swap-Space Mini HOWTO by
H. Peter Anvin. I have added the Windows 95/98 specific details as well
as a few Red hat Linux specific details. The msinfo program given in the
original HOWTO didn't work on my Redhat linux 6 system, so I created a similar
program. However, I have also included the original msinfo program. Thanks to
all those great people involved with the developement of Linux, to the people
at RedHat for giving a great Linux distrbution and to Sanjiv Guha, one of the
co-authors of "Red Hat Linux 6 Unleashed" from Techmedia for guidance about
shell programming. Right now, I have no internet access, so I don't know how
would you contact me in case of questions. May be someone from you local
place may come to your rescue.

Enjoy Linux,

Rahul :-)

Read more ...

The Wine FAQ

Frequently asked questions about Wine.

Questions

Click on the question to see its answer.

About Wine

1. What is Wine?
2. What's UNIX? What's Linux? What's FreeBSD? What's GNU?
3. Is Wine an emulator?
4. What's the history of Wine?
5. Why would anyone want Wine? Doesn't Windows suck?
6. What is Wine, and what is it supposed to do?
7. What is the current version of Wine?
8. When will Wine be finished?
9. What undocumented APIs / interfaces are not understood? Would seeing
Microsoft source help?

Getting Wine

10. Do I need Unix first? Where can I get Linux?
11. Can I get Wine on CD?

Common troubles with configuring Wine

12. This RPM requires libncurses.so.5, but the latest ncurses I can find is
libncurses.so.4?
13. Why does it keep saying that Xpm is not installed?
14. What is this kernel/kernel32 mismatch warning?
15. I'm getting a X_OpenFont crash when starting Wine!
16. All my Wine windows stick on top and/or on all my desktops!
17. Wine looks like Windows 3.1, but I run Windows 95 applications?
18. I compiled Wine from source, but it can't find the .so files, like
libavifil32.so!
19. Wine won't start on my new glibc2.1.3-based distribution (RedHat 6.2,
Mandrake 7.0, etc)!

Common troubles with running programs with Wine

20. I'm getting a relocation records stripped message, what's this?
21. I can't start programs in paths with spaces in them!
22. I tried to run a setup application, but it complains that it can't
create start menu entries, what can I do?
23. My application wants me to change disks/CD-ROMs, but I can't unmount it
while it is running, what can I do?

Getting Help

24. Is there any documentation for Wine?
25. I couldn't find the answer to my question in the documentation, but
I've written a document explaining how to solve it. What should I do?

Developing programs using Wine

26. Can I use Wine to port my Win32 sources to Unix?
27. Will MFC work with Wine? What do I need to do?
28. Are there any commercial applications which have been ported using
Wine?
29. How can I detect Wine?

Becoming a Wine developer

30. How do I become a Wine developer? What do I need to know?

About this FAQ

31. How recent is this FAQ? Where can I get the latest version?
32. Who maintains this FAQ? What's its history? How do I submit additions?
33. What's the copyright on this FAQ? How may I use it?

Capabilities

34. Which programs does Wine currently run?
35. Are there programs which Wine will never be able to run?
36. Can I use Wine to access my Winmodem?
37. Will MS Windows programs typically run faster or slower under UNIX and
Wine than they do under DOS and MS Windows? Will certain kinds of
programs run slower or faster?
38. Are there any advantages or disadvantages to running MS Windows
applications under Wine that I should be aware of?
39. Will Wine support MS Windows networked applications that use
winsock.dll?
40. I'm a software developer who wants to use UNIX to develop programs
rather than DOS, but I need to write DOS and MS Windows programs as
well. Will I be able to run my favorite DOS and/or MS Windows compilers
under Wine?

What You Need to Run Wine

41. Under what hardware platform(s) and operating system(s) will Wine run?
42. What minimum CPU must I have in my computer to be able to run Wine and
MS Windows applications smoothly?
43. How much disk space will the Wine source code and binaries take on my
hard drive? What other software do I need to have installed to compile
and run Wine?
44. How much RAM do I need to have on my UNIX system to be able to run Wine
and MS Windows applications smoothly?
45. I have a Drivespaced, Doublespaced or Stackered DOS partition. Can Wine
run MS Windows binaries located in such a partition?
46. Do I need to have a DOS partition on my system to use Wine? Does MS
Windows need to be loaded into that partition in order to run MS
Windows programs under Wine?
47. If Wine completely replaces MS Windows, will it duplicate all of the
functions of MS Windows?
48. Will I be able to install MS Windows applications in any flavor of a
UNIX filesystem?
49. Will Wine run only under X, or can it run in character mode?
50. Will Wine run under any X window manager? Does it require a window
manager at all?
51. Will 32-bit Windows 95/98 applications run under Wine?
52. What about NT specific programs, which use NT-only features?

How to Find, Install, Configure and Run Wine

53. Where can I get Wine?
54. If I do not have an Internet account, how can I get Wine?
55. How do I install Wine on my hard drive?
56. How do I compile the Wine distribution source code?
57. How do I configure Wine to run on my system?
58. How do I run an MS Windows program under Wine?
59. I have installed and configured Wine, but Wine cannot find MS Windows
on my drive. Where did I go wrong?
60. I'm running a DirectX game, but the graphics is slow, how can I speed
it up?
61. I think I've found a bug. How do I report this bug to the Wine
programming team?
62. I was able to get various MS Windows programs to run, but parts of them
do not work. What is wrong?
63. I have run various MS Windows programs, but since the program menus do
not work, how can I exit these programs?
64. How do I remove Wine from my computer?

How to Get Help with Wine

65. Is there a Usenet newsgroup for Wine?
66. Is there a World Wide Web site for Wine?

How You Can Help with the Wine Project

67. How can I help contribute to the Wine project, and in what way(s)?
68. I want to help beta test Wine. How can I do this?
69. I have written some code that I would like to submit to the Wine
project. How do I go about doing this?

Who's Responsible for Wine?

70. Who is responsible for writing and maintaining the Wine source code?
71. Who are the folks and organizations who have contributed money or
equipment to the Wine project?


Questions and Answers

About Wine

1. What is Wine?

Wine is Windows on UNIX.

2. What's UNIX? What's Linux? What's FreeBSD? What's GNU?

UNIX refers to a number of OSes based on the OS started at Bell Labs in
the 70's. GNU is a longstanding project to create a free Unix. Linux
and FreeBSD are free Unixes, building on the GNU project. Some
distributors, such as Debian, refer to the result as GNU/Linux in
recognition of the GNU heritage.

3. Is Wine an emulator?

Unfortunately, no. Wine provides low-level binary compatibility, but
currently only for OSes running on Intel-compatible chips.

4. What's the history of Wine?

As far as I remember it was a discussion in comp.os.linux about Windows
emulation. The first real code came from Eric Youngdale (at this point
he was toying around with object formats, i.e. he was writing the ELF
infrastructure for Linux and applied this knowledge to write a simple
loader for Windows binaries). Then Bob Amstadt got the actual project
running (with TK widgets). -- Joerg

Also see http://www.winehq.com/about.html.

5. Why would anyone want Wine? Doesn't Windows suck?

Not everyone thinks so. And for those that don't, Windows programs
would suck less when run on a more stable and flexible UNIX platform.

6. What is Wine, and what is it supposed to do?

Wine is a program which allows the operation of DOS and MS Windows
programs (Windows 3.x and Win32 executables) on UNIX. It consists of a
program loader, which loads and executes a Windows binary, and a
library that implements Windows API calls using their UNIX or X11
equivalents. The library may also be used for porting Win32 code into
native UNIX executables.

Wine is free software, and its license (contained in the file LICENSE
in each distribution) is BSD style. Basically, this means that you can
do anything with Wine except claim that you wrote it.

7. What is the current version of Wine?

A new version of Wine is distributed about every three weeks. You will
be able to keep up on all the latest releases by reading the newsgroup

comp.emulators.ms-windows.wine

where new release announcements are made. You can also subscribe to the
wine-announce mailing list to be notified of new releases via email.

When downloading Wine from your FTP site of choice (see
http://www.winehq.com/download.html for some of these choices), you can
make sure that you are getting the latest version by watching the
version numbers in the distribution filename.

For instance, the distribution released on June 20, 1994 was called
Wine-940620.tar.gz.

Patch files are also available. If you are current to the previous
version, you can download and apply just the current patch file rather
than the entire new distribution. The patch filenames follow the same
conventions as the monthly distribution.

Read-only CVS access is also available. See
http://www.winehq.com/dev.html

8. When will Wine be finished?

Large software projects are never finished, only released.

Because Wine is being developed by volunteers, it is difficult to
predict when it will be ready for general release. Between 90-98% of
the functions used by MS Windows applets, and 80-90% of the functions
used by major programs, have been at least partially implemented at
this time. However, the remaining 10% will likely take another 90% of
the time, not including debugging.

9. What undocumented APIs / interfaces are not understood? Would seeing
Microsoft source help?

The best would be if the Windows API would be fully documented, so Wine
could be a perfect "clean-room" implementation. Seeing the source code
might make it harder to prove that no copyright violations have taken
place. That said, the documentation is often bad, nonexistent, and even
misleading where it exists, so a fair amount of reverse engineering
have been necessary, particularly in the shell (Explorer) interface.

Getting Wine

10. Do I need Unix first? Where can I get Linux?

The short answer is yes: Wine is not an OS, it runs on top of your OS.
A project named Generic Windows, a prepacked setup of
FreeBSD+XFree86+Wine, has been proposed, but its domain name,
genericwindows.com, seems to have disappeared from the Web.

11. Can I get Wine on CD?

You can get the source on any CD which mirrors a Wine site, such as the
Metalab CD's marketed by Walnut Creek CDROM. Be warned that these might
be slightly out of date by the time you get them.

Common troubles with configuring Wine

12. This RPM requires libncurses.so.5, but the latest ncurses I can find is
libncurses.so.4?

RedHat has pulled a bad versioning trick; ncurses 5 is still installed
as libncurses.so.4 in order to avoid having to recompile the rest of
the distribution. If you must use a RPM rather than compile from
source, make a symlink, like

cd /usr/lib
ln -s libncurses.so.4 libncurses.so.5

13. Why does it keep saying that Xpm is not installed?

You need the Xpm development headers. On RedHat and SuSE, this is the
xpm-devel package. On Debian, this is the xpm4g-dev package. Remember
to rm config.cache (or make distclean) before trying again.

14. What is this kernel/kernel32 mismatch warning?

An error in the configuration file, which unfortunately many RPM
creators have overlooked. If you run win32 applications and have
win95/winNT installed with this error, Wine will crash on startup. The
wine.conf should contain something like this (but you may ignore the
DllPairs section if it doesn't exist, as it was obsoleted a while ago):

[DllPairs]
krnl386 = kernel32

[DllOverrides]
kernel32, gdi32, user32 = builtin
krnl386, gdi, user = builtin

15. I'm getting a X_OpenFont crash when starting Wine!

Make sure you have run mkfontdir in all your X font directories to make
sure X has a current list of available fonts. Also, some Windows fonts
do not work properly in X. When Wine starts, it queries the X server
for the metrics of every font on the system, and for some fonts this
may fail. Run wine -debugmsg +font -sync to see what fonts it was
querying the X server about, then remove the offending font.

16. All my Wine windows stick on top and/or on all my desktops!

Have you tried the -managed or -desktop command line options? See the
man page for details.

17. Wine looks like Windows 3.1, but I run Windows 95 applications?

The visual look and the API are completely different and independent
things, think of the look as a theme, it does not change what the
applications think they are running on. That said, to change the look,
set the WineLook option under [Tweak.Layout] in your wine.conf.

18. I compiled Wine from source, but it can't find the .so files, like
libavifil32.so!

When compiling from source, the libraries go into /usr/local/lib by
default. Most Linux distributions aren't set up to look there by
default, you have to add /usr/local/lib to /etc/ld.so.conf (and then
rerun ldconfig) yourself (or let tools/wineinstall do it for you).

19. Wine won't start on my new glibc2.1.3-based distribution (RedHat 6.2,
Mandrake 7.0, etc)!

There are severe bugs in stock glibc2.1.3. For towupper crashes, or
errors about MENU_CopySysPopup and USER, you can work around the
problem by defining the environment variable LC_ALL, i.e. export
LC_ALL=en (in bash) or setenv LC_ALL en (in tcsh).

Common troubles with running programs with Wine

20. I'm getting a relocation records stripped message, what's this?

It means that a Win32 application tried to start another executable,
but this new executable wanted itself loaded at an address typically
already occupied by the old executable, and did not have the relocation
records necessary for it to be loaded anywhere else (recent versions of
MSVC++ removes (strips) this information by default). Sometimes you can
get the application up anyway by just manually starting the other
executable it was trying to run (this applies to Lotus Notes, for
example).

The root of this problem is that Win32 keeps separate address spaces
for each Win32 process, so that two executables will never clash under
Windows. However, there is a lot of work left before Wine can do the
same, mostly having to do with how these applications are going to
communicate with each other once they are separated.

21. I can't start programs in paths with spaces in them!

Did you do something like wine /c/Program Files/foo/bar.exe? The shell
sees unescaped spaces as argument separators, for obvious reasons. To
tell it that it's all one argument, you must quote it. Examples:

wine /c/Program\ Files/foo/bar.exe
wine "/c/Program Files/foo/bar.exe"

But the best and simplest idea is always to cd into the program's
directory first and then just run wine bar.exe. Many applications
depend on the current directory being the program directory, and they
might not work otherwise.

22. I tried to run a setup application, but it complains that it can't
create start menu entries, what can I do?

If you're running without a real Windows installation, first you need
to install the necessary registry entries, if you haven't already done
so. See documentation/no-windows for more information. Next, you need
to create directories for the paths in the registry. If your Drive C
path is /c, you would type something like

mkdir "/c/windows/Start Menu"
mkdir "/c/windows/Start Menu/Programs"

to prepare the start menus, and after this the install should succeed.
(The newest version of tools/wineinstall should do all this for you.)

23. My application wants me to change disks/CD-ROMs, but I can't unmount it
while it is running, what can I do?

Use the Supermount kernel patch, and mount your removable media using
the Supermount filesystem (read its README file). Supermount implements
DOS/Windows-like behaviour (it allows you to change media (as long as
no files are open) without unmounting).

(Mandrake kernels are known to include this patch by default.)

Getting Help

24. Is there any documentation for Wine?

Yes, a bit. Look in the documentation/ directory of the source
distribution. Also see the WineHQ website and the draft version of the
Wine-HOWTO.

25. I couldn't find the answer to my question in the documentation, but
I've written a document explaining how to solve it. What should I do?

Updates and additions to the Wine documentation directory should be
sent to the wine-patches mailing list. Website and FAQ additions should
be sent to webmaster@winehq.com.

Developing programs using Wine

26. Can I use Wine to port my Win32 sources to Unix?

That is the idea of Winelib. Right now you may have some difficulties,
but this should change soon.

27. Will MFC work with Wine? What do I need to do?

Work is underway to support this.

28. Are there any commercial applications which have been ported using
Wine?

At this time, Corel's WordPerfect Office Suite and Deneba's Canvas 7
are known to use Winelib.

29. How can I detect Wine?

You shouldn't need to. If there's a quirk in Wine you need to work
around, it's better to fix it in Wine.

Becoming a Wine developer

30. How do I become a Wine developer? What do I need to know?

If you can program C, that's a good start. Download the sources via
CVS, subscribe to the mailing lists, look around the source, and pay
attention to the comp.emulators.ms-windows.wine newsgroup and the
mailing lists. See if there's anything that you think you can fix or
work on. You won't have much trouble finding areas that need work in
Wine (grep for FIXMEs in the source).

About this FAQ

31. How recent is this FAQ? Where can I get the latest version?

This document was last edited Fri Jul 21 11:43:09 EDT 2000. It is
available from http://www.winehq.com/faq.html.

32. Who maintains this FAQ? What's its history? How do I submit additions?

Dave Gardner maintained it from 1995-1998. Douglas Ridgway
, the current maintainer, took it over in 1999.
Proposed new questions should be sent to him.

33. What's the copyright on this FAQ? How may I use it?

The original Wine FAQ, which this FAQ was based on, was copyright ©
1995-1998 David Gardner. It may be reproduced and modified under the
same terms as Wine itself.

Capabilities

34. Which programs does Wine currently run?

Please see the Apps database.

35. Are there programs which Wine will never be able to run?

Wine is designed to allow applications to run, and implements an
application programming interface. It is not designed to interface
directly with hardware, which is the responsibility of the underlying
operating system. Wine does not in general allow using Windows drivers
under Unix. That said, Wine has been used to support parallel devices,
such as parallel port scanners for which no Unix driver is available.

36. Can I use Wine to access my Winmodem?

No. These are usually cheap DAC/ADC boards that comes with software
that consumes some of the processing power of your main CPU instead of
letting the hardware do its own job of decoding/encoding the acoustic
signals that carries data over the phone line. The software drivers use
VxDs to access the hardware, which brings us to the previous question,
above.

See http://www.linmodems.org/ instead.

37. Will MS Windows programs typically run faster or slower under UNIX and
Wine than they do under DOS and MS Windows? Will certain kinds of
programs run slower or faster?

When work on Wine is completed, programs should typically run at about
the same speed under Wine as they do under DOS and MS Windows.
Currently, there are debugging features built into each release, and
this slows down the execution of programs. However, these debugging
features will be removed for any post-development releases.

38. Are there any advantages or disadvantages to running MS Windows
applications under Wine that I should be aware of?

As with OS/2, you will be running MS Windows programs under a protected
mode operating system, which brings certain advantages (and some
disadvantages).

For instance, there will be crash protection. That is, each MS Windows
application running under Wine will be running in its own X window and
its own portion of reserved memory. If one MS Windows application
crashes, it will not crash the other MS Windows or UNIX applications
that you may have running at the same time.

However, be aware that some applications are broken and they access
memory that they haven't properly (or at all) allocated. Under OS/2 or
Wine, they will crash. Under MS Windows, they may work for a period of
time, but then eventually you will have to reboot the machine.

Also, MS Windows programs should run at about the same speed under Wine
as they do under MS Windows.

When Wine is finished, you will be able to run your favorite MS Windows
applications in a UNIX environment. However, be aware that any
application written for MS Windows will run much less efficiently than
its native UNIX cousin. For Linux, there is a database of such
applications at the Linux Apps Page.

39. Will Wine support MS Windows networked applications that use
winsock.dll?

Yes, Wine does support such applications, more so the 16-bit than the
32-bit version of winsock. Working applications include Agent (a Usenet
newsreader), mIRC, ws-FTP and Internet Explorer.

40. I'm a software developer who wants to use UNIX to develop programs
rather than DOS, but I need to write DOS and MS Windows programs as
well. Will I be able to run my favorite DOS and/or MS Windows compilers
under Wine?

Wine now supports DOS applications natively, which means that you might
be able to run command-line utilities. Some have reported success in
running (to varying degrees of success) various C++ compilers, and the
Borland Dephi and Turbo Pascal for Windows compilers. Others have
reported success in running the Borland C++ 5.0 command line compiler
(bcc) as well as some of the debugging tools in the MS SDK, but these
compilers' IDEs generally do not run yet.

What You Need to Run Wine

41. Under what hardware platform(s) and operating system(s) will Wine run?

Wine is being developed specifically to run on the Intel x86 class of
CPUs under certain UNIXes that run on the x86 platform. UNIXes
currently being tested for Wine compatibility include Linux, FreeBSD,
and Solaris x86. NetBSD, OpenBSD, Unixware, and SCO OpenServer 5 worked
at one time, but Wine now requires kernel-level threads which are not
currently available (or understood by the Wine team) in those
platforms. The Wine development team hopes to attract the interest of
other commercial UNIX and UNIX clone vendors as well.

There are side efforts underway to port Wine to the Alpha, OS/2, and
BeOS platforms. You can find out more information about the OS/2 port
at http://www.winehq.com/wine/documentation/wine_os2

42. What minimum CPU must I have in my computer to be able to run Wine and
MS Windows applications smoothly?

Wine won't run on any x86 CPU less than an 80386. It is known to also
work in the 80486 and Pentium CPUs. Beyond that, the basic test is, if
you can run X11 now, you should be able to run Wine and MS Windows
applications under it. As always, the faster your CPU, the better.
Having a math coprocessor is unimportant. However, having a graphics
accelerated video card supported by X will help greatly.

43. How much disk space will the Wine source code and binaries take on my
hard drive? What other software do I need to have installed to compile
and run Wine?

You need approximately 220 megabytes of free hard drive space to store
and compile the source code. Wine also needs about 18 megs in your /tmp
directory.

Many development tools need to be installed in order to compile Wine. A
list of required packages for several distributions is included in the
README.

To run Wine, you will need the following:
o The compiled Wine binary
o A properly configured wine.conf file (or ~/.winerc file)
o An installed and working X Window system
o Some MS Windows programs to test

44. How much RAM do I need to have on my UNIX system to be able to run Wine
and MS Windows applications smoothly?

If you can run X smoothly on your UNIX system now, you should be able
to run Wine and MS Windows applications just fine too. A typical Wine
workstation should realistically have at least 16 megabytes of RAM and
a 16 megabyte swap partition. More is better, of course. You can run
Wine with 8/8, but it is not recommended. If you wish to be part of the
development team and program Wine itself, be aware that the new
debugger is rather memory intensive. Some have suggested that 64
megabytes is the minimum RAM needed for Wine development, although some
are able to work (albeit slowly) with 24 megabytes of physical RAM and
lots of swap space.

45. I have a Drivespaced, Doublespaced or Stackered DOS partition. Can Wine
run MS Windows binaries located in such a partition?

Yes, but only if the operating system supports mounting those types of
drives.

There is a Linux filesystem driver called dmsdos that will allow
read/write access through Doublespaced and Drivespace 1.0 drives. More
specifically, it supports mounting DOS 6.0 and 6.2 Doublespaced, DOS
6.22 Drivespaced, and Windows 95 Doublespaced compressed partitions
(read and write access works fine, but write access is slow). It can be
found at ftp://metalab.unc.edu/pub/Linux/system/filesystems/dosfs/.

46. Do I need to have a DOS partition on my system to use Wine? Does MS
Windows need to be loaded into that partition in order to run MS
Windows programs under Wine?

Unlike Wabi, you do not need a licensed and installed copy of DOS or MS
Windows to install, configure and run Wine. However, Wine has to be
able to 'see' an MS Windows binary if it is to run it.

Some folks have successfully installed and run some small programs in
their UNIX filesystem without having a DOS partition or MS Windows.
However, not all programs will work this way yet. Some applications'
installation programs want to distribute some of the package's files
into the /windows and /windows/system directories in order to run, and
unless these exist on your UNIX filesystem, those programs will not
install correctly and probably will not run well, if at all.

If you have a DOS partition with MS Windows installed in it, make sure
that your UNIX system can 'see' this partition (check your /etc/fstab
file or mount the partition manually) so that Wine can run the MS
Windows binaries located in the DOS partition.

When it is finished, Wine will not require that you have a DOS
partition on your system at all, meaning that you will not need to have
MS Windows installed either. Wine programmers will provide an
application setup program to allow you to install your MS Windows
programs straight from your distribution diskettes or CDs onto your
UNIX filesystem, or from within your UNIX filesystem if you ftp an MS
Windows program over the Internet.

To run without a DOS partition, you need to set a UNIX path to be your
drive C, and make sure that the /windows and /windows/system
directories point to some place that actually exist. Here's an example,
copied from a machine which has no DOS partition but successfully runs
Wine

[Drive C]
Path=/var/lib/wine
Type=hd
Label=MS-DOS
Filesystem=win95

[wine]
Windows=c:\windows
System=c:\windows\system
Temp=e:\
Path=c:\windows;c:\windows\system;c:

In /var/lib/wine/windows, you will need to install a win.ini config
file that you might find on a typical MS Windows 3.1 machine. The
directory /var/lib/wine/windows/system should exist, but doesn't need
to contain anything. However, to use MS DLLs, you can copy them into
that directory.

If you have DOS/MS Windows installed on your system, you can mount that
partition at bootup by modifying the file /etc/fstab in your UNIX
partition. If you edit this file by hand, it should contain something
similar to the following

/dev/hda1 /dosc msdos uid=0,gid=100,umask=007 0 0

This will allow you to read and write to the DOS partition without
being root.

47. If Wine completely replaces MS Windows, will it duplicate all of the
functions of MS Windows?

Most of them, yes. However, some applications and applets that come
with MS Windows, such as File Manager and Calculator, can be considered
by some to be redundant, since 32-bit UNIX programs that duplicate
these applets' functions already exist.

48. Will I be able to install MS Windows applications in any flavor of a
UNIX filesystem?

Wine is written to be filesystem independent, so MS Windows
applications will install and run under any filesystem supported by
your brand of UNIX.

49. Will Wine run only under X, or can it run in character mode?

Most of Wine's development effort is geared against MS Windows' GUI,
but some limited support for character mode has appeared, by setting
GraphicsDriver=ttydrv in wine.conf's [wine] section.

50. Will Wine run under any X window manager? Does it require a window
manager at all?

Wine is window manager independent, so the X window manager you choose
to run has no bearing on your ability to run MS Windows programs under
Wine. Wine uses standard X libraries, so no additional ones are needed.
Wine has its own window management, which acts like MS Windows. It can
be turned off to use the native window manager with the -managed
command-line switch.

51. Will 32-bit Windows 95/98 applications run under Wine?

Yes, 32-bit programs are now about as well supported as 16-bit
programs.

52. What about NT specific programs, which use NT-only features?

These are only poorly supported.

How to Find, Install, Configure and Run Wine

53. Where can I get Wine?

Because of lags created by using mirror, word of this newest release
may reach you before the release is actually available at the ftp sites
listed here. The sources are available from the following locations:
o ftp://metalab.unc.edu/pub/Linux/ALPHA/wine/development/
o ftp://tsx-11.mit.edu/pub/linux/ALPHA/Wine/development/
o ftp://ftp.infomagic.com/pub/mirrors/linux/sunsite/ALPHA/wine/development/
o ftp://ftp.progsoc.uts.edu.au/pub/Wine/development/

It should also be available from any site that mirrors tsx-11 or
metalab (formerly sunsite).

Some of these ftp sites may archive previous versions of Wine as well
as the current one. To determine which is the latest one, look at the
distribution filename, which will take the form Wine-YYMMDD.tar.gz.
Simply replace YYMMDD in the distribution filename with the numbers for
year, month and date, respectively. The latest one is the one to get.

Wine binary packages are available for several OS'es and distributions.
See http://www.winehq.com/download.html for the most recent list.

Current Wine sources are also available via anonymous client/server
CVS. You will need CVS 1.9 or above. If you are coming from behind a
firewall, you will either need a hole in the firewall for the CVS port
(2401) or use SOCKS. To login to the CVS tree, do

export CVSROOT=:pserver:cvs@cvs.winehq.com/home/wine
cvs login

Use "cvs" as the password (without the quotes). Note that /home/wine is
a path on the server, not on your machine.

To check out the entire Wine source tree (which may be slow), use

cvs -z 3 checkout wine

or if you just want a subtree, or individual file, you can do that too
with

cvs -z 3 checkout wine/ANNOUNCE

Be aware, though, that getting the entire Wine source tree via CVS is
pretty slow, especially compared to getting Wine from an FTP mirror
near you.

Patch files are also available, so that you don't have to download,
install and configure the entire distribution each week if you are
current to the previous release. Patch file release names follow the
same numbering convention as do the general releases, and take the form

Wine-YYMMDD.diff.gz

Patch files are available from the same sites that distribute the full
release. To upgrade to a new release by using a patch file, first cd to
the top-level directory of the release (the one containing the README
file), then do a "make clean", and patch the release with

gunzip -c patch-file | patch -p1

where patch-file is the name of the patch file something like
Wine-YYMMDD.diff.gz. You can then re-run ./configure, and then run make
depend && make.

If you are mirroring the Wine distribution from the tsx-11 site and
wish to be listed here in this FAQ, please send email to the FAQ
author/maintainer at webmaster@winehq.com

54. If I do not have an Internet account, how can I get Wine?

Some CD-ROM archives of Internet sites, notably those from Walnut Creek
that archive ftp.cdrom.com and metalab.unc.edu, may include some
versions of Wine on their CD releases. However, the age of these
distributions should always be questioned, as the 'snapshot' of the ftp
site may have been taken anywhere from 1-4 months (or more) prior to
the CD's pressing date.

Your best bet to get the very latest distribution of Wine, if you do
not have your own Internet account, is to find a friend who does have
an Internet account, and have him/her ftp the necessary file(s) for
you. Unfortunately, since the Wine source no longer fits on a 1.44 MB
floppy, you'll have to figure out some way to transfer the file to your
computer.

If you have an email account on a BBS that can reach the Internet
through a gateway, you may be able to use 'email ftp' to get the Wine
release sent to you; check with your BBS system operator for details.

55. How do I install Wine on my hard drive?

Just un-gzip and un-tar the file, and follow the instructions contained
in the README file that will be located in the base Wine directory.

56. How do I compile the Wine distribution source code?

See the README for instructions. Additionally, you may want to set the
TMPDIR environment variable TMPDIR=~/tmp or TMPDIR=/tmp (if you are
root)

57. How do I configure Wine to run on my system?

Wine requires that you have a file called usr/local/etc/wine.conf (you
can supply a different filename when configuring wine) or a file called
.winerc in your home directory. The format of this file is explained in
the wine.conf man page . The file wine.ini contains a config file
example. More explicit directions can be found in the README file that
will be located in the base Wine directory after you ungzip and untar
the distribution file.

58. How do I run an MS Windows program under Wine?

When invoking Wine, you must specify the entire path to the executable,
or by filename only.

For example to run Windows' solitaire, type any of the following:
o wine sol or wine sol.exe (using the search path to locate the
file)
o wine c:\\windows\\sol.exe (using a DOS filename)
o wine /usr/windows/sol.exe (using a UNIX filename)

The path of the file will also be added to the path when a full name is
supplied on the command line.

59. I have installed and configured Wine, but Wine cannot find MS Windows
on my drive. Where did I go wrong?

If you have a DOS partition, first make sure that you have mounted it,
either by putting the entry into [tt /etc/fstab], or by manually
mounting it. Remember too that unless your version of UNIX can see
through it, or you are running a utility that can see through it, your
DOS partition must not be located on a Drivespaced, Doublespaced or
Stackered partition, as neither Linux, FreeBSD, NetBSD or Wine can
natively 'see' files located in these compressed DOS partitions.

Check your path statements in the wine.conf file. No capital letters
may be used in paths, as they are automatically converted to lowercase.

60. I'm running a DirectX game, but the graphics is slow, how can I speed
it up?

If you're using XFree86, you can take advantage of DGA. You must have
rw access to /dev/mem to do this. On many distributions, you can add
yourself to the kmem group. Otherwise, you have to change /dev/mem
permissions, or even play as root.

61. I think I've found a bug. How do I report this bug to the Wine
programming team?

Bug reports should be posted to the newsgroup
comp.emulators.ms-windows.wine. See documentation/bugreports for a list
of what to include. This means at least the following:
o The Wine version tested
o The MS Windows program name and, if possible, the version number
of the software tested
o A brief description of the bug
o The relevant part(s) of the output of the Wine debugger

62. I was able to get various MS Windows programs to run, but parts of them
do not work. What is wrong?

Wine is not complete at this time, so some of each programs' features
may not work. They will in time as more of the MS Windows API calls are
included in Wine.

63. I have run various MS Windows programs, but since the program menus do
not work, how can I exit these programs?

Kill the xterm shell window that you called up to run your MS Windows
program, and the X window that appeared with the program will be killed
too.

64. How do I remove Wine from my computer?

All you have to do is to type

rm -fR \[/path/\]Wine*

Make sure that you specify the exact path when using the powerful 'rm
-fR' command. If you are afraid that you might delete something
important, or might otherwise delete other files within your
filesystem, cd into each Wine subdirectory singly and delete the files
found there manually, one file or directory at a time. Neither the Wine
developers and programmers, nor the Wine FAQ author/maintainer, can be
held responsible for your deleting any files in your own filesystem.

How to Get Help with Wine

65. Is there a Usenet newsgroup for Wine?

Yes, and it's called comp.emulators.ms-windows.wine. The newsgroup
serves as a place for developers to discuss Wine, and for minor
announcements for the general public. Major announcements will be
crossposted to other appropriate newsgroups, such as the following
comp.os.linux.announce comp.windows.x.announce comp.emulators.announce
If your Usenet site does not carry these newsgroups, please urge your
ISP's sysadmin and/or uplink to add them.

66. Is there a World Wide Web site for Wine?

Here are a few
o WineHQ The official site.
o http://www.qbc.clic.net/~krynos/wine_en.html

If you are installing or maintain a WWW page pertaining to Wine that
you feel would be useful for others to read, please inform the FAQ
author/maintainer at webmaster@winehq.com.

How You Can Help with the Wine Project

67. How can I help contribute to the Wine project, and in what way(s)?

You can contribute programming skills, or monetary or equipment
donations, to aid the Wine developers in reaching their goals. To find
out who, what, where, when and why, please post your desire to
contribute to the newsgroup comp.emulators.ms-windows.wine

68. I want to help beta test Wine. How can I do this?

Beta testers are currently not needed, as Wine is still Alpha code at
this time. However, anyone is welcome to download the latest version
and try it out at any time.

69. I have written some code that I would like to submit to the Wine
project. How do I go about doing this?

Patches are greatly appreciated and should be submitted to the
wine-patches mailing list. Also see this page for a description of what
happens to submitted patches.

Who's Responsible for Wine?

70. Who is responsible for writing and maintaining the Wine source code?

Wine is available thanks to the work of many people. Please see the
file AUTHORS in the distribution for the complete list.

71. Who are the folks and organizations who have contributed money or
equipment to the Wine project?

People and organizations who have given generous contributions of
money, equipment, or licenses, include
o David L. Harper
o Bob Hepple
o Mark A. Horton
o Kevin P. Lawton
o the Syntropy Institute
o James Woulfe
o vmWare Inc.
o Corel

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

Home | News | About | Download | Documentation | Tools | References
Others | Links | Development | Bugs | Applications | Projects | Contributing
------------------------------------------------------------------------

info@winehq.com

Read more ...

Linux SMP FAQ

David Mentré, David.Mentre@irisa.fr
v0.47, 20 november 1998

This FAQ review main issues (and I hope solutions) related to SMP con
figuration under Linux.

Table of Contents

1. Introduction

2. What's new ?

3. Questions related to any architectures

3.1 Kernel side
3.2 User side
3.3 SMP Programming
3.3.1 Parallelization methods
3.3.2 The C Library
3.3.3 Languages, Compilers and debuggers
3.3.4 Other libraries
3.3.5 Other points about SMP Programming

4. Intel architecture specific questions

4.1 Why it doesn't work on my machine?
4.2 Possible causes of crash
4.3 Motherboard specific information
4.3.1 Motherboards with known problems
4.3.2 Motherboards with NO known problems
4.4 How to obtain maximum performance ? (not strictly SMP related)
4.4.1 From disks

5. Useful pointers

5.1 Various
5.2 Multithreaded programs and library
5.3 SMP specific patches
5.4 Parallelizing/Optimizing Compilers for 586/686 machines

6. Glossary

7. List of contributors



______________________________________________________________________

1. Introduction

Linux can work on SMP (Symetric Multi-Processors) machines. SMP
support has started with the 2.0 family and has been improved in the
2.1 (future 2.2) saga.


FAQ maintained by David Mentré (David.Mentre@irisa.fr). The latest
edition of this FAQ can be found at

· http://www.irisa.fr/prive/mentre/smp-faq/ (France)

· http://www.phy.duke.edu/brahma/smp-faq/ (USA)

If you want to contribute to this FAQ, I would prefer a diff against
the SGML version faq.sgml> of this document, but any remarks (in plain text) will be
greatly appreciated. If you send me an email about this FAQ, please
include a tag like [Linux SMP FAQ] in the Subject: field of your e-
mail. It helps me automatically sort mails (and you will have a faster
reply ;)).

This FAQ is an improvement of a first draft made by Chris Pirih.

All information contained in this FAQ is provided "as is." All
warranties, expressed, implied or statutory, concerning the accuracy
of the information of the suitability for any particular use are
hereby specifically disclaimed. While every effort has been taken to
ensure the accuracy of the information contained in this FAQ, the
authors assume(s) no responsibility for errors or omissions, or for
damages resulting from the use of the information contained herein.


2. What's new ?

v0.47, 20 november 1998

· Added that 2.0.36 as the MTRR patch (related to the BogoMips
problem)


v0.46, 10 november 1998

· Update about Epox KP6-LS motherboards


v0.45, 25 october 1998

· Corrected an error regarding /proc/stat file

· Added a pointer to CESDIS Ethernet Linux Drivers site


v0.44, 14 october 1998

· Updated the link to the web page: Motherboards rumored to run
Linux SMP

· Added Jakob explanation how to time SMP systems with 2.0 kernels


v0.43, 9 september 1998

· Updated first question in section 3.1

· Updated mt-Mesa link: multi-threaded is now included as
experimental in the Mesa distribution


v0.42, 2 september 1998

· Minor cosmetic update in sect 3.3

· Two links (multithreaded Mesa and SMP performance) marked
outdated

· Updated the item about threads and exceptions in C++ (sect 3.3)


v0.41, 1 september 1998

· Added a major section: "3.3 SMP Programming" written by Jakob
Østergaard

· moved some item of section "3.2 User side" in sect 3.3


v0.40, 27 august 1998

· Updated section 3.1, item 7: processor affinity


v0.39, 27 august 1998

· Updated needed Award BIOS version for Tyan motherboards (hASCII)

· Added an item on IRQ in the crash section (me and hASCII)

· Added good support of Asus P2B-DS (Ulf Rompe)

· Added another smp-list archive in pointer section (Hank
Leininger)


v0.38, 8 august 1998

· Added a pointer to the Linux Threads FAQ


v0.37, 30 July 1998

· Emil Briggs is working on parallel plugins for Gimp (see "Is
there any threaded programs or library?", sect. "User side")


v0.36, 26 July 1998

· Thanks to Jakob Østergaard, two changes in "Possible causes of
Crash"

· Changed 2.0.33 to 2.0.35 (latest stable)

· Added a "BIOS related causes of failure"


v0.35, 14 July 1998

· Added N440BX Server Board in Motherboards with NO problems

· Added a succes story for GigaByte motherboard with BIOS upgrade

· Added a "How to obtain maximum performance ?" section (waiting
for your contributions ;)


v0.34, 10 june 1998

· Added a "Parallelizing/Optimizing Compilers for 586/686
machines" section in section "Useful Pointers", thanks to Sumit
Roy


· Corrected a mispelling, "Asus P/I-UP5" is in fact "Asus P/I-
P65UP5"


v0.33, 3 june 1998

· Yet another success story for a GigaByte DLX Motherboard.

· A tip for Tyan motherboards, disable the "DRAM Fast Leadoff"
BIOS option


v0.32, 27 may 1998

· Asus P/I-UP5 added in the motherboard-with-NO-problem section


v0.31, 18 may 1998

· Elitegroup P6LX2-A works with 2.1.100 and 101

· Bugs should be reported to linux-smp@vger.rutgers.edu


v0.30, 12 may 1998

· SuperMicro is now in the motherboard-with-NO-problem section


v0.29, 11 may 1998

· A success story for a GigaByte 686 motherboard with 2.1.101

· Added a new item in the "User Side" section: "Is there any
threaded programs or library?"

· OpenGL Mesa library is beeing multithreaded. Cool! See the new
section for details.


v0.28, 09 may 1998

· A US mirror of this FAQ is now available (see Introduction)

· Merge of the two confusing Gigabyte 686 entries


v0.27, 05 may 1998

· New info for the Adaptec and TekRam drivers

· Micronics W6-LI motherboard works under SMP




3. Questions related to any architectures


3.1. Kernel side


1. Does Linux support multi-threading? If I start two or more
processes, will they be distributed among the available CPUs?

Yes. Processes and kernel-threads are distributed among processors.
2. What kind of architectures are supported in SMP?


From Alan Cox:
SMP is supported in 2.0 on the hypersparc (SS20, etc.) systems
and Intel 486, Pentium or higher machines which are Intel
MP1.1/1.4 compliant. Richard Jelinek adds: right now, systems
have been tested up to 4 CPUs and the MP standard (and so Linux)
theoretically allows up to 16 CPUs.

SMP support for UltraSparc, SparcServer, Alpha and PowerPC
machines is in progress in 2.1.x.


From Ralf Bächle:
MIPS, m68k and ARM does not support SMP; the latter two probly
won't ever.

That is, I'm going to hack on MIPS-SMP as soon as I get a SMP
box ...


3. How do I make a Linux SMP kernel?

Uncomment the SMP=1 line in the main Makefile
(/usr/src/linux/Makefile).

AND

enable "RTC support" (from Robert G. Brown). Note that inserting
RTC support actually doesn't afaik prevent drift, but according to
a discussion [Robert G. Brown] remember from a year ago or so it
can prevent lockup when the clock is read at boot time. A note from
Richard Jelinek says also that activating the Enhanced RTC is
necessary to get the second CPU working (identified) on some
original Intel Mainboards.

AND

do NOT enable APM! APM and SMP are not compatible, and your system
will almost certainly (or at least probably ;)) crash under boot if
APM is enabled (Jakob Oestergaard). Alan Cox confirms this : 2.1.x
turns APM off for SMP boxes. Basically APM is undefined in the
presence of SMP systems, and anything could occur.



You must rebuild all your kernel and kernel modules when changing
to and from SMP mode. Remember to make modules and make
modules_install (from Alan Cox).


4. How do I make a Linux non-SMP kernel?

Comment the SMP=1 line in the Makefile (and not set SMP to 0).



You must rebuild all your kernel and kernel modules when changing
to and from SMP mode. Remember to make modules and make
modules_install.



5. How can I tell if it worked?

cat /proc/cpuinfo




Typical output (dual PentiumII):

______________________________________________________________________
processor : 0
cpu : 686
model : 3
vendor_id : GenuineIntel
stepping : 3
fdiv_bug : no
hlt_bug : no
fpu : yes
fpu_exception : yes
cpuid : yes
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic 11 mtrr pge mca cmo
v mmx
bogomips : 267.06

processor : 1
cpu : 686
model : 3
vendor_id : GenuineIntel
stepping : 3
fdiv_bug : no
hlt_bug : no
fpu : yes
fpu_exception : yes
cpuid : yes
wp : yes
flags : fpu vme de pse tsc msr pae mce cx8 apic 11 mtrr pge mca cmo
v mmx
bogomips : 267.06
______________________________________________________________________




6. What is the status of converting the kernel toward finer grained
locking and multithreading?

2.1.x has signal handling, interrupts and some I/O stuff fine grain
locked. The rest is gradually migrating. All the scheduling is SMP
safe


7. Does Linux SMP support processor affinity?



Standard kernel
No and Yes. There is no way to force a process onto specific
CPU's but the linux scheduler has a processor bias for each
process, which tends to keep processes tied to a specific CPU.


Patch
Yes. Look at PSET - Processor Sets for the Linux kernel
:

The goal of this project is to make a source compatible
and functionally equivalent version of pset (as defined
by SGI - partially removed from their IRIX 6.4 kernel)
for Linux. This enables users to determine which
processor or set of processors a process may run on.
Possible uses include forcing threads to seperate proces
sors, timings, security (a `root' only CPU?) and probably
more.




8. Where should one report SMP bugs to?

Please report bugs to linux-smp@vger.rutgers.edu.




3.2. User side


1. Do I really need SMP?

If you have to ask, you probably don't. :)


2. How does one display mutiple cpu performance?

Thanks to Samuel S. Chessman, here is some useful utilities:

Character based:
http://www.cs.inf.ethz.ch/~rauch/procps.html

Basically, it's procps v1.12.2 (top, ps, et. al.) and some
patches to support SMP.


Graphic:
xosview-1.5.1 supports SMP. And kernels above 2.1.85 (included)
the cpuX entry in /proc/stat file.

The official homepage for xosview is:
http://lore.ece.utexas.edu/~bgrayson/xosview.html

The various forissier's kernel patches are at: http://www-
isia.cma.fr/~forissie/smp_kernel_patch/


3. How can I enable more than 1 process for my kernel compile?

use:

___________________________________________________________________
# make [modules|zImage|bzImages] MAKE="make -jX"
where X=max number of processes.
WARNING: This won't work for "make dep".
___________________________________________________________________



With a 2.1.x like kernel, see also the file
/usr/src/linux/Documentation/smp for specific instruction.

BTW, since running multiple compilers allows a machine with sufficient
memory to use use the otherwise wasted CPU time during I/O caused
delays make MAKE="make -j 2" -j 2 actually even helps on uniprocessor
boxes (from Ralf Bächle).


4. Why the time given by the time command is false ? (from Joel
Marchand)

In the 2.0 series, the result given by the time command is false.
The sum user+system is right *but* the spreading between user and
system time is false.

More precisely: "The explanation is, that all time spent in
processors other than the boot cpu is accounted as system time. If
you time a program, add the user time and the system time, then you
timing will be almost right, except for also including the system
time that is correctly accounted for" (Jakob Østergaard).

This bug in corrected in 2.1 series.


5. How will my application perform under SMP?

Look at SMP Performance of Linux [OUTDATED]
which gives useful
hints how to bench a specific machine (from a post made by Cameron
MacKinnon).






3.3. SMP Programming

Section made by Jakob Østergaard.

This section is intended to outline what works, and what doesn't, when
it comes to programming multi-threaded software for SMP Linux.


3.3.1. Parallelization methods


1. POSIX Threads

2. PVM / MPI Message Passing Libraries

3. fork() -- Multiple processes

Since both fork() and PVM/MPI processes usually does not share memory,
but either communicate by means of IPC or a messaging API, they will
not be described further in this section. They are not very specific
to SMP, since they are used just as much - or more - on uniprocessor
computers, and clusters thereof.

Only POSIX Threads provide us with multiple threads sharing ressources
like - especially - memory. The exact same thing that makes a SMP
machine special, by allowing many processors to share their memory. To
use both (or more ;) processors of an SMP, use a kernel-thread
library. A good library is the LinuxThreads, a pthread library made by
Xavier Leroy which is
now integrated with glibc2 (aka libc6).

Multi-threading has never been really popular in the UN*X world
though. For some reason, applications requiring multiple processes or
threads, has mostly been written using fork(). Therefore, when using
the thread approach, one runs into problems of incompatible (not
thread-ready) libraries, compilers, and debuggers. GNU/Linux is no
exception to this. Hopefully the next few sections will sched a little
light over what is currently possible, and what is not.
3.3.2. The C Library

Older C libraries are not thread-safe. It is very important that you
use GNU LibC (glibc), also known as libc6. Earlier versions are
ofcourse possible to use, but it will cause you much more trouble than
upgrading your system will, well probably :)

If you want to use GDB to debug your programs, you should get the
patches or SRPMS available for glibc at
http://odin.appliedtheory.com/debug_thread_rpms/RedHat_5.1/ which will
allow GDB to work with threads.

It is not nessecary to patch glibc in any way just to make it work
with threads. If you do not need to debug the software (this could be
true for all machines that are not development workstations), there is
no need to patch glibc.


3.3.3. Languages, Compilers and debuggers

There is a wealth of programming languages available for GNU/Linux,
and many of them can be made to use threads one way or the other (some
languages like Ada and Java even have threads as primitives in the
language).

This section will, however, currently only describe C and C++. If you
have experience in SMP Programming with other languages, please
enlighten us.

GNU C and C++, as well as the EGCS C and C++ compilers work with the
thread support from the standard C library (glibc). There are however
a few issues:


1. When compiling C or C++, use the -D_REENTRANT define in the
compiler command line. This is necessary to make certain error-
handling functions work.

2. When using C++, If two threads throw exceptions concurrently, the
program will segfault. The compiler does not generate thread-safe
exception code.

The workaround is to put a
pthread_mutex_lock(&global_exception_lock) in the constructor(s) of
every class you throw(), and to put the corresponding
pthread_mutex_unlock(...) in the destructor. It's ugly, but it
works. This solution was given by Markus Ferch.

The GNU Debugger GDB as of version 4.17, is incapable of handling
threads, at least in any sensible way. There is however a patched
version available at
http://odin.appliedtheory.com/debug_thread_rpms/RedHat_5.1/, for
RedHat Linux at least. It's probably quite easy to use the standalone
patches on any other GNU/Linux distribution. Note that you must also
patch your glibc.

Note that core-dumps are of no use, when using multiple threads.
Somehow the core dump is attached to one of the currently running
threads, and not to the program as a whole. Therefore, whenever you
are debugging anything, run it from the debugger.

Hint: If you have a thread running haywire, like eating 100% CPU time,
and you cannot seem to figure out why, here is a nice way to find out
what's going on: Run the program straight from the shell, no GDB. Make
the thread go haywire. Use top to get the PID of the process. Run GDB
like gdb program pid. This will make GDB attach itself to the process
with the PID you specified, and stop the thead. Now you have a GDB
session with the offending thread, and can use bt and the likes to see
what is happening.


3.3.4. Other libraries

ElectricFence: This library is not thread safe. It should however be
possible to make it work in SMP environments, by inserting mutex locks
in the ElectricFence code.



3.3.5. Other points about SMP Programming


1. Where can I found more information about parallel programming?

Look at the Linux Parallel Processing HOWTO


Lots of useful information can be found at Parallel Processing
using Linux

Look also at the Linux Threads FAQ faq.html>


2. Is there any threaded programs or library?

Yes. For programs, you should look at: Multithreaded programs on
linux (I love
hyperlinks, did you know that ? ;))

As far as library are concerned, there is:


OpenGL Mesa library
Thanks to David Buccarelli, Andreas Schiffler and Emil Briggs,
it exists in a multithreaded version (right now [1998-05-11],
there is a working version that provides speedups of 5-30% on
some OpenGL benchmarks). The multithreaded stuff is now included
in the regular Mesa distribution as an experimental option. For
more information, look at the Mesa library



BLAS
Pentium Pro Optimized BLAS and FFTs for Intel Linux


Multithreaded BLAS routines are not available right now, but a
dual proc library is planned for 1998-05-27, see Blas News
for details.


The GIMP
Emil Briggs, the same guy who is involved in multithreaded Mesa,
is also working on multithreaded The GIMP plugins. Look at
http://nemo.physics.ncsu.edu/~briggs/gimp/index.html for more
info.





4. Intel architecture specific questions


4.1. Why it doesn't work on my machine?


1. Can I use my Cyrix/AMD/non-Intel CPU in SMP?

Short answer: no.

Long answer: Intel claims ownership to the APIC SMP scheme, and
unless a company licenses it from Intel they may not use it. There
are currently no companies that have done so. (This of course can
change in the future) FYI - Both Cyrix and AMD support the non-
proprietary OpenPIC SMP standard but currently there are no
motherboards that use it.


2. Why doesn't my old Compaq work?

Put it into MP1.1/1.4 compliant mode.


3. Why doesnt my ALR work?

From Robert Hyatt : ALR Revolution quad-6 seems quite safe, while
some older revolution quad machines without P6 processors seem
"iffy"...


4. Why does SMP go so slowly? or Why does one CPU show a very low
bogomips value while the first one is normal?

From Alan Cox: If one of your CPU's is reporting a very low
bogomips value the cache is not enabled on it. Your vendor probably
provides a buggy BIOS. Get the patch to work around this or better
yet send it back and buy a board from a competent supplier.

Another work-around is to use the 2.0.36 kernel. It contains the
MTRR patch which should solve this problem (select option "Handle
buggy SMP BIOSes with bad MTRR setup" in the "General setup" menu).


5. I've heard IBM machines have problems


Some IBM machines have the MP1.4 bios block in the EBDA, allowed
but not supported by <2.1.80. Please update to the right kernel.

There is an old 486SLC based IBM SMP box. Linux/SMP requires
hardware FPU support.


6. Is there any advantage of Intel MP 1.4 over 1.1 specification?

Nope (according to Alan :) ), 1.4 is just a stricker specs of 1.1.


7. Why does the clock drift so rapidly when I run linux SMP?


This is known problem with IRQ handling and long kernel locks in
the 2.0 series kernels. Consider upgrading to a later 2.1 kernel
(not garenteed to work).

From Jakob Oestergaard: Or, consider running xntpd. That should
keep your clock right on time. (I think that I've heard that
enabling RTC in the kernel also fixes the clock drift. It works for
me! but I'm not sure whether that's general or I'm just being
lucky)



8. Why are my CPU's numbered 0 and 2 instead of 0 and 1 (or some other
odd numbering)?

The CPU number is assigned by the MB manufacturer and doesn't mean
anything. Ignore it.



9. My SMP system is locking up all the time. Black screen, nothing in
the logs. Help!

If you're running a 2.0 kernel, consider upgrading to later 2.0.32+
kernels or apply Leonard Zubkoff's deadlock patch. If you still
have deadlocks, apply Ingo Molnar's deadlock detection patch and
post the results (against your System.map) to linux-smp or linux-
kernel. You might also consider running a 2.1 kernel.





4.2. Possible causes of crash

You'll find in this section some possible reasons for a crash of an
SMP machine (credits are due to Jakob Østergaard for this part). As
far as I (david) know, theses problems are Intel specific.



· Cooling problems

From Ralf Bächle: [Related to case size and fans] It's important
that the air is flowing. It of course can't where cables etc. are
preventing this like in too small cases. On the other side I've
seen oversized cases causing big problems. There are some tower
cases on the market that actually are worse for cooling than
desktops. In short, the right thing is thinking about aerodynamics
in the case. Extra cases for hot peripherals are usefull as well.



· Bad memory

Don't buy too cheap RAM and don't use mixed RAM modules on a
motherboard that is picky about it.

Especially Tyan motherboards are known to be picky about RAM speed
(see the Tyan paragraph below for a possible solution).



· Bad combination of different stepping CPUs

Check /proc/cpuinfo to see that your CPUs are same stepping.


· You are running 2.0.35 aren't you ?

If you run 2.0.31 or 2.1.xx you can't be sure that SMP is stable.
2.0.35 is the right kernel for a production system. 2.1.xx kernels
perform better, but they are development releases and should NOT be
considered stable!


· If your system is unstable, then DON'T overclock it!

...and even if it is stable, DON'T overclock.

From Ralf Bächle: Overclocking causes very subtile problems. I
have a nice example, one of my overclocked old machines
misscomputes a couple of pixels of a 640 x 400 fractal. The
problem is only visible when comparing them using tools. So better
say never, nuncas, jamais, niemals overclock.



· 2.0.x kernel and fast ethernet (from Robert G. Brown)

2.0.X kernels on high performance fast ethernet systems have
significant (and known) problems with a race/deadlock condition in
the networking interrupt handler.

The solution is to get the latest 100BT development drivers from
CESDIS Linux Ethernet device drivers site
(ones that define
SMPCHECK).


· A bug in the 440FX chipset (from Emil Briggs)

If you had a system using the 440FX chipset then your problem with
the lockups was possibly due to a documented errata in the chipset.
Here is a reference

References: Intel 440FX PCIset 82441FX (PMC) and 82442FX (DBX)
Specification Update. pg. 13

http://www.intel.com/design/pcisets/specupdt/297654.htm

The problem can be fixed with a BIOS workaround (Or a kernel patch)
and in fact David Wragg wrote a patch that's included with Richard
Gooch's MTTR patch. For more information and a fix look here:

http://nemo.physics.ncsu.edu/~briggs/vfix.html


· DONT run emm386.exe before booting linux SMP

From Mark Duguid, dumb rule #1 with W6LI motherboards. ;)


· If the machine reboots/freezes after a while, there can be two good
BIOS + memory related reasons (from Jakob Østergaard)

· If the BIOS has settings like "memory hole at 16M" and/or "OS/2
memory > 64MB", try disabling them both. Linux does not always
react well with theese options.

· If you have more than 64 MB of memory in the machine, and you
specified the exact number manually in the LILO configuration, you
should specify one MB less than you actually have in the machine.
If you have 128 MB, you lilo.conf line looks like:
append="mem=127M"


· Be aware of IRQ related problems

Sometime, some cards are not recognized or can trigger IRQ
conflicts. Try shuffle cards on slots in different ways.

Contributed by hASCII : removing an " append="hisax=9,2,3"" line in
lilo.conf allowed using a kernel from the 2.1.xx series with
activated ISDN + Hisax support. Kernels from the 2.0.xx series
doesn't make problems like this.



Some hardware is also known to cause problems. This includes:

· Adaptec SCSI controllers

Latest news (05 may 1998):

The latest version of this driver (5.0.13 at this writting) should
be SMP safe (both in 2.0 and 2.1 kernels). Doug had verified it
through code review and intensive tests (on a dual PII system).

This said, some machines still have problems. Doug has kindly given
some explanations:

· Doug: The simple fact of the matter is that this version of the
aic7xxx driver places a larger demand on DMA transfers than the old
driver did, especially for for smaller DMA transactions. So, the
point should be made that this version of the driver *is* more
demanding on your system than either the 4.1 or 4.1.1 driver, and
that certain marginal systems may get hit by this problem (such as
my own P133 system is).

· In 2.1 kernels, they are still problems (with IRQ) with the kernel
(2.1.99) and they are not related to this specific driver. People
are working on this.


· 3Com 3c905 cards

Some work, some don't. Try disabling busmastering if your system is
unstable.




4.3. Motherboard specific information

Please note: Some more specific information can be found with the list
of Motherboards rumored to run Linux SMP


4.3.1. Motherboards with known problems


· GA686DLX (Andrew Crane)

Same BIOS related BogoMIPS problem as other motherboards.

Solution from Alan Cox: Congratulations, send the bill for your
hair damage to the supplier. You have yet another SMP box with
faulty bios. There is a patch for 2.0.x on www.uk.linux.org and
there are people working on generic MTRR handling for 2.1.x

From Claus-Justus Heine: I'm able to boot above MB with 2.1.90 +
Ingo's apic + Richard's mtrr patches. From David Mentré: the kernel
> 2.1.99 have the MTRR patch included and Florian Hinzmann told me
that with 2.1.101, both CPUs are detected fine.

David Maslen tells: Fortunately I suspect these problems have been
fixed, and would like to report my success so that others won't be
put off what seems to be a nice motherboard. [...] My system has
been running for about 3 days without a lockup (72hrs) Kernel
2.1.103 compiled easily. /proc/cpuinfo says the cpus are both
there. This was also true of 2.0.33.

Other possible solution: BIOS upgrade (see http://www.giga-
byte.com).

(14 July 1998)Volker Reichelt confirms that with a BIOS upgrade
from v1.14 to v1.20 everything seems to work fine.


· EPoX KP6-LS (Christopher Allen Wing, 16 march 1998)

It appears to have the same BIOS related BogoMIPS problem as other
motherboards. (one CPU only gives about 3 BogoMIPS, the other gives
the full amount) All 2.0.x kernels lock up soon after booting, late
2.1.x kernels run slowly but don't seem to lock up. There is no
BIOS upgrade available (yet). I wrote the manufacturer but have not
received a reply.

(update, 10 november 1998) First of all, there are 2 revisions on
the KP6-LS: (1) Revision 2 (production release, has a power-leak on
the second processor connector - To fix this problem, contact Epox
support and they will guide you for further assistence. - For some
boards it is needed to replace the entire board. Cause the leak is
corrected in the middle of this revision). (2) Revision 3
(production release). For both the revisions is a patch avaliable
from their site (http://www.epox.com/support/bios.html). Please
make sure that Epox has been contacted about the bios upgrade
before applying. After applying the patch, kernel 2.0.35 and all
other expirimental kernels from 2.1.110 up to 2.1.125 report a
correct BogoMIPS index. (Niels Ammerlaan)


· Tyan

Tyan motherboards are known to be picky about RAM speed (Jakob
Oestergaard).

From Doug Ledford about the onboard aic-7895 SCSI controller (for
which he wrote the driver): "BTW, make sure you have at least BIOS
version 1.16 on that Tyan motherboard. The 1.15 and below BIOS
versions have a bug relating to IRQ allocation for the 7895 SCSI
controller" (submitted by Szakacsits Szabolcs).

(27 august 1998) From hASCII: If you have a tyan with award bios,
the newest version you can get is 1.02.

But, as motherboard problems are more close to grayshade than black
and white ;), Richard Jelinek (from S.u.S.E.) tells that they
sell/sold several Tyan Titan Pro (Dual-PPro) Motherboards. They
work perfectly with SMP.

(3 june 1998) maybe an explanation found by Leonard Zubkoff and
told tp me by Sean Reifschneider: The Tyan Titan Pro motherboards
with 3.03 BIOS version (dated 10/31/96) has an option labled "DRAM
Fast Leadoff", which MUST be disabled.



· MS-6114

More details for this motherboard at
http://www.msi.com.tw/product/6114/6114.htm


Solution: BIOS upgrade

Somebody experienced solid hangs (nothing in the log files) under
constant load of about 5 running processes within less than 12
hours with AMI BIOS v1.1. v1.4b3 runs without problems.





4.3.2. Motherboards with NO known problems


· AIR P6NDP and P6NDI (Leonard N. Zubkoff)

My primary production machine is based on an AIR P6NDP and one of
my test machines uses a P6NDI. Both seem to be fine motherboards
in my experience. The P6NDI BIOS is a little conservative in its
programming of the Natoma chipset for 50ns EDO, but a minor tweek
to one register in rc.local took care of that.


· AIR 54CDP (Chris Mauritz)

You can also list the following motherboard as working with no
problems:

AIR 54CDP motherboard / EISA/PCI / onboard aic7870 / dual P120 /
Redhat 5.0 (2.0.32 and 2.0.33 kernels)

However, Jon Lewis adds the following comments: Has Chris tried
putting multiple PCI cards in these motherboards...say a SCSI card
and a network card? Due to BIOS brain damage, the 54CDP insists on
having all PCI devices share a single IRQ. AIR lead me on for 2
weeks and then said "there have been / will be no updates for your
board". This means I can't have Tulip network cards and PCI SCSI
without hacking the drives (which seems to work, though I was
cautioned not to do it).


· HP XU 6/200 (Jean-Francois Micouleau)

Works with 2.0 and 2.1 kernels. Some problems under high network
load with 2.0.x kernel. Works under 2.1.78 with Ingo Molnar IO-APIC
patch.


· Elitegroup P6FX2-A (Benedikt Heinen)

Had this mainboard running with ONE PPro on it for several months,
and since about a year, it's running without problems with TWO PPro
200MHz. The only crashes this machine ever experienced were before
Leonard Zubkoff's deadlock-patches for Linux 2.0.30... ;)

Elitegroup P6FX2-A / ISA/PCI / Dual PPro200 / Debian "hamm"


· Elitegroup P6LX2-A (Ulf Nielsen)

This motherboard works with a post 2.1.99 kernel (100 and 101
tested). All kernels pre 2.1.100 does not work on P6LX2-A.


· QDI P6I440LX/DP "Legend IV" (Tony Kocurko)

The QDI P6I440LX/DP "Legend IV" dual Pentium II motherboard now
boots properly with Linux-SMP. As of 0326 hours on 15 April, there
is a necessary BIOS upgrade to version 1.6 at the Canadian site
(http://www.qdi.ca). Previously, the Legend IV would bring up the
first processor normally, but the /proc/cpuinfo file would show the
second processor barely alive. The BIOS update seems to have
corrected the problem.


· Asus P2L97-DS

ASUS P2L97-DS works great under Linux-SMP (from Richard Jelinek).


· Asus P/I-P65UP5 (Jukka Tainio)

I have run it with both 2x233 MMX Pentium and 2x200 PPRO. Both
boards are in heavy www-proxy use and work without problems. Kernel
version is 2.0.33.


· Asus P2B-DS (Ulf Rompe)

Asus P2B-DS is working without problems. It runs with two PII-266,
the onboard Adaptec 7890 (Patch from
ftp://ftp.dialnet.net/pub/linux/aic7xxx/ required) in U2W mode, an
Elsa Victory Erazor AGP an some obscure other hardware.

The only thing missing is support for the new SMP-aware APM, but
that is a general Linux problem.



· Micronics W6-LI

From Mark Garlanger: 2.0.33 is very stable on the board, and the
2.1.xx kernels are improving. People have also been able to run
other OSes including Windows NT(yuck...), FreeBSD-SMP, Rhapsody.


· SuperMicro

Thomas Schenk is running about 80 SMP machines with SuperMicro
motherboards without any problem. Kernel used: 2.0.33. No "bad
bogomips" problem for him (was I [david] wrong about this ?).


· N440BX Server Board

Moni Hollmann using a N440BX Server Board unter Linux (SMP) and no
Problems occured so far. RAM: 256 MB, 2x Pentium/II- 350
(Deschutes).



4.4. How to obtain maximum performance ? (not strictly SMP related)





4.4.1. From disks


Some useful information pointed out by Robert G. Brown, one of the
bigest contributor to this FAQ.


Date: Wed, 8 Jul 1998 09:12:41 +1000 (EST)
From: "Andrew Mc.Ghee"

I believe there was work done on this at - (I've got the report sitting in
front of me, but there is no http reference, must have used UNIX netscape
to print it, but it was done by Eric Hendriks at cesdis.gsfc.nasa.gov)

Distilling it down, the paper presents

Interface Disk Arrangement Cpu Usage Throughput
=============================================================
IDE-PIO 4 Disks / 2 Channels 98% read 7.53 MB/s
58% write 4.84 MB/s
IDE-DMA 4 Disks / 2 Channels 34% read 11.78 MB/s
57% write 9.21 MB/s
IDE-DMA 2 Disks / 2 Channels 31% ----- 9.87 MB/s
SCSI 4 Disks / 1 Channel 53% read 13.41 MB/s
92% write 11.93 MB/s
SCSI 4 Disks / 2 Channels 77% read 21.99 MB/s
97% write 13.44 MB/s

The test where done using RAID0 via the md system, but of course the test
involved using a large, single contiguous data transfer.

Andrew Mc.Ghee
Mechanical Engineering
University of Queensland




5. Useful pointers


5.1. Various


· Parallel Processing using Linux


· Linux Parallel Processing HOWTO


· (outdated) Linux SMP home page


· linux-smp mailing list

To subscribe, send subscribe linux-smp in the message body at
majordomo@vger.rutgers.edu

To unsubscribe, send unsubscribe linux-smp in the message body at
majordomo@vger.rutgers.edu

Linux SMP archives

Linux SMP archives at progressive-comp.com comp.com/Lists/?l=linux-smp&r=1&w=2#linux-smp>

· pthread library made by Xavier Leroy


· Motherboards rumored to run Linux SMP

· procps

· xosview

· SMP Performance of Linux [OUTDATED]


· CESDIS Linux Ethernet device drivers site




5.2. Multithreaded programs and library


· Linux Threads FAQ

· Multithreaded programs on linux


· Pentium Pro Optimized BLAS and FFTs for Intel Linux
(not available right now,
but a dual proc library is planned for 5/27/98, see Blas News
for details)

· Mesa library (with
experimental multi-threading)

· Parallel plugins for The GIMP





5.3. SMP specific patches


· Forissier kernel patches isia.cma.fr/~forissie/smp_kernel_patch/>

· Patch for a bug in the 440FX chipset


· MTRR patch (latest version: 1.9)


· PSET - Processor Sets for the Linux kernel





5.4. ( Sumit Roy ) Parallelizing/Optimizing Compilers for 586/686
machines


· Pentium Compiler Group creators of pgcc

· Absoft , Fortran 90 and Fortran 77
compilers

· The Portland Group, Inc. , supports the
OpenMP standard for Fortran parallelization
on Linux

· Pacific-Sierra Research Corporation , has a
free F90 compiler for Linux, as well as parallelizing compilers for
SMP Linux

· Applied Parallel Research ,
currently have parallelizing compilers for WinNT



6. Glossary


· SMP Symetric Multi-Processors

· APIC Advanced Programmable Interrupt Controler

· thread A thread is a processor activity in a process. The same
process can have multiple threads. Those threads share the process
address space and can therefore share data.

· pthread Posix thread, threads defined by the Posix standard.



7. List of contributors

Many thanks to those who help me to maintain this FAQ :


· Tigran A. Aivazian

· Niels Ammerlaan

· Emil Briggs

· Robert G. Brown

· Samuel S. Chessman

· Alan Cox

· Andrew Crane

· Mark Duguid

· Jocelyne Erhel

· Byron Faber

· Mark Garlanger

· hASCII

· Claus-Justus Heine

· Benedikt Heinen

· Florian Hinzmann

· Moni Hollmann


· Robert Hyatt

· Richard Jelinek

· Tony Kocurko

· Doug Ledford

· Hank Leininger

· Cameron MacKinnon

· Joel Marchand

· David Maslen

· Chris Mauritz

· Jean-Francois Micouleau

· Ulf Nielsen

· Jakob Oestergaard

· Ulf Rompe

· Jean-Michel Rouet

· Ralf Bächle

· Volker Reichelt

· Sean Reifschneider

· Sumit Roy

· Thomas Schenk

· Szakacsits Szabolcs

· Jukka Tainio

· Simen Timian Thoresen

· El Warren

· Christopher Allen Wing

· Leonard N. Zubkoff

Read more ...