Usenet comp.os.linux.announce (1993-2013)
 help / color / mirror / Atom feed
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1995-01-31 23:48 Ian Jackson
  1995-01-31 23:49 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1995-01-31 23:48 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 31 Jan 1995

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q12.1 `You still
haven't answered my question !', before posting your question to the
newsgroup comp.os.linux.help.

See Q13.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How do I remove LILO so my system boots DOS again ?
 Q4.7        Why can't I use fdformat except as root ?
 Q4.8        Is there something like Stacker or Doublespace for Linux ?
 Q4.9        My ext2fs partitions are checked each time I reboot.
 Q4.10       My root filesystem is read-only !
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?
 Q4.12       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?

 Section 6.  Solutions to common miscellaneous problems
 Q6.1        Setuid scripts don't seem to work.
 Q6.2        Free memory as reported by free keeps shrinking.
 Q6.3        When I add more memory it slows to a crawl.
 Q6.4        Some programs (e.g. xdm) won't let me log in.
 Q6.5        Some programs let me log in with no password.
 Q6.6        My machine runs very slowly when I run GCC / X / ...
 Q6.7        I can only log in as root.
 Q6.8        My screen is all full of weird characters instead of letters.
 Q6.9        I have screwed up my system and can't log in to fix it.
 Q6.10       Emacs just dumps core.
 Q6.11       I've discovered a huge security hole in rm !
 Q6.12       lpr and/or lpd aren't working.
 Q6.13       Timestamps on files on msdos partitions are set incorrectly.

 Section 7.  How do I do this or find out that ... ?
 Q7.1        How can I get scrollback in text mode ?
 Q7.2        How do I switch virtual consoles ?  How do I enable them ?
 Q7.3        How do I set the timezone ?
 Q7.4        What version of Linux and what machine name am I using ?
 Q7.5        How can I enable or disable core dumps ?
 Q7.6        How do I upgrade/recompile my kernel ?
 Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
 Q7.8        How do I make a bootable floppy ?
 Q7.9        How do I remap my keyboard to UK, French, etc. ?
 Q7.10       How do I get NUM LOCK to default to on ?
 Q7.11       How can I have more than 128Mb of swap ?

 Section 8.  Miscellaneous information and questions answered
 Q8.1        What is a .gz file ? And a .tgz ? And ... ?
 Q8.2        What does VFS stand for ?
 Q8.3        What is a BogoMip ?
 Q8.4        What is the Linux Journal and where can I get it ?
 Q8.5        How many people use Linux ?
 Q8.6        How should I pronounce Linux ?

 Section 9.  Frequently encountered error messages
 Q9.1        During linking I get Undefined symbol _mcount
 Q9.2        lp1 on fire
 Q9.3        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q9.4        ld: unrecognized option '-m486'
 Q9.5        GCC says Internal compiler error
 Q9.6        make says Error 139
 Q9.7        shell-init: permission denied when I log in.
 Q9.8        No utmp entry.  You must exec ... when I log in.
 Q9.9        Warning - bdflush not running
 Q9.10       Warning: obsolete routing request made.
 Q9.11       EXT2-fs: warning: mounting unchecked filesystem
 Q9.12       EXT2-fs warning: maximal count reached
 Q9.13       EXT2-fs warning: checktime reached
 Q9.14       df says Cannot read table of mounted filesystems
 Q9.15       fdisk says Partition X has different physical/logical ...
 Q9.16       fdisk: Partition 1 does not start on cylinder boundary
 Q9.17       fdisk says partition n has an odd number of sectors
 Q9.18       mtools says cannot initialise drive XYZ
 Q9.19       At the start of booting: Memory tight

 Section 10. The X Window System
 Q10.1       Does Linux support X Windows ?
 Q10.2       Where can I get an XF86Config for my system ?
 Q10.3       xterm logins show up strangely in who, finger
 Q10.4       I can't get X Windows to work right.

 Section 11. Questions applicable to very out-of-date software
 Q11.1       fdisk says cannot use nnn sectors of this partition
 Q11.2       GCC sometimes uses huge amounts of virtual memory and thrashes
 Q11.3       My keyboard goes all funny after I switch VC's.

 Section 12. How to get further assistance
 Q12.1       You still haven't answered my question !
 Q12.2       What to put in a posting to comp.os.linux.help
 Q12.3       I want to mail someone about my problem.

 Section 13. Administrative information and acknowledgements
 Q13.1       Feedback is invited
 Q13.2       Formats in which this FAQ is available
 Q13.3       Authorship and acknowledgements
 Q13.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.  It aims
towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It runs mainly on 386/486/586-based PCs, using the hardware facilities of
the 386 processor family (TSS segments et al) to implement these features.
Ports to other architectures are underway [Q1.4 `What ports to other
processors are there ?'].

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

The Linux kernel is distributed under the GNU General Public License - see
Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

An iBCS2 (Intel Binary Compatibility Standard) emulator for SVR4 ELF and
SVR3.2 COFF binaries is at a fairly advanced stage of development.  See
the iBCS2 emulator source tree README file for details.

Work is progressing on an emulator for Microsoft Windows binaries [Q3.6
`Can I run Microsoft Windows programs under Linux ?'].

For more information see the INFO-SHEET, which is one of the the HOWTOs
[Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
Q5.3 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM and a hard disk are
required.

VESA local bus and PCI are both supported.  A driver for the NCR SCSI chip
in many PCI machines is included in current alpha test release kernels.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux is reported to run on 386 family based laptops, with X on most of
them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386 family processors.

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

Question 1.4.  What ports to other processors are there ?

A project has been underway for a while to port Linux to suitable
68000-series based systems such as Amigas and Ataris.  This has now
reached beta test quality, but still lacks an X server.  There is a 680X0
channel on the Linux Activists mailserver [Q2.8 `What's this mailing list
thing at niksula.hut.fi ?'], and a Linux/68K FAQ on the World Wide Web and
on tsx-11.mit.edu in /pub/linux/680x0/FAQ.  There is a mailing list for
the Atari port - mail <majordomo@phil.uni-sb.de> with a body containing
only subscribe atarix - and an ftp area on ftp.phil.uni-sb.de in
/pub/atari/linux.

Information about a port to 68K-based Macintoshes can be found in the
MacLinux FAQ, available on www.ibg.uu.se in /pub/maclinux/FAQ.txt.  Other
stuff may be in the same directory.  There is a mailing list, but it is
currently broken.

Work has just been started on a port to the PowerPC.  Currently this will
be based on the PowerMAC architecture.  Again, don't post asking about it
unless you have experience to offer, and don't hold your breath.  There is
a mailing list - send your subscription request to
<linux-ppc-request@vger.rutgers.edu>.

On a political note, you might like to know that the FSF disapprove of
Apple - see /usr/lib/emacs/19.*/etc/APPLE on your system.

Both Linus and Jim Paradis <paradis@sousa.amt.ako.dec.com> or
<jrp@world.std.com> are working on ports to the 64-bit DEC AXP (the
Alpha).  Mailing list: <linux-alpha-request@vger.rutgers.edu>.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
also a MIPS channel on the Linux Activists mailserver and a list
linux-mips at vger.rutgers.edu.  Interested people may mail their
questions and offers of assistance to <linux@waldorf-gmbh.de>.

None of these ports will be capable of running Linux/386 binaries.

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

Question 1.5.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
including some space for user files and spool areas.

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

Question 1.6.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.  This is not the same as Public Domain (see the Copyright
FAQ, available on rtfm.mit.edu in
/pub/usenet/news.answers/law/Copyright-FAQ, for details).

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The licences 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
material by FTP ?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

     Linux INFO-SHEET                        Linux META-FAQ
     BUPS HOWTO (regarding the Back UPS).    Busmouse HOWTO
     CDROM HOWTO                             Commercial HOWTO
     Distribution HOWTO                      DOSEMU HOWTO
     Ethernet HOWTO                          Ftape HOWTO
     German HOWTO                            Hardware HOWTO
     Installation HOWTO                      Japanese Extensions HOWTO
     Keystroke HOWTO                         Mail HOWTO
     MGR HOWTO                               NET-2 HOWTO
     NIS HOWTO (NIS is Sun's Yellow Pages)   News HOWTO
     PPP HOWTO                               Printing HOWTO
     SCSI HOWTO                              Sound HOWTO
     Term HOWTO                              Tips HOWTO
     UUCP HOWTO                              XFree86 HOWTO
More of these documents are always in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also a few mini-HOWTOs on sunsite.unc.edu in the
/pub/Linux/docs/HOWTO/mini directory.

The HOWTO.INDEX also contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are five international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@tc.cornell.edu.

comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.misc are also worth reading -- you may find that many common
problems are too recent to find in this FAQ but are answered in the
newsgroups.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q12.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup.  Crossposting is
rarely a good idea.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
The German one is de.comp.os.linux.  In Australia, try
aus.computers.linux.

There may well be Linux groups local to your institution or area - check
there first.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run Linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of those releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
also a large number of other releases which are distributed less globally,
which suit special local and national requirements (for example, better
internationalisation support).

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux

The MCC-Interim release is available from ftp.mcc.ac.uk (US, 130.88.200.7)
in /pub/linux; the TAMU release is available from net.tamu.edu (US,
128.194.177.1) in /pub/linux.

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

* src.doc.ic.ac.uk : /packages/Linux (UK)
* sunacm.swan.ac.uk : /pub/Linux (UK)
* ftp.ibp.fr : /pub/linux (France)
* wuarchive.wustl.edu : /systems/linux (US)
* mrcnext.cso.uiuc.edu : /pub/linux (US)
* ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
* ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
* ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
* ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
* bond.edu.au : /pub/OS/Linux (Australia)
* monu1.cc.monash.edu.au : /pub/linux (Australia)
* ftp.sun.ac.za : /pub/linux (South Africa)
* ftp.inf.utfsm.cl : /pub/Linux (Chile)

Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

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

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the comp.os.linux.* groups are available by
subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

Note that a new mailing list server is gaining rapid acceptance - send
message with list in the body to <majordomo@vger.rutgers.edu> (add help to
your mail if you don't have the standard Majordomo help file).  This
server contains lists corresponding to all of the channels at the niksula
multi-channel server (NB that these pairs of lists are *not* connected by
gateways - they are separate lists with the same target audience).

The ANNOUNCE list on niksula is a digest of postings to
comp.os.linux.announce, for the benefit of those without Usenet access.
However since niksula.hut.fi is slow and overloaded I'd recommend
subscribing to the MIT digestifier instead [Q2.7 `I don't have Usenet
access.  Where do I get information ?'].

There is also a NEWBIE channel (linux-newbie at vger) where `no question
is too stupid'; unfortunately it seems that few of the experienced users
read that channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the niksula
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

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

Question 2.9.  Are the newsgroups archived anywhere ?

Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
comp.os.linux.announce and the old group comp.os.linux, in their Linux
areas.  The comp.os.linux.announce archives are mirrored from /usenet on
src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).

There is an `easy to access' archive of comp.os.linux.announce on the
World Wide Web at http://www.leo.org/archiv/linux/archiv/ann_index.html.
It supports searching and browsing.

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  See Q1.2 `What software does it support ?' for details and status
of the emulators for DOS, MS Windows and System V programs.

Linux can also access Minix and System V UFS filesystems, and can read
(but not yet write) OS/2 HPFS and Amiga filesystems.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.5 `Where can I get Linux material by FTP
?'.

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.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not easily.  You can access them from within the DOS emulator [Q1.2 `What
software does it support ?'], but not as a normal filesystem under Linux
or using mtools.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is a primitive, alpha test read-only Amiga filesystem
on sunsite.unc.edu in /pub/Linux/patches/amigaffs.tar.Z.  More information
is in affs-readme in the tarfile.

The 1.1.x alpha test kernel series contains support for the UFS filesystem
used by System V and Coherent.

There is a set of user-level programs that provides read-only access to
the Macintosh hierarchical filing system (HFS). It is available on
sunsite.unc.edu in /pub/Linux/utils/disk-management/xhfs0_3.tgz.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS.  This is so
that OS/2 knows about the partition being formatted.

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How do I remove LILO so my system boots DOS again ?
 Q4.7        Why can't I use fdformat except as root ?
 Q4.8        Is there something like Stacker or Doublespace for Linux ?
 Q4.9        My ext2fs partitions are checked each time I reboot.
 Q4.10       My root filesystem is read-only !
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?
 Q4.12       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I undelete files ?

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

There are a number of packages available that work by providing new
commands for deletion and sometimes copying that move deleted files into a
`wastebasket' directory instead; they can then be recovered until cleaned
out automatically by background processing.

Alternatively you can search the raw disk device which holds the
filesystem in question.  This is hard work, and you will need to be root
to do this.

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

Question 4.2.  Is there a defragmenter for ext2fs etc. ?

Yes.  There is a Linux filesystem defragmenter for minix, old-style, ext2,
and xia filesystems available on sunsite.unc.edu in
system/Filesystems/defrag-0.6.tar.gz.

Users of the ext2 filesystem can probably do without defrag since ext2
contains extra code to keep fragmentation reduced even in very full
filesystems.

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

Question 4.3.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  You may have to run mke2fs directly
instead of mkfs -t ext2.  The -m 0 option tells mkfs.ext2 not to reserve
any space on the disk for the superuser --- usually the last 10% is
reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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
filesystem; if you're unlucky the filesystem is trashed and you'll have to
reinitialise it with mkfs (or mke2fs, mkxfs etc.) it and restore from a
backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.5.  My swap area isn't working.

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 or /etc/rc.local (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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.6.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
into FDISK in the normal way and then select the `Re-write Master Boot
Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.7.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.8.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.9.  My ext2fs partitions are checked each time I reboot.

See Q9.11 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.10.  My root filesystem is read-only !

Remount it.  If /etc/fstab is correct you can simply mount -n -o remount
/. If /etc/fstab is wrong you must give the device name and posibly the
type too: e.g. mount -n -o remount -t ext2 /dev/hda2 /.  To understand why
you got into this state see Q9.11 `EXT2-fs: warning: mounting unchecked
filesystem'.

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

Question 4.11.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.12.  My AHA1542C doesn't work with Linux.

The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS 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.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?

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

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

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

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

Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sties.

Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
first --- search the find-ls or INDEX files for appropriate strings.
Check the Linux Projects Map (LPM), on ftp.ix.de in
/pub/Linux/docs/Projects-Map.gz.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to <linux-announce@tc.cornell.edu>).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.3.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.

GCC does not currently know how to do optimisation well for the 586,
because Intel won't release the necessary information except under
nondisclosure.  Don't buy a Pentium or wait for people to reverse-engineer
the required optimisations.

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

Question 5.5.  What does gcc -O6 do ?

Currently the same as -O2; any number greater than 2 currently works just
like 2.  The Makefiles of newer kernels use -O2, and so should you.

GCC 2.6 adds optimisation level -O3.  However, GCC 2.6.0 and several of
the following versions are known to have some problems with Linux, though
these will hopefully be solved soon.  In any case you should not use -O3
on a program until you're sure it doesn't create any problems.

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

Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q7.6 `How do I
upgrade/recompile my 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 /usr/include/asm

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

Question 5.7.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're using a kernel more recent than 1.1.44 you should find that
there are new directories /usr/src/linux/include/asm-i386.  The directory
asm there should be removed, as should the directory asm.  The symlinks
Makefile target will make these be symbolic links to asm-i36 and
arch/i386/boot respectively.  The easiest way to make sure all this gets
done is not to try to patch 1.1.44 to make 1.1.45, but to download
linux-1.1.45.tar.gz instead.

ld: unrecognised option `-qmagic' means you should get a newer linker,
from tsx-11.mit.edu in /pub/linux/packages/GCC, in the file
image-4.6.xx.tar.gz.

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

Question 5.8.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
It comes with documentation that will tell you what to do.

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

Question 5.9.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (check the GCC documentation) and -s which strips 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.

Using QMAGIC binaries also can reduce the size of binaries, especially
small ones.  Don't worry about this unless you know what QMAGIC is; Linux
is moving to QMAGIC as a default.

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

Question 5.10.  Does Linux support threads or lightweight processes ?

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, most of which are
generic packages for any Unix:

* In sipb.mit.edu:/pub/pthread or 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.
* In 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 as /tr/1993/05/UW-CSE-93-05-06.PS.Z.
* In gummo.doc.ic.ac.uk:/rex is lwp, a very minimal implementation.
* In 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 useable under
  Linux.

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

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

Question 5.11.  Where can I get `lint' for Linux ?

Roughly equivalent functionality is built into the GNU C compiler (gcc)
which is used by Linux systems.  Use the -Wall option to turn on most of
the useful extra warnings.  Check the GCC manual for more details (type
control-h followed by i in Emacs and select the entry for GCC).

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQCVAgUBLy7NbsMWjroj9a3bAQHq8gP+PuZKirYlRw2gA4PIqsRGQO5qomf16WOU
MNGsFjwpX1/I2YMzlldeFNEgAZ37J7whwBI+RtYlRJh+DA8XC8dDjeGPYo9Kl7O6
AeOCRPmqu/vFtnFGS+Ni2MRJySMz7IXiP/lLBLfKff2s9mOPTFVJQeu0yGL9e11e
6syif97kZN8=
=87kG
-----END PGP SIGNATURE-----
-- 
Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
+44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1996-03-06  5:00 Ian Jackson
  1996-03-06  5:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1996-03-06  5:00 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 06 Mar 1996

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q12.1 `You still
haven't answered my question !', before posting your question to a
newsgroup.

See Q13.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What mailing lists are there ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Win95 ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I get Linux to work with my large disk ?
 Q4.2        How can I undelete files ?
 Q4.3        Is there a defragmenter for ext2fs etc. ?
 Q4.4        How do I format and create a filesystem on a floppy ?
 Q4.5        I get nasty messages about inodes, blocks, and the suchlike
 Q4.6        My swap area isn't working.
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       My root filesystem is read-only !
 Q4.12       I have a huge /proc/kcore !  Can I delete it ?
 Q4.13       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        How do I port XXX to Linux ?
 Q5.2        What is ld.so and where do I get it ?
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        My executables are (very) large.
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

 Section 6.  Solutions to common miscellaneous problems
 Q6.1        free dumps core.
 Q6.2        My clock is very wrong.
 Q6.3        Setuid scripts don't seem to work.
 Q6.4        Free memory as reported by free keeps shrinking.
 Q6.5        When I add more memory it slows to a crawl.
 Q6.6        Some programs (e.g. xdm) won't let me log in.
 Q6.7        Some programs let me log in with no password.
 Q6.8        My machine runs very slowly when I run GCC / X / ...
 Q6.9        I can only log in as root.
 Q6.10       My screen is all full of weird characters instead of letters.
 Q6.11       I have screwed up my system and can't log in to fix it.
 Q6.12       I've discovered a huge security hole in rm !
 Q6.13       lpr and/or lpd aren't working.
 Q6.14       Timestamps on files on msdos partitions are set incorrectly.
 Q6.15       How do I get LILO to boot the vmlinux file ?

 Section 7.  How do I do this or find out that ... ?
 Q7.1        How can I get scrollback in text mode ?
 Q7.2        How do I switch virtual consoles ?  How do I enable them ?
 Q7.3        How do I set the timezone ?
 Q7.4        What version of Linux and what machine name am I using ?
 Q7.5        How can I enable or disable core dumps ?
 Q7.6        How do I upgrade/recompile my kernel ?
 Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
 Q7.8        How do I make a bootable floppy ?
 Q7.9        How do I remap my keyboard to UK, French, etc. ?
 Q7.10       How do I get NUM LOCK to default to on ?
 Q7.11       How can I have more than 128Mb of swap ?

 Section 8.  Miscellaneous information and questions answered
 Q8.1        How do I program XYZ under Linux ?
 Q8.2        What's all this about ELF ?
 Q8.3        What is a .gz file ? And a .tgz ? And ... ?
 Q8.4        What does VFS stand for ?
 Q8.5        What is a BogoMip ?
 Q8.6        What is the Linux Journal and where can I get it ?
 Q8.7        How many people use Linux ?
 Q8.8        How should I pronounce Linux ?

 Section 9.  Frequently encountered error messages
 Q9.1        Unknown terminal type linux and similar
 Q9.2        During linking I get Undefined symbol _mcount
 Q9.3        lp1 on fire
 Q9.4        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q9.5        ld: unrecognized option '-m486'
 Q9.6        GCC says Internal compiler error
 Q9.7        make says Error 139
 Q9.8        shell-init: permission denied when I log in.
 Q9.9        No utmp entry.  You must exec ... when I log in.
 Q9.10       Warning - bdflush not running
 Q9.11       Warning: obsolete routing request made.
 Q9.12       EXT2-fs: warning: mounting unchecked filesystem
 Q9.13       EXT2-fs warning: maximal count reached
 Q9.14       EXT2-fs warning: checktime reached
 Q9.15       df says Cannot read table of mounted filesystems
 Q9.16       fdisk says Partition X has different physical/logical ...
 Q9.17       fdisk: Partition 1 does not start on cylinder boundary
 Q9.18       fdisk says partition n has an odd number of sectors
 Q9.19       mtools says cannot initialise drive XYZ
 Q9.20       At the start of booting: Memory tight
 Q9.21       You don't exist. Go away.

 Section 10. The X Window System
 Q10.1       Does Linux support X Windows ?
 Q10.2       Where can I get an XF86Config for my system ?
 Q10.3       xterm logins show up strangely in who, finger
 Q10.4       I can't get X Windows to work right.

 Section 11. Questions applicable to very out-of-date software
 Q11.1       Emacs just dumps core.
 Q11.2       fdisk says cannot use nnn sectors of this partition
 Q11.3       GCC sometimes uses huge amounts of virtual memory and thrashes
 Q11.4       My keyboard goes all funny after I switch VC's.

 Section 12. How to get further assistance
 Q12.1       You still haven't answered my question !
 Q12.2       What to put in a request for help
 Q12.3       I want to mail someone about my problem.

 Section 13. Administrative information and acknowledgements
 Q13.1       Feedback is invited
 Q13.2       Formats in which this FAQ is available
 Q13.3       Authorship and acknowledgements
 Q13.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.  It aims
towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It runs mainly on 386/486/586-based PCs, using the hardware facilities of
the 386 processor family (TSS segments et al) to implement these features.
Ports to other architectures are underway [Q1.4 `What ports to other
processors are there ?'].

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

The Linux kernel is distributed under the GNU General Public License - see
Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.  I'm told that it can now run Windows 3.1 in Enhanced
Mode.

An iBCS2 (Intel Binary Compatibility Standard) emulator for SVR4 ELF and
SVR3.2 COFF binaries is at a fairly advanced stage of development.  See
the file /pub/linux/BETA/ibcs2/README on tsx-11.mit.edu.

Work is progressing on an emulator for Microsoft Windows binaries [Q3.6
`Can I run Microsoft Windows programs under Linux ?']; alternatively, I'm
told that the DOS emulator team have been having some success getting MS
Windows to run inside dosemu - there will be an announcement if and when
they get it working.

For more information see the INFO-SHEET, which is one of the the HOWTOs
[Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
Q5.1 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM (4Mb to install most
distributions, and 8Mb is highly recommended for running X) and a hard
disk are required.

VESA local bus and PCI are both supported.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux runs on 386 family based laptops, with X on most of them.  There is
a relevant Web page at
http://www.cs.utexas.edu/users/kharker/linux-laptop/.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

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.  See
http://www.linux.org.uk/Linux8086.html for more information.  Linux will
never run fully on an 8086 or '286, because it requires task-switching and
memory management facilities not found on these processors.

Recent versions of Linux (1.3.35 and later) do support multiprocessor
machines, though this is still rather less stable than one would hope.

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

Question 1.4.  What ports to other processors are there ?

A project has been underway for a while to port Linux to suitable
68000-series based systems such as Amigas and Ataris.  This has now
reached beta test quality and there is an X server.  There is a
linux-680x0 mailing list [Q2.8 `What mailing lists are there ?'], and a
Linux/68K FAQ at
http://pfah.informatik.uni-kl.de:8000/pers/jmayer/linux68k-faq and on
tsx-11.mit.edu in /pub/linux/680x0/FAQ; further information is at
http://www-users.informatik.rwth-aachen.de/~hn/linux68k.html.  There is a
mailing list for the Atari port - mail <majordomo@phil.uni-sb.de> with a
body containing only subscribe atarix - and an ftp area on
ftp.phil.uni-sb.de in /pub/atari/linux.

There used to be a project to port Linux too 68K-based Macintoshes, but
its FTP site disappeared recently and the project appears to be dead.

There is a port to the PowerPC.  As of the 7th of July it is rather
fragmentary and cannot recompile itself, and only supports Motorola 1603
boards.  Work on Motorola Ultra, PowerStack, RS/6000 and NuBus machines
continues.  If you wish to contribute to the project join the linux-ppc
mailing list [Q2.8 `What mailing lists are there ?'].  There is a FAQ on
liber.stanford.edu in /pub/linuxppc/linux-ppc-FAQ or on the WWW at
http://liber.stanford.edu/linuxppc/linux-ppc-FAQ.html.

Apple and the OSF are working on a PowerPC port of Linux based on the OSF
Mach microkernel. See http://mklinux.apple.com/.

There is a port to the 64-bit DEC Alpha/AXP.  See
http://www.azstarnet.com/~axplinux/.  Again, there is a mailing list at
vger.rutgers.edu.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
also a MIPS channel on the Linux Activists mailserver and a linux-mips
mailing list [Q2.8 `What mailing lists are there ?'].  Interested people
may mail their questions and offers of assistance to
<linux@waldorf-gmbh.de>.

There are currently two ports of Linux to the ARM family of processors
ongoing; one of these is to the ARM3 as fitted to the Acorn A5000, and
includes I/O drivers for the 82710/11 as appropriate, and the other is to
the ARM610 as fitted to 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 fairly soon.  For more up to date information watch the
newsgroup comp.sys.acorn.misc, or look on the WWW at
http://whirligig.ecs.soton.ac.uk/~rmk92/armlinux.html; if you want to
volunteer you should contact Martin Ebourne <mje@soton.ac.uk>.

David Miller is working on a port to the Sparc.  It is at a very early
stage; people who are willing to dedicate lots of time and have access to
Sparc boxes for testing should get in touch with <davem@caip.rutgers.edu>.

None of the above ports will be capable of running Linux/386 binaries.

Linux port to the Aleph One 486 card (*not* the second processor card for
the Risc PC yet, but the original PC-on-a-podule card) has been completed
and appears stable.  Full details on this version, and updates on general
ports in progress, can be found on the WWW at
http://www.ph.kcl.ac.uk/~amb/linux.html.

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

Question 1.5.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  Installating almost all of Debian 0.93R6 takes around 500Mb,
including some space for user files and spool areas.

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

Question 1.6.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.  This is not the same as Public Domain (see the Copyright
FAQ, available on rtfm.mit.edu in
/pub/usenet/news.answers/law/Copyright-FAQ, for details).

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The licences 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What mailing lists are there ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
material by FTP ?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, or on the Web at
http://sunsite.unc.edu/mdw/HOWTO/HOWTO-INDEX.html but here is a (possibly
incomplete) list:

     Linux INFO-SHEET                        Linux META-FAQ
     Bootdisk HOWTO                          Busmouse HOWTO
     CDROM HOWTO                             Commercial HOWTO
     Cyrillic HOWTO                          DOSEMU HOWTO
     Danish HOWTO                            Distribution HOWTO
     ELF HOWTO                               Ethernet HOWTO
     Firewall HOWTO                          Ftape HOWTO
     German HOWTO                            HAM HOWTO
     Hardware HOWTO                          Installation HOWTO
     JE HOWTO                                Kernel HOWTO
     MGR HOWTO                               Electronic Mail HOWTO
     NET-2 HOWTO                             NIS HOWTO
     News HOWTO                              PCI-HOWTO
     PCMCIA HOWTO                            PPP HOWTO
     Printing HOWTO                          SCSI HOWTO
     SCSI Programming HOWTO                  Serial HOWTO
     Sound HOWTO                             Term HOWTO
     Tips HOWTO                              UPS HOWTO
     UUCP HOWTO                              XFree86 HOWTO
More of these documents are always in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also several mini-HOWTOs on sunsite.unc.edu in the
/pub/Linux/docs/HOWTO/mini directory.

The file WRITING contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Greg Hankins, <gregh@cc.gatech.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are ten international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@news.ornl.gov.

comp.os.linux.answers contains all the FAQs, HOWTOs and other important
documentation.  You should subscribe to this too.

Also worth reading are the other groups in the comp.os.linux.* hierarchy
- -- you may find that many common problems are too recent to find in this
FAQ but are answered in the newsgroups.  These groups are
comp.os.linux.setup, comp.os.linux.hardware, comp.os.linux.networking,
comp.os.linux.x, comp.os.linux.development.apps,
comp.os.linux.development.system, comp.os.linux.advocacy and
comp.os.linux.misc.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q12.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup -- see `Welcome to
the comp.os.linux.* hierarchy' which is posted every two weeks to
comp.os.linux.announce, comp.os.linux.answers and other groups.

Crossposting between different comp.os.linux.* groups is rarely a good
idea.

There may well be Linux groups local to your institution or area - check
there first.

The groups comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.help were superseded in a recent newsgroup reorganisation.
You should no longer use them.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
The German one is de.comp.os.linux.  In Australia, try
aus.computers.linux.  In Croatia there is the moderated group
hr.comp.linux.m.  In Italy, it.comp.linux.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including
Debian, Red Hat and Slackware.  Each contains the software you need to run
Linux, ready to install and use.  The exact details of which software is
included and how to install them vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  Red Hat and Debian are both more recent and less
buggy, and have more sophisticated installation schemes, but they are less
widely used and don't contain quite as wide a range of software.

All of those releases are available via anonymous FTP from various Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
also a large number of other releases which are distributed less globally,
which suit special local and national requirements (for example, better
internationalisation support).

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux

The best place to get the Linux kernel is on ftp.cs.helsinki.fi in
/pub/Software/Linux/Kernel; Linus Torvalds uploads the most recent kernel
versions to this site.

The Debian distribution is available at ftp.debian.org and the Red Hat
distribution at ftp.redhat.com.

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

* src.doc.ic.ac.uk : /packages/Linux (UK)
* sunacm.swan.ac.uk : /pub/Linux (UK)
* ftp.ibp.fr : /pub/linux (France)
* ftp.cc.gatech.edu : /pub/linux (US - southeast: Suranet)
* wuarchive.wustl.edu : /systems/linux (US)
* uiarchive.cso.uiuc.edu : /pub/systems/linux (US)
* ftp.cdrom.com : /pub/linux (US)
* ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
* ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
* ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
* ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
* bond.edu.au : /pub/OS/Linux (Australia)
* ftp.cc.monash.edu.au : /pub/linux (Australia)
* ftp.dstc.edu.au : /pub/Linux (Australia: Queensland)
* ftp.sun.ac.za : /pub/linux (South Africa)
* ftp.inf.utfsm.cl : /pub/Linux (Chile)
* ftp.zel.fer.hr : /pub/Linux (Croatia)

Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

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

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

A digest of comp.os.linux.announce is available by mailing the word
subscribe as the body of a message to
<linux-announce-REQUEST@news-digests.mit.edu>.  You are strongly advised
to subscribe to this list, as it carries important information and
documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What mailing lists are there ?

The Linux developers now mainly use the Majordomo server at
<majordomo@vger.rutgers.edu>.  Send a message with lists in the body to
get a list of the lists there; add a line with help to get the standard
Majordomo help file which has instructions for subscribing and
unsubscribing.

Note that most of these lists are used by the developers of Linux to talk
about technical issues and future developments.  These are not intended
for new users' questions.

There is a linux-newbie list where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel.  It does have very low volume.

There used to be a multi-channel Linux mailing list server on
niksula.hut.fi.  This shut down during the summer of 1995.

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

Question 2.9.  Are the newsgroups archived anywhere ?

sunsite.unc.edu contains archives of comp.os.linux.announce, in
/pub/Linux/docs/linux-announce.archive.  These are mirrored from /usenet
on src.doc.ic.ac.uk.

There is an `easy to access' archive of comp.os.linux.announce on the
World Wide Web at http://www.leo.org/archiv/linux/archiv/ann_index.html.
It supports searching and browsing.

I do not know of any (current) archives of the other groups in the
comp.os.linux hierarchy.

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Win95 ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Win95 ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.  Note, however, that many of these
other operating systems are rather cranky: DOS FDISK and FORMAT can
sometimes 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 them from doing this it is
a good idea to zero out under Linux the start of a partition you've just
created, before you use MSDOS or whatever to format it.  Type:
   dd if=/dev/zero of=/dev/hdXY bs=512 count=1
where hdXY is the relevant partition, eg, 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 filesystem type built into the kernel or
mtools.  There is an alpha version of kernel support for the VFAT
filesystem used by Windows 95 and Windows NT; it is available from
mm-ftp.cs.berkeley.edu in /pub/multimedia/linux/vfat/vfat-0.3.0.tgz.  This
was integrated into the standard kernel in version 1.3.60.

See Q1.2 `What software does it support ?' for details and status of the
emulators for DOS, MS Windows and System V programs.

See also Q3.5 `Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems
?'.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.5 `Where can I get Linux material by FTP
?'.

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.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not very easily.  You can access them from within the DOS emulator [Q1.2
`What software does it support ?'], but it's harder to do as a normal
filesystem under Linux or using mtools.  There is a module available for
the Linux kernel which can do read-only access of the compressed volume.
Look on sunsite.unc.edu in /pub/Linux/system/Filesystems, for the ths
package.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is a primitive, alpha test read-only Amiga filesystem
on sunsite.unc.edu in /pub/Linux/patches/amigaffs.tar.Z.  More information
is in affs-readme in the tarfile.

Recent kernels contain support for the UFS filesystem used by System V,
Coherent and Xenix.

There is alpha kernel support, readonly for the moment, for the 4.2BSD
UFS, on sunsite.unc.edu in /pub/Linux/ALPHA/ufs.

There is a set of user-level programs that provides read-only access to
the Macintosh hierarchical filing system (HFS). It is available on
sunsite.unc.edu in /pub/Linux/utils/disk-management/hfs0_36.tgz.  This is
being turned into a kernel module, which is available on sunsite.

A suite of programs called Samba provide support for Windows for
Workgroups networked filesystems (provided it's configured to use TCP/IP).
Information is available at http://lake.canberra.edu.au/samba/samba.html.
There is alpha kernel support for mounting such filesystems, on
sunsite.unc.edu in /pub/Linux/ALPHA/smbfs.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. 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.)

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@yggdrasil.com>.
It is available on sunsite.unc.edu in
/pub/Linux/docs/HOWTO/mini/Swap-Space.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I get Linux to work with my large disk ?
 Q4.2        How can I undelete files ?
 Q4.3        Is there a defragmenter for ext2fs etc. ?
 Q4.4        How do I format and create a filesystem on a floppy ?
 Q4.5        I get nasty messages about inodes, blocks, and the suchlike
 Q4.6        My swap area isn't working.
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       My root filesystem is read-only !
 Q4.12       I have a huge /proc/kcore !  Can I delete it ?
 Q4.13       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I get Linux to work with my large disk ?

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' cylinders/heads/sectors fiction to support DOS.

DOS 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.

I'd recommend creating at least one Linux partition entirely under the
1024-logical-cylinder limit and booting off that; the other partitions
will then be OK.

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

Question 4.2.  How can I undelete files ?

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

There are a number of packages available that work by providing new
commands for deletion and sometimes copying that move deleted files into a
`wastebasket' directory instead; they can then be recovered until cleaned
out automatically by background processing.

Alternatively you can search the raw disk device which holds the
filesystem in question.  This is hard work, and you will need to be root
to do this.

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

Question 4.3.  Is there a defragmenter for ext2fs etc. ?

Yes.  There is a Linux filesystem defragmenter for ext2, minix and
old-style ext filesystems available on sunsite.unc.edu in
system/Filesystems/defrag-0.6.tar.gz.

Users of the ext2 filesystem can probably do without defrag since ext2
contains extra code to keep fragmentation reduced even in very full
filesystems.

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

Question 4.4.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  You may have to run mke2fs directly
instead of mkfs -t ext2.  The -m 0 option tells mkfs.ext2 not to reserve
any space on the disk for the superuser --- usually the last 10% is
reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.5.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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
filesystem; if you're unlucky the filesystem is trashed and you'll have to
reinitialise it with mkfs (or mke2fs, mkxfs etc.) it and restore from a
backup.

NB: don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.6.  My swap area isn't working.

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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.7.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR (which is not
documented).  This will restore a standard MS-DOS Master Boot Record.  If
you have DR-DOS 6.0, go into FDISK in the normal way and then select the
`Re-write Master Boot Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.8.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.9.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a program called Zlibc which allows existing applications to read
compressed (GNU zipped) files as if they were not compressed.  After
installing it you can compress files using gzip and programs will still
find them, without having to change the programs.  Look on sunsite.unc.edu
in /pub/Linux/libs.  The author is <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/kernel/patches/diskdrives; the author is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.10.  My ext2fs partitions are checked each time I reboot.

See Q9.12 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.11.  My root filesystem is read-only !

Remount it.  If /etc/fstab is correct you can simply mount -n -o remount
/. If /etc/fstab is wrong you must give the device name and posibly the
type too: e.g. mount -n -o remount -t ext2 /dev/hda2 /.  To understand why
you got into this state see Q9.12 `EXT2-fs: warning: mounting unchecked
filesystem'.

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

Question 4.12.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.13.  My AHA1542C doesn't work with Linux.

The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS 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.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        How do I port XXX to Linux ?
 Q5.2        What is ld.so and where do I get it ?
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        My executables are (very) large.
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

Please see also the Linux GCC-FAQ, available in HTML format by FTP from
www.mrc-apu.cam.ac.uk in /pub/linux/GCC-FAQ.html.

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

Question 5.1.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.2.  What is ld.so and where do I get it ?

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.

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

/lib/ld-linux.so.1 is the same thing for ELF [Q8.2 `What's all this about
ELF ?'], and comes in the same package as the a.out loader.

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

Question 5.3.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sites.  A search engine is
available on the WWW at http://www.boutell.com/lsm/.

Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
first --- search the find-ls or INDEX files for appropriate strings.
Check the Linux Projects Map (LPM), on ftp.ix.de in
/pub/Linux/docs/Projects-Map.gz.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.1 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup comp.os.linux.development.apps.

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

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes, unless it's the kernel.

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

However, from version 1.3.35 the kernel will use 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 overriden 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 optimisation well
for the 586, but it is quite unreliable, especially at high optimisation
settings.  The Pentium GCC can be found on tsx-11.mit.edu in
/pub/linux/ALPHA/pentium-gcc.  I'd recommend using the ordinary 486 GCC
instead; word has it that using -m386 produces code that's better for the
Pentium, or at least slightly smaller.

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

Question 5.5.  What does gcc -O6 do ?

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

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

Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q7.6 `How do I
upgrade/recompile my 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 /usr/include/asm

Nowadays /usr/src/linux/include/asm is a symbolic link to an
architecture-specific asm-<arch> directory - if you have a freshly
unpacked kernel source tree you must use make symlinks.  You'll also find
that you may need to do make config in a newly-unpacked kernel source
tree, to create <linux/autoconf.h>.

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

Question 5.7.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're patching to a kernel more recent than 1.1.44 you should find
that there are new directories /usr/src/linux/include/asm-i386.  The
directory asm there should be removed.  The symlinks Makefile target will
make these be symbolic links to asm-i36 and arch/i386/boot respectively.
The easiest way to make sure all this gets done is not to try to patch
1.1.44 to make 1.1.45, but to download linux-1.1.45.tar.gz instead.

ld: unrecognised option `-qmagic' means you should get a newer linker,
from tsx-11.mit.edu in /pub/linux/packages/GCC, in the file
binutils-2.6.0.2.bin.tar.gz.

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

Question 5.8.  How do I make a shared library ?

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, in
/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.

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

Question 5.9.  My executables are (very) large.

With an ELF compiler (see Q8.2 `What's all this about ELF ?') 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 (see Q8.2 `What's all this about ELF ?') 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 linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (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.

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

Question 5.10.  Does Linux support threads or lightweight processes ?

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, most of which are
generic packages for any Unix:

* In sipb.mit.edu:/pub/pthread or 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 libcs contain the pthreads source; the GNU Ada compiler on
  sunsite.unc.edu in /pub/Linux/devel/lang/ada/gnat-3.01-linux+elf.tar.gz
  contains binaries made from that source code.
* In 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 as /tr/1993/05/UW-CSE-93-05-06.PS.Z.
* In gummo.doc.ic.ac.uk:/rex is lwp, a very minimal implementation.
* In 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.

Kernel version 1.3.35 contains some support for kernel threads, but this
code has not been well-tested.

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

Question 5.11.  Where can I get `lint' for Linux ?

Roughly equivalent functionality is built into the GNU C compiler (gcc)
which is used by Linux systems.  Use the -Wall option to turn on most of
the useful extra warnings.  Check the GCC manual for more details (type
control-h followed by 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 on larch.lcs.mit.edu in /pub/Larch/lclint; on the World Wide
Web look at http://larch-www.lcs.mit.edu:8001/larch/lclint.html.

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

Question 5.12.  Where can I find `kermit' for Linux ?

Kermit has a restrictive copyright which has forced most distribution
maintainers to remove it, or to move the package containing it into an
obscure directory.

The source code is available on kermit.columbia.edu in
/kermit/archives/cku190.tar.gz; Linux binaries are available in
/kermit/bin/ckuker.linux and /kermit/bin/ckuker.linuxtcp.

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i

iQCVAwUBMT4Z6sMWjroj9a3bAQHJ1wQAyoUP0iyXdpJvji41SPLmvz4+/InafbV9
M6opmJykiThxMr3DNUuXQWfXhrYqmU03ZZ2W9Els9/SkBQeKixIe1LzSs7xa44SX
4N5p8qXQksGkVi5glTtgEpROGLAa/2CdJQpk+VJy2+HPYlDzAbgJTB0WSCSxPle6
Ub5fNEBEjbM=
=cLwK
-----END PGP SIGNATURE-----
-- 
Ian Jackson, at home.   ian@chiark.chu.cam.ac.uk           + 44 1223 3 31579
General: ijackson@chiark.chu.cam.ac.uk    Permanent: ijackson@gnu.ai.mit.edu
Churchill College, Cambridge, CB3 0DS.   http://www.cl.cam.ac.uk/users/iwj10/



^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1996-02-08  5:00 Ian Jackson
  1996-02-09  5:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1996-02-08  5:00 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 08 Feb 1996

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q12.1 `You still
haven't answered my question !', before posting your question to a
newsgroup.

See Q13.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What mailing lists are there ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I get Linux to work with my large disk ?
 Q4.2        How can I undelete files ?
 Q4.3        Is there a defragmenter for ext2fs etc. ?
 Q4.4        How do I format and create a filesystem on a floppy ?
 Q4.5        I get nasty messages about inodes, blocks, and the suchlike
 Q4.6        My swap area isn't working.
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       My root filesystem is read-only !
 Q4.12       I have a huge /proc/kcore !  Can I delete it ?
 Q4.13       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        How do I port XXX to Linux ?
 Q5.2        What is ld.so and where do I get it ?
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        My executables are (very) large.
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

 Section 6.  Solutions to common miscellaneous problems
 Q6.1        My clock is very wrong.
 Q6.2        Setuid scripts don't seem to work.
 Q6.3        Free memory as reported by free keeps shrinking.
 Q6.4        When I add more memory it slows to a crawl.
 Q6.5        Some programs (e.g. xdm) won't let me log in.
 Q6.6        Some programs let me log in with no password.
 Q6.7        My machine runs very slowly when I run GCC / X / ...
 Q6.8        I can only log in as root.
 Q6.9        My screen is all full of weird characters instead of letters.
 Q6.10       I have screwed up my system and can't log in to fix it.
 Q6.11       I've discovered a huge security hole in rm !
 Q6.12       lpr and/or lpd aren't working.
 Q6.13       Timestamps on files on msdos partitions are set incorrectly.
 Q6.14       How do I get LILO to boot the vmlinux file ?

 Section 7.  How do I do this or find out that ... ?
 Q7.1        How can I get scrollback in text mode ?
 Q7.2        How do I switch virtual consoles ?  How do I enable them ?
 Q7.3        How do I set the timezone ?
 Q7.4        What version of Linux and what machine name am I using ?
 Q7.5        How can I enable or disable core dumps ?
 Q7.6        How do I upgrade/recompile my kernel ?
 Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
 Q7.8        How do I make a bootable floppy ?
 Q7.9        How do I remap my keyboard to UK, French, etc. ?
 Q7.10       How do I get NUM LOCK to default to on ?
 Q7.11       How can I have more than 128Mb of swap ?

 Section 8.  Miscellaneous information and questions answered
 Q8.1        How do I program XYZ under Linux ?
 Q8.2        What's all this about ELF ?
 Q8.3        What is a .gz file ? And a .tgz ? And ... ?
 Q8.4        What does VFS stand for ?
 Q8.5        What is a BogoMip ?
 Q8.6        What is the Linux Journal and where can I get it ?
 Q8.7        How many people use Linux ?
 Q8.8        How should I pronounce Linux ?

 Section 9.  Frequently encountered error messages
 Q9.1        Unknown terminal type linux and similar
 Q9.2        During linking I get Undefined symbol _mcount
 Q9.3        lp1 on fire
 Q9.4        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q9.5        ld: unrecognized option '-m486'
 Q9.6        GCC says Internal compiler error
 Q9.7        make says Error 139
 Q9.8        shell-init: permission denied when I log in.
 Q9.9        No utmp entry.  You must exec ... when I log in.
 Q9.10       Warning - bdflush not running
 Q9.11       Warning: obsolete routing request made.
 Q9.12       EXT2-fs: warning: mounting unchecked filesystem
 Q9.13       EXT2-fs warning: maximal count reached
 Q9.14       EXT2-fs warning: checktime reached
 Q9.15       df says Cannot read table of mounted filesystems
 Q9.16       fdisk says Partition X has different physical/logical ...
 Q9.17       fdisk: Partition 1 does not start on cylinder boundary
 Q9.18       fdisk says partition n has an odd number of sectors
 Q9.19       mtools says cannot initialise drive XYZ
 Q9.20       At the start of booting: Memory tight
 Q9.21       You don't exist. Go away.

 Section 10. The X Window System
 Q10.1       Does Linux support X Windows ?
 Q10.2       Where can I get an XF86Config for my system ?
 Q10.3       xterm logins show up strangely in who, finger
 Q10.4       I can't get X Windows to work right.

 Section 11. Questions applicable to very out-of-date software
 Q11.1       Emacs just dumps core.
 Q11.2       fdisk says cannot use nnn sectors of this partition
 Q11.3       GCC sometimes uses huge amounts of virtual memory and thrashes
 Q11.4       My keyboard goes all funny after I switch VC's.

 Section 12. How to get further assistance
 Q12.1       You still haven't answered my question !
 Q12.2       What to put in a request for help
 Q12.3       I want to mail someone about my problem.

 Section 13. Administrative information and acknowledgements
 Q13.1       Feedback is invited
 Q13.2       Formats in which this FAQ is available
 Q13.3       Authorship and acknowledgements
 Q13.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.  It aims
towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It runs mainly on 386/486/586-based PCs, using the hardware facilities of
the 386 processor family (TSS segments et al) to implement these features.
Ports to other architectures are underway [Q1.4 `What ports to other
processors are there ?'].

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

The Linux kernel is distributed under the GNU General Public License - see
Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

An iBCS2 (Intel Binary Compatibility Standard) emulator for SVR4 ELF and
SVR3.2 COFF binaries is at a fairly advanced stage of development.  See
the file /pub/linux/BETA/ibcs2/README on tsx-11.mit.edu.

Work is progressing on an emulator for Microsoft Windows binaries [Q3.6
`Can I run Microsoft Windows programs under Linux ?']; alternatively, I'm
told that the DOS emulator team have been having some success getting MS
Windows to run inside dosemu - there will be an announcement if and when
they get it working.

For more information see the INFO-SHEET, which is one of the the HOWTOs
[Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
Q5.1 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM (4Mb to install most
distributions, and 8Mb is highly recommended for running X) and a hard
disk are required.

VESA local bus and PCI are both supported.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux runs on 386 family based laptops, with X on most of them.  There is
a relevant Web page at
http://www.cs.utexas.edu/users/kharker/linux-laptop/.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

Linux will never run on a 286, because it requires task-switching and
memory management facilities not found on 286 processors.

Linux does not currently support multiprocessor machines, though some
experienced developers are working on the problem.

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

Question 1.4.  What ports to other processors are there ?

A project has been underway for a while to port Linux to suitable
68000-series based systems such as Amigas and Ataris.  This has now
reached beta test quality and there is an X server.  There is a
linux-680x0 mailing list [Q2.8 `What mailing lists are there ?'], and a
Linux/68K FAQ at
http://pfah.informatik.uni-kl.de:8000/pers/jmayer/linux68k-faq and on
tsx-11.mit.edu in /pub/linux/680x0/FAQ; further information is at
http://www-users.informatik.rwth-aachen.de/~hn/linux68k.html.  There is a
mailing list for the Atari port - mail <majordomo@phil.uni-sb.de> with a
body containing only subscribe atarix - and an ftp area on
ftp.phil.uni-sb.de in /pub/atari/linux.

There used to be a project to port Linux too 68K-based Macintoshes, but
its FTP site disappeared recently and the project appears to be dead.

There is a port to the PowerPC.  As of the 7th of July it is rather
fragmentary and cannot recompile itself, and only supports Motorola 1603
boards.  Work on Motorola Ultra, PowerStack, RS/6000 and NuBus machines
continues.  If you wish to contribute to the project join the linux-ppc
mailing list [Q2.8 `What mailing lists are there ?'].  There is a FAQ on
liber.stanford.edu in /pub/linuxppc/linux-ppc-FAQ or on the WWW at
http://liber.stanford.edu/linuxppc/linux-ppc-FAQ.html.

There is a port to the 64-bit DEC Alpha/AXP.  See
http://www.azstarnet.com/~axplinux/FAQ.html.  Again, there is a mailing
list at vger.rutgers.edu.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
also a MIPS channel on the Linux Activists mailserver and a linux-mips
mailing list [Q2.8 `What mailing lists are there ?'].  Interested people
may mail their questions and offers of assistance to
<linux@waldorf-gmbh.de>.

There are currently two ports of Linux to the ARM family of processors
ongoing; one of these is to the ARM3 as fitted to the Acorn A5000, and
includes I/O drivers for the 82710/11 as appropriate, and the other is to
the ARM610 as fitted to 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 fairly soon.  For more up to date information watch the
newsgroup comp.sys.acorn.misc, or look on the WWW at
http://whirligig.ecs.soton.ac.uk/~rmk92/armlinux.html; if you want to
volunteer you should contact Martin Ebourne <mje@soton.ac.uk>.

David Miller is working on a port to the Sparc.  It is at a very early
stage; people who are willing to dedicate lots of time and have access to
Sparc boxes for testing should get in touch with <davem@caip.rutgers.edu>.

None of the above ports will be capable of running Linux/386 binaries.

Linux port to the Aleph 1 486 card (*not* the second processor card for
the Risc PC yet, but the original PC-on-a-podule card) has been completed
and appears stable.  Full details on this version, and updates on general
ports in progress, can be found on the WWW at
http://www.ph.kcl.ac.uk/~amb/linux.html.

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

Question 1.5.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
including some space for user files and spool areas.

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

Question 1.6.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.  This is not the same as Public Domain (see the Copyright
FAQ, available on rtfm.mit.edu in
/pub/usenet/news.answers/law/Copyright-FAQ, for details).

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The licences 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What mailing lists are there ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
material by FTP ?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, or on the Web at
http://sunsite.unc.edu/mdw/HOWTO/HOWTO-INDEX.html but here is a (possibly
incomplete) list:

     Linux INFO-SHEET                        Linux META-FAQ
     Bootdisk HOWTO                          Busmouse HOWTO
     CDROM HOWTO                             Commercial HOWTO
     Cyrillic HOWTO                          DOSEMU HOWTO
     Danish HOWTO                            Distribution HOWTO
     ELF HOWTO                               Ethernet HOWTO
     Firewall HOWTO                          Ftape HOWTO
     German HOWTO                            HAM HOWTO
     Hardware HOWTO                          Installation HOWTO
     JE HOWTO                                Kernel HOWTO
     MGR HOWTO                               Electronic Mail HOWTO
     NET-2 HOWTO                             NIS HOWTO
     News HOWTO                              PCI-HOWTO
     PCMCIA HOWTO                            PPP HOWTO
     Printing HOWTO                          SCSI HOWTO
     SCSI Programming HOWTO                  Serial HOWTO
     Sound HOWTO                             Term HOWTO
     Tips HOWTO                              UPS HOWTO
     UUCP HOWTO                              XFree86 HOWTO
More of these documents are always in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also several mini-HOWTOs on sunsite.unc.edu in the
/pub/Linux/docs/HOWTO/mini directory.

The file WRITING contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Greg Hankins, <gregh@cc.gatech.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are ten international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@news.ornl.gov.

comp.os.linux.answers contains all the FAQs, HOWTOs and other important
documentation.  You should subscribe to this too.

Also worth reading are the other groups in the comp.os.linux.* hierarchy
- -- you may find that many common problems are too recent to find in this
FAQ but are answered in the newsgroups.  These groups are
comp.os.linux.setup, comp.os.linux.hardware, comp.os.linux.networking,
comp.os.linux.x, comp.os.linux.development.apps,
comp.os.linux.development.system, comp.os.linux.advocacy and
comp.os.linux.misc.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q12.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup -- see `Welcome to
the comp.os.linux.* hierarchy' which is posted every two weeks to
comp.os.linux.announce, comp.os.linux.answers and other groups.

Crossposting between different comp.os.linux.* groups is rarely a good
idea.

There may well be Linux groups local to your institution or area - check
there first.

The groups comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.help were superseded in a recent newsgroup reorganisation.
You should no longer use them.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
The German one is de.comp.os.linux.  In Australia, try
aus.computers.linux.  In Croatia there is the moderated group
hr.comp.linux.m.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run Linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of those releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
also a large number of other releases which are distributed less globally,
which suit special local and national requirements (for example, better
internationalisation support).

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux

The MCC-Interim release is available from ftp.mcc.ac.uk (UK, 130.88.200.7)
in /pub/linux; the TAMU release is available from net.tamu.edu (US,
128.194.177.1) in /pub/linux.

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

* src.doc.ic.ac.uk : /packages/Linux (UK)
* sunacm.swan.ac.uk : /pub/Linux (UK)
* ftp.ibp.fr : /pub/linux (France)
* ftp.cc.gatech.edu : /pub/linux (US - southeast: Suranet)
* wuarchive.wustl.edu : /systems/linux (US)
* mrcnext.cso.uiuc.edu : /pub/linux (US)
* ftp.cdrom.com : /pub/linux (US)
* ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
* ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
* ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
* ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
* bond.edu.au : /pub/OS/Linux (Australia)
* ftp.cc.monash.edu.au : /pub/linux (Australia)
* ftp.dstc.edu.au : /pub/Linux (Australia: Queensland)
* ftp.sun.ac.za : /pub/linux (South Africa)
* ftp.inf.utfsm.cl : /pub/Linux (Chile)
* ftp.zel.fer.hr : /pub/Linux (Croatia)

Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

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

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

A digest of comp.os.linux.announce is available by mailing the word
subscribe as the body of a message to
<linux-announce-REQUEST@news-digests.mit.edu>.  You are strongly advised
to subscribe to this list, as it carries important information and
documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What mailing lists are there ?

The Linux developers now mainly use the Majordomo server at
<majordomo@vger.rutgers.edu>.  Send a message with lists in the body to
get a list of the lists there; add a line with help to get the standard
Majordomo help file which has instructions for subscribing and
unsubscribing.

Note that most of these lists are used by the developers of Linux to talk
about technical issues and future developments.  These are not intended
for new users' questions.

There is a linux-newbie list where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel.  It does have very low volume.

There used to be a multi-channel Linux mailing list server on
niksula.hut.fi.  This shut down during the summer of 1995.

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

Question 2.9.  Are the newsgroups archived anywhere ?

sunsite.unc.edu contains archives of comp.os.linux.announce, in
/pub/Linux/docs/linux-announce.archive.  These are mirrored from /usenet
on src.doc.ic.ac.uk.

There is an `easy to access' archive of comp.os.linux.announce on the
World Wide Web at http://www.leo.org/archiv/linux/archiv/ann_index.html.
It supports searching and browsing.

I do not know of any (current) archives of the other groups in the
comp.os.linux hierarchy.

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.  Note, however, that many of these
other operating systems are rather cranky: DOS FDISK and FORMAT can
sometimes overwrite data in a Linux partition because they sometimes
incorrectly use partition data from the partition's boot sector rather
than the partition table.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  There is an alpha version of kernel support for the VFAT
filesystem used by Windows 95 and Windows NT; it is available from
mm-ftp.cs.berkeley.edu in /pub/multimedia/linux/xmsdos/xmsdos-0.1.6.tgz.

See Q1.2 `What software does it support ?' for details and status of the
emulators for DOS, MS Windows and System V programs.

See also Q3.5 `Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems
?'.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.5 `Where can I get Linux material by FTP
?'.

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.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not very easily.  You can access them from within the DOS emulator [Q1.2
`What software does it support ?'], but it's harder to do as a normal
filesystem under Linux or using mtools.  There is a module available for
the Linux kernel which can do read-only access of the compressed volume.
Look on sunsite.unc.edu in /pub/Linux/system/Filesystems, for the ths
package.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is a primitive, alpha test read-only Amiga filesystem
on sunsite.unc.edu in /pub/Linux/patches/amigaffs.tar.Z.  More information
is in affs-readme in the tarfile.

Recent kernels contain support for the UFS filesystem used by System V,
Coherent and Xenix.

There is alpha kernel support, readonly for the moment, for the 4.2BSD
UFS, on sunsite.unc.edu in /pub/Linux/ALPHA/ufs.

There is a set of user-level programs that provides read-only access to
the Macintosh hierarchical filing system (HFS). It is available on
sunsite.unc.edu in /pub/Linux/utils/disk-management/hfs0_36.tgz.  This is
being turned into a kernel module, which is available on sunsite.

A suite of programs called Samba provide support for Windows for
Workgroups networked filesystems (provided it's configured to use TCP/IP).
Information is available at http://lake.canberra.edu.au/samba/samba.html.
There is alpha kernel support for mounting such filesystems, on
sunsite.unc.edu in /pub/Linux/ALPHA/smbfs.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. 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.)

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I get Linux to work with my large disk ?
 Q4.2        How can I undelete files ?
 Q4.3        Is there a defragmenter for ext2fs etc. ?
 Q4.4        How do I format and create a filesystem on a floppy ?
 Q4.5        I get nasty messages about inodes, blocks, and the suchlike
 Q4.6        My swap area isn't working.
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       My root filesystem is read-only !
 Q4.12       I have a huge /proc/kcore !  Can I delete it ?
 Q4.13       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I get Linux to work with my large disk ?

If your disk is an IDE or EIDE drive you should read the Large-IDE
mini-HOWTO.  Some controllers do translation between `physical'
cylinders/heads/sectors and `logical' ones.

SCSI disks are accessed by linear block numbers; the BIOS invents some
`logical' cylinders/heads/sectors fiction to support DOS.

DOS 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.

I'd recommend creating at least one Linux partition entirely under the
1024-logical-cylinder limit and booting off that; the other partitions
will then be OK.

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

Question 4.2.  How can I undelete files ?

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

There are a number of packages available that work by providing new
commands for deletion and sometimes copying that move deleted files into a
`wastebasket' directory instead; they can then be recovered until cleaned
out automatically by background processing.

Alternatively you can search the raw disk device which holds the
filesystem in question.  This is hard work, and you will need to be root
to do this.

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

Question 4.3.  Is there a defragmenter for ext2fs etc. ?

Yes.  There is a Linux filesystem defragmenter for minix, old-style ext,
ext2, and xia filesystems available on sunsite.unc.edu in
system/Filesystems/defrag-0.6.tar.gz.

Users of the ext2 filesystem can probably do without defrag since ext2
contains extra code to keep fragmentation reduced even in very full
filesystems.

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

Question 4.4.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  You may have to run mke2fs directly
instead of mkfs -t ext2.  The -m 0 option tells mkfs.ext2 not to reserve
any space on the disk for the superuser --- usually the last 10% is
reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.5.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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
filesystem; if you're unlucky the filesystem is trashed and you'll have to
reinitialise it with mkfs (or mke2fs, mkxfs etc.) it and restore from a
backup.

NB: don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.6.  My swap area isn't working.

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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.7.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR (which is not
documented).  This will restore a standard MS-DOS Master Boot Record.  If
you have DR-DOS 6.0, go into FDISK in the normal way and then select the
`Re-write Master Boot Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.8.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.9.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/kernel/patches/diskdrives; the author is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.10.  My ext2fs partitions are checked each time I reboot.

See Q9.12 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.11.  My root filesystem is read-only !

Remount it.  If /etc/fstab is correct you can simply mount -n -o remount
/. If /etc/fstab is wrong you must give the device name and posibly the
type too: e.g. mount -n -o remount -t ext2 /dev/hda2 /.  To understand why
you got into this state see Q9.12 `EXT2-fs: warning: mounting unchecked
filesystem'.

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

Question 4.12.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.13.  My AHA1542C doesn't work with Linux.

The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS 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.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        How do I port XXX to Linux ?
 Q5.2        What is ld.so and where do I get it ?
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        My executables are (very) large.
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

Please see also the Linux GCC-FAQ, available in HTML format by FTP from
www.mrc-apu.cam.ac.uk in /pub/linux/GCC-FAQ.html.

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

Question 5.1.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.2.  What is ld.so and where do I get it ?

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.

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

/lib/ld-linux.so.1 is the same thing for ELF [Q8.2 `What's all this about
ELF ?'], and comes in the same package as the a.out loader.

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

Question 5.3.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sites.  A search engine is
available on the WWW at http://siva.cshl.org/lsm/lsm.html.

Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
first --- search the find-ls or INDEX files for appropriate strings.
Check the Linux Projects Map (LPM), on ftp.ix.de in
/pub/Linux/docs/Projects-Map.gz.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.1 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup comp.os.linux.development.apps.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to <linux-announce@news.ornl.gov.edu>).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden 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 optimisation well
for the 586, but it is quite unreliable, especially at high optimisation
settings.  The Pentium GCC can be found on tsx-11.mit.edu in
/pub/linux/ALPHA/pentium-gcc.  I'd recommend using the ordinary 486 GCC
instead; word has it that using -m386 produces code that's better for the
Pentium, or at least slightly smaller.

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

Question 5.5.  What does gcc -O6 do ?

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

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

Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q7.6 `How do I
upgrade/recompile my 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 /usr/include/asm

Nowadays /usr/src/linux/include/asm is a symbolic link to an
architecture-specific asm-<arch> directory - if you have a freshly
unpacked kernel source tree you must use make symlinks.

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

Question 5.7.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're patching to a kernel more recent than 1.1.44 you should find
that there are new directories /usr/src/linux/include/asm-i386.  The
directory asm there should be removed.  The symlinks Makefile target will
make these be symbolic links to asm-i36 and arch/i386/boot respectively.
The easiest way to make sure all this gets done is not to try to patch
1.1.44 to make 1.1.45, but to download linux-1.1.45.tar.gz instead.

ld: unrecognised option `-qmagic' means you should get a newer linker,
from tsx-11.mit.edu in /pub/linux/packages/GCC, in the file
binutils-2.5.2l.17.bin.tar.gz.

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

Question 5.8.  How do I make a shared library ?

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, in
/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.

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

Question 5.9.  My executables are (very) large.

With an ELF compiler (see Q8.2 `What's all this about ELF ?') 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 (see Q8.2 `What's all this about ELF ?') 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 linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (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.

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

Question 5.10.  Does Linux support threads or lightweight processes ?

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, most of which are
generic packages for any Unix:

* In sipb.mit.edu:/pub/pthread or 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.
* In 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 as /tr/1993/05/UW-CSE-93-05-06.PS.Z.
* In gummo.doc.ic.ac.uk:/rex is lwp, a very minimal implementation.
* In 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 useable under
  Linux.

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

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

Question 5.11.  Where can I get `lint' for Linux ?

Roughly equivalent functionality is built into the GNU C compiler (gcc)
which is used by Linux systems.  Use the -Wall option to turn on most of
the useful extra warnings.  Check the GCC manual for more details (type
control-h followed by 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 on larch.lcs.mit.edu in /pub/Larch/lclint; on the World Wide
Web look at http://larch-www.lcs.mit.edu:8001/larch/lclint.html.

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

Question 5.12.  Where can I find `kermit' for Linux ?

Kermit has a restrictive copyright which has forced most distribution
maintainers to remove it, or to move the package containing it into an
obscure directory.

The source code is available on kermit.columbia.edu in
/kermit/archives/cku190.tar.gz; Linux binaries are available in
/kermit/bin/ckuker.linux and /kermit/bin/ckuker.linuxtcp.

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i

iQCVAwUBMRlx4cMWjroj9a3bAQFR0AQAsAD4hgNKmIt5j5T0+B75shFiV/CPONhX
vIff/dqhQ4vxUgQmV5PDqopePjKLli5cBnUAzbSLa9mjU0p0n7/03qmNjzyLPh+j
C+PZTL2OffYVTvrWi8W75xpQ9hdYgQydeDeeqMV2xmZ4/J/JR5u3Sf76LXaKw64y
+dZBun3HWw8=
=zhID
-----END PGP SIGNATURE-----
-- 
Ian Jackson   ijackson@chiark.chu.cam.ac.uk        These opinions are my own.
Cambridge University Computer Laboratory, New Museums Site. + 44 1223 3 34676
Home: ijackson@gnu.ai.mit.edu   Churchill College, CB3 0DS. + 44 1223 3 31579
PGP2 public key available.               http://www.cl.cam.ac.uk/users/iwj10/



^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1995-09-10  4:00 Ian Jackson
  1995-09-10  4:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1995-09-10  4:00 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 10 Sep 1995

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q12.1 `You still
haven't answered my question !', before posting your question to a
newsgroup.

See Q13.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's mailing lists are there ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I get Linux to work with my large disk ?
 Q4.2        How can I undelete files ?
 Q4.3        Is there a defragmenter for ext2fs etc. ?
 Q4.4        How do I format and create a filesystem on a floppy ?
 Q4.5        I get nasty messages about inodes, blocks, and the suchlike
 Q4.6        My swap area isn't working.
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       My root filesystem is read-only !
 Q4.12       I have a huge /proc/kcore !  Can I delete it ?
 Q4.13       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

 Section 6.  Solutions to common miscellaneous problems
 Q6.1        Setuid scripts don't seem to work.
 Q6.2        Free memory as reported by free keeps shrinking.
 Q6.3        When I add more memory it slows to a crawl.
 Q6.4        Some programs (e.g. xdm) won't let me log in.
 Q6.5        Some programs let me log in with no password.
 Q6.6        My machine runs very slowly when I run GCC / X / ...
 Q6.7        I can only log in as root.
 Q6.8        My screen is all full of weird characters instead of letters.
 Q6.9        I have screwed up my system and can't log in to fix it.
 Q6.10       Emacs just dumps core.
 Q6.11       I've discovered a huge security hole in rm !
 Q6.12       lpr and/or lpd aren't working.
 Q6.13       Timestamps on files on msdos partitions are set incorrectly.
 Q6.14       How do I get LILO to boot the vmlinux file ?

 Section 7.  How do I do this or find out that ... ?
 Q7.1        How can I get scrollback in text mode ?
 Q7.2        How do I switch virtual consoles ?  How do I enable them ?
 Q7.3        How do I set the timezone ?
 Q7.4        What version of Linux and what machine name am I using ?
 Q7.5        How can I enable or disable core dumps ?
 Q7.6        How do I upgrade/recompile my kernel ?
 Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
 Q7.8        How do I make a bootable floppy ?
 Q7.9        How do I remap my keyboard to UK, French, etc. ?
 Q7.10       How do I get NUM LOCK to default to on ?
 Q7.11       How can I have more than 128Mb of swap ?

 Section 8.  Miscellaneous information and questions answered
 Q8.1        What's all this about ELF ?
 Q8.2        What is a .gz file ? And a .tgz ? And ... ?
 Q8.3        What does VFS stand for ?
 Q8.4        What is a BogoMip ?
 Q8.5        What is the Linux Journal and where can I get it ?
 Q8.6        How many people use Linux ?
 Q8.7        How should I pronounce Linux ?

 Section 9.  Frequently encountered error messages
 Q9.1        Unknown terminal type linux and similar
 Q9.2        During linking I get Undefined symbol _mcount
 Q9.3        lp1 on fire
 Q9.4        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q9.5        ld: unrecognized option '-m486'
 Q9.6        GCC says Internal compiler error
 Q9.7        make says Error 139
 Q9.8        shell-init: permission denied when I log in.
 Q9.9        No utmp entry.  You must exec ... when I log in.
 Q9.10       Warning - bdflush not running
 Q9.11       Warning: obsolete routing request made.
 Q9.12       EXT2-fs: warning: mounting unchecked filesystem
 Q9.13       EXT2-fs warning: maximal count reached
 Q9.14       EXT2-fs warning: checktime reached
 Q9.15       df says Cannot read table of mounted filesystems
 Q9.16       fdisk says Partition X has different physical/logical ...
 Q9.17       fdisk: Partition 1 does not start on cylinder boundary
 Q9.18       fdisk says partition n has an odd number of sectors
 Q9.19       mtools says cannot initialise drive XYZ
 Q9.20       At the start of booting: Memory tight

 Section 10. The X Window System
 Q10.1       Does Linux support X Windows ?
 Q10.2       Where can I get an XF86Config for my system ?
 Q10.3       xterm logins show up strangely in who, finger
 Q10.4       I can't get X Windows to work right.

 Section 11. Questions applicable to very out-of-date software
 Q11.1       fdisk says cannot use nnn sectors of this partition
 Q11.2       GCC sometimes uses huge amounts of virtual memory and thrashes
 Q11.3       My keyboard goes all funny after I switch VC's.

 Section 12. How to get further assistance
 Q12.1       You still haven't answered my question !
 Q12.2       What to put in a request for help
 Q12.3       I want to mail someone about my problem.

 Section 13. Administrative information and acknowledgements
 Q13.1       Feedback is invited
 Q13.2       Formats in which this FAQ is available
 Q13.3       Authorship and acknowledgements
 Q13.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.  It aims
towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It runs mainly on 386/486/586-based PCs, using the hardware facilities of
the 386 processor family (TSS segments et al) to implement these features.
Ports to other architectures are underway [Q1.4 `What ports to other
processors are there ?'].

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

The Linux kernel is distributed under the GNU General Public License - see
Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

An iBCS2 (Intel Binary Compatibility Standard) emulator for SVR4 ELF and
SVR3.2 COFF binaries is at a fairly advanced stage of development.  See
the file /pub/linux/BETA/ibcs2/README on tsx-11.mit.edu.

Work is progressing on an emulator for Microsoft Windows binaries [Q3.6
`Can I run Microsoft Windows programs under Linux ?']; alternatively, I'm
told that the DOS emulator team have been having some success getting MS
Windows to run inside dosemu - there will be an announcement if and when
they get it working.

For more information see the INFO-SHEET, which is one of the the HOWTOs
[Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
Q5.3 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM and a hard disk are
required.

VESA local bus and PCI are both supported.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux is reported to run on 386 family based laptops, with X on most of
them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

Linux will never run on a 286, because it requires task-switching and
memory management facilities not found on 286 processors.

Linux does not currently support multiprocessor machines, though some
experienced developers are working on the problem.

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

Question 1.4.  What ports to other processors are there ?

A project has been underway for a while to port Linux to suitable
68000-series based systems such as Amigas and Ataris.  This has now
reached beta test quality and there is an X server.  There is a
linux-680x0 mailing list [Q2.8 `What's mailing lists are there ?'], and a
Linux/68K FAQ at
http://pfah.informatik.uni-kl.de:8000/pers/jmayer/linux68k-faq and on
tsx-11.mit.edu in /pub/linux/680x0/FAQ.gz; further information is at
http://www-users.informatik.rwth-aachen.de/~hn/linux68k.html.  There is a
mailing list for the Atari port - mail <majordomo@phil.uni-sb.de> with a
body containing only subscribe atarix - and an ftp area on
ftp.phil.uni-sb.de in /pub/atari/linux.

Information about a port to 68K-based Macintoshes can be found in the
MacLinux FAQ, available on www.ibg.uu.se in /pub/maclinux/FAQ.txt.  Other
stuff may be in the same directory.  There is a mailing list.  Rumour has
it that this project is dead.

There is a port to the PowerPC.  As of the 7th of July it is rather
fragmentary and cannot recompile itself, and only supports Motorola 1603
boards.  Work on Motorola Ultra, PowerStack, RS/6000 and NuBus machines
continues.  If you wish to contribute to the project join the linux-ppc
mailing list [Q2.8 `What's mailing lists are there ?'].  There is a FAQ on
liber.stanford.edu in /pub/linuxppc/linux-ppc-FAQ or on the WWW at
http://liber.stanford.edu/linuxppc/linux-ppc-FAQ.html.

Both Linus and Jim Paradis <paradis@sousa.amt.ako.dec.com> or
<jrp@world.std.com> are working on ports to the 64-bit DEC AXP (the
Alpha).  Again, there is a mailing list at vger.rutgers.edu.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
also a MIPS channel on the Linux Activists mailserver and a linux-mips
mailing list [Q2.8 `What's mailing lists are there ?'].  Interested people
may mail their questions and offers of assistance to
<linux@waldorf-gmbh.de>.

There are currently two ports of Linux to the ARM family of processors
ongoing; one of these is to the ARM3 as fitted to the Acorn A5000, and
includes I/O drivers for the 82710/11 as appropriate, and the other is to
the ARM610 as fitted to 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 fairly soon.  For more up to date information watch the
newsgroup comp.sys.acorn.misc, or look on the WWW at
http://whirligig.ecs.soton.ac.uk/~rmk92/armlinux.html; if you want to
volunteer you should contact Martin Ebourne <mje@soton.ac.uk>.

David Miller is working on a port to the Sparc.  It is at a very early
stage; people who are willing to dedicate lots of time and have access to
Sparc boxes for testing should get in touch with <davem@caip.rutgers.edu>.

None of the above ports will be capable of running Linux/386 binaries.

Linux port to the Aleph 1 486 card (*not* the second processor card for
the Risc PC yet, but the original PC-on-a-podule card) has been completed
and appears stable.  Full details on this version, and updates on general
ports in progress, can be found on the WWW at
http://www.ph.kcl.ac.uk/~amb/linux.html.

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

Question 1.5.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
including some space for user files and spool areas.

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

Question 1.6.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.  This is not the same as Public Domain (see the Copyright
FAQ, available on rtfm.mit.edu in
/pub/usenet/news.answers/law/Copyright-FAQ, for details).

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The licences 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's mailing lists are there ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
material by FTP ?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

     Linux INFO-SHEET                        Linux META-FAQ
     Bootdisk HOWTO                          Busmouse HOWTO
     CDROM HOWTO                             Commercial HOWTO
     Danish HOWTO                            Distribution HOWTO
     DOSEMU HOWTO                            ELF HOWTO
     Ethernet HOWTO                          Firewall HOWTO
     Ftape HOWTO                             German HOWTO
     HAM HOWTO                               Hardware HOWTO
     Installation HOWTO                      Japanese Extensions HOWTO
     Kernel HOWTO                            Keystroke HOWTO
     Mail HOWTO                              MGR HOWTO
     NET-2 HOWTO                             News HOWTO
     NIS HOWTO (NIS=Sun's YP)                PCI HOWTO
     PCMCIA HOWTO                            Printing HOWTO
     Printing Usage HOWTO                    PPP HOWTO
     SCSI HOWTO                              SCSI-Programming HOWTO
     Serial HOWTO                            Sound HOWTO
     Term HOWTO                              Tips HOWTO
     UPS HOWTO                               UUCP HOWTO
     XFree86 HOWTO

More of these documents are always in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also several mini-HOWTOs on sunsite.unc.edu in the
/pub/Linux/docs/HOWTO/mini directory.

The file WRITING contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Greg Hankins, <gregh@cc.gatech.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are ten international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@news.ornl.gov.

comp.os.linux.answers contains all the FAQs, HOWTOs and other important
documentation.  You should subscribe to this too.

Also worth reading are the other groups in the comp.os.linux.* hierarchy
- -- you may find that many common problems are too recent to find in this
FAQ but are answered in the newsgroups.  These groups are
comp.os.linux.setup, comp.os.linux.hardware, comp.os.linux.networking,
comp.os.linux.x, comp.os.linux.development.apps,
comp.os.linux.development.system, comp.os.linux.advocacy and
comp.os.linux.misc.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q12.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup -- see `Welcome to
the comp.os.linux.* hierarchy' which is posted every two weeks to
comp.os.linux.announce, comp.os.linux.answers and other groups.

Crossposting between different comp.os.linux.* groups is rarely a good
idea.

There may well be Linux groups local to your institution or area - check
there first.

The groups comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.help were superseded in a recent newsgroup reorganisation.
You should no longer use them.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
The German one is de.comp.os.linux.  In Australia, try
aus.computers.linux.  In Croatia there is the moderated group
hr.comp.linux.m.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run Linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of those releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
also a large number of other releases which are distributed less globally,
which suit special local and national requirements (for example, better
internationalisation support).

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux

The MCC-Interim release is available from ftp.mcc.ac.uk (UK, 130.88.200.7)
in /pub/linux; the TAMU release is available from net.tamu.edu (US,
128.194.177.1) in /pub/linux.

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

* src.doc.ic.ac.uk : /packages/Linux (UK)
* sunacm.swan.ac.uk : /pub/Linux (UK)
* ftp.ibp.fr : /pub/linux (France)
* ftp.cc.gatech.edu : /pub/linux (US - southeast: Suranet)
* wuarchive.wustl.edu : /systems/linux (US)
* mrcnext.cso.uiuc.edu : /pub/linux (US)
* ftp.cdrom.com : /pub/linux (US)
* ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
* ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
* ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
* ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
* bond.edu.au : /pub/OS/Linux (Australia)
* monu1.cc.monash.edu.au : /pub/linux (Australia)
* ftp.dstc.edu.au : /pub/Linux (Australia: Queensland)
* ftp.sun.ac.za : /pub/linux (South Africa)
* ftp.inf.utfsm.cl : /pub/Linux (Chile)
* ftp.zel.fer.hr : /pub/Linux (Croatia)

Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

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

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

A digest of comp.os.linux.announce is available at the
majordomo@vger.rugters.edu listserver [Q2.8 `What's mailing lists are
there ?'], as the list namedlinux-announce-digest.  You are strongly
advised to subscribe to this list, as it carries important information and
documentation about Linux.

Digests of postings to the old set of comp.os.linux.* groups are available
by subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's mailing lists are there ?

The Linux developers now mainly use the Majordomo server at
<majordomo@vger.rutgers.edu>.  Send a message with lists in the body to
get a list of the lists there; add a line with help to get the standard
Majordomo help file which has instructions for subscribing and
unsubscribing.

Note that most of these lists are used by the developers of Linux to talk
about technical issues and future developments.  These are not intended
for new users' questions.

There is a linux-newbie list where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel.  It does have very low volume.

There is also an old listserver on niksula.hut.fi; most of the lists on
vger were once `channels' on niksula.  The mailing list software there is
weird and flakey, and the list-owner mail is redirected to /dev/null
because the person who used to run the list doesn't any more.

The niksula server will send you its help file if you send an empty mail
message to linux-activists-request@niksula.hut.fi.

If you want to unsubscribe from it send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe from niksula *before* you
change your email address, as due to a design flaw in the list server it
is virtually impossible to get yourself unsubscribed after such a change.

The ANNOUNCE list on niksula is a digest of postings to
comp.os.linux.announce, for the benefit of those without Usenet access.
However since niksula.hut.fi is slow and overloaded I'd recommend
subscribing to the MIT digestifier instead [Q2.7 `I don't have Usenet
access.  Where do I get information ?'].

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

Question 2.9.  Are the newsgroups archived anywhere ?

sunsite.unc.edu contains archives of comp.os.linux.announce, in
/pub/Linux/docs/linux-announce.archive.  These are mirrored from /usenet
on src.doc.ic.ac.uk.

There is an `easy to access' archive of comp.os.linux.announce on the
World Wide Web at http://www.leo.org/archiv/linux/archiv/ann_index.html.
It supports searching and browsing.

I do not know of any (current) archives of the other groups in the
comp.os.linux hierarchy.

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.  Note, however, that many of these
other operating systems are rather cranky: DOS FDISK and FORMAT can
sometimes overwrite data in a Linux partition because they sometimes
incorrectly use partition data from the partition's boot sector rather
than the partition table.

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

See Q1.2 `What software does it support ?' for details and status of the
emulators for DOS, MS Windows and System V programs.

See also Q3.5 `Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems
?'.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.5 `Where can I get Linux material by FTP
?'.

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.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not very easily.  You can access them from within the DOS emulator [Q1.2
`What software does it support ?'], but it's harder to do as a normal
filesystem under Linux or using mtools.  There is a module available for
the Linux kernel which can do read-only access of the compressed volume.
Look on sunsite.unc.edu in /pub/Linux/system/Filesystems, for the ths
package.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is a primitive, alpha test read-only Amiga filesystem
on sunsite.unc.edu in /pub/Linux/patches/amigaffs.tar.Z.  More information
is in affs-readme in the tarfile.

Recent kernels contain support for the UFS filesystem used by System V and
Coherent.

There is a set of user-level programs that provides read-only access to
the Macintosh hierarchical filing system (HFS). It is available on
sunsite.unc.edu in /pub/Linux/utils/disk-management/hfs0_36.tgz.  This is
being turned into a kernel module, which is available on sunsite.

The 1.3.x alpha test kernel series now has support for mounting Windows
for Workgroups networked filesystems, using Samba.  Information is
available at http://lake.canberra.edu.au/samba/samba.html.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. 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.)

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I get Linux to work with my large disk ?
 Q4.2        How can I undelete files ?
 Q4.3        Is there a defragmenter for ext2fs etc. ?
 Q4.4        How do I format and create a filesystem on a floppy ?
 Q4.5        I get nasty messages about inodes, blocks, and the suchlike
 Q4.6        My swap area isn't working.
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       My root filesystem is read-only !
 Q4.12       I have a huge /proc/kcore !  Can I delete it ?
 Q4.13       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I get Linux to work with my large disk ?

If your disk is an IDE or EIDE drive you should read the Large-IDE
mini-HOWTO.  Some controllers do translation between `physical'
cylinders/heads/sectors and `logical' ones.

SCSI disks are accessed by linear block numbers; the BIOS invents some
`logical' cylinders/heads/sectors fiction to support DOS.

DOS 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.

I'd recommend creating at least one Linux partition entirely under the
1024-logical-cylinder limit and booting off that; the other partitions
will then be OK.

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

Question 4.2.  How can I undelete files ?

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

There are a number of packages available that work by providing new
commands for deletion and sometimes copying that move deleted files into a
`wastebasket' directory instead; they can then be recovered until cleaned
out automatically by background processing.

Alternatively you can search the raw disk device which holds the
filesystem in question.  This is hard work, and you will need to be root
to do this.

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

Question 4.3.  Is there a defragmenter for ext2fs etc. ?

Yes.  There is a Linux filesystem defragmenter for minix, old-style, ext2,
and xia filesystems available on sunsite.unc.edu in
system/Filesystems/defrag-0.6.tar.gz.

Users of the ext2 filesystem can probably do without defrag since ext2
contains extra code to keep fragmentation reduced even in very full
filesystems.

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

Question 4.4.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  You may have to run mke2fs directly
instead of mkfs -t ext2.  The -m 0 option tells mkfs.ext2 not to reserve
any space on the disk for the superuser --- usually the last 10% is
reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.5.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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
filesystem; if you're unlucky the filesystem is trashed and you'll have to
reinitialise it with mkfs (or mke2fs, mkxfs etc.) it and restore from a
backup.

NB: don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.6.  My swap area isn't working.

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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.7.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR (which is not
documented).  This will restore a standard MS-DOS Master Boot Record.  If
you have DR-DOS 6.0, go into FDISK in the normal way and then select the
`Re-write Master Boot Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.8.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.9.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/kernel/patches/diskdrives; the author is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.10.  My ext2fs partitions are checked each time I reboot.

See Q9.12 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.11.  My root filesystem is read-only !

Remount it.  If /etc/fstab is correct you can simply mount -n -o remount
/. If /etc/fstab is wrong you must give the device name and posibly the
type too: e.g. mount -n -o remount -t ext2 /dev/hda2 /.  To understand why
you got into this state see Q9.12 `EXT2-fs: warning: mounting unchecked
filesystem'.

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

Question 4.12.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.13.  My AHA1542C doesn't work with Linux.

The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS 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.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

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

Question 5.1.  What is ld.so and where do I get it ?

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.

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

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

Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sites.  A search engine is
available on the WWW at http://siva.cshl.org/lsm/lsm.html.

Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
first --- search the find-ls or INDEX files for appropriate strings.
Check the Linux Projects Map (LPM), on ftp.ix.de in
/pub/Linux/docs/Projects-Map.gz.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup comp.os.linux.development.apps.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to <linux-announce@news.ornl.gov.edu>).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.3.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden 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 optimisation well
for the 586, but it is quite unreliable, especially at high optimisation
settings.  I'd recommend using the ordinary 486 GCC instead.  The Pentium
GCC can be found on tsx-11.mit.edu in /pub/linux/ALPHA/pentium-gcc.

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

Question 5.5.  What does gcc -O6 do ?

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

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

Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q7.6 `How do I
upgrade/recompile my 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 /usr/include/asm

Nowadays /usr/src/linux/include/asm is a symbolic link to an
architecture-specific asm-<arch> directory - if you have a freshly
unpacked kernel source tree you must use make symlinks.

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

Question 5.7.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're using a kernel more recent than 1.1.44 you should find that
there are new directories /usr/src/linux/include/asm-i386.  The directory
asm there should be removed, as should the directory asm.  The symlinks
Makefile target will make these be symbolic links to asm-i36 and
arch/i386/boot respectively.  The easiest way to make sure all this gets
done is not to try to patch 1.1.44 to make 1.1.45, but to download
linux-1.1.45.tar.gz instead.

ld: unrecognised option `-qmagic' means you should get a newer linker,
from tsx-11.mit.edu in /pub/linux/packages/GCC, in the file
binutils-2.5.2l.17.bin.tar.gz.

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

Question 5.8.  How do I make a shared library ?

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, in
/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.

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

Question 5.9.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (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.

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

Question 5.10.  Does Linux support threads or lightweight processes ?

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, most of which are
generic packages for any Unix:

* In sipb.mit.edu:/pub/pthread or 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.
* In 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 as /tr/1993/05/UW-CSE-93-05-06.PS.Z.
* In gummo.doc.ic.ac.uk:/rex is lwp, a very minimal implementation.
* In 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 useable under
  Linux.

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

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

Question 5.11.  Where can I get `lint' for Linux ?

Roughly equivalent functionality is built into the GNU C compiler (gcc)
which is used by Linux systems.  Use the -Wall option to turn on most of
the useful extra warnings.  Check the GCC manual for more details (type
control-h followed by 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 on larch.lcs.mit.edu in /pub/Larch/lclint; on the World Wide
Web look at http://larch-www.lcs.mit.edu:8001/larch/lclint.html.

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

Question 5.12.  Where can I find `kermit' for Linux ?

Kermit has a restrictive copyright which has forced most distribution
maintainers to remove it, or to move the package containing it into an
obscure directory.

The source code is available on kermit.columbia.edu in
/kermit/archives/cku190.tar.gz; Linux binaries are available in
/kermit/bin/ckuker.linux and /kermit/bin/ckuker.linuxtcp.

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i

iQCVAwUBMFL7PcMWjroj9a3bAQFhFgP/QwmwCAHcVPsHbolh6jrjU2VFvS/DCILX
Dyo2cw9kVji9BYnF0hgKFcLU/P5D3+9u+g/dhrWTUAojfE90P2tHMuFKLMT57BW+
2+/u7MRoI59R0U3z8OjRFzo77Oy0MEjLDEBK/O/bsyWNUgobqbkrzB1snVXt4Dwj
XLxVEjhHEHI=
=wb9l
-----END PGP SIGNATURE-----
-- 
Ian Jackson, at home.          ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
+44 1223 575512    Escoerea on IRC.    http://www.cl.cam.ac.uk/users/iwj10/
2 Lexington Close, Cambridge, CB4 3LS, England.  Urgent: iwj10@thor.cam.co.uk



^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1995-07-05  4:00 Ian Jackson
  1995-07-05  4:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1995-07-05  4:00 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 06 Jul 1995

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q12.1 `You still
haven't answered my question !', before posting your question to a
newsgroup.

See Q13.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's mailing lists are there ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I get Linux to work with my large disk ?
 Q4.2        How can I undelete files ?
 Q4.3        Is there a defragmenter for ext2fs etc. ?
 Q4.4        How do I format and create a filesystem on a floppy ?
 Q4.5        I get nasty messages about inodes, blocks, and the suchlike
 Q4.6        My swap area isn't working.
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       My root filesystem is read-only !
 Q4.12       I have a huge /proc/kcore !  Can I delete it ?
 Q4.13       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

 Section 6.  Solutions to common miscellaneous problems
 Q6.1        Setuid scripts don't seem to work.
 Q6.2        Free memory as reported by free keeps shrinking.
 Q6.3        When I add more memory it slows to a crawl.
 Q6.4        Some programs (e.g. xdm) won't let me log in.
 Q6.5        Some programs let me log in with no password.
 Q6.6        My machine runs very slowly when I run GCC / X / ...
 Q6.7        I can only log in as root.
 Q6.8        My screen is all full of weird characters instead of letters.
 Q6.9        I have screwed up my system and can't log in to fix it.
 Q6.10       Emacs just dumps core.
 Q6.11       I've discovered a huge security hole in rm !
 Q6.12       lpr and/or lpd aren't working.
 Q6.13       Timestamps on files on msdos partitions are set incorrectly.
 Q6.14       How do I get LILO to boot the vmlinux file ?

 Section 7.  How do I do this or find out that ... ?
 Q7.1        How can I get scrollback in text mode ?
 Q7.2        How do I switch virtual consoles ?  How do I enable them ?
 Q7.3        How do I set the timezone ?
 Q7.4        What version of Linux and what machine name am I using ?
 Q7.5        How can I enable or disable core dumps ?
 Q7.6        How do I upgrade/recompile my kernel ?
 Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
 Q7.8        How do I make a bootable floppy ?
 Q7.9        How do I remap my keyboard to UK, French, etc. ?
 Q7.10       How do I get NUM LOCK to default to on ?
 Q7.11       How can I have more than 128Mb of swap ?

 Section 8.  Miscellaneous information and questions answered
 Q8.1        What's all this about ELF ?
 Q8.2        What is a .gz file ? And a .tgz ? And ... ?
 Q8.3        What does VFS stand for ?
 Q8.4        What is a BogoMip ?
 Q8.5        What is the Linux Journal and where can I get it ?
 Q8.6        How many people use Linux ?
 Q8.7        How should I pronounce Linux ?

 Section 9.  Frequently encountered error messages
 Q9.1        During linking I get Undefined symbol _mcount
 Q9.2        lp1 on fire
 Q9.3        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q9.4        ld: unrecognized option '-m486'
 Q9.5        GCC says Internal compiler error
 Q9.6        make says Error 139
 Q9.7        shell-init: permission denied when I log in.
 Q9.8        No utmp entry.  You must exec ... when I log in.
 Q9.9        Warning - bdflush not running
 Q9.10       Warning: obsolete routing request made.
 Q9.11       EXT2-fs: warning: mounting unchecked filesystem
 Q9.12       EXT2-fs warning: maximal count reached
 Q9.13       EXT2-fs warning: checktime reached
 Q9.14       df says Cannot read table of mounted filesystems
 Q9.15       fdisk says Partition X has different physical/logical ...
 Q9.16       fdisk: Partition 1 does not start on cylinder boundary
 Q9.17       fdisk says partition n has an odd number of sectors
 Q9.18       mtools says cannot initialise drive XYZ
 Q9.19       At the start of booting: Memory tight

 Section 10. The X Window System
 Q10.1       Does Linux support X Windows ?
 Q10.2       Where can I get an XF86Config for my system ?
 Q10.3       xterm logins show up strangely in who, finger
 Q10.4       I can't get X Windows to work right.

 Section 11. Questions applicable to very out-of-date software
 Q11.1       fdisk says cannot use nnn sectors of this partition
 Q11.2       GCC sometimes uses huge amounts of virtual memory and thrashes
 Q11.3       My keyboard goes all funny after I switch VC's.

 Section 12. How to get further assistance
 Q12.1       You still haven't answered my question !
 Q12.2       What to put in a request for help
 Q12.3       I want to mail someone about my problem.

 Section 13. Administrative information and acknowledgements
 Q13.1       Feedback is invited
 Q13.2       Formats in which this FAQ is available
 Q13.3       Authorship and acknowledgements
 Q13.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.  It aims
towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It runs mainly on 386/486/586-based PCs, using the hardware facilities of
the 386 processor family (TSS segments et al) to implement these features.
Ports to other architectures are underway [Q1.4 `What ports to other
processors are there ?'].

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

The Linux kernel is distributed under the GNU General Public License - see
Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

An iBCS2 (Intel Binary Compatibility Standard) emulator for SVR4 ELF and
SVR3.2 COFF binaries is at a fairly advanced stage of development.  See
the file /pub/linux/BETA/ibcs2/README on tsx-11.mit.edu.

Work is progressing on an emulator for Microsoft Windows binaries [Q3.6
`Can I run Microsoft Windows programs under Linux ?']; alternatively, I'm
told that the DOS emulator team have been having some success getting MS
Windows to run inside dosemu - there will be an announcement if and when
they get it working.

For more information see the INFO-SHEET, which is one of the the HOWTOs
[Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
Q5.3 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM and a hard disk are
required.

VESA local bus and PCI are both supported.  A driver for the NCR SCSI chip
in many PCI machines is included in current alpha test release kernels.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux is reported to run on 386 family based laptops, with X on most of
them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

Linux will never run on a 286, because it requires task-switching and
memory management facilities not found on 286 processors.

Linux does not currently support multiprocessor machines, though some
experienced developers are working on the problem.

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

Question 1.4.  What ports to other processors are there ?

A project has been underway for a while to port Linux to suitable
68000-series based systems such as Amigas and Ataris.  This has now
reached beta test quality and there is an X server.  There is a
linux-680x0 mailing list [Q2.8 `What's mailing lists are there ?'], and a
Linux/68K FAQ at
http://pfah.informatik.uni-kl.de:8000/pers/jmayer/linux68k-faq and on
tsx-11.mit.edu in /pub/linux/680x0/FAQ.gz; further information is at
http://www-users.informatik.rwth-aachen.de/~hn/linux68k.html.  There is a
mailing list for the Atari port - mail <majordomo@phil.uni-sb.de> with a
body containing only subscribe atarix - and an ftp area on
ftp.phil.uni-sb.de in /pub/atari/linux.

Information about a port to 68K-based Macintoshes can be found in the
MacLinux FAQ, available on www.ibg.uu.se in /pub/maclinux/FAQ.txt.  Other
stuff may be in the same directory.  There is a mailing list.  Rumour has
it that this project is dead.

Work has just been started on a port to the PowerPC (PowerStack, RS/6000
and NuBus machines are being worked on simultaneously).  Again, don't post
asking about it unless you have experience to offer, and don't hold your
breath.  There is a mailing list [Q2.8 `What's mailing lists are there ?']
and a FAQ on liber.stanford.edu in /pub/linuxppc/linux-ppc-FAQ or on the
WWW at http://liber.stanford.edu/linuxppc/linux-ppc-FAQ.html.

Both Linus and Jim Paradis <paradis@sousa.amt.ako.dec.com> or
<jrp@world.std.com> are working on ports to the 64-bit DEC AXP (the
Alpha).  Again, there is a mailing list at vger.rutgers.edu.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
also a MIPS channel on the Linux Activists mailserver and a linux-mips
mailing list [Q2.8 `What's mailing lists are there ?'].  Interested people
may mail their questions and offers of assistance to
<linux@waldorf-gmbh.de>.

There are currently two ports of Linux to the ARM family of processors
ongoing; one of these is to the ARM3 as fitted to the Acorn A5000, and
includes I/O drivers for the 82710/11 as appropriate, and the other is to
the ARM610 as fitted to 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 fairly soon.  For more up to date information watch the
newsgroup comp.sys.acorn.misc, or look on the WWW at
http://whirligig.ecs.soton.ac.uk/~rmk92/armlinux.html; if you want to
volunteer you should contact Martin Ebourne <mje@soton.ac.uk>.

None of the above ports will be capable of running Linux/386 binaries.

Linux port to the Aleph 1 486 card (*not* the second processor card for
the Risc PC yet, but the original PC-on-a-podule card) has been completed
and appears stable.  Full details on this version, and updates on general
ports in progress, can be found on the WWW at
http://www.ph.kcl.ac.uk/~amb/linux.html.

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

Question 1.5.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
including some space for user files and spool areas.

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

Question 1.6.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.  This is not the same as Public Domain (see the Copyright
FAQ, available on rtfm.mit.edu in
/pub/usenet/news.answers/law/Copyright-FAQ, for details).

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The licences 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's mailing lists are there ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
material by FTP ?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

     Linux INFO-SHEET                        Linux META-FAQ
     BUPS HOWTO (re the Back UPS).           Busmouse HOWTO
     CDROM HOWTO                             Commercial HOWTO
     Danish HOWTO                            Distribution HOWTO
     DOSEMU HOWTO                            ELF HOWTO
     Ethernet HOWTO                          Ftape HOWTO
     German HOWTO                            HAM HOWTO
     Hardware HOWTO                          Installation HOWTO
     Japanese Extensions HOWTO               Kernel HOWTO
     Keystroke HOWTO                         Mail HOWTO
     MGR HOWTO                               NET-2 HOWTO
     News HOWTO                              NIS HOWTO (NIS=Sun's YP)
     PCI HOWTO                               PCMCIA HOWTO
     Printing HOWTO                          PPP HOWTO
     SCSI HOWTO                              SCSI-Programming HOWTO
     Serial HOWTO                            Sound HOWTO
     Term HOWTO                              Tips HOWTO
     UUCP HOWTO                              UPS HOWTO
     XFree86 HOWTO

More of these documents are always in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also several mini-HOWTOs on sunsite.unc.edu in the
/pub/Linux/docs/HOWTO/mini directory.

The file WRITING contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Greg Hankins, <gregh@cc.gatech.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are ten international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@news.ornl.gov.

comp.os.linux.answers contains all the FAQs, HOWTOs and other important
documentation.  You should subscribe to this too.

Also worth reading are the other groups in the comp.os.linux.* hierarchy
- -- you may find that many common problems are too recent to find in this
FAQ but are answered in the newsgroups.  These groups are
comp.os.linux.setup, comp.os.linux.hardware, comp.os.linux.networking,
comp.os.linux.x, comp.os.linux.development.apps,
comp.os.linux.development.system, comp.os.linux.advocacy and
comp.os.linux.misc.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q12.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup -- see `Welcome to
the comp.os.linux.* hierarchy' which is posted every two weeks to
comp.os.linux.announce, comp.os.linux.answers and other groups.

Crossposting between different comp.os.linux.* groups is rarely a good
idea.

There may well be Linux groups local to your institution or area - check
there first.

The groups comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.help were superseded in a recent newsgroup reorganisation.
You should no longer use them.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
The German one is de.comp.os.linux.  In Australia, try
aus.computers.linux.  In Croatia there is the moderated group
hr.comp.linux.m.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run Linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of those releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
also a large number of other releases which are distributed less globally,
which suit special local and national requirements (for example, better
internationalisation support).

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux

The MCC-Interim release is available from ftp.mcc.ac.uk (UK, 130.88.200.7)
in /pub/linux; the TAMU release is available from net.tamu.edu (US,
128.194.177.1) in /pub/linux.

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

* src.doc.ic.ac.uk : /packages/Linux (UK)
* sunacm.swan.ac.uk : /pub/Linux (UK)
* ftp.ibp.fr : /pub/linux (France)
* ftp.cc.gatech.edu : /pub/linux (US - southeast: Suranet)
* wuarchive.wustl.edu : /systems/linux (US)
* mrcnext.cso.uiuc.edu : /pub/linux (US)
* ftp.cdrom.com : /pub/linux (US)
* ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
* ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
* ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
* ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
* bond.edu.au : /pub/OS/Linux (Australia)
* monu1.cc.monash.edu.au : /pub/linux (Australia)
* ftp.dstc.edu.au : /pub/Linux (Australia: Queensland)
* ftp.sun.ac.za : /pub/linux (South Africa)
* ftp.inf.utfsm.cl : /pub/Linux (Chile)
* ftp.zel.fer.hr : /pub/Linux (Croatia)

Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

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

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

A digest of comp.os.linux.announce is available at the
majordomo@vger.rugters.edu listserver [Q2.8 `What's mailing lists are
there ?'], as the list namedlinux-announce-digest.  You are strongly
advised to subscribe to this list, as it carries important information and
documentation about Linux.

Digests of postings to the old set of comp.os.linux.* groups are available
by subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's mailing lists are there ?

The Linux developers now mainly use the Majordomo server at
<majordomo@vger.rutgers.edu>.  Send a message with lists in the body to
get a list of the lists there; add a line with help to get the standard
Majordomo help file which has instructions for subscribing and
unsubscribing.

Note that most of these lists are used by the developers of Linux to talk
about technical issues and future developments.  These are not intended
for new users' questions.

There is a linux-newbie list where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel.  It does have very low volume.

There is also an old listserver on niksula.hut.fi; most of the lists on
vger were once `channels' on niksula.  The mailing list software there is
weird and flakey, and the list-owner mail is redirected to /dev/null
because the person who used to run the list doesn't any more.

The niksula server will send you its help file if you send an empty mail
message to linux-activists-request@niksula.hut.fi.

If you want to unsubscribe from it send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe from niksula *before* you
change your email address, as due to a design flaw in the list server it
is virtually impossible to get yourself unsubscribed after such a change.

The ANNOUNCE list on niksula is a digest of postings to
comp.os.linux.announce, for the benefit of those without Usenet access.
However since niksula.hut.fi is slow and overloaded I'd recommend
subscribing to the MIT digestifier instead [Q2.7 `I don't have Usenet
access.  Where do I get information ?'].

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

Question 2.9.  Are the newsgroups archived anywhere ?

sunsite.unc.edu contains archives of comp.os.linux.announce, in
/pub/Linux/docs/linux-announce.archive.  These are mirrored from /usenet
on src.doc.ic.ac.uk.

There is an `easy to access' archive of comp.os.linux.announce on the
World Wide Web at http://www.leo.org/archiv/linux/archiv/ann_index.html.
It supports searching and browsing.

I do not know of any (current) archives of the other groups in the
comp.os.linux hierarchy.

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.  Note, however, that many of these
other operating systems are rather cranky: DOS FDISK and FORMAT can
sometimes overwrite data in a Linux partition because they sometimes
incorrectly use partition data from the partition's boot sector rather
than the partition table.

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

See Q1.2 `What software does it support ?' for details and status of the
emulators for DOS, MS Windows and System V programs.

See also Q3.5 `Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems
?'.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.5 `Where can I get Linux material by FTP
?'.

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.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not very easily.  You can access them from within the DOS emulator [Q1.2
`What software does it support ?'], but it's harder to do as a normal
filesystem under Linux or using mtools.  There is a module available for
the Linux kernel which can do read-only access of the compressed volume.
Look on sunsite.unc.edu in /pub/Linux/system/Filesystems, for the ths
package.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is a primitive, alpha test read-only Amiga filesystem
on sunsite.unc.edu in /pub/Linux/patches/amigaffs.tar.Z.  More information
is in affs-readme in the tarfile.

The 1.1.x alpha test kernel series contains support for the UFS filesystem
used by System V and Coherent.

There is a set of user-level programs that provides read-only access to
the Macintosh hierarchical filing system (HFS). It is available on
sunsite.unc.edu in /pub/Linux/utils/disk-management/hfs0_36.tgz.  This is
being turned into a kernel module, which is available on sunsite.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. 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.)

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I get Linux to work with my large disk ?
 Q4.2        How can I undelete files ?
 Q4.3        Is there a defragmenter for ext2fs etc. ?
 Q4.4        How do I format and create a filesystem on a floppy ?
 Q4.5        I get nasty messages about inodes, blocks, and the suchlike
 Q4.6        My swap area isn't working.
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       My root filesystem is read-only !
 Q4.12       I have a huge /proc/kcore !  Can I delete it ?
 Q4.13       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I get Linux to work with my large disk ?

If your disk is an IDE or EIDE drive you should read the Large-IDE
mini-HOWTO.  Some controllers do translation between `physical'
cylinders/heads/sectors and `logical' ones.

SCSI disks are accessed by linear block numbers; the BIOS invents some
`logical' cylinders/heads/sectors fiction to support DOS.

DOS 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.

I'd recommend creating at least one Linux partition entirely under the
1024-logical-cylinder limit and booting off that; the other partitions
will then be OK.

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

Question 4.2.  How can I undelete files ?

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

There are a number of packages available that work by providing new
commands for deletion and sometimes copying that move deleted files into a
`wastebasket' directory instead; they can then be recovered until cleaned
out automatically by background processing.

Alternatively you can search the raw disk device which holds the
filesystem in question.  This is hard work, and you will need to be root
to do this.

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

Question 4.3.  Is there a defragmenter for ext2fs etc. ?

Yes.  There is a Linux filesystem defragmenter for minix, old-style, ext2,
and xia filesystems available on sunsite.unc.edu in
system/Filesystems/defrag-0.6.tar.gz.

Users of the ext2 filesystem can probably do without defrag since ext2
contains extra code to keep fragmentation reduced even in very full
filesystems.

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

Question 4.4.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  You may have to run mke2fs directly
instead of mkfs -t ext2.  The -m 0 option tells mkfs.ext2 not to reserve
any space on the disk for the superuser --- usually the last 10% is
reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.5.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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
filesystem; if you're unlucky the filesystem is trashed and you'll have to
reinitialise it with mkfs (or mke2fs, mkxfs etc.) it and restore from a
backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.6.  My swap area isn't working.

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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.7.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR (which is not
documented).  This will restore a standard MS-DOS Master Boot Record.  If
you have DR-DOS 6.0, go into FDISK in the normal way and then select the
`Re-write Master Boot Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.8.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.9.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/kernel/patches/diskdrives; the author is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.10.  My ext2fs partitions are checked each time I reboot.

See Q9.11 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.11.  My root filesystem is read-only !

Remount it.  If /etc/fstab is correct you can simply mount -n -o remount
/. If /etc/fstab is wrong you must give the device name and posibly the
type too: e.g. mount -n -o remount -t ext2 /dev/hda2 /.  To understand why
you got into this state see Q9.11 `EXT2-fs: warning: mounting unchecked
filesystem'.

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

Question 4.12.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.13.  My AHA1542C doesn't work with Linux.

The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS 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.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

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

Question 5.1.  What is ld.so and where do I get it ?

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.

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

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

Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sites.  A search engine is
available on the WWW at http://siva.cshl.org/lsm/lsm.html.

Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
first --- search the find-ls or INDEX files for appropriate strings.
Check the Linux Projects Map (LPM), on ftp.ix.de in
/pub/Linux/docs/Projects-Map.gz.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup comp.os.linux.development.apps.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to <linux-announce@news.ornl.gov.edu>).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.3.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden 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 optimisation well
for the 586, but it is quite unreliable, especially at high optimisation
settings.  I'd recommend using the ordinary 486 GCC instead.  The Pentium
GCC can be found on tsx-11.mit.edu in /pub/linux/ALPHA/pentium-gcc.

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

Question 5.5.  What does gcc -O6 do ?

Currently the same as -O2; any number greater than 2 currently works just
like 2.  The Makefiles of newer kernels use -O2, and so should you.

GCC 2.6 adds optimisation level -O3.  However, GCC 2.6.0 and several of
the following versions are known to have some problems with Linux, though
these will hopefully be solved soon.  In any case you should not use -O3
on a program until you're sure it doesn't create any problems.

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

Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q7.6 `How do I
upgrade/recompile my 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 /usr/include/asm

Nowadays /usr/src/linux/include/asm is a symbolic link to an
architecture-specific asm-<arch> directory - if you have a freshly
unpacked kernel source tree you must use make symlinks.

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

Question 5.7.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're using a kernel more recent than 1.1.44 you should find that
there are new directories /usr/src/linux/include/asm-i386.  The directory
asm there should be removed, as should the directory asm.  The symlinks
Makefile target will make these be symbolic links to asm-i36 and
arch/i386/boot respectively.  The easiest way to make sure all this gets
done is not to try to patch 1.1.44 to make 1.1.45, but to download
linux-1.1.45.tar.gz instead.

ld: unrecognised option `-qmagic' means you should get a newer linker,
from tsx-11.mit.edu in /pub/linux/packages/GCC, in the file
image-4.6.xx.tar.gz.

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

Question 5.8.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
It comes with documentation that will tell you what to do.

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

Question 5.9.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (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.

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

Question 5.10.  Does Linux support threads or lightweight processes ?

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, most of which are
generic packages for any Unix:

* In sipb.mit.edu:/pub/pthread or 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.
* In 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 as /tr/1993/05/UW-CSE-93-05-06.PS.Z.
* In gummo.doc.ic.ac.uk:/rex is lwp, a very minimal implementation.
* In 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 useable under
  Linux.

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

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

Question 5.11.  Where can I get `lint' for Linux ?

Roughly equivalent functionality is built into the GNU C compiler (gcc)
which is used by Linux systems.  Use the -Wall option to turn on most of
the useful extra warnings.  Check the GCC manual for more details (type
control-h followed by 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 on larch.lcs.mit.edu in /pub/Larch/lclint; on the World Wide
Web look at http://larch-www.lcs.mit.edu:8001/larch/lclint.html.

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

Question 5.12.  Where can I find `kermit' for Linux ?

Kermit has a restrictive copyright which has forced most distribution
maintainers to remove it, or to move the package containing it into an
obscure directory.

The source code is available on kermit.columbia.edu in
/kermit/archives/cku190.tar.gz; Linux binaries are available in
/kermit/bin/ckuker.linux and /kermit/bin/ckuker.linuxtcp.

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i

iQCVAwUBL/sm0sMWjroj9a3bAQGHPgQAtTYWvSMhz3JnCMtYR6Aj5dvfDKFxuCBV
jljKD4hePXtHAHvWK/q2GXSM88nwXUiUxgB8wZsgCHGGOZYqhS1cBsulM1ApNZXQ
OhnSnGFpDojONq9rLeepIsHilF+hb/i95KnNk/BbeCqpyiSO5mowEigot0qdwxN/
5bMooD5e/4I=
=lsMS
-----END PGP SIGNATURE-----
-- 
Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
+44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk



^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1995-06-06  4:00 Ian Jackson
  1995-06-06  4:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1995-06-06  4:00 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 06 Jun 1995

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q12.1 `You still
haven't answered my question !', before posting your question to a
newsgroup.

See Q13.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's mailing lists are there ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I get Linux to work with my large disk ?
 Q4.2        How can I undelete files ?
 Q4.3        Is there a defragmenter for ext2fs etc. ?
 Q4.4        How do I format and create a filesystem on a floppy ?
 Q4.5        I get nasty messages about inodes, blocks, and the suchlike
 Q4.6        My swap area isn't working.
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       My root filesystem is read-only !
 Q4.12       I have a huge /proc/kcore !  Can I delete it ?
 Q4.13       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

 Section 6.  Solutions to common miscellaneous problems
 Q6.1        Setuid scripts don't seem to work.
 Q6.2        Free memory as reported by free keeps shrinking.
 Q6.3        When I add more memory it slows to a crawl.
 Q6.4        Some programs (e.g. xdm) won't let me log in.
 Q6.5        Some programs let me log in with no password.
 Q6.6        My machine runs very slowly when I run GCC / X / ...
 Q6.7        I can only log in as root.
 Q6.8        My screen is all full of weird characters instead of letters.
 Q6.9        I have screwed up my system and can't log in to fix it.
 Q6.10       Emacs just dumps core.
 Q6.11       I've discovered a huge security hole in rm !
 Q6.12       lpr and/or lpd aren't working.
 Q6.13       Timestamps on files on msdos partitions are set incorrectly.
 Q6.14       How do I get LILO to boot the vmlinux file ?

 Section 7.  How do I do this or find out that ... ?
 Q7.1        How can I get scrollback in text mode ?
 Q7.2        How do I switch virtual consoles ?  How do I enable them ?
 Q7.3        How do I set the timezone ?
 Q7.4        What version of Linux and what machine name am I using ?
 Q7.5        How can I enable or disable core dumps ?
 Q7.6        How do I upgrade/recompile my kernel ?
 Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
 Q7.8        How do I make a bootable floppy ?
 Q7.9        How do I remap my keyboard to UK, French, etc. ?
 Q7.10       How do I get NUM LOCK to default to on ?
 Q7.11       How can I have more than 128Mb of swap ?

 Section 8.  Miscellaneous information and questions answered
 Q8.1        What's all this about ELF ?
 Q8.2        What is a .gz file ? And a .tgz ? And ... ?
 Q8.3        What does VFS stand for ?
 Q8.4        What is a BogoMip ?
 Q8.5        What is the Linux Journal and where can I get it ?
 Q8.6        How many people use Linux ?
 Q8.7        How should I pronounce Linux ?

 Section 9.  Frequently encountered error messages
 Q9.1        During linking I get Undefined symbol _mcount
 Q9.2        lp1 on fire
 Q9.3        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q9.4        ld: unrecognized option '-m486'
 Q9.5        GCC says Internal compiler error
 Q9.6        make says Error 139
 Q9.7        shell-init: permission denied when I log in.
 Q9.8        No utmp entry.  You must exec ... when I log in.
 Q9.9        Warning - bdflush not running
 Q9.10       Warning: obsolete routing request made.
 Q9.11       EXT2-fs: warning: mounting unchecked filesystem
 Q9.12       EXT2-fs warning: maximal count reached
 Q9.13       EXT2-fs warning: checktime reached
 Q9.14       df says Cannot read table of mounted filesystems
 Q9.15       fdisk says Partition X has different physical/logical ...
 Q9.16       fdisk: Partition 1 does not start on cylinder boundary
 Q9.17       fdisk says partition n has an odd number of sectors
 Q9.18       mtools says cannot initialise drive XYZ
 Q9.19       At the start of booting: Memory tight

 Section 10. The X Window System
 Q10.1       Does Linux support X Windows ?
 Q10.2       Where can I get an XF86Config for my system ?
 Q10.3       xterm logins show up strangely in who, finger
 Q10.4       I can't get X Windows to work right.

 Section 11. Questions applicable to very out-of-date software
 Q11.1       fdisk says cannot use nnn sectors of this partition
 Q11.2       GCC sometimes uses huge amounts of virtual memory and thrashes
 Q11.3       My keyboard goes all funny after I switch VC's.

 Section 12. How to get further assistance
 Q12.1       You still haven't answered my question !
 Q12.2       What to put in a request for help
 Q12.3       I want to mail someone about my problem.

 Section 13. Administrative information and acknowledgements
 Q13.1       Feedback is invited
 Q13.2       Formats in which this FAQ is available
 Q13.3       Authorship and acknowledgements
 Q13.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.  It aims
towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It runs mainly on 386/486/586-based PCs, using the hardware facilities of
the 386 processor family (TSS segments et al) to implement these features.
Ports to other architectures are underway [Q1.4 `What ports to other
processors are there ?'].

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

The Linux kernel is distributed under the GNU General Public License - see
Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

An iBCS2 (Intel Binary Compatibility Standard) emulator for SVR4 ELF and
SVR3.2 COFF binaries is at a fairly advanced stage of development.  See
the file /pub/linux/BETA/ibcs2/README on tsx-11.mit.edu.

Work is progressing on an emulator for Microsoft Windows binaries [Q3.6
`Can I run Microsoft Windows programs under Linux ?']; alternatively, I'm
told that the DOS emulator team have been having some success getting MS
Windows to run inside dosemu - there will be an announcement if and when
they get it working.

For more information see the INFO-SHEET, which is one of the the HOWTOs
[Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
Q5.3 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM and a hard disk are
required.

VESA local bus and PCI are both supported.  A driver for the NCR SCSI chip
in many PCI machines is included in current alpha test release kernels.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux is reported to run on 386 family based laptops, with X on most of
them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

Linux will never run on a 286, because it requires task-switching and
memory management facilities not found on 286 processors.

Linux does not currently support multiprocessor machines, though there are
rumours that some developers are working on the problem.

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

Question 1.4.  What ports to other processors are there ?

A project has been underway for a while to port Linux to suitable
68000-series based systems such as Amigas and Ataris.  This has now
reached beta test quality and there is an X server.  There is a
linux-680x0 mailing list [Q2.8 `What's mailing lists are there ?'], and a
Linux/68K FAQ at
http://pfah.informatik.uni-kl.de:8000/pers/jmayer/linux68k-faq and on
tsx-11.mit.edu in /pub/linux/680x0/FAQ.gz; further information is at
http://www-users.informatik.rwth-aachen.de/~hn/linux68k.html.  There is a
mailing list for the Atari port - mail <majordomo@phil.uni-sb.de> with a
body containing only subscribe atarix - and an ftp area on
ftp.phil.uni-sb.de in /pub/atari/linux.

Information about a port to 68K-based Macintoshes can be found in the
MacLinux FAQ, available on www.ibg.uu.se in /pub/maclinux/FAQ.txt.  Other
stuff may be in the same directory.  There is a mailing list.  Rumour has
it that this project is dead.

Work has just been started on a port to the PowerPC (PowerStack, RS/6000
and NuBus machines are being worked on simultaneously).  Again, don't post
asking about it unless you have experience to offer, and don't hold your
breath.  There is a mailing list [Q2.8 `What's mailing lists are there ?']
and a FAQ on liber.stanford.edu in /pub/linuxppc/linux-ppc-FAQ or on the
WWW at http://liber.stanford.edu/linuxppc/linux-ppc-FAQ.html.

Both Linus and Jim Paradis <paradis@sousa.amt.ako.dec.com> or
<jrp@world.std.com> are working on ports to the 64-bit DEC AXP (the
Alpha).  Again, there is a mailing list at vger.rutgers.edu.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
also a MIPS channel on the Linux Activists mailserver and a linux-mips
mailing list [Q2.8 `What's mailing lists are there ?'].  Interested people
may mail their questions and offers of assistance to
<linux@waldorf-gmbh.de>.

There are currently two ports of Linux to the ARM family of processors
ongoing; one of these is to the ARM3 as fitted to the Acorn A5000, and
includes I/O drivers for the 82710/11 as appropriate, and the other is to
the ARM610 as fitted to 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 fairly soon.  For more up to date information watch the
newsgroups comp.sys.acorn and comp.sys.acorn.tech, or on the WWW at
http://whirligig.ecs.soton.ac.uk/~rmk92/armlinux.html; if you want to
volunteer you should contact Martin Ebourne <mje@soton.ac.uk>.

None of the above ports will be capable of running Linux/386 binaries.

Linux port to the Aleph 1 486 card (*not* the second processor card for
the Risc PC yet, but the original PC-on-a-podule card) has been completed
and appears stable.  Full details on this version, and updates on general
ports in progress, can be found on the WWW at
http://www.ph.kcl.ac.uk/~amb/linux.html.

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

Question 1.5.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
including some space for user files and spool areas.

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

Question 1.6.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.  This is not the same as Public Domain (see the Copyright
FAQ, available on rtfm.mit.edu in
/pub/usenet/news.answers/law/Copyright-FAQ, for details).

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The licences 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's mailing lists are there ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
material by FTP ?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

     Linux INFO-SHEET                        Linux META-FAQ
     BUPS HOWTO (re the Back UPS).           Busmouse HOWTO
     CDROM HOWTO                             Commercial HOWTO
     Danish HOWTO                            Distribution HOWTO
     DOSEMU HOWTO                            ELF HOWTO
     Ethernet HOWTO                          Ftape HOWTO
     German HOWTO                            HAM HOWTO
     Hardware HOWTO                          Installation HOWTO
     Japanese Extensions HOWTO               Kernel HOWTO
     Keystroke HOWTO                         Mail HOWTO
     MGR HOWTO                               NET-2 HOWTO
     News HOWTO                              NIS HOWTO (NIS=Sun's YP)
     PCI HOWTO                               PCMCIA HOWTO
     Printing HOWTO                          PPP HOWTO
     SCSI HOWTO                              SCSI-Programming HOWTO
     Serial HOWTO                            Sound HOWTO
     Term HOWTO                              Tips HOWTO
     UUCP HOWTO                              UPS HOWTO
     XFree86 HOWTO

More of these documents are always in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also several mini-HOWTOs on sunsite.unc.edu in the
/pub/Linux/docs/HOWTO/mini directory.

The file WRITING contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Greg Hankins, <gregh@cc.gatech.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are ten international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@news.ornl.gov.

comp.os.linux.answers contains all the FAQs, HOWTOs and other important
documentation.  You should subscribe to this too.

Also worth reading are the other groups in the comp.os.linux.* hierarchy
- -- you may find that many common problems are too recent to find in this
FAQ but are answered in the newsgroups.  These groups are
comp.os.linux.setup, comp.os.linux.hardware, comp.os.linux.networking,
comp.os.linux.x, comp.os.linux.development.apps,
comp.os.linux.development.system, comp.os.linux.advocacy and
comp.os.linux.misc.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q12.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup -- see `Welcome to
the comp.os.linux.* hierarchy' which is posted every two weeks to
comp.os.linux.announce, comp.os.linux.answers and other groups.

Crossposting between different comp.os.linux.* groups is rarely a good
idea.

There may well be Linux groups local to your institution or area - check
there first.

The groups comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.help were superseded in a recent newsgroup reorganisation.
You should no longer use them.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
The German one is de.comp.os.linux.  In Australia, try
aus.computers.linux.  In Croatia there is the moderated group
hr.comp.linux.m.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run Linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of those releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
also a large number of other releases which are distributed less globally,
which suit special local and national requirements (for example, better
internationalisation support).

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux

The MCC-Interim release is available from ftp.mcc.ac.uk (UK, 130.88.200.7)
in /pub/linux; the TAMU release is available from net.tamu.edu (US,
128.194.177.1) in /pub/linux.

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

* src.doc.ic.ac.uk : /packages/Linux (UK)
* sunacm.swan.ac.uk : /pub/Linux (UK)
* ftp.ibp.fr : /pub/linux (France)
* ftp.cc.gatech.edu : /pub/linux (US - southeast: Suranet)
* wuarchive.wustl.edu : /systems/linux (US)
* mrcnext.cso.uiuc.edu : /pub/linux (US)
* ftp.cdrom.com : /pub/linux (US)
* ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
* ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
* ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
* ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
* bond.edu.au : /pub/OS/Linux (Australia)
* monu1.cc.monash.edu.au : /pub/linux (Australia)
* ftp.sun.ac.za : /pub/linux (South Africa)
* ftp.inf.utfsm.cl : /pub/Linux (Chile)
* ftp.zel.fer.hr : /pub/Linux (Croatia)

Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

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

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

A digest of comp.os.linux.announce is available at the
majordomo@vger.rugters.edu listserver [Q2.8 `What's mailing lists are
there ?'], as the list namedlinux-announce-digest.  You are strongly
advised to subscribe to this list, as it carries important information and
documentation about Linux.

Digests of postings to the old set of comp.os.linux.* groups are available
by subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's mailing lists are there ?

The Linux developers now mainly use the Majordomo server at
<majordomo@vger.rutgers.edu>.  Send a message with list in the body to get
a list of the lists there; add a line with help to get the standard
Majordomo help file which has instructions for subscribing and
unsubscribing.

Note that most of these lists are used by the developers of Linux to talk
about technical issues and future developments.  These are not intended
for new users' questions.

There is a linux-newbie list where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel.  It does have very low volume.

There is also an old listserver on niksula.hut.fi; most of the lists on
vger were once `channels' on niksula.  The mailing list software there is
weird and flakey, and the list-owner mail is redirected to /dev/null
because the person who used to run the list doesn't any more.

The niksula server will send you its help file if you send an empty mail
message to linux-activists-request@niksula.hut.fi.

If you want to unsubscribe from it send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe from niksula *before* you
change your email address, as due to a design flaw in the list server it
is virtually impossible to get yourself unsubscribed after such a change.

The ANNOUNCE list on niksula is a digest of postings to
comp.os.linux.announce, for the benefit of those without Usenet access.
However since niksula.hut.fi is slow and overloaded I'd recommend
subscribing to the MIT digestifier instead [Q2.7 `I don't have Usenet
access.  Where do I get information ?'].

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

Question 2.9.  Are the newsgroups archived anywhere ?

sunsite.unc.edu contains archives of comp.os.linux.announce, in
/pub/Linux/docs/linux-announce.archive.  These are mirrored from /usenet
on src.doc.ic.ac.uk.

There is an `easy to access' archive of comp.os.linux.announce on the
World Wide Web at http://www.leo.org/archiv/linux/archiv/ann_index.html.
It supports searching and browsing.

I do not know of any (current) archives of the other groups in the
comp.os.linux hierarchy.

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.  Note, however, that many of these
other operating systems are rather cranky: DOS FDISK and FORMAT can
sometimes overwrite data in a Linux partition because they sometimes
incorrectly use partition data from the partition's boot sector rather
than the partition table.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  See Q1.2 `What software does it support ?' for details and status
of the emulators for DOS, MS Windows and System V programs.

See also Q3.5 `Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems
?'.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.5 `Where can I get Linux material by FTP
?'.

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.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not very easily.  You can access them from within the DOS emulator [Q1.2
`What software does it support ?'], but it's harder to do as a normal
filesystem under Linux or using mtools.  There is a module available for
the Linux kernel which can do read-only access of the compressed volume.
Look on sunsite.unc.edu in /pub/Linux/system/Filesystems, for the ths
package.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is a primitive, alpha test read-only Amiga filesystem
on sunsite.unc.edu in /pub/Linux/patches/amigaffs.tar.Z.  More information
is in affs-readme in the tarfile.

The 1.1.x alpha test kernel series contains support for the UFS filesystem
used by System V and Coherent.

There is a set of user-level programs that provides read-only access to
the Macintosh hierarchical filing system (HFS). It is available on
sunsite.unc.edu in /pub/Linux/utils/disk-management/xhfs0_3.tgz.  This is
being turned into a kernel module, which is available on sunsite.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. 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.)

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I get Linux to work with my large disk ?
 Q4.2        How can I undelete files ?
 Q4.3        Is there a defragmenter for ext2fs etc. ?
 Q4.4        How do I format and create a filesystem on a floppy ?
 Q4.5        I get nasty messages about inodes, blocks, and the suchlike
 Q4.6        My swap area isn't working.
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       My root filesystem is read-only !
 Q4.12       I have a huge /proc/kcore !  Can I delete it ?
 Q4.13       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I get Linux to work with my large disk ?

If your disk is an IDE or EIDE drive you should read the Large-IDE
mini-HOWTO.  Some controllers do translation between `physical'
cylinders/heads/sectors and `logical' ones.

SCSI disks are accessed by linear block numbers; the BIOS invents some
`logical' cylinders/heads/sectors fiction to support DOS.

DOS 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 use access the controller directly..

I'd recommend creating at least one Linux partition entirely under the
1024-logical-cylinder limit and booting off that; the other partitions
will then be OK.

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

Question 4.2.  How can I undelete files ?

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

There are a number of packages available that work by providing new
commands for deletion and sometimes copying that move deleted files into a
`wastebasket' directory instead; they can then be recovered until cleaned
out automatically by background processing.

Alternatively you can search the raw disk device which holds the
filesystem in question.  This is hard work, and you will need to be root
to do this.

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

Question 4.3.  Is there a defragmenter for ext2fs etc. ?

Yes.  There is a Linux filesystem defragmenter for minix, old-style, ext2,
and xia filesystems available on sunsite.unc.edu in
system/Filesystems/defrag-0.6.tar.gz.

Users of the ext2 filesystem can probably do without defrag since ext2
contains extra code to keep fragmentation reduced even in very full
filesystems.

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

Question 4.4.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  You may have to run mke2fs directly
instead of mkfs -t ext2.  The -m 0 option tells mkfs.ext2 not to reserve
any space on the disk for the superuser --- usually the last 10% is
reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.5.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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
filesystem; if you're unlucky the filesystem is trashed and you'll have to
reinitialise it with mkfs (or mke2fs, mkxfs etc.) it and restore from a
backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.6.  My swap area isn't working.

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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.7.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR (which is not
documented).  This will restore a standard MS-DOS Master Boot Record.  If
you have DR-DOS 6.0, go into FDISK in the normal way and then select the
`Re-write Master Boot Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.8.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.9.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/kernel/patches/diskdrives; the author is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.10.  My ext2fs partitions are checked each time I reboot.

See Q9.11 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.11.  My root filesystem is read-only !

Remount it.  If /etc/fstab is correct you can simply mount -n -o remount
/. If /etc/fstab is wrong you must give the device name and posibly the
type too: e.g. mount -n -o remount -t ext2 /dev/hda2 /.  To understand why
you got into this state see Q9.11 `EXT2-fs: warning: mounting unchecked
filesystem'.

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

Question 4.12.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.13.  My AHA1542C doesn't work with Linux.

The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS 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.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

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

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

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

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

Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sites.  A search engine is
available on the WWW at http://siva.cshl.org/lsm/lsm.html.

Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
first --- search the find-ls or INDEX files for appropriate strings.
Check the Linux Projects Map (LPM), on ftp.ix.de in
/pub/Linux/docs/Projects-Map.gz.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to <linux-announce@news.ornl.gov.edu>).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.3.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden 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 optimisation well
for the 586, but it is quite unreliable, especially at high optimisation
settings.  I'd recommend using the ordinary 486 GCC instead.  The Pentium
GCC can be found on tsx-11.mit.edu in /pub/linux/ALPHA/pentium-gcc.

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

Question 5.5.  What does gcc -O6 do ?

Currently the same as -O2; any number greater than 2 currently works just
like 2.  The Makefiles of newer kernels use -O2, and so should you.

GCC 2.6 adds optimisation level -O3.  However, GCC 2.6.0 and several of
the following versions are known to have some problems with Linux, though
these will hopefully be solved soon.  In any case you should not use -O3
on a program until you're sure it doesn't create any problems.

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

Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q7.6 `How do I
upgrade/recompile my 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 /usr/include/asm

Nowadays /usr/src/linux/include/asm is a symbolic link to an
architecture-specific asm-<arch> directory - if you have a freshly
unpacked kernel source tree you must use make symlinks.

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

Question 5.7.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're using a kernel more recent than 1.1.44 you should find that
there are new directories /usr/src/linux/include/asm-i386.  The directory
asm there should be removed, as should the directory asm.  The symlinks
Makefile target will make these be symbolic links to asm-i36 and
arch/i386/boot respectively.  The easiest way to make sure all this gets
done is not to try to patch 1.1.44 to make 1.1.45, but to download
linux-1.1.45.tar.gz instead.

ld: unrecognised option `-qmagic' means you should get a newer linker,
from tsx-11.mit.edu in /pub/linux/packages/GCC, in the file
image-4.6.xx.tar.gz.

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

Question 5.8.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
It comes with documentation that will tell you what to do.

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

Question 5.9.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (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.

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

Question 5.10.  Does Linux support threads or lightweight processes ?

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, most of which are
generic packages for any Unix:

* In sipb.mit.edu:/pub/pthread or 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.
* In 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 as /tr/1993/05/UW-CSE-93-05-06.PS.Z.
* In gummo.doc.ic.ac.uk:/rex is lwp, a very minimal implementation.
* In 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 useable under
  Linux.

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

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

Question 5.11.  Where can I get `lint' for Linux ?

Roughly equivalent functionality is built into the GNU C compiler (gcc)
which is used by Linux systems.  Use the -Wall option to turn on most of
the useful extra warnings.  Check the GCC manual for more details (type
control-h followed by 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 on larch.lcs.mit.edu in /pub/Larch/lclint; on the World Wide
Web look at http://larch-www.lcs.mit.edu:8001/larch/lclint.html.

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

Question 5.12.  Where can I find `kermit' for Linux ?

Kermit has a restrictive copyright which has forced most distribution
maintainers to remove it, or to move the package containing it into an
obscure directory.

The source code is available on kermit.columbia.edu in
/kermit/archives/cku190.tar.gz; Linux binaries are available in
/kermit/bin/ckuker.linux and /kermit/bin/ckuker.linuxtcp.

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i

iQCVAwUBL9OgHMMWjroj9a3bAQGXiAP9EVG6S/IdE9fZIFzbBJWHGnF2jkJrSJ+M
V+0n/QaVV6J48puRk8qeoQ0gvTHw0OA9O6Jxa7mF+DDgw5tLTUHALhAYW9up54Mi
wum14vwMkiLO2o06O+0qJzvzw8m/R5M4MifB2XBMjU+XkXPHPScRF9GQVRLKHzXZ
Ruc1n0XLYHA=
=eGTc
-----END PGP SIGNATURE-----
-- 
Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
+44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk



^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1995-05-08  4:00 Ian Jackson
  1995-05-08  4:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1995-05-08  4:00 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 08 May 1995

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q12.1 `You still
haven't answered my question !', before posting your question to a
newsgroup.

See Q13.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I get Linux to work with my large disk ?
 Q4.2        How can I undelete files ?
 Q4.3        Is there a defragmenter for ext2fs etc. ?
 Q4.4        How do I format and create a filesystem on a floppy ?
 Q4.5        I get nasty messages about inodes, blocks, and the suchlike
 Q4.6        My swap area isn't working.
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       My root filesystem is read-only !
 Q4.12       I have a huge /proc/kcore !  Can I delete it ?
 Q4.13       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

 Section 6.  Solutions to common miscellaneous problems
 Q6.1        Setuid scripts don't seem to work.
 Q6.2        Free memory as reported by free keeps shrinking.
 Q6.3        When I add more memory it slows to a crawl.
 Q6.4        Some programs (e.g. xdm) won't let me log in.
 Q6.5        Some programs let me log in with no password.
 Q6.6        My machine runs very slowly when I run GCC / X / ...
 Q6.7        I can only log in as root.
 Q6.8        My screen is all full of weird characters instead of letters.
 Q6.9        I have screwed up my system and can't log in to fix it.
 Q6.10       Emacs just dumps core.
 Q6.11       I've discovered a huge security hole in rm !
 Q6.12       lpr and/or lpd aren't working.
 Q6.13       Timestamps on files on msdos partitions are set incorrectly.
 Q6.14       How do I get LILO to boot the vmlinux file ?

 Section 7.  How do I do this or find out that ... ?
 Q7.1        How can I get scrollback in text mode ?
 Q7.2        How do I switch virtual consoles ?  How do I enable them ?
 Q7.3        How do I set the timezone ?
 Q7.4        What version of Linux and what machine name am I using ?
 Q7.5        How can I enable or disable core dumps ?
 Q7.6        How do I upgrade/recompile my kernel ?
 Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
 Q7.8        How do I make a bootable floppy ?
 Q7.9        How do I remap my keyboard to UK, French, etc. ?
 Q7.10       How do I get NUM LOCK to default to on ?
 Q7.11       How can I have more than 128Mb of swap ?

 Section 8.  Miscellaneous information and questions answered
 Q8.1        What is a .gz file ? And a .tgz ? And ... ?
 Q8.2        What does VFS stand for ?
 Q8.3        What is a BogoMip ?
 Q8.4        What is the Linux Journal and where can I get it ?
 Q8.5        How many people use Linux ?
 Q8.6        How should I pronounce Linux ?

 Section 9.  Frequently encountered error messages
 Q9.1        During linking I get Undefined symbol _mcount
 Q9.2        lp1 on fire
 Q9.3        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q9.4        ld: unrecognized option '-m486'
 Q9.5        GCC says Internal compiler error
 Q9.6        make says Error 139
 Q9.7        shell-init: permission denied when I log in.
 Q9.8        No utmp entry.  You must exec ... when I log in.
 Q9.9        Warning - bdflush not running
 Q9.10       Warning: obsolete routing request made.
 Q9.11       EXT2-fs: warning: mounting unchecked filesystem
 Q9.12       EXT2-fs warning: maximal count reached
 Q9.13       EXT2-fs warning: checktime reached
 Q9.14       df says Cannot read table of mounted filesystems
 Q9.15       fdisk says Partition X has different physical/logical ...
 Q9.16       fdisk: Partition 1 does not start on cylinder boundary
 Q9.17       fdisk says partition n has an odd number of sectors
 Q9.18       mtools says cannot initialise drive XYZ
 Q9.19       At the start of booting: Memory tight

 Section 10. The X Window System
 Q10.1       Does Linux support X Windows ?
 Q10.2       Where can I get an XF86Config for my system ?
 Q10.3       xterm logins show up strangely in who, finger
 Q10.4       I can't get X Windows to work right.

 Section 11. Questions applicable to very out-of-date software
 Q11.1       fdisk says cannot use nnn sectors of this partition
 Q11.2       GCC sometimes uses huge amounts of virtual memory and thrashes
 Q11.3       My keyboard goes all funny after I switch VC's.

 Section 12. How to get further assistance
 Q12.1       You still haven't answered my question !
 Q12.2       What to put in a request for help
 Q12.3       I want to mail someone about my problem.

 Section 13. Administrative information and acknowledgements
 Q13.1       Feedback is invited
 Q13.2       Formats in which this FAQ is available
 Q13.3       Authorship and acknowledgements
 Q13.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.  It aims
towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It runs mainly on 386/486/586-based PCs, using the hardware facilities of
the 386 processor family (TSS segments et al) to implement these features.
Ports to other architectures are underway [Q1.4 `What ports to other
processors are there ?'].

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

The Linux kernel is distributed under the GNU General Public License - see
Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

An iBCS2 (Intel Binary Compatibility Standard) emulator for SVR4 ELF and
SVR3.2 COFF binaries is at a fairly advanced stage of development.  See
the file /pub/linux/BETA/ibcs2/README on tsx-11.mit.edu.

Work is progressing on an emulator for Microsoft Windows binaries [Q3.6
`Can I run Microsoft Windows programs under Linux ?']; alternatively, I'm
told that the DOS emulator team have been having some success getting MS
Windows to run inside dosemu - there will be an announcement if and when
they get it working.

For more information see the INFO-SHEET, which is one of the the HOWTOs
[Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
Q5.3 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM and a hard disk are
required.

VESA local bus and PCI are both supported.  A driver for the NCR SCSI chip
in many PCI machines is included in current alpha test release kernels.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux is reported to run on 386 family based laptops, with X on most of
them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386 family processors.

Linux does not currently support multiprocessor machines, though there are
rumours that some developers are working on the problem.

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

Question 1.4.  What ports to other processors are there ?

A project has been underway for a while to port Linux to suitable
68000-series based systems such as Amigas and Ataris.  This has now
reached beta test quality and there is an X server.  There is a 680X0
channel on the Linux Activists mailserver [Q2.8 `What's this mailing list
thing at niksula.hut.fi ?'], and a Linux/68K FAQ at
http://pfah.informatik.uni-kl.de:8000/pers/jmayer/linux68k-faq and on
tsx-11.mit.edu in /pub/linux/680x0/FAQ; further information is at
http://www-users.informatik.rwth-aachen.de/~hn/linux68k.html.  There is a
mailing list for the Atari port - mail <majordomo@phil.uni-sb.de> with a
body containing only subscribe atarix - and an ftp area on
ftp.phil.uni-sb.de in /pub/atari/linux.

Information about a port to 68K-based Macintoshes can be found in the
MacLinux FAQ, available on www.ibg.uu.se in /pub/maclinux/FAQ.txt.  Other
stuff may be in the same directory.  There is a mailing list.  Rumour has
it that this project is dead.

Work has just been started on a port to the PowerPC.  Currently this will
be based on the PowerMAC architecture.  Again, don't post asking about it
unless you have experience to offer, and don't hold your breath.  There is
a mailing list at <majordomo@vger.rutgers.edu>, and a FAQ on
liber.stanford.edu in /pub/linuxppc/linux-ppc-FAQ or on the WWW at
http://liber.stanford.edu/linuxppc/linux-ppc-FAQ.html.

Both Linus and Jim Paradis <paradis@sousa.amt.ako.dec.com> or
<jrp@world.std.com> are working on ports to the 64-bit DEC AXP (the
Alpha).  Again, mailing list at <majordomo@vger.rutgers.edu>.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
also a MIPS channel on the Linux Activists mailserver and a list
linux-mips at vger.rutgers.edu.  Interested people may mail their
questions and offers of assistance to <linux@waldorf-gmbh.de>.

There are currently two ports of Linux to the ARM family of processors
ongoing; one of these is to the ARM3 as fitted to the Acorn A5000, and
includes I/O drivers for the 82710/11 as appropriate, and the other is to
the ARM610 as fitted to 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 fairly soon.  For more up to date information watch the
newsgroups comp.sys.acorn and comp.sys.acorn.tech, or on the WWW at
http://whirligig.ecs.soton.ac.uk/~rmk92/armlinux.html; if you want to
volunteer you should contact Martin Ebourne <mje@soton.ac.uk>.

None of the above ports will be capable of running Linux/386 binaries.

Linux port to the Aleph 1 486 card (*not* the second processor card for
the Risc PC yet, but the original PC-on-a-podule card) has been completed
and appears stable.  Full details on this version, and updates on general
ports in progress, can be found on the WWW at
http://www.ph.kcl.ac.uk/~amb/linux.html.

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

Question 1.5.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
including some space for user files and spool areas.

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

Question 1.6.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.  This is not the same as Public Domain (see the Copyright
FAQ, available on rtfm.mit.edu in
/pub/usenet/news.answers/law/Copyright-FAQ, for details).

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The licences 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
material by FTP ?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

     Linux INFO-SHEET                        Linux META-FAQ
     BUPS HOWTO (re the Back UPS).           Busmouse HOWTO
     CDROM HOWTO                             Commercial HOWTO
     Danish HOWTO                            Distribution HOWTO
     DOSEMU HOWTO                            ELF HOWTO
     Ethernet HOWTO                          Ftape HOWTO
     German HOWTO                            HAM HOWTO
     Hardware HOWTO                          Installation HOWTO
     Japanese Extensions HOWTO               Kernel HOWTO
     Keystroke HOWTO                         Mail HOWTO
     MGR HOWTO                               NET-2 HOWTO
     News HOWTO                              NIS HOWTO (NIS=Sun's YP)
     PCI HOWTO                               PCMCIA HOWTO
     Printing HOWTO                          PPP HOWTO
     SCSI HOWTO                              SCSI-Programming HOWTO
     Serial HOWTO                            Sound HOWTO
     Term HOWTO                              Tips HOWTO
     UUCP HOWTO                              UPS HOWTO
     XFree86 HOWTO

More of these documents are always in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also several mini-HOWTOs on sunsite.unc.edu in the
/pub/Linux/docs/HOWTO/mini directory.

The file WRITING contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Greg Hankins, <gregh@cc.gatech.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are ten international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@news.ornl.gov.

comp.os.linux.answers contains all the FAQs, HOWTOs and other important
documentation.  You should subscribe to this too.

Also worth reading are the other groups in the comp.os.linux.* hierarchy
- -- you may find that many common problems are too recent to find in this
FAQ but are answered in the newsgroups.  These groups are
comp.os.linux.setup, comp.os.linux.hardware, comp.os.linux.networking,
comp.os.linux.x, comp.os.linux.development.apps,
comp.os.linux.development.system, comp.os.linux.advocacy and
comp.os.linux.misc.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q12.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup -- see `Welcome to
the comp.os.linux.* hierarchy' which is posted every two weeks to
comp.os.linux.announce, comp.os.linux.answers and other groups.

Crossposting between different comp.os.linux.* groups is rarely a good
idea.

There may well be Linux groups local to your institution or area - check
there first.

The groups comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.help were superseded in a recent newsgroup reorganisation.
You should no longer use them.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
The German one is de.comp.os.linux.  In Australia, try
aus.computers.linux.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run Linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of those releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
also a large number of other releases which are distributed less globally,
which suit special local and national requirements (for example, better
internationalisation support).

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux

The MCC-Interim release is available from ftp.mcc.ac.uk (US, 130.88.200.7)
in /pub/linux; the TAMU release is available from net.tamu.edu (US,
128.194.177.1) in /pub/linux.

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

* src.doc.ic.ac.uk : /packages/Linux (UK)
* sunacm.swan.ac.uk : /pub/Linux (UK)
* ftp.ibp.fr : /pub/linux (France)
* ftp.cc.gatech.edu : /pub/linux (US - southeast: Suranet)
* wuarchive.wustl.edu : /systems/linux (US)
* mrcnext.cso.uiuc.edu : /pub/linux (US)
* ftp.cdrom.com : /pub/linux (US)
* ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
* ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
* ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
* ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
* bond.edu.au : /pub/OS/Linux (Australia)
* monu1.cc.monash.edu.au : /pub/linux (Australia)
* ftp.sun.ac.za : /pub/linux (South Africa)
* ftp.inf.utfsm.cl : /pub/Linux (Chile)

Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

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

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the old set of comp.os.linux.* groups are available
by subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

Note that a new mailing list server is gaining rapid acceptance - send
message with list in the body to <majordomo@vger.rutgers.edu> (add help to
your mail if you don't have the standard Majordomo help file).  This
server contains lists corresponding to all of the channels at the niksula
multi-channel server (NB that these pairs of lists are *not* connected by
gateways - they are separate lists with the same target audience).

The ANNOUNCE list on niksula is a digest of postings to
comp.os.linux.announce, for the benefit of those without Usenet access.
However since niksula.hut.fi is slow and overloaded I'd recommend
subscribing to the MIT digestifier instead [Q2.7 `I don't have Usenet
access.  Where do I get information ?'].

There is also a NEWBIE channel (linux-newbie at vger) where `no question
is too stupid'; unfortunately it seems that few of the experienced users
read that channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the niksula
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

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

Question 2.9.  Are the newsgroups archived anywhere ?

sunsite.unc.edu contains archives of comp.os.linux.announce, in
/pub/Linux/docs/linux-announce.archive.  These are mirrored from /usenet
on src.doc.ic.ac.uk.

There is an `easy to access' archive of comp.os.linux.announce on the
World Wide Web at http://www.leo.org/archiv/linux/archiv/ann_index.html.
It supports searching and browsing.

I do not know of any (current) archives of the other groups in the
comp.os.linux hierarchy.

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  See Q1.2 `What software does it support ?' for details and status
of the emulators for DOS, MS Windows and System V programs.

Linux can also access Minix and System V UFS filesystems, and can read
(but not yet write) OS/2 HPFS and Amiga filesystems.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.5 `Where can I get Linux material by FTP
?'.

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.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not very easily.  You can access them from within the DOS emulator [Q1.2
`What software does it support ?'], but it's harder to do as a normal
filesystem under Linux or using mtools.  There is a module available for
the Linux kernel which can do read-only access of the compressed volume.
Look on sunsite.unc.edu in /pub/Linux/system/Filesystems, for the ths
package.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is a primitive, alpha test read-only Amiga filesystem
on sunsite.unc.edu in /pub/Linux/patches/amigaffs.tar.Z.  More information
is in affs-readme in the tarfile.

The 1.1.x alpha test kernel series contains support for the UFS filesystem
used by System V and Coherent.

There is a set of user-level programs that provides read-only access to
the Macintosh hierarchical filing system (HFS). It is available on
sunsite.unc.edu in /pub/Linux/utils/disk-management/xhfs0_3.tgz.  This is
being turned into a kernel module, which is available on sunsite.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. 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.)

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I get Linux to work with my large disk ?
 Q4.2        How can I undelete files ?
 Q4.3        Is there a defragmenter for ext2fs etc. ?
 Q4.4        How do I format and create a filesystem on a floppy ?
 Q4.5        I get nasty messages about inodes, blocks, and the suchlike
 Q4.6        My swap area isn't working.
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       My root filesystem is read-only !
 Q4.12       I have a huge /proc/kcore !  Can I delete it ?
 Q4.13       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I get Linux to work with my large disk ?

If your disk is an IDE or EIDE drive you should read the Large-IDE
mini-HOWTO}.  Some controllers do translation between `physical'
cylinders/heads/sectors and `logical' ones.

SCSI disks are accessed by linear block numbers; the BIOS invents some
`logical' cylinders/heads/sectors fiction to support DOS.

DOS 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 use access the controller directly..

I'd recommend creating at least one Linux partition entirely under the
1024-logical-cylinder limit and booting off that; the other partitions
will then be OK.

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

Question 4.2.  How can I undelete files ?

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

There are a number of packages available that work by providing new
commands for deletion and sometimes copying that move deleted files into a
`wastebasket' directory instead; they can then be recovered until cleaned
out automatically by background processing.

Alternatively you can search the raw disk device which holds the
filesystem in question.  This is hard work, and you will need to be root
to do this.

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

Question 4.3.  Is there a defragmenter for ext2fs etc. ?

Yes.  There is a Linux filesystem defragmenter for minix, old-style, ext2,
and xia filesystems available on sunsite.unc.edu in
system/Filesystems/defrag-0.6.tar.gz.

Users of the ext2 filesystem can probably do without defrag since ext2
contains extra code to keep fragmentation reduced even in very full
filesystems.

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

Question 4.4.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  You may have to run mke2fs directly
instead of mkfs -t ext2.  The -m 0 option tells mkfs.ext2 not to reserve
any space on the disk for the superuser --- usually the last 10% is
reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.5.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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
filesystem; if you're unlucky the filesystem is trashed and you'll have to
reinitialise it with mkfs (or mke2fs, mkxfs etc.) it and restore from a
backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.6.  My swap area isn't working.

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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.7.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR (which is not
documented).  This will restore a standard MS-DOS Master Boot Record.  If
you have DR-DOS 6.0, go into FDISK in the normal way and then select the
`Re-write Master Boot Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.8.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.9.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/kernel/patches/diskdrives; the auther is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.10.  My ext2fs partitions are checked each time I reboot.

See Q9.11 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.11.  My root filesystem is read-only !

Remount it.  If /etc/fstab is correct you can simply mount -n -o remount
/. If /etc/fstab is wrong you must give the device name and posibly the
type too: e.g. mount -n -o remount -t ext2 /dev/hda2 /.  To understand why
you got into this state see Q9.11 `EXT2-fs: warning: mounting unchecked
filesystem'.

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

Question 4.12.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.13.  My AHA1542C doesn't work with Linux.

The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS 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.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

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

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

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

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

Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sites.  A search engine is
available on the WWW at http://siva.cshl.org/lsm/lsm.html.

Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
first --- search the find-ls or INDEX files for appropriate strings.
Check the Linux Projects Map (LPM), on ftp.ix.de in
/pub/Linux/docs/Projects-Map.gz.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to <linux-announce@news.ornl.gov.edu>).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.3.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden 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 optimisation well
for the 586, but it is quite unreliable, especially at high optimisation
settings.  I'd recommend using the ordinary 486 GCC instead.  The Pentium
GCC can be found on tsx-11.mit.edu in /pub/linux/ALPHA/pentium-gcc.

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

Question 5.5.  What does gcc -O6 do ?

Currently the same as -O2; any number greater than 2 currently works just
like 2.  The Makefiles of newer kernels use -O2, and so should you.

GCC 2.6 adds optimisation level -O3.  However, GCC 2.6.0 and several of
the following versions are known to have some problems with Linux, though
these will hopefully be solved soon.  In any case you should not use -O3
on a program until you're sure it doesn't create any problems.

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

Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q7.6 `How do I
upgrade/recompile my 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 /usr/include/asm

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

Question 5.7.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're using a kernel more recent than 1.1.44 you should find that
there are new directories /usr/src/linux/include/asm-i386.  The directory
asm there should be removed, as should the directory asm.  The symlinks
Makefile target will make these be symbolic links to asm-i36 and
arch/i386/boot respectively.  The easiest way to make sure all this gets
done is not to try to patch 1.1.44 to make 1.1.45, but to download
linux-1.1.45.tar.gz instead.

ld: unrecognised option `-qmagic' means you should get a newer linker,
from tsx-11.mit.edu in /pub/linux/packages/GCC, in the file
image-4.6.xx.tar.gz.

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

Question 5.8.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
It comes with documentation that will tell you what to do.

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

Question 5.9.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (check the GCC documentation) and -s which strips 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.

Using QMAGIC binaries also can reduce the size of binaries, especially
small ones.  Don't worry about this unless you know what QMAGIC is; Linux
is moving to QMAGIC as a default.

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

Question 5.10.  Does Linux support threads or lightweight processes ?

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, most of which are
generic packages for any Unix:

* In sipb.mit.edu:/pub/pthread or 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.
* In 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 as /tr/1993/05/UW-CSE-93-05-06.PS.Z.
* In gummo.doc.ic.ac.uk:/rex is lwp, a very minimal implementation.
* In 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 useable under
  Linux.

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

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

Question 5.11.  Where can I get `lint' for Linux ?

Roughly equivalent functionality is built into the GNU C compiler (gcc)
which is used by Linux systems.  Use the -Wall option to turn on most of
the useful extra warnings.  Check the GCC manual for more details (type
control-h followed by 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 on larch.lcs.mit.edu in /pub/Larch/lclint; on the World Wide
Web look at http://larch-www.lcs.mit.edu:8001/larch/lclint.html.

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

Question 5.12.  Where can I find `kermit' for Linux ?

Kermit has a restrictive copyright which has forced most distribution
maintainers to remove it, or to move the package containing it into an
obscure directory.

The source code is available on kermit.columbia.edu in
/kermit/archives/cku190.tar.gz; Linux binaries are available in
/kermit/bin/ckuker.linux and /kermit/bin/ckuker.linuxtcp.

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQCVAgUBL64gDMMWjroj9a3bAQEeNQP9HKFjOn6Wc08NmiB31eUB9dlqvUS5Rt/u
3qIgs/Gl+LKlsVMjYaqF8bJ0OfrzYEwB1TCQfXeLW4AZt2+vlgh3Z3cbQ/vE6tk/
/tnpcoOY2oYofPxlEEMCC+vh96sqL8C4j2uKrghsGI+kOE0ajQ7epA4WRzeJVbbh
hx0nupDStuA=
=GskA
-----END PGP SIGNATURE-----
-- 
Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
+44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk



^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1995-03-29  5:00 Ian Jackson
  1995-03-29  5:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1995-03-29  5:00 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 30 Mar 1995

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q12.1 `You still
haven't answered my question !', before posting your question to a
newsgroup.

See Q13.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How do I remove LILO so my system boots DOS again ?
 Q4.7        Why can't I use fdformat except as root ?
 Q4.8        Is there something like Stacker or Doublespace for Linux ?
 Q4.9        My ext2fs partitions are checked each time I reboot.
 Q4.10       My root filesystem is read-only !
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?
 Q4.12       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

 Section 6.  Solutions to common miscellaneous problems
 Q6.1        Setuid scripts don't seem to work.
 Q6.2        Free memory as reported by free keeps shrinking.
 Q6.3        When I add more memory it slows to a crawl.
 Q6.4        Some programs (e.g. xdm) won't let me log in.
 Q6.5        Some programs let me log in with no password.
 Q6.6        My machine runs very slowly when I run GCC / X / ...
 Q6.7        I can only log in as root.
 Q6.8        My screen is all full of weird characters instead of letters.
 Q6.9        I have screwed up my system and can't log in to fix it.
 Q6.10       Emacs just dumps core.
 Q6.11       I've discovered a huge security hole in rm !
 Q6.12       lpr and/or lpd aren't working.
 Q6.13       Timestamps on files on msdos partitions are set incorrectly.
 Q6.14       How do I get LILO to boot the vmlinux file ?

 Section 7.  How do I do this or find out that ... ?
 Q7.1        How can I get scrollback in text mode ?
 Q7.2        How do I switch virtual consoles ?  How do I enable them ?
 Q7.3        How do I set the timezone ?
 Q7.4        What version of Linux and what machine name am I using ?
 Q7.5        How can I enable or disable core dumps ?
 Q7.6        How do I upgrade/recompile my kernel ?
 Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
 Q7.8        How do I make a bootable floppy ?
 Q7.9        How do I remap my keyboard to UK, French, etc. ?
 Q7.10       How do I get NUM LOCK to default to on ?
 Q7.11       How can I have more than 128Mb of swap ?

 Section 8.  Miscellaneous information and questions answered
 Q8.1        What is a .gz file ? And a .tgz ? And ... ?
 Q8.2        What does VFS stand for ?
 Q8.3        What is a BogoMip ?
 Q8.4        What is the Linux Journal and where can I get it ?
 Q8.5        How many people use Linux ?
 Q8.6        How should I pronounce Linux ?

 Section 9.  Frequently encountered error messages
 Q9.1        During linking I get Undefined symbol _mcount
 Q9.2        lp1 on fire
 Q9.3        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q9.4        ld: unrecognized option '-m486'
 Q9.5        GCC says Internal compiler error
 Q9.6        make says Error 139
 Q9.7        shell-init: permission denied when I log in.
 Q9.8        No utmp entry.  You must exec ... when I log in.
 Q9.9        Warning - bdflush not running
 Q9.10       Warning: obsolete routing request made.
 Q9.11       EXT2-fs: warning: mounting unchecked filesystem
 Q9.12       EXT2-fs warning: maximal count reached
 Q9.13       EXT2-fs warning: checktime reached
 Q9.14       df says Cannot read table of mounted filesystems
 Q9.15       fdisk says Partition X has different physical/logical ...
 Q9.16       fdisk: Partition 1 does not start on cylinder boundary
 Q9.17       fdisk says partition n has an odd number of sectors
 Q9.18       mtools says cannot initialise drive XYZ
 Q9.19       At the start of booting: Memory tight

 Section 10. The X Window System
 Q10.1       Does Linux support X Windows ?
 Q10.2       Where can I get an XF86Config for my system ?
 Q10.3       xterm logins show up strangely in who, finger
 Q10.4       I can't get X Windows to work right.

 Section 11. Questions applicable to very out-of-date software
 Q11.1       fdisk says cannot use nnn sectors of this partition
 Q11.2       GCC sometimes uses huge amounts of virtual memory and thrashes
 Q11.3       My keyboard goes all funny after I switch VC's.

 Section 12. How to get further assistance
 Q12.1       You still haven't answered my question !
 Q12.2       What to put in a request for help
 Q12.3       I want to mail someone about my problem.

 Section 13. Administrative information and acknowledgements
 Q13.1       Feedback is invited
 Q13.2       Formats in which this FAQ is available
 Q13.3       Authorship and acknowledgements
 Q13.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.  It aims
towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It runs mainly on 386/486/586-based PCs, using the hardware facilities of
the 386 processor family (TSS segments et al) to implement these features.
Ports to other architectures are underway [Q1.4 `What ports to other
processors are there ?'].

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

The Linux kernel is distributed under the GNU General Public License - see
Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

An iBCS2 (Intel Binary Compatibility Standard) emulator for SVR4 ELF and
SVR3.2 COFF binaries is at a fairly advanced stage of development.  See
the file /pub/linux/BETA/ibcs2/README on tsx-11.mit.edu.

Work is progressing on an emulator for Microsoft Windows binaries [Q3.6
`Can I run Microsoft Windows programs under Linux ?'].

For more information see the INFO-SHEET, which is one of the the HOWTOs
[Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
Q5.3 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM and a hard disk are
required.

VESA local bus and PCI are both supported.  A driver for the NCR SCSI chip
in many PCI machines is included in current alpha test release kernels.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux is reported to run on 386 family based laptops, with X on most of
them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386 family processors.

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

Question 1.4.  What ports to other processors are there ?

A project has been underway for a while to port Linux to suitable
68000-series based systems such as Amigas and Ataris.  This has now
reached beta test quality, but still lacks an X server.  There is a 680X0
channel on the Linux Activists mailserver [Q2.8 `What's this mailing list
thing at niksula.hut.fi ?'], and a Linux/68K FAQ on the World Wide Web and
on tsx-11.mit.edu in /pub/linux/680x0/FAQ.  There is a mailing list for
the Atari port - mail <majordomo@phil.uni-sb.de> with a body containing
only subscribe atarix - and an ftp area on ftp.phil.uni-sb.de in
/pub/atari/linux.

Information about a port to 68K-based Macintoshes can be found in the
MacLinux FAQ, available on www.ibg.uu.se in /pub/maclinux/FAQ.txt.  Other
stuff may be in the same directory.  There is a mailing list, but it is
currently broken.

Work has just been started on a port to the PowerPC.  Currently this will
be based on the PowerMAC architecture.  Again, don't post asking about it
unless you have experience to offer, and don't hold your breath.  There is
a mailing list at <majordomo@vger.rutgers.edu>, and a FAQ on
liber.stanford.edu in /pub/linuxppc/linux-ppc-FAQ or on the WWW at
http://liber.stanford.edu/linuxppc/linux-ppc-FAQ.html.

Both Linus and Jim Paradis <paradis@sousa.amt.ako.dec.com> or
<jrp@world.std.com> are working on ports to the 64-bit DEC AXP (the
Alpha).  Again, mailing list at <majordomo@vger.rutgers.edu>.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
also a MIPS channel on the Linux Activists mailserver and a list
linux-mips at vger.rutgers.edu.  Interested people may mail their
questions and offers of assistance to <linux@waldorf-gmbh.de>.

There are currently two ports of Linux to the ARM family of processors
ongoing; one of these is to the ARM3 as fitted to the Acorn A5000, and
includes I/O drivers for the 82710/11 as appropriate, and the other is to
the ARM610 as fitted to 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 fairly soon.  For more up to date information watch the
newsgroups comp.sys.acorn and comp.sys.acorn.tech, or on the WWW at
http://whirligig.ecs.soton.ac.uk/~rmk92/armlinux.html; if you want to
volunteer you should contact Martin Ebourne <mje@soton.ac.uk>.

None of the above ports will be capable of running Linux/386 binaries.

Linux port to the Aleph 1 486 card (*not* the second processor card for
the Risc PC yet, but the original PC-on-a-podule card) has been completed
and appears stable.  Full details on this version, and updates on general
ports in progress, can be found on the WWW at
http://www.ph.kcl.ac.uk/~amb/linux.html.

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

Question 1.5.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
including some space for user files and spool areas.

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

Question 1.6.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.  This is not the same as Public Domain (see the Copyright
FAQ, available on rtfm.mit.edu in
/pub/usenet/news.answers/law/Copyright-FAQ, for details).

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The licences 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
material by FTP ?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

     Linux INFO-SHEET                        Linux META-FAQ
     BUPS HOWTO (re the Back UPS).           Busmouse HOWTO
     CDROM HOWTO                             Commercial HOWTO
     Danish HOWTO                            Distribution HOWTO
     DOSEMU HOWTO                            ELF HOWTO
     Ethernet HOWTO                          Ftape HOWTO
     German HOWTO                            HAM HOWTO
     Hardware HOWTO                          Installation HOWTO
     Japanese Extensions HOWTO               Kernel HOWTO
     Keystroke HOWTO                         Mail HOWTO
     MGR HOWTO                               NET-2 HOWTO
     News HOWTO                              NIS HOWTO (NIS=Sun's YP)
     PCI HOWTO                               PCMCIA HOWTO
     Printing HOWTO                          PPP HOWTO
     SCSI HOWTO                              SCSI-Programming HOWTO
     Serial HOWTO                            Sound HOWTO
     Term HOWTO                              Tips HOWTO
     UUCP HOWTO                              UPS HOWTO
     XFree86 HOWTO

More of these documents are always in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also several mini-HOWTOs on sunsite.unc.edu in the
/pub/Linux/docs/HOWTO/mini directory.

The file WRITING contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Greg Hankins, <gregh@cc.gatech.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are ten international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@news.ornl.gov.

comp.os.linux.answers contains all the FAQs, HOWTOs and other important
documentation.  You should subscribe to this too.

Also worth reading are the other groups in the comp.os.linux.* hierarchy
- -- you may find that many common problems are too recent to find in this
FAQ but are answered in the newsgroups.  These groups are
comp.os.linux.setup, comp.os.linux.hardware, comp.os.linux.networking,
comp.os.linux.x, comp.os.linux.development.apps,
comp.os.linux.development.system, comp.os.linux.advocacy and
comp.os.linux.misc.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q12.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup -- see `Welcome to
the comp.os.linux.* hierarchy' which is posted every two weeks to
comp.os.linux.announce, comp.os.linux.answers and other groups.

Crossposting between different comp.os.linux.* groups is rarely a good
idea.

There may well be Linux groups local to your institution or area - check
there first.

The groups comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.help were superseded in a recent newsgroup reorganisation.
You should no longer use them.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
The German one is de.comp.os.linux.  In Australia, try
aus.computers.linux.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run Linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of those releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
also a large number of other releases which are distributed less globally,
which suit special local and national requirements (for example, better
internationalisation support).

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux

The MCC-Interim release is available from ftp.mcc.ac.uk (US, 130.88.200.7)
in /pub/linux; the TAMU release is available from net.tamu.edu (US,
128.194.177.1) in /pub/linux.

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

* src.doc.ic.ac.uk : /packages/Linux (UK)
* sunacm.swan.ac.uk : /pub/Linux (UK)
* ftp.ibp.fr : /pub/linux (France)
* ftp.cc.gatech.edu : /pub/linux (US - southeast: Suranet)
* wuarchive.wustl.edu : /systems/linux (US)
* mrcnext.cso.uiuc.edu : /pub/linux (US)
* ftp.cdrom.com : /pub/linux (US)
* ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
* ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
* ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
* ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
* bond.edu.au : /pub/OS/Linux (Australia)
* monu1.cc.monash.edu.au : /pub/linux (Australia)
* ftp.sun.ac.za : /pub/linux (South Africa)
* ftp.inf.utfsm.cl : /pub/Linux (Chile)

Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

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

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the old set of comp.os.linux.* groups are available
by subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

Note that a new mailing list server is gaining rapid acceptance - send
message with list in the body to <majordomo@vger.rutgers.edu> (add help to
your mail if you don't have the standard Majordomo help file).  This
server contains lists corresponding to all of the channels at the niksula
multi-channel server (NB that these pairs of lists are *not* connected by
gateways - they are separate lists with the same target audience).

The ANNOUNCE list on niksula is a digest of postings to
comp.os.linux.announce, for the benefit of those without Usenet access.
However since niksula.hut.fi is slow and overloaded I'd recommend
subscribing to the MIT digestifier instead [Q2.7 `I don't have Usenet
access.  Where do I get information ?'].

There is also a NEWBIE channel (linux-newbie at vger) where `no question
is too stupid'; unfortunately it seems that few of the experienced users
read that channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the niksula
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

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

Question 2.9.  Are the newsgroups archived anywhere ?

sunsite.unc.edu contains archives of comp.os.linux.announce, in
/pub/Linux/docs/linux-announce.archive.  These are mirrored from /usenet
on src.doc.ic.ac.uk.

There is an `easy to access' archive of comp.os.linux.announce on the
World Wide Web at http://www.leo.org/archiv/linux/archiv/ann_index.html.
It supports searching and browsing.

I do not know of any (current) archives of the other groups in the
comp.os.linux hierarchy.

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  See Q1.2 `What software does it support ?' for details and status
of the emulators for DOS, MS Windows and System V programs.

Linux can also access Minix and System V UFS filesystems, and can read
(but not yet write) OS/2 HPFS and Amiga filesystems.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.5 `Where can I get Linux material by FTP
?'.

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.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not very easily.  You can access them from within the DOS emulator [Q1.2
`What software does it support ?'], but it's harder to do as a normal
filesystem under Linux or using mtools.  There is a module available for
the Linux kernel which can do read-only access of the compressed volume.
Look on sunsite.unc.edu in /pub/Linux/system/Filesystems, for the ths
package.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is a primitive, alpha test read-only Amiga filesystem
on sunsite.unc.edu in /pub/Linux/patches/amigaffs.tar.Z.  More information
is in affs-readme in the tarfile.

The 1.1.x alpha test kernel series contains support for the UFS filesystem
used by System V and Coherent.

There is a set of user-level programs that provides read-only access to
the Macintosh hierarchical filing system (HFS). It is available on
sunsite.unc.edu in /pub/Linux/utils/disk-management/xhfs0_3.tgz.  This is
being turned into a kernel module, which is available on sunsite.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. 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.)

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How do I remove LILO so my system boots DOS again ?
 Q4.7        Why can't I use fdformat except as root ?
 Q4.8        Is there something like Stacker or Doublespace for Linux ?
 Q4.9        My ext2fs partitions are checked each time I reboot.
 Q4.10       My root filesystem is read-only !
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?
 Q4.12       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I undelete files ?

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

There are a number of packages available that work by providing new
commands for deletion and sometimes copying that move deleted files into a
`wastebasket' directory instead; they can then be recovered until cleaned
out automatically by background processing.

Alternatively you can search the raw disk device which holds the
filesystem in question.  This is hard work, and you will need to be root
to do this.

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

Question 4.2.  Is there a defragmenter for ext2fs etc. ?

Yes.  There is a Linux filesystem defragmenter for minix, old-style, ext2,
and xia filesystems available on sunsite.unc.edu in
system/Filesystems/defrag-0.6.tar.gz.

Users of the ext2 filesystem can probably do without defrag since ext2
contains extra code to keep fragmentation reduced even in very full
filesystems.

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

Question 4.3.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  You may have to run mke2fs directly
instead of mkfs -t ext2.  The -m 0 option tells mkfs.ext2 not to reserve
any space on the disk for the superuser --- usually the last 10% is
reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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
filesystem; if you're unlucky the filesystem is trashed and you'll have to
reinitialise it with mkfs (or mke2fs, mkxfs etc.) it and restore from a
backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.5.  My swap area isn't working.

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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.6.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR (which is not
documented).  This will restore a standard MS-DOS Master Boot Record.  If
you have DR-DOS 6.0, go into FDISK in the normal way and then select the
`Re-write Master Boot Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.7.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.8.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.9.  My ext2fs partitions are checked each time I reboot.

See Q9.11 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.10.  My root filesystem is read-only !

Remount it.  If /etc/fstab is correct you can simply mount -n -o remount
/. If /etc/fstab is wrong you must give the device name and posibly the
type too: e.g. mount -n -o remount -t ext2 /dev/hda2 /.  To understand why
you got into this state see Q9.11 `EXT2-fs: warning: mounting unchecked
filesystem'.

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

Question 4.11.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.12.  My AHA1542C doesn't work with Linux.

The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS 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.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?
 Q5.11       Where can I get `lint' for Linux ?
 Q5.12       Where can I find `kermit' for Linux ?

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

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

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

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

Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sites.  A search engine is
available on the WWW at http://siva.cshl.org/lsm/lsm.html.

Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
first --- search the find-ls or INDEX files for appropriate strings.
Check the Linux Projects Map (LPM), on ftp.ix.de in
/pub/Linux/docs/Projects-Map.gz.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to <linux-announce@news.ornl.gov.edu>).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.3.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden 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 optimisation well
for the 586, but it is quite unreliable, especially at high optimisation
settings.  I'd recommend using the ordinary 486 GCC instead.  The Pentium
GCC can be found on tsx-11.mit.edu in /pub/linux/ALPHA/pentium-gcc.

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

Question 5.5.  What does gcc -O6 do ?

Currently the same as -O2; any number greater than 2 currently works just
like 2.  The Makefiles of newer kernels use -O2, and so should you.

GCC 2.6 adds optimisation level -O3.  However, GCC 2.6.0 and several of
the following versions are known to have some problems with Linux, though
these will hopefully be solved soon.  In any case you should not use -O3
on a program until you're sure it doesn't create any problems.

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

Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q7.6 `How do I
upgrade/recompile my 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 /usr/include/asm

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

Question 5.7.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're using a kernel more recent than 1.1.44 you should find that
there are new directories /usr/src/linux/include/asm-i386.  The directory
asm there should be removed, as should the directory asm.  The symlinks
Makefile target will make these be symbolic links to asm-i36 and
arch/i386/boot respectively.  The easiest way to make sure all this gets
done is not to try to patch 1.1.44 to make 1.1.45, but to download
linux-1.1.45.tar.gz instead.

ld: unrecognised option `-qmagic' means you should get a newer linker,
from tsx-11.mit.edu in /pub/linux/packages/GCC, in the file
image-4.6.xx.tar.gz.

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

Question 5.8.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
It comes with documentation that will tell you what to do.

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

Question 5.9.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (check the GCC documentation) and -s which strips 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.

Using QMAGIC binaries also can reduce the size of binaries, especially
small ones.  Don't worry about this unless you know what QMAGIC is; Linux
is moving to QMAGIC as a default.

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

Question 5.10.  Does Linux support threads or lightweight processes ?

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, most of which are
generic packages for any Unix:

* In sipb.mit.edu:/pub/pthread or 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.
* In 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 as /tr/1993/05/UW-CSE-93-05-06.PS.Z.
* In gummo.doc.ic.ac.uk:/rex is lwp, a very minimal implementation.
* In 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 useable under
  Linux.

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

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

Question 5.11.  Where can I get `lint' for Linux ?

Roughly equivalent functionality is built into the GNU C compiler (gcc)
which is used by Linux systems.  Use the -Wall option to turn on most of
the useful extra warnings.  Check the GCC manual for more details (type
control-h followed by 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 on larch.lcs.mit.edu in /pub/Larch/lclint; on the World Wide
Web look at http://larch-www.lcs.mit.edu:8001/larch/lclint.html.

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

Question 5.12.  Where can I find `kermit' for Linux ?

Kermit has a restrictive copyright which has forced most distribution
maintainers to remove it, or to move the package containing it into an
obscure directory.

The source code is available on kermit.columbia.edu in
/kermit/archives/cku190.tar.gz; Linux binaries are available in
/kermit/bin/ckuker.linux and /kermit/bin/ckuker.linuxtcp.

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQCVAgUBL3vrMsMWjroj9a3bAQEXqwQAjgm9wOTKOLlyGJiZbgBVdyhB5JxndL4w
0FOJGwJK3QcT2UjU3s3KpzriKhBCf/gfa1zuKXe3tsQaiUHUeIgWCpJOZn4TmnYl
9v8Om9PS9MHTyhiqs4MPlfWwRnH9d2CAzhr+ObKnjH1rZNRLCYLKb/a7/3y7xaez
pWp/OIAf6RU=
=pV5+
-----END PGP SIGNATURE-----
-- 
Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
+44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk



^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1994-12-21 20:54 Ian Jackson
  1994-12-21 20:54 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1994-12-21 20:54 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 21 Dec 1994

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q12.1 `You still
haven't answered my question !', before posting your question to the
newsgroup comp.os.linux.help.

See Q13.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How do I remove LILO so my system boots DOS again ?
 Q4.7        Why can't I use fdformat except as root ?
 Q4.8        Is there something like Stacker or Doublespace for Linux ?
 Q4.9        My ext2fs partitions are checked each time I reboot.
 Q4.10       My root filesystem is read-only !
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?
 Q4.12       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?

 Section 6.  Solutions to common miscellaneous problems
 Q6.1        Setuid scripts don't seem to work.
 Q6.2        Free memory as reported by free keeps shrinking.
 Q6.3        When I add more memory it slows to a crawl.
 Q6.4        Some programs (e.g. xdm) won't let me log in.
 Q6.5        Some programs let me log in with no password.
 Q6.6        My machine runs very slowly when I run GCC / X / ...
 Q6.7        I can only log in as root.
 Q6.8        My screen is all full of weird characters instead of letters.
 Q6.9        I have screwed up my system and can't log in to fix it.
 Q6.10       Emacs just dumps core.
 Q6.11       I've discovered a huge security hole in rm !
 Q6.12       lpr and/or lpd aren't working.

 Section 7.  How do I do this or find out that ... ?
 Q7.1        How can I get scrollback in text mode ?
 Q7.2        How do I switch virtual consoles ?  How do I enable them ?
 Q7.3        How do I set the timezone ?
 Q7.4        What version of Linux and what machine name am I using ?
 Q7.5        How can I enable or disable core dumps ?
 Q7.6        How do I upgrade/recompile my kernel ?
 Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
 Q7.8        How do I make a bootable floppy ?
 Q7.9        How do I remap my keyboard to UK, French, etc. ?
 Q7.10       How do I get NUM LOCK to default to on ?
 Q7.11       How can I have more than 128Mb of swap ?

 Section 8.  Miscellaneous information and questions answered
 Q8.1        What is a .gz file ? And a .tgz ? And ... ?
 Q8.2        What does VFS stand for ?
 Q8.3        What is a BogoMip ?
 Q8.4        What is the Linux Journal and where can I get it ?
 Q8.5        How many people use Linux ?
 Q8.6        How should I pronounce Linux ?

 Section 9.  Frequently encountered error messages
 Q9.1        During linking I get Undefined symbol _mcount
 Q9.2        lp1 on fire
 Q9.3        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q9.4        ld: unrecognized option '-m486'
 Q9.5        GCC says Internal compiler error
 Q9.6        make says Error 139
 Q9.7        shell-init: permission denied when I log in.
 Q9.8        No utmp entry.  You must exec ... when I log in.
 Q9.9        Warning - bdflush not running
 Q9.10       Warning: obsolete routing request made.
 Q9.11       EXT2-fs: warning: mounting unchecked filesystem
 Q9.12       EXT2-fs warning: maximal count reached
 Q9.13       EXT2-fs warning: checktime reached
 Q9.14       df says Cannot read table of mounted filesystems
 Q9.15       fdisk says Partition X has different physical/logical ...
 Q9.16       fdisk: Partition 1 does not start on cylinder boundary
 Q9.17       fdisk says cannot use nnn sectors of this partition
 Q9.18       fdisk says partition n has an odd number of sectors
 Q9.19       mtools says cannot initialise drive XYZ

 Section 10. The X Window System
 Q10.1       Does Linux support X Windows ?
 Q10.2       Where can I get an XF86Config for my system ?
 Q10.3       xterm logins show up strangely in who, finger
 Q10.4       I can't get X Windows to work right.

 Section 11. Questions applicable to very out-of-date software
 Q11.1       GCC sometimes uses huge amounts of virtual memory and thrashes
 Q11.2       My keyboard goes all funny after I switch VC's.

 Section 12. How to get further assistance
 Q12.1       You still haven't answered my question !
 Q12.2       What to put in a posting to comp.os.linux.help
 Q12.3       I want to mail someone about my problem.

 Section 13. Administrative information and acknowledgements
 Q13.1       Feedback is invited
 Q13.2       Formats in which this FAQ is available
 Q13.3       Authorship and acknowledgements
 Q13.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.  It aims
towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It runs mainly on 386/486/586-based PCs, using the hardware facilities of
the 386 processor family (TSS segments et al) to implement these features.
Ports to other architectures are underway [Q1.4 `What ports to other
processors are there ?'].

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

The Linux kernel is distributed under the GNU General Public License - see
Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
386BSD ?  Minix ?'].  Work is progressing on an iBCS2 (Intel Binary
Compatibility Standard) emulator for SVR4 ELF and SVR3.2 COFF binaries
(see the iBCS2 emulator source tree README file for details) and an
emulator for Microsoft Windows binaries [Q3.6 `Can I run Microsoft Windows
programs under Linux ?'].

For more information see the INFO-SHEET, which is one of the the HOWTOs
[Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
Q5.3 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM and a hard disk are
required.

VESA local bus and PCI are both supported.  A driver for the NCR SCSI chip
in many PCI machines is included in current alpha test release kernels.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux is reported to run on 386 family based laptops, with X on most of
them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386 family processors.

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

Question 1.4.  What ports to other processors are there ?

A project has been underway for around two years to port Linux to suitable
68000-series based systems such as Amigas and Ataris.  This has now
reached beta test quality, but still lacks an X server.  There is a 680X0
channel on the Linux Activists mailserver [Q2.8 `What's this mailing list
thing at niksula.hut.fi ?'], and a Linux/68K FAQ on the World Wide Web and
on tsx-11.mit.edu in /pub/linux/680x0/FAQ.

Work has just been started on a port to the PowerPC.  Currently this will
be based on the PowerMAC architecture (on a political note, you might like
to know that the FSF disapprove of Apple - see /usr/lib/emacs/19.*/APPLE
on your system).  Again, don't post asking about it unless you have
experience to offer, and don't hold your breath.

Jim Paradis <paradis@sousa.amt.ako.dec.com> or <jrp@world.std.com> is
working on a port to the 64-bit DEC AXP (the Alpha).  This can currently
boot from a floppy disk or disk image loaded into a ramdisk at boot time.
Disk drivers are not yet available.  Please email him of you have access
to an ISA or EISA-based Alpha AXP and wish to contribute to the project,
or have access to another class of Alpha and are willing to write drivers.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
also a MIPS channel on the Linux Activists mailserver.  Interested people
may mail their questions and offers of assistance to
<linux@waldorf-gmbh.de>.

None of these ports will be capable of running Linux/386 binaries.

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

Question 1.5.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
including some space for user files and spool areas.

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

Question 1.6.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The licences 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
material by FTP ?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

     Linux INFO-SHEET                        Linux META-FAQ
     BUPS HOWTO (regarding the Back UPS).    Busmouse HOWTO
     CDROM HOWTO                             Distribution HOWTO
     DOSEMU HOWTO                            Ethernet HOWTO
     Ftape HOWTO                             Hardware HOWTO
     Installation HOWTO                      Japanese Extensions HOWTO
     Keystroke HOWTO                         Mail HOWTO
     MGR HOWTO                               NET-2 HOWTO
     News HOWTO                              Printing HOWTO
     SCSI HOWTO                              Sound HOWTO
     Term HOWTO                              Tips HOWTO
     UUCP HOWTO                              XFree86 HOWTO
More of these documents are always in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also a few mini-HOWTOs on sunsite.unc.edu in the
/pub/Linux/docs/HOWTO/mini directory.

The HOWTO.INDEX also contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are five international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@tc.cornell.edu.

comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.misc are also worth reading -- you may find that many common
problems are too recent to find in this FAQ but are answered in the
newsgroups.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q12.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup.  Crossposting is
rarely a good idea.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
The German one is de.comp.os.linux.  In Australia, try
aus.computers.linux.

There may well be Linux groups local to your institution or area - check
there first.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run Linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of those releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
also a large number of other releases which are distributed less globally,
which suit special local and national requirements (for example, better
internationalisation support).

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux

The MCC-Interim release is available from ftp.mcc.ac.uk (US, 130.88.200.7)
in /pub/linux; the TAMU release is available from net.tamu.edu (US,
128.194.177.1) in /pub/linux.

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

* src.doc.ic.ac.uk : /packages/Linux (UK)
* sunacm.swan.ac.uk : /pub/Linux (UK)
* ftp.ibp.fr : /pub/linux (France)
* wuarchive.wustl.edu : /systems/linux (US)
* mrcnext.cso.uiuc.edu : /pub/linux (US)
* ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
* ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
* ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
* ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
* bond.edu.au : /pub/OS/Linux (Australia)
* monu1.cc.monash.edu.au : /pub/linux (Australia)
* ftp.sun.ac.za : /pub/linux (South Africa)

Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

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

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the comp.os.linux.* groups are available by
subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
for the benefit of those without Usenet access.  However since
niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
digestifier instead [Q2.7 `I don't have Usenet access.  Where do I get
information ?'].

There is also a NEWBIE channel where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

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

Question 2.9.  Are the newsgroups archived anywhere ?

Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
comp.os.linux.announce and the old group comp.os.linux, in their Linux
areas.  The comp.os.linux.announce archives are mirrored from /usenet on
src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).

There is an `easy to access' archive of comp.os.linux.announce on the
World Wide Web at http://www.leo.org/archiv/linux/archiv/ann_index.html.
It supports searching and browsing.

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

Linux can also access Minix and System V UFS filesystems, and can read
(but not yet write) OS/2 HPFS and Amiga filesystems.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.5 `Where can I get Linux material by FTP
?'.

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.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
filesystem under Linux or using mtools.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is a primitive, alpha test read-only Amiga filesystem
on sunsite.unc.edu in /pub/Linux/patches/amigaffs.tar.Z.  More information
is in affs-readme in the tarfile.

The 1.1.x alpha test kernel series contains support for the UFS filesystem
used by System V and Coherent.

There is a set of user-level programs that provides read-only access to
the Macintosh hierarchical filing system (HFS). It is available on
sunsite.unc.edu in /pub/Linux/utils/disk-management/xhfs0_3.tgz.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS.  This is so
that OS/2 knows about the partition being formatted.

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How do I remove LILO so my system boots DOS again ?
 Q4.7        Why can't I use fdformat except as root ?
 Q4.8        Is there something like Stacker or Doublespace for Linux ?
 Q4.9        My ext2fs partitions are checked each time I reboot.
 Q4.10       My root filesystem is read-only !
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?
 Q4.12       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I undelete files ?

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

There are a number of packages available that work by providing new
commands for deletion and sometimes copying that move deleted files into a
`wastebasket' directory instead; they can then be recovered until cleaned
out automatically by background processing.

Alternatively you can search the raw disk device which holds the
filesystem in question.  This is hard work, and you will need to be root
to do this.

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

Question 4.2.  Is there a defragmenter for ext2fs etc. ?

Yes.  There is a Linux filesystem defragmenter for minix, old-style, ext2,
and xia filesystems available on sunsite.unc.edu in
system/Filesystems/defrag-0.6.tar.gz.

Users of the ext2 filesystem can probably do without defrag since ext2
contains extra code to keep fragmentation reduced even in very full
filesystems.

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

Question 4.3.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  If you don't have the fsutils package
you'll have to run mke2fs instead of mkfs -t ext2.  The -m 0 option tells
mkfs.ext2 not to reserve any space on the disk for the superuser ---
usually the last 10% is reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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 fsutils package) will be able to repair your filesystem; if
you're unlucky the filesystem is trashed and you'll have to reinitialise
it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.5.  My swap area isn't working.

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 or /etc/rc.local (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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.6.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
into FDISK in the normal way and then select the `Re-write Master Boot
Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.7.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.8.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.9.  My ext2fs partitions are checked each time I reboot.

See Q9.11 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.10.  My root filesystem is read-only !

Remount it.  If /etc/fstab is correct you can simply mount -n -o remount
/. If /etc/fstab is wrong you must give the device name and posibly the
type too: e.g. mount -n -o remount -t ext2 /dev/hda2 /.  To understand why
you got into this state see Q9.11 `EXT2-fs: warning: mounting unchecked
filesystem'.

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

Question 4.11.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.12.  My AHA1542C doesn't work with Linux.

The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS 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.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?

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

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

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

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

Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sties.

Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
first --- search the find-ls or INDEX files for appropriate strings.
Check the Linux Projects Map (LPM), on ftp.ix.de in
/pub/Linux/docs/Projects-Map.gz.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to <linux-announce@tc.cornell.edu>).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.3.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.

GCC does not currently know how to do optimisation well for the 586,
because Intel won't release the necessary information except under
nondisclosure.  Don't buy a Pentium or wait for people to reverse-engineer
the required optimisations.

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

Question 5.5.  What does gcc -O6 do ?

Currently the same as -O2; any number greater than 2 currently works just
like 2.  The Makefiles of newer kernels use -O2, and so should you.

GCC 2.6 adds optimisation level -O3.  However, GCC 2.6.0 and several of
the following versions are known to have some problems with Linux, though
these will hopefully be solved soon.  In any case you should not use -O3
on a program until you're sure it doesn't create any problems.

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

Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q7.6 `How do I
upgrade/recompile my 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 /usr/include/asm

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

Question 5.7.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're using a kernel more recent than 1.1.44 you should find that
there are new directories /usr/src/linux/include/asm-i386.  The directory
asm there should be removed, as should the directory asm.  The symlinks
Makefile target will make these be symbolic links to asm-i36 and
arch/i386/boot respectively.  The easiest way to make sure all this gets
done is not to try to patch 1.1.44 to make 1.1.45, but to download
linux-1.1.45.tar.gz instead.

ld: unrecognised option `-qmagic' means you should get a newer linker,
from tsx-11.mit.edu in /pub/linux/packages/GCC.

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

Question 5.8.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
It comes with documentation that will tell you what to do.

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

Question 5.9.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (check the GCC documentation) and -s which strips 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.

Using QMAGIC binaries also can reduce the size of binaries, especially
small ones.  Don't worry about this unless you know what QMAGIC is; Linux
is moving to QMAGIC as a default.

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

Question 5.10.  Does Linux support threads or lightweight processes ?

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, most of which are
generic packages for any Unix:

* In sipb.mit.edu:/pub/pthread or 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.
* In 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 as /tr/1993/05/UW-CSE-93-05-06.PS.Z.
* In gummo.doc.ic.ac.uk:/rex is lwp, a very minimal implementation.
* In 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 useable under
  Linux.

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

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQCVAgUBLviWxcMWjroj9a3bAQEQ9AP8DDbvqkxCnl1NtHiVx7X28ik7RxrHyqyn
QUh8LOD0OMFFYYg467renkRVMH5hYPFOCaZoFgS9gPIkmhp26ONk1BMYHatplItt
Hk+9MkoE4qcDYBi5vKVwgp+5mnbSvC6AYu+tcGAg2e3DBXxp2rcIEmr+m+MU5njc
OEQF9ClkHBE=
=lDrR
-----END PGP SIGNATURE-----
-- 
Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
+44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1994-11-30 23:28 Ian Jackson
  1994-11-30 23:29 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1994-11-30 23:28 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 30 Nov 1994

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q12.1 `You still
haven't answered my question !', before posting your question to the
newsgroup comp.os.linux.help.

See Q13.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How do I remove LILO so my system boots DOS again ?
 Q4.7        Why can't I use fdformat except as root ?
 Q4.8        Is there something like Stacker or Doublespace for Linux ?
 Q4.9        My ext2fs partitions are checked each time I reboot.
 Q4.10       I have a huge /proc/kcore !  Can I delete it ?
 Q4.11       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?

 Section 6.  Solutions to common miscellaneous problems
 Q6.1        Setuid scripts don't seem to work.
 Q6.2        Free memory as reported by free keeps shrinking.
 Q6.3        When I add more memory it slows to a crawl.
 Q6.4        Some programs (e.g. xdm) won't let me log in.
 Q6.5        Some programs let me log in with no password.
 Q6.6        My machine runs very slowly when I run GCC / X / ...
 Q6.7        I can only log in as root.
 Q6.8        My screen is all full of weird characters instead of letters.
 Q6.9        I have screwed up my system and can't log in to fix it.
 Q6.10       Emacs just dumps core.
 Q6.11       I've discovered a huge security hole in rm !
 Q6.12       lpr and/or lpd aren't working.

 Section 7.  How do I do this or find out that ... ?
 Q7.1        How can I get scrollback in text mode ?
 Q7.2        How do I switch virtual consoles ?  How do I enable them ?
 Q7.3        How do I set the timezone ?
 Q7.4        What version of Linux and what machine name am I using ?
 Q7.5        How can I enable or disable core dumps ?
 Q7.6        How do I upgrade/recompile my kernel ?
 Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
 Q7.8        How do I make a bootable floppy ?
 Q7.9        How do I remap my keyboard to UK, French, etc. ?
 Q7.10       How do I get NUM LOCK to default to on ?

 Section 8.  Miscellaneous information and questions answered
 Q8.1        What is a .gz file ? And a .tgz ? And ... ?
 Q8.2        What does VFS stand for ?
 Q8.3        What is a BogoMip ?
 Q8.4        What is the Linux Journal and where can I get it ?
 Q8.5        How many people use Linux ?
 Q8.6        How should I pronounce Linux ?

 Section 9.  Frequently encountered error messages
 Q9.1        During linking I get Undefined symbol _mcount
 Q9.2        lp1 on fire
 Q9.3        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q9.4        ld: unrecognized option '-m486'
 Q9.5        GCC says Internal compiler error
 Q9.6        make says Error 139
 Q9.7        shell-init: permission denied when I log in.
 Q9.8        No utmp entry.  You must exec ... when I log in.
 Q9.9        Warning - bdflush not running
 Q9.10       Warning: obsolete routing request made.
 Q9.11       EXT2-fs: warning: mounting unchecked filesystem
 Q9.12       EXT2-fs warning: maximal count reached
 Q9.13       EXT2-fs warning: checktime reached
 Q9.14       df says Cannot read table of mounted filesystems
 Q9.15       fdisk says Partition X has different physical/logical ...
 Q9.16       fdisk: Partition 1 does not start on cylinder boundary
 Q9.17       fdisk says cannot use nnn sectors of this partition
 Q9.18       fdisk says partition n has an odd number of sectors
 Q9.19       mtools says cannot initialise drive XYZ

 Section 10. The X Window System
 Q10.1       Does Linux support X Windows ?
 Q10.2       Where can I get an XF86Config for my system ?
 Q10.3       xterm logins show up strangely in who, finger
 Q10.4       I can't get X Windows to work right.

 Section 11. Questions applicable to very out-of-date software
 Q11.1       How can I have more than 16Mb of swap ?
 Q11.2       GCC sometimes uses huge amounts of virtual memory and thrashes
 Q11.3       My keyboard goes all funny after I switch VC's.

 Section 12. How to get further assistance
 Q12.1       You still haven't answered my question !
 Q12.2       What to put in a posting to comp.os.linux.help

 Section 13. Administrative information and acknowledgements
 Q13.1       Feedback is invited
 Q13.2       Formats in which this FAQ is available
 Q13.3       Authorship and acknowledgements
 Q13.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.  It aims
towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It runs mainly on 386/486/586-based PCs, using the hardware facilities of
the 386 processor family (TSS segments et al) to implement these features.
Ports to other architectures are underway [Q1.4 `What ports to other
processors are there ?'].

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

The Linux kernel is distributed under the GNU General Public License - see
Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
386BSD ?  Minix ?'].  Work is progressing on an iBCS2 (Intel Binary
Compatibility Standard) emulator for SVR4 ELF and SVR3.2 COFF binaries
(see the iBCS2 emulator source tree README file for details) and an
emulator for Microsoft Windows binaries [Q3.6 `Can I run Microsoft Windows
programs under Linux ?'].

For more information see the INFO-SHEET, which is one of the the HOWTOs
[Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
Q5.3 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM and a hard disk are
required.

VESA local bus and PCI are both supported.  A driver for the NCR SCSI chip
in many PCI machines is included in current alpha test release kernels.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux is reported to run on 386 family based laptops, with X on most of
them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386 family processors.

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

Question 1.4.  What ports to other processors are there ?

A project has been underway for around two years to port Linux to suitable
68000-series based systems such as Amigas and Ataris.  This has now
reached beta test quality, but still lacks an X server.  There is a 680X0
channel on the Linux Activists mailserver [Q2.8 `What's this mailing list
thing at niksula.hut.fi ?'], and a Linux/68K FAQ on the World Wide Web and
on tsx-11.mit.edu in /pub/linux/680x0/FAQ.

Work has just been started on a port to the PowerPC.  Currently this will
be based on the PowerMAC architecture (on a political note, you might like
to know that the FSF disapprove of Apple - see /usr/lib/emacs/19.*/APPLE
on your system).  Again, don't post asking about it unless you have
experience to offer, and don't hold your breath.

Jim Paradis <paradis@sousa.amt.ako.dec.com> or <jrp@world.std.com> is
working on a port to the 64-bit DEC AXP (the Alpha).  This can currently
boot from a floppy disk or disk image loaded into a ramdisk at boot time.
Disk drivers are not yet available.  Please email him of you have access
to an ISA or EISA-based Alpha AXP and wish to contribute to the project,
or have access to another class of Alpha and are willing to write drivers.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
also a MIPS channel on the Linux Activists mailserver.  Interested people
may mail their questions and offers of assistance to
<linux@waldorf-gmbh.de>.

None of these ports will be capable of running Linux/386 binaries.

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

Question 1.5.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
including some space for user files and spool areas.

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

Question 1.6.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The licences 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
material by FTP ?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

     Linux INFO-SHEET                        Linux META-FAQ
     BUPS HOWTO (regarding the Back UPS).    Busmouse HOWTO
     CDROM HOWTO                             Distribution HOWTO
     DOSEMU HOWTO                            Ethernet HOWTO
     Ftape HOWTO                             Hardware HOWTO
     Installation HOWTO                      Japanese Extensions HOWTO
     Keystroke HOWTO                         Mail HOWTO
     MGR HOWTO                               NET-2 HOWTO
     News HOWTO                              Printing HOWTO
     SCSI HOWTO                              Sound HOWTO
     Term HOWTO                              Tips HOWTO
     UUCP HOWTO                              XFree86 HOWTO
More of these documents are always in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also a few mini-HOWTOs on sunsite.unc.edu in the
/pub/Linux/docs/HOWTO/mini directory.

The HOWTO.INDEX also contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are five international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@tc.cornell.edu.

comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.misc are also worth reading -- you may find that many common
problems are too recent to find in this FAQ but are answered in the
newsgroups.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q12.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup.  Crossposting is
rarely a good idea.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
The German one is de.comp.os.linux.  In Australia, try
aus.computers.linux.

There may well be Linux groups local to your institution or area - check
there first.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run Linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of those releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
also a large number of other releases which are distributed less globally,
which suit special local and national requirements (for example, better
internationalisation support).

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux

The MCC-Interim release is available from ftp.mcc.ac.uk (US, 130.88.200.7)
in /pub/linux; the TAMU release is available from net.tamu.edu (US,
128.194.177.1) in /pub/linux.

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

* src.doc.ic.ac.uk : /packages/Linux (UK)
* sunacm.swan.ac.uk : /pub/Linux (UK)
* ftp.ibp.fr : /pub/linux (France)
* wuarchive.wustl.edu : /systems/linux (US)
* mrcnext.cso.uiuc.edu : /pub/linux (US)
* ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
* ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
* ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
* ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
* bond.edu.au : /pub/OS/Linux (Australia)
* monu1.cc.monash.edu.au : /pub/linux (Australia)
* ftp.sun.ac.za : /pub/linux (South Africa)

Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

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

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the comp.os.linux.* groups are available by
subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
for the benefit of those without Usenet access.  However since
niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
digestifier instead [Q2.7 `I don't have Usenet access.  Where do I get
information ?'].

There is also a NEWBIE channel where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

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

Question 2.9.  Are the newsgroups archived anywhere ?

Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
comp.os.linux.announce and the old group comp.os.linux, in their Linux
areas.  The comp.os.linux.announce archives are mirrored from /usenet on
src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

Linux can also access Minix and System V UFS filesystems, and can read
(but not yet write) OS/2 HPFS and Amiga filesystems.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.5 `Where can I get Linux material by FTP
?'.

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.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
filesystem under Linux or using mtools.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is a primitive, alpha test read-only Amiga filesystem
on sunsite.unc.edu in /pub/Linux/patches/amigaffs.tar.Z.  More information
is in affs-readme in the tarfile.

The 1.1.x alpha test kernel series contains support for the UFS filesystem
used by System V and Coherent.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS.  This is so
that OS/2 knows about the partition being formatted.

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How do I remove LILO so my system boots DOS again ?
 Q4.7        Why can't I use fdformat except as root ?
 Q4.8        Is there something like Stacker or Doublespace for Linux ?
 Q4.9        My ext2fs partitions are checked each time I reboot.
 Q4.10       I have a huge /proc/kcore !  Can I delete it ?
 Q4.11       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I undelete files ?

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

There are a number of packages available that work by providing new
commands for deletion and sometimes copying that move deleted files into a
`wastebasket' directory instead; they can then be recovered until cleaned
out automatically by background processing.

Alternatively you can search the raw disk device which holds the
filesystem in question.  This is hard work, and you will need to be root
to do this.

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

Question 4.2.  Is there a defragmenter for ext2fs etc. ?

Yes.  There is a Linux filesystem defragmenter for minix, old-style, ext2,
and xia filesystems available on sunsite.unc.edu in
system/Filesystems/defrag-0.6.tar.gz.

Users of the ext2 filesystem can probably do without defrag since ext2
contains extra code to keep fragmentation reduced even in very full
filesystems.

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

Question 4.3.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  If you don't have the fsutils package
you'll have to run mke2fs instead of mkfs -t ext2.  The -m 0 option tells
mkfs.ext2 not to reserve any space on the disk for the superuser ---
usually the last 10% is reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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 fsutils package) will be able to repair your filesystem; if
you're unlucky the filesystem is trashed and you'll have to reinitialise
it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.5.  My swap area isn't working.

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 or /etc/rc.local (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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.6.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
into FDISK in the normal way and then select the `Re-write Master Boot
Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.7.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.8.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.9.  My ext2fs partitions are checked each time I reboot.

See Q9.11 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.10.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.11.  My AHA1542C doesn't work with Linux.

The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS 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.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?
 Q5.10       Does Linux support threads or lightweight processes ?

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

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

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

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

Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sties.

Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
first --- search the find-ls or INDEX files for appropriate strings.
Check the Linux Projects Map (LPM), on ftp.ix.de in
/pub/Linux/docs/Projects-Map.gz.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to <linux-announce@tc.cornell.edu>).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.3.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.

GCC does not currently know how to do optimisation well for the 586,
because Intel won't release the necessary information except under
nondisclosure.  Don't buy a Pentium or wait for people to reverse-engineer
the required optimisations.

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

Question 5.5.  What does gcc -O6 do ?

Currently the same as -O2; any number greater than 2 currently works just
like 2.  The Makefiles of newer kernels use -O2, and so should you.

GCC 2.6 adds optimisation level -O3.  However, GCC 2.6.0 and several of
the following versions are known to have some problems with Linux, though
these will hopefully be solved soon.  In any case you should not use -O3
on a program until you're sure it doesn't create any problems.

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

Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q7.6 `How do I
upgrade/recompile my 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 /usr/include/asm

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

Question 5.7.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're using a kernel more recent than 1.1.44 you should find that
there are new directories /usr/src/linux/include/asm-i386.  The directory
asm there should be removed, as should the directory asm.  The symlinks
Makefile target will make these be symbolic links to asm-i36 and
arch/i386/boot respectively.  The easiest way to make sure all this gets
done is not to try to patch 1.1.44 to make 1.1.45, but to download
linux-1.1.45.tar.gz instead.

ld: unrecognised option `-qmagic' means you should get a newer linker,
from tsx-11.mit.edu in /pub/linux/packages/GCC.

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

Question 5.8.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
It comes with documentation that will tell you what to do.

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

Question 5.9.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (check the GCC documentation) and -s which strips 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.

Using QMAGIC binaries also can reduce the size of binaries, especially
small ones.  Don't worry about this unless you know what QMAGIC is; Linux
is moving to QMAGIC as a default.

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

Question 5.10.  Does Linux support threads or lightweight processes ?

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, most of which are
generic packages for any Unix:

* In sipb.mit.edu:/pub/pthread or 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.
* In 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 as /tr/1993/05/UW-CSE-93-05-06.PS.Z.
* In gummo.doc.ic.ac.uk:/rex is lwp, a very minimal implementation.
* In 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 useable under
  Linux.

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

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQCVAgUBLt0LcsMWjroj9a3bAQFnkQP/asi3EFtoFzBZUXjqbgWhml1Q17zYeMSc
hF4fmQApiEQi1yVmq7fw/Cci7OUomwBQOxdm8ExS2MNwsAmQh7gvUquVJDedaGwH
07beRK6SA6BRcTXjnD/fSBBR0fER60lHL8gdr6+2J/1ayyEl31icYRz23fZqPraF
vd8YlNdWfUQ=
=Ue/7
-----END PGP SIGNATURE-----
-- 
Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
+44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1994-10-30 16:24 Ian Jackson
  1994-10-30 16:25 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1994-10-30 16:24 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 30 Oct 1994

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q12.1 `You still
haven't answered my question !', before posting your question to the
newsgroup comp.os.linux.help.

See Q13.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How do I remove LILO so my system boots DOS again ?
 Q4.7        Why can't I use fdformat except as root ?
 Q4.8        Is there something like Stacker or Doublespace for Linux ?
 Q4.9        My ext2fs partitions are checked each time I reboot.
 Q4.10       I have a huge /proc/kcore !  Can I delete it ?
 Q4.11       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?

 Section 6.  Solutions to common miscellaneous problems
 Q6.1        Setuid scripts don't seem to work.
 Q6.2        Free memory as reported by free keeps shrinking.
 Q6.3        When I add more memory it slows to a crawl.
 Q6.4        Some programs (e.g. xdm) won't let me log in.
 Q6.5        Some programs let me log in with no password.
 Q6.6        My machine runs very slowly when I run GCC / X / ...
 Q6.7        I can only log in as root.
 Q6.8        My screen is all full of weird characters instead of letters.
 Q6.9        I have screwed up my system and can't log in to fix it.
 Q6.10       Emacs just dumps core.
 Q6.11       I've discovered a huge security hole in rm !
 Q6.12       lpr and/or lpd aren't working.

 Section 7.  How do I do this or find out that ... ?
 Q7.1        How can I get scrollback in text mode ?
 Q7.2        How do I switch virtual consoles ?  How do I enable them ?
 Q7.3        How do I set the timezone ?
 Q7.4        What version of Linux and what machine name am I using ?
 Q7.5        How can I enable or disable core dumps ?
 Q7.6        How do I upgrade/recompile my kernel ?
 Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
 Q7.8        How do I make a bootable floppy ?
 Q7.9        How do I remap my keyboard to UK, French, etc. ?
 Q7.10       How do I get NUM LOCK to default to on ?

 Section 8.  Miscellaneous information and questions answered
 Q8.1        What is a .gz file ? And a .tgz ? And ... ?
 Q8.2        What does VFS stand for ?
 Q8.3        What is a BogoMip ?
 Q8.4        What is the Linux Journal and where can I get it ?
 Q8.5        How many people use Linux ?
 Q8.6        How should I pronounce Linux ?

 Section 9.  Frequently encountered error messages
 Q9.1        During linking I get Undefined symbol _mcount
 Q9.2        lp1 on fire
 Q9.3        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q9.4        ld: unrecognized option '-m486'
 Q9.5        GCC says Internal compiler error
 Q9.6        make says Error 139
 Q9.7        shell-init: permission denied when I log in.
 Q9.8        No utmp entry.  You must exec ... when I log in.
 Q9.9        Warning - bdflush not running
 Q9.10       Warning: obsolete routing request made.
 Q9.11       EXT2-fs: warning: mounting unchecked filesystem
 Q9.12       EXT2-fs warning: maximal count reached
 Q9.13       EXT2-fs warning: checktime reached
 Q9.14       df says Cannot read table of mounted filesystems
 Q9.15       fdisk says Partition X has different physical/logical ...
 Q9.16       fdisk: Partition 1 does not start on cylinder boundary
 Q9.17       fdisk says cannot use nnn sectors of this partition
 Q9.18       fdisk says partition n has an odd number of sectors
 Q9.19       mtools says cannot initialise drive XYZ

 Section 10. The X Window System
 Q10.1       Does Linux support X Windows ?
 Q10.2       Where can I get an Xconfig for my video card and monitor ?
 Q10.3       xterm logins show up strangely in who, finger
 Q10.4       I can't get X Windows to work right.

 Section 11. Questions applicable to very out-of-date software
 Q11.1       How can I have more than 16Mb of swap ?
 Q11.2       GCC sometimes uses huge amounts of virtual memory and thrashes
 Q11.3       My keyboard goes all funny after I switch VC's.

 Section 12. How to get further assistance
 Q12.1       You still haven't answered my question !
 Q12.2       What to put in a posting to comp.os.linux.help

 Section 13. Administrative information and acknowledgements
 Q13.1       Feedback is invited
 Q13.2       Formats in which this FAQ is available
 Q13.3       Authorship and acknowledgements
 Q13.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.  It aims
towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It runs mainly on 386/486/586-based PCs, using the hardware facilities of
the 386 processor family (TSS segments et al) to implement these features.
Ports to other architectures are underway [Q1.4 `What ports to other
processors are there ?'].

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

The Linux kernel is distributed under the GNU General Public License - see
Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
386BSD ?  Minix ?'].  Work is progressing on an iBCS2 (Intel Binary
Compatibility Standard) emulator for SVR4 ELF and SVR3.2 COFF binaries and
an emulator for Microsoft Windows binaries [Q3.6 `Can I run Microsoft
Windows programs under Linux ?'].

For more information see the INFO-SHEET, which is one of the the HOWTOs
[Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
Q5.3 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM and a hard disk are
required.

VESA local bus and PCI are both supported.  A driver for the NCR SCSI chip
in many PCI machines is included in current alpha test release kernels.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux is reported to run on 386 family based laptops, with X on most of
them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386 family processors.

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

Question 1.4.  What ports to other processors are there ?

A project has been underway for around two years to port Linux to suitable
68000-series based systems such as Amigas and Ataris.  This has now
reached beta test quality, but still lacks networking support and an X
server.  There is a 680X0 channel on the Linux Activists mailserver [Q2.8
`What's this mailing list thing at niksula.hut.fi ?'].

Work has just been started on a port to the PowerPC.  Currently this will
be based on the PowerMAC architecture.  Again, don't post asking about it
unless you have experience to offer, and don't hold your breath.

Jim Paradis <paradis@sousa.amt.ako.dec.com> or <jrp@world.std.com> is
working on a port to the 64-bit DEC AXP (the Alpha).  This can currently
boot from a floppy disk or disk image loaded into a ramdisk at boot time.
Disk drivers are not yet available.  Please email him of you have access
to an ISA or EISA-based Alpha AXP and wish to contribute to the project,
or have access to another class of Alpha and are willing to write drivers.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
also a MIPS channel on the Linux Activists mailserver.  Interested people
may mail their questions and offers of assistance to
<linux@waldorf-gmbh.de>.

None of these ports will be capable of running Linux/386 binaries.

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

Question 1.5.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
including some space for user files and spool areas.

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

Question 1.6.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The licences 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
material by FTP ?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

     Linux INFO-SHEET                        Linux META-FAQ
     BUPS HOWTO (regarding the Back UPS).    Busmouse HOWTO
     CDROM HOWTO                             Distribution HOWTO
     DOSEMU HOWTO                            Ethernet HOWTO
     Ftape HOWTO                             Hardware HOWTO
     Installation HOWTO                      Japanese Extensions HOWTO
     Keystroke HOWTO                         Mail HOWTO
     MGR HOWTO                               NET-2 HOWTO
     News HOWTO                              Printing HOWTO
     SCSI HOWTO                              Sound HOWTO
     Term HOWTO                              Tips HOWTO
     UUCP HOWTO                              XFree86 HOWTO
More of these documents are always in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also a few mini-HOWTOs on sunsite.unc.edu in the
/pub/Linux/docs/HOWTO/mini directory.

The HOWTO.INDEX also contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are five international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@tc.cornell.edu.

comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.misc are also worth reading -- you may find that many common
problems are too recent to find in this FAQ but are answered in the
newsgroups.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q12.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup.  Crossposting is
rarely a good idea.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
The German one is de.comp.os.linux.  In Australia, try
aus.computers.linux.

There may well be Linux groups local to your institution or area - check
there first.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run Linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of those releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
also a large number of other releases which are distributed less globally,
which suit special local and national requirements (for example, better
internationalisation support).

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux

The MCC-Interim release is available from ftp.mcc.ac.uk (US, 130.88.200.7)
in /pub/linux; the TAMU release is available from net.tamu.edu (US,
128.194.177.1) in /pub/linux.

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

* src.doc.ic.ac.uk : /packages/Linux (UK)
* sunacm.swan.ac.uk : /pub/Linux (UK)
* ftp.ibp.fr : /pub/linux (France)
* wuarchive.wustl.edu : /systems/linux (US)
* mrcnext.cso.uiuc.edu : /pub/linux (US)
* ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
* ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
* ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
* ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
* bond.edu.au : /pub/OS/Linux (Australia)
* monu1.cc.monash.edu.au : /pub/linux (Australia)
* ftp.sun.ac.za : /pub/linux (South Africa)

Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

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

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the comp.os.linux.* groups are available by
subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
for the benefit of those without Usenet access.  However since
niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
digestifier instead [Q2.7 `I don't have Usenet access.  Where do I get
information ?'].

There is also a NEWBIE channel where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

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

Question 2.9.  Are the newsgroups archived anywhere ?

Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
comp.os.linux.announce and the old group comp.os.linux, in their Linux
areas.  The comp.os.linux.announce archives are mirrored from /usenet on
src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

Linux can also access Minix and System V UFS filesystems, and can read
(but not yet write) OS/2 HPFS and Amiga filesystems.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.5 `Where can I get Linux material by FTP
?'.

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.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
filesystem under Linux or using mtools.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is an alpha test read-only Amiga filesystem on
sunsite.unc.edu, probably in /pub/Linux/kernel/misc-patches/ffs-patch.
Work may well be progressing on upgrading this to read-write for the 680x0
Linux project.

The 1.1.x alpha test kernel series contains support for the UFS filesystem
used by System V and Coherent.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS.  This is so
that OS/2 knows about the partition being formatted.

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How do I remove LILO so my system boots DOS again ?
 Q4.7        Why can't I use fdformat except as root ?
 Q4.8        Is there something like Stacker or Doublespace for Linux ?
 Q4.9        My ext2fs partitions are checked each time I reboot.
 Q4.10       I have a huge /proc/kcore !  Can I delete it ?
 Q4.11       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I undelete files ?

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

There are a number of packages available that work by providing new
commands for deletion and sometimes copying that move deleted files into a
`wastebasket' directory instead; they can then be recovered until cleaned
out automatically by background processing.

Alternatively you can search the raw disk device which holds the
filesystem in question.  This is hard work, and you will need to be root
to do this.

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

Question 4.2.  Is there a defragmenter for ext2fs etc. ?

Yes.  There is a Linux filesystem defragmenter for minix, old-style, ext2,
and xia filesystems available on sunsite.unc.edu in
system/Filesystems/defrag-0.6.tar.gz.

Users of the ext2 filesystem can probably do without defrag since ext2
contains extra code to keep fragmentation reduced even in very full
filesystems.

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

Question 4.3.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  If you don't have the fsutils package
you'll have to run mke2fs instead of mkfs -t ext2.  The -m 0 option tells
mkfs.ext2 not to reserve any space on the disk for the superuser ---
usually the last 10% is reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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 fsutils package) will be able to repair your filesystem; if
you're unlucky the filesystem is trashed and you'll have to reinitialise
it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.5.  My swap area isn't working.

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 or /etc/rc.local (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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.6.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
into FDISK in the normal way and then select the `Re-write Master Boot
Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.7.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.8.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.9.  My ext2fs partitions are checked each time I reboot.

See Q9.11 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.10.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.11.  My AHA1542C doesn't work with Linux.

The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS 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.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?

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

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

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

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

Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sties.

Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
first --- search the find-ls or INDEX files for appropriate strings.
Check the Linux Projects Map (LPM), on ftp.ix.de in
/pub/Linux/docs/Projects-Map.gz.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to <linux-announce@tc.cornell.edu>).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.3.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.

GCC does not currently know how to do optimisation well for the 586,
because Intel won't release the necessary information except under
nondisclosure.  Don't buy a Pentium or wait for people to reverse-engineer
the required optimisations.

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

Question 5.5.  What does gcc -O6 do ?

Currently the same as -O2; any number greater than 2 currently works just
like 2.  The Makefiles of newer kernels use -O2, and so should you.

GCC 2.6 adds optimisation level -O3.  However, GCC 2.6.0 and several of
the following versions are known to have some problems with Linux, though
these will hopefully be solved soon.  In any case you should not use -O3
on a program until you're sure it doesn't create any problems.

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

Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q7.6 `How do I
upgrade/recompile my 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 /usr/include/asm

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

Question 5.7.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're using a kernel more recent than 1.1.44 you should find that
there are new directories /usr/src/linux/include/asm-i386.  The directory
asm there should be removed, as should the directory asm.  The symlinks
Makefile target will make these be symbolic links to asm-i36 and
arch/i386/boot respectively.  The easiest way to make sure all this gets
done is not to try to patch 1.1.44 to make 1.1.45, but to download
linux-1.1.45.tar.gz instead.

ld: unrecognised option `-qmagic' means you should get a newer linker,
from tsx-11.mit.edu in /pub/linux/packages/GCC.

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

Question 5.8.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
It comes with documentation that will tell you what to do.

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

Question 5.9.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (check the GCC documentation) and -s which strips 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.

Using QMAGIC binaries also can reduce the size of binaries, especially
small ones.  Don't worry about this unless you know what QMAGIC is; Linux
is moving to QMAGIC as a default.

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQCVAgUBLrPJhMMWjroj9a3bAQHWjQP/TH4lgiCnzdpl/guA/aExxwyZk/yuYRBi
6tZU8CNSnduoBucAR4MBhtsuXP6BuqxchkrQnvEJ+a+KTtK8dH6DV38Jlkln0Tk+
aOaFFOYPmdyu2TxU3TVPov5hDR/uTIfMwqyworscTrsIwVzSmaofDdcMP21gI7hZ
2u+8mjjdT5I=
=Gtgy
-----END PGP SIGNATURE-----
-- 
Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
+44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1994-09-21 12:32 Ian Jackson
  1994-09-21 12:33 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1994-09-21 12:32 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 21 Sep 1994

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q12.1 `You still
haven't answered my question !', before posting your question to the
newsgroup comp.os.linux.help.

See Q13.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How do I remove LILO so my system boots DOS again ?
 Q4.7        Why can't I use fdformat except as root ?
 Q4.8        Is there something like Stacker or Doublespace for Linux ?
 Q4.9        My ext2fs partitions are checked each time I reboot.
 Q4.10       I have a huge /proc/kcore !  Can I delete it ?
 Q4.11       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?

 Section 6.  Solutions to common miscellaneous problems
 Q6.1        Setuid scripts don't seem to work.
 Q6.2        Free memory as reported by free keeps shrinking.
 Q6.3        When I add more memory it slows to a crawl.
 Q6.4        Some programs (e.g. xdm) won't let me log in.
 Q6.5        Some programs let me log in with no password.
 Q6.6        My machine runs very slowly when I run GCC / X / ...
 Q6.7        I can only log in as root.
 Q6.8        My screen is all full of weird characters instead of letters.
 Q6.9        I have screwed up my system and can't log in to fix it.
 Q6.10       Emacs just dumps core.
 Q6.11       I've discovered a huge security hole in rm !
 Q6.12       lpr and/or lpd aren't working.

 Section 7.  How do I do this or find out that ... ?
 Q7.1        How can I get scrollback on text VC's ?
 Q7.2        How do I switch VC's ?  How do I enable them ?
 Q7.3        How do I set the timezone ?
 Q7.4        What version of Linux and what machine name am I using ?
 Q7.5        How can I enable or disable core dumps ?
 Q7.6        How do I upgrade/recompile my kernel ?
 Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
 Q7.8        How do I make a bootable floppy ?
 Q7.9        How do I remap my keyboard to UK, French, etc. ?
 Q7.10       How do I get NUM LOCK to default to on ?

 Section 8.  Miscellaneous information and questions answered
 Q8.1        What is a .gz file ? And a .tgz ? And ... ?
 Q8.2        What does VFS stand for ?
 Q8.3        What is a BogoMip ?
 Q8.4        What is the Linux Journal and where can I get it ?
 Q8.5        How many people use Linux ?
 Q8.6        How should I pronounce Linux ?

 Section 9.  Frequently encountered error messages
 Q9.1        During linking I get Undefined symbol _mcount
 Q9.2        lp1 on fire
 Q9.3        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q9.4        ld: unrecognized option '-m486'
 Q9.5        GCC says Internal compiler error
 Q9.6        make says Error 139
 Q9.7        shell-init: permission denied when I log in.
 Q9.8        No utmp entry.  You must exec ... when I log in.
 Q9.9        Warning - bdflush not running
 Q9.10       Warning: obsolete routing request made.
 Q9.11       EXT2-fs: warning: mounting unchecked filesystem
 Q9.12       EXT2-fs warning: maximal count reached
 Q9.13       EXT2-fs warning: checktime reached
 Q9.14       df says Cannot read table of mounted filesystems
 Q9.15       fdisk says Partition X has different physical/logical ...
 Q9.16       fdisk: Partition 1 does not start on cylinder boundary
 Q9.17       fdisk says cannot use nnn sectors of this partition
 Q9.18       fdisk says partition n has an odd number of sectors
 Q9.19       mtools says cannot initialise drive XYZ

 Section 10. The X Window System
 Q10.1       Does Linux support X Windows ?
 Q10.2       Where can I get an Xconfig for my video card and monitor ?
 Q10.3       xterm logins show up strangely in who, finger
 Q10.4       I can't get X Windows to work right.

 Section 11. Questions applicable to very out-of-date software
 Q11.1       How can I have more than 16Mb of swap ?
 Q11.2       GCC sometimes uses huge amounts of virtual memory and thrashes
 Q11.3       My keyboard goes all funny after I switch VC's.

 Section 12. How to get further assistance
 Q12.1       You still haven't answered my question !
 Q12.2       What to put in a posting to comp.os.linux.help

 Section 13. Administrative information and acknowledgements
 Q13.1       Feedback is invited
 Q13.2       Formats in which this FAQ is available
 Q13.3       Authorship and acknowledgements
 Q13.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        What ports to other processors are there ?
 Q1.5        How much hard disk space does Linux need ?
 Q1.6        Is Linux PD ?  Copyrighted ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone written from scratch by Linus Torvalds with
assistance from a loosely-knit team of hackers across the Net.  It aims
towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It runs mainly on 386/486/586-based PCs, using the hardware facilities of
the 386 processor family (TSS segments et al) to implement these features.
Ports to other architectures are underway [Q1.4 `What ports to other
processors are there ?'].

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

The Linux kernel is distributed under the GNU General Public License - see
Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
386BSD ?  Minix ?'] and work is progressing on a facilities to allow SVR4
ELF, SVR3.2 COFF and Microsoft Windows binaries [Q3.6 `Can I run Microsoft
Windows programs under Linux ?'] to be run under Linux and X Windows.

For more information see the INFO-SHEET, which is one of the the HOWTOs
[Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
Q5.3 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM and a hard disk are
required.

VESA local bus and PCI are both supported.  A driver for the NCR SCSI chip
in many PCI machines is included in current alpha test release kernels.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux is reported to run on 386 family based laptops, with X on most of
them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386 family processors.

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

Question 1.4.  What ports to other processors are there ?

A project has been underway for around two years to port Linux to suitable
68000-series based systems such as Amigas and Ataris.  This has now
reached beta test quality, but still lacks networking support and an X
server.  There is a 680X0 channel on the Linux Activists mailserver [Q2.8
`What's this mailing list thing at niksula.hut.fi ?'].

Work has just been started on a port to the PowerPC.  Currently this will
be based on the PowerMAC architecture.  Again, don't post asking about it
unless you have experience to offer, and don't hold your breath.

Jim Paradis <paradis@sousa.amt.ako.dec.com> is working on a port to the
64-bit DEC AXP (the Alpha).  This can currently boot from a floppy disk or
disk image loaded into a ramdisk at boot time.  Disk drivers are not yet
available.  Please email him of you have access to an ISA or EISA-based
Alpha AXP and wish to contribute to the project.

Jim Paradis <paradis@sousa.amt.ako.dec.com> or <jrp@world.std.com> is
working on a port to the 64-bit DEC AXP (the Alpha).  This can currently
boot from a floppy disk or disk image loaded into a ramdisk at boot time.
Disk drivers are not yet available.  Please email him of you have access
to an ISA or EISA-based Alpha AXP and wish to contribute to the project,
or have access to another class of Alpha and are willing to write drivers.

Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
also a MIPS channel on the Linux Activists mailserver.  Interested people
may mail their questions and offers of assistance to
<linux@waldorf-gmbh.de>.

None of these ports will be capable of running Linux/386 binaries.

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

Question 1.5.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
including some space for user files and spool areas.

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

Question 1.6.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The licences 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
material by FTP ?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

     Linux INFO-SHEET                        Linux META-FAQ
     Busmouse HOWTO                          CDROM HOWTO
     Distribution HOWTO                      DOSEMU HOWTO
     Ethernet HOWTO                          Ftape HOWTO
     Hardware HOWTO                          Installation HOWTO
     Japanese Extensions HOWTO               Keystroke HOWTO
     Mail HOWTO                              MGR HOWTO
     NET-2 HOWTO                             News HOWTO
     Printing HOWTO                          SCSI HOWTO
     Sound HOWTO                             Term HOWTO
     Tips HOWTO                              UUCP HOWTO
     XFree86 HOWTO

More of these documents are always in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also a few mini-HOWTOs in the docs/HOWTO/mini
directory.

The HOWTO.INDEX also contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are five international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@tc.cornell.edu.

comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.misc are also worth reading -- you may find that many common
problems are too recent to find in this FAQ but are answered in the
newsgroups.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q12.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup.  Crossposting is
rarely a good idea.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
The German one is de.comp.os.linux.  In Australia, try
aus.computers.linux.

There may well be Linux groups local to your institution or area - check
there first.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run Linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of those releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
also a large number of other releases which are distributed less globally,
which suit special local and national requirements (for example, better
internationalisation support).

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (18.172.1.2) : /pub/linux

The MCC-Interim release is available from ftp.mcc.ac.uk (130.88.200.7) in
/pub/linux; the TAMU release is available from net.tamu.edu
(128.194.177.1) in /pub/linux.

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

* src.doc.ic.ac.uk : /packages/Linux
* sunacm.swan.ac.uk : /pub/Linux
* ftp.ibp.fr : /pub/linux
* wuarchive.wustl.edu : /systems/linux
* mrcnext.cso.uiuc.edu : /pub/linux
* ftp.informatik.tu-muenchen.de : /pub/comp/os/linux
* ftp.ibr.cs.tu-bs.de : /pub/os/linux
* ftp.dfv.rwth-aachen.de : /pub/linux
* ftp.informatik.rwth-aachen.de : /pub/Linux
* bond.edu.au : /pub/OS/Linux
* monu1.cc.monash.edu.au : /pub/linux
* ftp.sun.ac.za : /pub/linux

Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

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

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the comp.os.linux.* groups are available by
subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
for the benefit of those without Usenet access.  However since
niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
digestifier instead [Q2.7 `I don't have Usenet access.  Where do I get
information ?'].

There is also a NEWBIE channel where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

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

Question 2.9.  Are the newsgroups archived anywhere ?

Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
comp.os.linux.announce and the old group comp.os.linux, in their Linux
areas.  The comp.os.linux.announce archives are mirrored from /usenet on
src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

Linux can also access Minix and System V UFS filesystems, and can read
(but not yet write) OS/2 HPFS filesystems.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.5 `Where can I get Linux material by FTP
?'.

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.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
filesystem under Linux or using mtools.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is an alpha test read-only Amiga filesystem on
sunsite.unc.edu, probably in /pub/Linux/kernel/misc-patches/ffs-patch.
Work may well be progressing on upgrading this to read-write for the 680x0
Linux project.

The 1.1.x alpha test kernel series contains support for the filesystem
used by System V and Coherent.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS.  This is so
that OS/2 knows about the partition being formatted.

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How do I remove LILO so my system boots DOS again ?
 Q4.7        Why can't I use fdformat except as root ?
 Q4.8        Is there something like Stacker or Doublespace for Linux ?
 Q4.9        My ext2fs partitions are checked each time I reboot.
 Q4.10       I have a huge /proc/kcore !  Can I delete it ?
 Q4.11       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I undelete files ?

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

There are a number of packages available that work by providing new
commands for deletion and sometimes copying that move deleted files into a
`wastebasket' directory instead; they can then be recovered until cleaned
out automatically by background processing.

Alternatively you can search the raw disk device which holds the
filesystem in question.  This is hard work, and you will need to be root
to do this.

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

Question 4.2.  Is there a defragmenter for ext2fs etc. ?

Yes.  There is a Linux filesystem defragmenter for minix, old-style, ext2,
and xia filesystems available on sunsite.unc.edu in
system/Filesystems/defrag-0.6.tar.gz.

Users of the ext2 filesystem can probably do without defrag since ext2
contains extra code to keep fragmentation reduced even in very full
filesystems.

You can probably do without, since the ext2 filesystem code tries to
reduce fragmentation as it goes, during normal operation.

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

Question 4.3.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  If you don't have the fsutils package
you'll have to run mke2fs instead of mkfs -t ext2.  The -m 0 option tells
mkfs.ext2 not to reserve any space on the disk for the superuser ---
usually the last 10% is reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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 bootutils 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 fsutils package) will be able to repair your filesystem; if
you're unlucky the filesystem is trashed and you'll have to reinitialise
it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.5.  My swap area isn't working.

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 or /etc/rc.local (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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.6.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
into FDISK in the normal way and then select the `Re-write Master Boot
Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.7.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.8.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.9.  My ext2fs partitions are checked each time I reboot.

See Q9.11 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.10.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.11.  My AHA1542C doesn't work with Linux.

The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS 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.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        What does gcc -O6 do ?
 Q5.6        Where are <linux/*.h> and <asm/*.h> ?
 Q5.7        I get errors when I try to compile the kernel.
 Q5.8        How do I make a shared library ?
 Q5.9        How do I make my executables smaller ?

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

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

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

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

Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sties.

Check the FTP sites (see Q2.1 `Where can I get the HOWTOs and other
documentation ?') first --- search the find-ls or INDEX files for
appropriate strings.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to <linux-announce@tc.cornell.edu>).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.3.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.

GCC does not currently know how to do optimisation well for the 586,
because Intel won't release the necessary information except under
nondisclosure.  Don't buy a Pentium or wait for people to reverse-engineer
the required optimisations.

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

Question 5.5.  What does gcc -O6 do ?

Currently the same as -O2; any number greater than 2 currently works just
like 2.  The Makefiles of newer kernels use -O2, and so should you.

GCC 2.6 adds optimisation level -O3.  However, GCC 2.6.0 and several of
the following versions are known to have some problems with Linux, though
these will hopefully be solved soon.  In any case you should not use -O3
on a program until you're sure it doesn't create any problems.

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

Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q7.6 `How do I
upgrade/recompile my 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 /usr/include/asm

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

Question 5.7.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're using a kernel more recent than 1.1.44 you should find that
there are new directories /usr/src/linux/include/asm-i386.  The directory
asm there should be removed, as should the directory asm.  The symlinks
Makefile target will make these be symbolic links to asm-i36 and
arch/i386/boot respectively.  The easiest way to make sure all this gets
done is not to try to patch 1.1.44 to make 1.1.45, but to download
linux-1.1.45.tar.gz instead.

ld: unrecognised option `-qmagic' means you should get a newer linker,
from tsx-11.mit.edu in /pub/linux/packages/GCC.

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

Question 5.8.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
It comes with documentation that will tell you what to do.

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

Question 5.9.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (check the GCC documentation) and -s which strips 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.

Using QMAGIC binaries also can reduce the size of binaries, especially
small ones.  Don't worry about this unless you know what QMAGIC is; Linux
is moving to QMAGIC as a default.

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQCVAgUBLoAovMMWjroj9a3bAQG+AgP8CgcCDtF/jhMOU91ekQEXxxKOirmKDSJ4
3CR5NQG4oCVLvor5YECs0CFY4vMj03EfQ9pB/4CEMcXEgj9eK0R6ISpcCKqbbu4Z
aFDiuGSXNlIUMy3lafUriTAjjABIGCvaCQ1MaMLBXOIN81nNAq68gZFiSVTFT5aI
jHwUadGuMsQ=
=SN5N
-----END PGP SIGNATURE-----
-- 
Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
+44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1994-08-28 17:45 Ian Jackson
  1994-08-28 17:46 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1994-08-28 17:45 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 28 Aug 1994

-----BEGIN PGP SIGNED MESSAGE-----

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
be read in conjunction with the HOWTO documents, which are available in

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q9.1 `You still
haven't answered my question !', before posting your question to the
newsgroup comp.os.linux.help.

See Q10.2 `Formats in which this FAQ is available' for details of where to
get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
this document.

You can skip to a particular question by searching for `Question n.n'.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?
 Q2.10       What is the Linux Journal and where can I get it ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How can I have more than 16Mb of swap ?
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?
 Q4.12       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        During linking I get Undefined symbol _mcount
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        How do I port XXX to Linux ?
 Q5.5        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.6        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.7        What does gcc -O6 do ?
 Q5.8        Where are <linux/*.h> and <asm/*.h> ?
 Q5.9        I get errors when I try to compile the kernel.
 Q5.10       How do I make a shared library ?
 Q5.11       How do I make my executables smaller ?

 Section 6.  Miscellaneous questions and problems
 Q6.1        How many people use Linux ?
 Q6.2        How can I get scrollback on text VC's ?
 Q6.3        How do I switch VC's ?  How do I enable them ?
 Q6.4        Setuid scripts don't seem to work.
 Q6.5        Free memory as reported by free keeps shrinking.
 Q6.6        What is a BogoMip ?
 Q6.7        How do I set the timezone ?
 Q6.8        What version of Linux and what machine name am I using ?
 Q6.9        When I add more memory it slows to a crawl.
 Q6.10       Some programs (e.g. xdm) won't let me log in.
 Q6.11       Some programs let me log in with no password.
 Q6.12       My machine runs very slowly when I run GCC / X / ...
 Q6.13       I can only log in as root.
 Q6.14       How can I produce core files ?
 Q6.15       How do I stop producing core files ?
 Q6.16       My keyboard goes all funny after I switch VC's.
 Q6.17       My screen is all full of weird characters instead of letters.
 Q6.18       What is a .gz file ? And a .tgz ? And ... ?
 Q6.19       I have screwed up my system and can't log in to fix it.
 Q6.20       How do I upgrade/recompile my kernel ?
 Q6.21       Can I have more than 3 serial ports by sharing interrupts ?
 Q6.22       Emacs just dumps core.
 Q6.23       How do I make a bootable floppy ?
 Q6.24       How do I remap my keyboard to UK, French, etc. ?
 Q6.25       I've discovered a huge security hole in rm !
 Q6.26       lpr and/or lpd aren't working.
 Q6.27       What does VFS stand for ?
 Q6.28       How do I get NUM LOCK to default to on ?

 Section 7.  Frequently Encountered Error messages
 Q7.1        fdisk says Partition X has different phsyical/logical ...
 Q7.2        fdisk: Partition 1 does not start on cylinder boundary
 Q7.3        lp1 on fire
 Q7.4        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q7.5        ld: unrecognized option '-m486'
 Q7.6        GCC says Internal compiler error
 Q7.7        make says Error 139
 Q7.8        df says Cannot read table of mounted filesystems
 Q7.9        shell-init: permission denied when I log in.
 Q7.10       No utmp entry.  You must exec ... when I log in.
 Q7.11       EXT2-fs: warning: mounting unchecked filesystem
 Q7.12       EXT2-fs warning: maximal count reached
 Q7.13       EXT2-fs warning: checktime reached
 Q7.14       fdisk says cannot use nnn sectors of this partition
 Q7.15       fdisk says partition n has an odd number of sectors
 Q7.16       mtools says cannot initialise drive XYZ
 Q7.17       Warning - bdflush not running
 Q7.18       Warning: obsolete routing request made.

 Section 8.  The X Window System
 Q8.1        Does Linux support X Windows ?
 Q8.2        Where can I get an Xconfig for my video card and monitor ?
 Q8.3        xterm logins show up strangely in who, finger
 Q8.4        I can't get X Windows to work right.

 Section 9.  How to get further assistance
 Q9.1        You still haven't answered my question !
 Q9.2        What to put in a posting to comp.os.linux.help

 Section 10. Administrative information and acknowledgements
 Q10.1       Feedback is invited
 Q10.2       Formats in which this FAQ is available
 Q10.3       Authorship and acknowledgements
 Q10.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone for 386/486/586-based PCs written from scratch by
Linus Torvalds with assistance from a loosely-knit team of hackers across
the Net.  It aims towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It uses the hardware features of the 386 processor family (TSS segments et
al) to implement these features.

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

It is distributed under the GNU General Public License - see Q1.5 `Is
Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
386BSD ?  Minix ?'] and work is progressing on a facilities to allow SVR4
ELF, SVR3.2 COFF and Microsoft Windows binaries [Q3.6 `Can I run Microsoft
Windows programs under Linux ?'] to be run under Linux and X Windows.

For more information see the INFO-SHEET, which is one of the the HOWTOs
- --- see above, or Q2.1 `Where can I get the HOWTOs and other documentation
?'.  See also Q5.4 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
to try it out.  To do anything useful more RAM and a hard disk are
required.

VESA local bus and PCI are both supported.  However, a driver for the NCR
SCSI chip in many PCI machines is not yet available, but is under
development.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux is reported to run on 386 family based laptops, with X on most of
them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386 family processors.

A project has been underway for nearly a year now to port Linux to
suitable 68000-series based systems such as Amigas and Ataris, but this is
still at an early stage of development.  Don't post asking about it unless
you think you can contribute to it, and don't hold your breath.

Work has just been started on a port to the PowerPC.  Currently this will
be based on the PowerMAC architecture.  Again, don't post asking about it
unless you have experience to offer, and don't hold your breath.

Neither of these ports will be capable of running Linux/386 binaries.

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

Question 1.4.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  The full Slackware 1.2 distribution takes around 200Mb, including
some space for user files and spool areas.

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

Question 1.5.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The copyright 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

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

Question 1.6.  How should I pronounce Linux ?

This is a matter of religious debate, of course !

If you want to hear the Linus himself say how he pronounces it download
english.au or swedish.au from ftp.funet.fi (in
/pub/OS/Linux/PEOPLE/Linus/SillySounds).  If you have a soundcard 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 of you who don't have the equipment or
inclination: Linus pronounces Linux approximately as Leenus, where the ee
is 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).

When speaking English I pronounce it Lie-nucks (u as in bucket) --- this
is an anglicised pronunciation based on the analogy with Linus' name,
which in English is usually pronounced Lie-nus (u as in put).  It is of
course quite acceptable and common to modify the pronunciation of a proper
noun when it changes languages.

I think I can safely say that the pronunciation Linnucks (short i as in
pit, short u as in bucket) is wrong in English, as it is not the original
Swedish pronunciation, not a sensible direct anglicisation of it, and not
based on the anglicised version of Linus' name.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?
 Q2.10       What is the Linux Journal and where can I get it ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
* tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
* sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO

For a complete list of Linux FTP sites see Q2.4 `How do I install Linux
?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

     Linux INFO-SHEET                        Linux META-FAQ
     Busmouse HOWTO                          CDROM HOWTO
     Distribution HOWTO                      DOSEMU HOWTO
     Ethernet HOWTO                          Ftape HOWTO
     Hardware HOWTO                          Installation HOWTO
     Japanese Extensions HOWTO               Keystroke HOWTO
     Mail HOWTO                              MGR HOWTO
     NET-2 HOWTO                             News HOWTO
     Printing HOWTO                          SCSI HOWTO
     Sound HOWTO                             Term HOWTO
     Tips HOWTO                              UUCP HOWTO
     XFree86 HOWTO

Some more of these documents are in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also a few mini-HOWTOs in the docs/HOWTO/mini
directory.

The HOWTO.INDEX also contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

* The Linux Documentation Project manifesto
* Installation and Getting Started Guide
* The Kernel Hacker's Guide
* Network Administration Guide
* Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Documentation Project Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format, like this FAQ, and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are five international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@tc.cornell.edu.

comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.misc are also worth reading -- you may find that many common
problems are too recent to find in this FAQ but are answered in the
newsgroups.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q9.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup.  Crossposting is
rarely a good idea.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
there is probably also a German one.  In Australia, try
aus.computers.linux.

There may well be Linux groups local to your institution or area - check
there first.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of these releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:

* ftp.funet.fi (128.214.6.100) : /pub/OS/Linux
* sunsite.unc.edu (152.2.22.81) : /pub/Linux
* tsx-11.mit.edu (18.172.1.2) : /pub/linux

The MCC-Interim release is available from ftp.mcc.ac.uk (130.88.200.7) in
/pub/linux; The TAMU release is available from net.tamu.edu
(128.194.177.1) in /pub/linux.

The contents of these sites is mirrored (copied, usually approximately
daily) by a number of other sites.  Please use one close to you -- that
will be faster for you and easier on the network.
   src.doc.ic.ac.uk                     wuarchive.wustl.edu
   sunacm.swan.ac.uk                    ftp.eecs.umich.edu
   ftp.ibp.fr                           mrcnext.cso.uiuc.edu

   ftp.informatik.tu-muenchen.de        bond.edu.au
   ftp.ibr.cs.tu-bs.de                  monu1.cc.monash.edu.au
   ftp.dfv.rwth-aachen.de               ftp.sun.ac.za
   ftp.informatik.rwth-aachen.de        cair.kaist.ac.kr
Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

Linux is also available via traditional mail on diskette, CD-ROM and tape.
The Installation HOWTO, and the file /pub/Linux/docs/distributions on
sunsite.unc.edu, contains information on these distributions.

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the comp.os.linux.* groups are available by
subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
for the benefit of those without Usenet access.  However since
niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
digestifier instead [Q2.7 `I don't have Usenet access.  Where do I get
information ?'].

There is also a NEWBIE channel where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

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

Question 2.9.  Are the newsgroups archived anywhere ?

Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
comp.os.linux.announce and the old group comp.os.linux, in their Linux
areas.  The comp.os.linux.announce archives are mirrored from /usenet on
src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).

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

Question 2.10.  What is the Linux Journal and where can I get it ?

Linux Journal is a monthly magazine (printed on paper) that is available
on newsstands and via subscription worldwide. Email <linux@ssc.com> for
details.

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

Linux can also access Minix and System V UFS filesystems.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.4 `How do I install Linux ?'.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
filesystem under Linux or using mtools.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q6.20 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is an alpha test read-only Amiga filesystem on
sunsite.unc.edu, probably in /pub/Linux/kernel/misc-patches/ffs-patch.
Work may well be progressing on upgrading this to read-write for the 680x0
Linux project.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.emulators.ms-windows.wine.

The advert from Softlanding (producers of SLS) stating that Linux could
run MS Windows binaries was at best grossly exaggerated.  I'm told that
you can run Windoze 3.0 in real mode in a dosemu [Q3.1 `Can Linux coexist
with DOS ?  OS/2 ?  386BSD ?  Minix ?'].

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS.  This is so
that OS/2 knows about the partition being formatted.

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How can I have more than 16Mb of swap ?
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?
 Q4.12       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I undelete files ?

In general, this is very hard to do on Unices.  Undelete functionality for
the ext2fs is being worked on, but don't hold your breath.

In the meantime you can search the raw disk device which holds the
filesystem in question.  The strings command may help you do this, if the
file you've lost was a text file: for example strings /dev/hdb3.  You will
need to be root to do this, and you should take care to put the output
file on a different filesystem, of course ! The output will be large and
full of extra unwanted crud, so make sure you have enough space.

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

Question 4.2.  Is there a defragmenter for ext2fs etc. ?

You can probably do without, since the ext2 filesystem code tries to
reduce fragmentation as it goes, during normal operation.

If you really need to defragment a filesystem you could back it up,
reinitialise the partition using mkfs -t ext2 and restore it.

I'm told that a defragmenter for Minix and old-style `ext' filesystems is
available on sunsite.unc.edu in system/Filesystems/defrag-0.4.tar.z.

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

Question 4.3.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  If you don't have the fsutils package
you'll have to run mke2fs instead of mkfs -t ext2.  The -m 0 option tells
mkfs.ext2 not to reserve any space on the disk for the superuser ---
usually the last 10% is reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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 bootutils 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 fsutils package) will be able to repair your filesystem; if
you're unlucky the filesystem is trashed and you'll have to reinitialise
it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.5.  My swap area isn't working.

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 or /etc/rc.local (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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.6.  How can I have more than 16Mb of swap ?

Use a recent kernel -- from at least 0.99.14 Linux can use swap partitions
of up to 128Mb.

If you use an older kernel which only supports swap area sizes up to 16Mb
you have to set up more than one swap partition or swapfile.

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

Question 4.7.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
into FDISK in the normal way and then select the `Re-write Master Boot
Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.8.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.9.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.10.  My ext2fs partitions are checked each time I reboot.

See Q7.11 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.11.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.12.  My AHA1542C doesn't work with 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.
The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS misfeature and should be turned *off* under
Linux.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        During linking I get Undefined symbol _mcount
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        How do I port XXX to Linux ?
 Q5.5        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.6        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.7        What does gcc -O6 do ?
 Q5.8        Where are <linux/*.h> and <asm/*.h> ?
 Q5.9        I get errors when I try to compile the kernel.
 Q5.10       How do I make a shared library ?
 Q5.11       How do I make my executables smaller ?

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

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

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

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

Question 5.2.  During linking I get Undefined symbol _mcount

This is usually due to a bad interaction between a brokenness in SLS and
the C library release notes.  Your libc.a has been replaced by the
profiling library.  You should remove libc.a, libg.a and libc_p.a and once
again install the new libraries (following the release notes, of course).

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

Question 5.3.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sties.

Check the FTP sites (see Q2.1 `Where can I get the HOWTOs and other
documentation ?') first --- search the find-ls or INDEX files for
appropriate strings.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.4 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to <linux-announce@tc.cornell.edu>).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.4.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.5.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.

GCC does not currently know how to do optimisation well for the 586,
because Intel won't release the necessary information except under
nondisclosure.  Don't buy a Pentium or wait for people to reverse-engineer
the required optimisations.

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

Question 5.6.  GCC sometimes uses huge amounts of virtual memory and thrashes

Older versions of GCC had a bug which makes it use lots of memory if you
try to compile a program which has a large static data table in it.

You can either upgrade your version of GCC, or add more swap if necessary
and just grin and bear it; it'll work in the end.

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

Question 5.7.  What does gcc -O6 do ?

The same as -O2; any number greater than 2 currently works just like 2.
The Makefiles of newer kernels use -O2, and so should you.

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

Question 5.8.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q6.20 `How do I
upgrade/recompile my 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 /usr/include/asm

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

Question 5.9.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.8 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

If you're using a kernel more recent than 1.1.44 you should find that
there are new directories /usr/src/linux/include/asm-i386.  The directory
asm there should be removed, as should the directory asm.  The symlinks
Makefile target will make these be symbolic links to asm-i36 and
arch/i386/boot respectively.  The easiest way to make sure all this gets
done is not to try to patch 1.1.44 to make 1.1.45, but to download
linux-1.1.45.tar.gz instead.

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

Question 5.10.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
It comes with documentation that will tell you what to do.

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

Question 5.11.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (check the GCC documentation) and -s which strips 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.

===============================================================================

The remainder of the FAQ is in the next part ...


-----BEGIN PGP SIGNATURE-----
Version: 2.6

iQCVAgUBLmDOUcMWjroj9a3bAQEw2gP/RiI+CYF5dN80D36x+eCvCgXuwj+bD6ea
HJa94DLo5B7Kb+34AHCK7bj0u7q06fjAXnF2xkSUTl0nQFWPfhpYQKAbejY9PoPh
24Jdz02DC0jYlKH02rBiefYGpigoAd1fesVXHSpSYUKLI1Qi6X7HJw4gbaaAyto9
zdhtz8s/DnU=
=15ws
-----END PGP SIGNATURE-----
-- 
Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
+44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1994-07-13  9:01 Ian Jackson
  1994-07-13  9:01 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1994-07-13  9:01 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 13 Jul 1994

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486 [see Q1.1 `What is Linux ?' for more details].  It should be
read in conjunction with the HOWTO documents, which are available in
   ftp.funet.fi (128.214.6.100)   /pub/OS/Linux/doc/HOWTO
   tsx-11.mit.edu (18.172.1.2)    /pub/linux/docs/HOWTO
   sunsite.unc.edu (152.2.22.81)  /pub/Linux/docs/HOWTO
and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q9.1 `You still
haven't answered my question !', before posting your question to the
newsgroup comp.os.linux.help.

You can skip to a particular question by searching for `Question n.n'.
See Q10.2 `Formats in which this FAQ is available' for details of where to
get the PostScript and Emacs Info versions of this document.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?
 Q2.10       What is the Linux Journal and where can I get it ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How can I have more than 16Mb of swap ?
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?
 Q4.12       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        During linking I get Undefined symbol _mcount
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        How do I port XXX to Linux ?
 Q5.5        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.6        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.7        What does gcc -O6 do ?
 Q5.8        Where are <linux/*.h> and <asm/*.h> ?
 Q5.9        I get errors when I try to compile the kernel.
 Q5.10       How do I make a shared library ?
 Q5.11       How do I make my executables smaller ?

 Section 6.  Miscellaneous questions and problems
 Q6.1        How many people use Linux ?
 Q6.2        How can I get scrollback on text VC's ?
 Q6.3        How do I switch VC's ?  How do I enable them ?
 Q6.4        Setuid scripts don't seem to work.
 Q6.5        Free memory as reported by free keeps shrinking.
 Q6.6        What is a BogoMip ?
 Q6.7        How do I set the timezone ?
 Q6.8        What version of Linux and what machine name am I using ?
 Q6.9        When I add more memory it slows to a crawl.
 Q6.10       Some programs (e.g. xdm) won't let me log in.
 Q6.11       Some programs let me log in with no password.
 Q6.12       My machine runs very slowly when I run GCC / X / ...
 Q6.13       I can only log in as root.
 Q6.14       How can I produce core files ?
 Q6.15       How do I stop producing core files ?
 Q6.16       My keyboard goes all funny after I switch VC's.
 Q6.17       My screen is all full of weird characters instead of letters.
 Q6.18       What is a .gz file ? And a .tgz ? And ... ?
 Q6.19       I have screwed up my system and can't log in to fix it.
 Q6.20       How do I upgrade/recompile my kernel ?
 Q6.21       Can I have more than 3 serial ports by sharing interrupts ?
 Q6.22       Emacs just dumps core.
 Q6.23       How do I make a bootable floppy ?
 Q6.24       How do I remap my keyboard to UK, French, etc. ?
 Q6.25       I've discovered a huge security hole in rm !
 Q6.26       lpr and/or lpd aren't working.
 Q6.27       What does VFS stand for ?
 Q6.28       How do I get NUM LOCK to default to on ?

 Section 7.  Frequently Encountered Error messages
 Q7.1        fdisk says Partition X has different phsyical/logical ...
 Q7.2        fdisk: Partition 1 does not start on cylinder boundary
 Q7.3        lp1 on fire
 Q7.4        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q7.5        ld: unrecognized option '-m486'
 Q7.6        GCC says Internal compiler error
 Q7.7        make says Error 139
 Q7.8        df says Cannot read table of mounted filesystems
 Q7.9        shell-init: permission denied when I log in.
 Q7.10       No utmp entry.  You must exec ... when I log in.
 Q7.11       EXT2-fs: warning: mounting unchecked filesystem
 Q7.12       EXT2-fs warning: maximal count reached
 Q7.13       EXT2-fs warning: checktime reached
 Q7.14       fdisk says cannot use nnn sectors of this partition
 Q7.15       fdisk says partition n has an odd number of sectors
 Q7.16       mtools says cannot initialise drive XYZ
 Q7.17       Warning - bdflush not running
 Q7.18       Warning: obsolete routing request made.

 Section 8.  The X Window System
 Q8.1        Does Linux support X Windows ?
 Q8.2        Where can I get an Xconfig for my video card and monitor ?
 Q8.3        xterm logins show up strangely in who, finger
 Q8.4        I can't get X Windows to work right.

 Section 9.  How to get further assistance
 Q9.1        You still haven't answered my question !
 Q9.2        What to put in a posting to comp.os.linux.help

 Section 10. Administrative information and acknowledgements
 Q10.1       Feedback is invited
 Q10.2       Formats in which this FAQ is available
 Q10.3       Authorship and acknowledgements
 Q10.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone for 386/486-based PCs written from scratch by Linus
Torvalds with assistance from a loosely-knit team of hackers across the
Net.  It aims towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It uses the hardware features of the 386 processor family (TSS segments et
al) to implement these features.

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

It is distributed under the GNU General Public License - see Q1.5 `Is
Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP and PPP) and all the hundreds of programs that people have
compiled or ported for it.

There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
386BSD ?  Minix ?'] and work is progressing on a facilities to allow SVR4
ELF, SVR3.2 COFF and Microsoft Windows binaries [Q3.6 `Can I run Microsoft
Windows programs under Linux ?'] to be run under Linux and X Windows.

For more information see the INFO-SHEET, which is one of the the HOWTOs
--- see above, or Q2.1 `Where can I get the HOWTOs and other documentation
?'.  See also Q5.4 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386 or 486, with at least 2Mb of RAM and a single floppy, to
try it out.  To do anything useful more RAM and a hard disk are required.
Reportedly Linux also works on a Pentium.

VESA local bus and PCI are both supported.  However, a driver for the NCR
SCSI chip in many PCI machines is not yet available, but is under
development.

There are problems with machines using MCA (IBM's proprietary bus), mainly
to do with the hard disk controller.  There is a developers' release for
PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
kinds of SCSI controllers also work, I understand.  Work is in progress to
create a suitable version of the Slackware distribution.  I'm afraid I
don't have any further details; you could try asking Arindam Banerji
<axb@defender.dcrl.nd.edu>.

Linux is reported to run on 386/486-based laptops, with X on most of them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware Compatibility HOWTO [Q2.1 `Where
can I get the HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386/486 processors.

A project has been underway for nearly a year now to port Linux to
suitable 68000-series based systems such as Amigas and Ataris, but this is
still at an early stage of development.  Don't post asking about it unless
you think you can contribute to it, and don't hold your breath.

Work has just been started on a port to the PowerPC.  Currently this will
be based on the PowerMAC architecture.  Again, don't post asking about it
unless you have experience to offer, and don't hold your breath.

Neither of these ports will be capable of running Linux/386 binaries.

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

Question 1.4.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  The SLS 1.03 distribution (which I would recommend you stay well
clear of - it has a number of serious and annoying bugs) takes around
100Mb.

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

Question 1.5.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The copyright 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

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

Question 1.6.  How should I pronounce Linux ?

This is a matter of religious debate, of course !

If you want to hear the Linus himself say how he pronounces it download
english.au or swedish.au from ftp.funet.fi (in
/pub/OS/Linux/PEOPLE/Linus/SillySounds).  If you have a soundcard 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 of you who don't have the equipment or
inclination: Linus pronounces Linux approximately as Leenus, where the ee
is 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).

When speaking English I pronounce it Lie-nucks (u as in bucket) --- this
is an anglicised pronunciation based on the analogy with Linus' name,
which in English is usually pronounced Lie-nus (u as in put).  It is of
course quite acceptable and common to modify the pronunciation of a proper
noun when it changes languages.

I think I can safely say that the pronunciation Linnucks (short i as in
pit, short u as in bucket) is wrong in English, as it is not the original
Swedish pronunciation, not a sensible direct anglicisation of it, and not
based on the anglicised version of Linus' name.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?
 Q2.10       What is the Linux Journal and where can I get it ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.
   ftp.funet.fi (128.214.6.100)   /pub/OS/Linux/doc/HOWTO
   tsx-11.mit.edu (18.172.1.2)    /pub/linux/docs/HOWTO
   sunsite.unc.edu (152.2.22.81)  /pub/Linux/docs/HOWTO
For a complete list of Linux FTP sites see Q2.4 `How do I install Linux
?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

          Installation HOWTO            Electronic Mail HOWTO
          Linux INFO-SHEET              UUCP HOWTO
          Linux META-FAQ                SCSI HOWTO
          NET-2 HOWTO                   Printing HOWTO
          Ethernet HOWTO                Hardware Comaptibility HOWTO
          News HOWTO                    XFree86 HOWTO
          Distribution HOWTO            MGR HOWTO
          Ftape HOWTO                   Sound HOWTO
          JE HOWTO                      Busmouse HOWTO
          Keystroke HOWTO

Some more of these documents are in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also a few mini-HOWTOs in the docs/HOWTO/mini
directory.

The HOWTO.INDEX also contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

          The Linux Documentation Project manifesto
          Installation and Setup Guide for Linux
          The Kernel Hacker's Guide
          Network Administration Guide
          Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are five international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@tc.cornell.edu.

comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.misc are also worth reading -- you may find that many common
problems are too recent to find in this FAQ but are answered in the
newsgroups.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q9.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup.  Crossposting is
rarely a good idea.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
there is probably also a German one.  In Australia, try
aus.computers.linux.

There may well be Linux groups local to your institution or area - check
there first.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of these releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:
   ftp.funet.fi (128.214.248.6)   /pub/OS/Linux
   sunsite.unc.edu (152.2.22.81)  /pub/Linux
   tsx-11.mit.edu (18.172.1.2)    /pub/linux
The MCC-Interim release is available from:
   ftp.mcc.ac.uk (130.88.200.7)   /pub/linux
The TAMU release is available from:
   net.tamu.edu (128.194.177.1)   /pub/linux

The contents of these sites is mirrored (copied, usually approximately
daily) by a number of other sites.  Please use one close to you -- that
will be faster for you and easier on the network.
   src.doc.ic.ac.uk                     wuarchive.wustl.edu
   sunacm.swan.ac.uk                    ftp.eecs.umich.edu
   ftp.ibp.fr                           mrcnext.cso.uiuc.edu

   ftp.informatik.tu-muenchen.de        bond.edu.au
   ftp.ibr.cs.tu-bs.de                  monu1.cc.monash.edu.au
   ftp.dfv.rwth-aachen.de               ftp.sun.ac.za
   ftp.informatik.rwth-aachen.de        cair.kaist.ac.kr
Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

Linux is also available via traditional mail on diskette, CD-ROM and tape.
The Installation HOWTO, and the file /pub/Linux/docs/distributions on
sunsite.unc.edu, contains information on these distributions.

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the comp.os.linux.* groups are available by
subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
for the benefit of those without Usenet access.  However since
niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
digestifier instead [Q2.7 `I don't have Usenet access.  Where do I get
information ?'].

There is also a NEWBIE channel where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

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

Question 2.9.  Are the newsgroups archived anywhere ?

Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
comp.os.linux.announce and the old group comp.os.linux, in their Linux
areas.  The comp.os.linux.announce archives are mirrored from /usenet on
src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).

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

Question 2.10.  What is the Linux Journal and where can I get it ?

It's a normal magazine published monthly on paper (not electronically) by
Lasermoon Ltd.  Contact their semiautomatic mail server on
lj@lasermoon.co.uk for details.

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

Linux can also access Minix and System V UFS filesystems.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.4 `How do I install Linux ?'.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
filesystem under Linux or using mtools.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q6.20 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is an alpha test read-only Amiga filesystem on
sunsite.unc.edu, probably in /pub/Linux/kernel/misc-patches/ffs-patch.
Work may well be progressing on upgrading this to read-write for the 680x0
Linux project.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.os.linux.announce.

The advert from Softlanding (producers of SLS) stating that Linux could
run MS Windows binaries was at best grossly exaggerated.  I'm told that
you can run Windoze 3.0 in real mode in a dosemu [Q3.1 `Can Linux coexist
with DOS ?  OS/2 ?  386BSD ?  Minix ?'].

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS.  This is so
that OS/2 knows about the partition being formatted.

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How can I have more than 16Mb of swap ?
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?
 Q4.12       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I undelete files ?

In general, this is very hard to do on Unices.  Undelete functionality for
the ext2fs is being worked on, but don't hold your breath.

In the meantime you can search the raw disk device which holds the
filesystem in question.  The strings command may help you do this, if the
file you've lost was a text file: for example strings /dev/hdb3.  You will
need to be root to do this, and you should take care to put the output
file on a different filesystem, of course ! The output will be large and
full of extra unwanted crud, so make sure you have enough space.

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

Question 4.2.  Is there a defragmenter for ext2fs etc. ?

You can probably do without, since the ext2 filesystem code tries to
reduce fragmentation as it goes, during normal operation.

If you really need to defragment a filesystem you could back it up,
reinitialise the partition using mkfs -t ext2 and restore it.

I'm told that a defragmenter for Minix and old-style `ext' filesystems is
available on sunsite.unc.edu in system/Filesystems/defrag-0.4.tar.z.

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

Question 4.3.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  If you don't have the fsutils package
you'll have to run mke2fs instead of mkfs -t ext2.  The -m 0 option tells
mkfs.ext2 not to reserve any space on the disk for the superuser ---
usually the last 10% is reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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 bootutils 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 fsutils package) will be able to repair your filesystem; if
you're unlucky the filesystem is trashed and you'll have to reinitialise
it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.5.  My swap area isn't working.

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 or /etc/rc.local (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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.6.  How can I have more than 16Mb of swap ?

Use a recent kernel -- from at least 0.99.14 Linux can use swap partitions
of up to 128Mb.

If you use an older kernel which only supports swap area sizes up to 16Mb
you have to set up more than one swap partition or swapfile.

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

Question 4.7.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
into FDISK in the normal way and then select the `Re-write Master Boot
Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.8.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.9.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.10.  My ext2fs partitions are checked each time I reboot.

See Q7.11 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.11.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.12.  My AHA1542C doesn't work with 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.
The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS misfeature and should be turned *off* under
Linux.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        During linking I get Undefined symbol _mcount
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        How do I port XXX to Linux ?
 Q5.5        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.6        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.7        What does gcc -O6 do ?
 Q5.8        Where are <linux/*.h> and <asm/*.h> ?
 Q5.9        I get errors when I try to compile the kernel.
 Q5.10       How do I make a shared library ?
 Q5.11       How do I make my executables smaller ?

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

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

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

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

Question 5.2.  During linking I get Undefined symbol _mcount

This is usually due to a bad interaction between a brokenness in SLS and
the C library release notes.  Your libc.a has been replaced by the
profiling library.  You should remove libc.a, libg.a and libc_p.a and once
again install the new libraries (following the release notes, of course).

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

Question 5.3.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sties.

Check the FTP sites (see Q2.1 `Where can I get the HOWTOs and other
documentation ?') first --- search the find-ls or INDEX files for
appropriate strings.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.4 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to linux-announce@tc.cornell.edu).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

You should also check the Projects-FAQ, available in
/pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.

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

Question 5.4.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.5.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.

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

Question 5.6.  GCC sometimes uses huge amounts of virtual memory and thrashes

Older versions of GCC had a bug which makes it use lots of memory if you
try to compile a program which has a large static data table in it.

You can either upgrade your version of GCC, or add more swap if necessary
and just grin and bear it; it'll work in the end.

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

Question 5.7.  What does gcc -O6 do ?

The same as -O2; any number greater than 2 currently works just like 2.
The Makefiles of newer kernels use -O2, and so should you.

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

Question 5.8.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q6.20 `How do I
upgrade/recompile my 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 /usr/include/asm

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

Question 5.9.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.8 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

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

Question 5.10.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
It comes with documentation that will tell you what to do.

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

Question 5.11.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (check the GCC documentation) and -s which strips 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.

===============================================================================

The remainder of the FAQ is in the next part ...

-- 
Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
+44 223 575512    Escoerea on IRC.    http://www.cl.cam.ac.uk/users/iwj10/
2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1994-06-15 23:59 Ian Jackson
  1994-06-16  0:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1994-06-15 23:59 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 16 Jun 1994

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486 [see Q1.1 `What is Linux ?' for more details].  It should be
read in conjunction with the HOWTO documents, which are available in
   ftp.funet.fi (128.214.6.100)   /pub/OS/Linux/doc/HOWTO
   tsx-11.mit.edu (18.172.1.2)    /pub/linux/docs/HOWTO
   sunsite.unc.edu (152.2.22.81)  /pub/Linux/docs/HOWTO
and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q9.1 `You still
haven't answered my question !', before posting your question to the
newsgroup comp.os.linux.help.

You can skip to a particular question by searching for `Question n.n'.
See Q10.2 `Formats in which this FAQ is available' for details of where to
get the PostScript and Emacs Info versions of this document.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How can I have more than 16Mb of swap ?
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?
 Q4.12       My AHA1542C doesn't work with Linux.

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        During linking I get Undefined symbol _mcount
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        How do I port XXX to Linux ?
 Q5.5        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.6        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.7        What does gcc -O6 do ?
 Q5.8        Where are <linux/*.h> and <asm/*.h> ?
 Q5.9        I get errors when I try to compile the kernel.
 Q5.10       How do I make a shared library ?
 Q5.11       How do I make my executables smaller ?

 Section 6.  Miscellaneous questions and problems
 Q6.1        How many people use Linux ?
 Q6.2        How can I get scrollback on text VC's ?
 Q6.3        Setuid scripts don't seem to work.
 Q6.4        Free memory as reported by free keeps shrinking.
 Q6.5        What is a BogoMip ?
 Q6.6        How do I set the timezone ?
 Q6.7        What version of Linux and what machine name am I using ?
 Q6.8        When I add more memory it slows to a crawl.
 Q6.9        Some programs (e.g. xdm) won't let me log in.
 Q6.10       Some programs let me log in with no password.
 Q6.11       My machine runs very slowly when I run GCC / X / ...
 Q6.12       I can only log in as root.
 Q6.13       How can I produce core files ?
 Q6.14       How do I stop producing core files ?
 Q6.15       My keyboard goes all funny after I switch VC's.
 Q6.16       My screen is all full of weird characters instead of letters.
 Q6.17       What is a .gz file ? And a .tgz ? And ... ?
 Q6.18       I have screwed up my system and can't log in to fix it.
 Q6.19       How do I upgrade/recompile my kernel ?
 Q6.20       Can I have more than 3 serial ports by sharing interrupts ?
 Q6.21       Emacs just dumps core.
 Q6.22       How do I make a bootable floppy ?
 Q6.23       How do I remap my keyboard to UK, French, etc. ?
 Q6.24       I've discovered a huge security hole in rm !
 Q6.25       lpr and lpd aren't working.
 Q6.26       What does VFS stand for ?

 Section 7.  Frequently Encountered Error messages
 Q7.1        fdisk says Partition X has different phsyical/logical ...
 Q7.2        fdisk: Partition 1 does not start on cylinder boundary
 Q7.3        lp1 on fire
 Q7.4        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q7.5        ld: unrecognized option '-m486'
 Q7.6        GCC says Internal compiler error
 Q7.7        make says Error 139
 Q7.8        df says Cannot read table of mounted filesystems
 Q7.9        shell-init: permission denied when I log in.
 Q7.10       No utmp entry.  You must exec ... when I log in.
 Q7.11       EXT2-fs: warning: mounting unchecked filesystem
 Q7.12       EXT2-fs warning: maximal count reached
 Q7.13       EXT2-fs warning: checktime reached
 Q7.14       fdisk says cannot use nnn sectors of this partition
 Q7.15       fdisk says partition n has an odd number of sectors
 Q7.16       mtools says cannot initialise drive XYZ
 Q7.17       Warning: obsolete routing request made.

 Section 8.  The X Window System
 Q8.1        Does Linux support X Windows ?
 Q8.2        Where can I get an Xconfig for my video card and monitor ?
 Q8.3        xterm logins show up strangely in who, finger
 Q8.4        I can't get X Windows to work right.

 Section 9.  How to get further assistance
 Q9.1        You still haven't answered my question !
 Q9.2        What to put in a posting to comp.os.linux.help

 Section 10. Administrative information and acknowledgements
 Q10.1       Feedback is invited
 Q10.2       Formats in which this FAQ is available
 Q10.3       Authorship and acknowledgements
 Q10.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone for 386/486-based PCs written from scratch by Linus
Torvalds with assistance from a loosely-knit team of hackers across the
Net.  It aims towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It uses the hardware features of the 386 processor family (TSS segments et
al) to implement these features.

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

It is distributed under the GNU General Public License - see Q1.5 `Is
Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP --- PPP support is being developed) and all the hundreds
of programs that people have compiled or ported for it.

There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
386BSD ?  Minix ?'] and work is progressing on a facilities to allow SVR4
ELF, SVR3.2 COFF and Microsoft Windows binaries [Q3.6 `Can I run Microsoft
Windows programs under Linux ?'] to be run under Linux and X Windows.

For more information see the INFO-SHEET, which is one of the the HOWTOs
--- see above, or Q2.1 `Where can I get the HOWTOs and other documentation
?'.  See also Q5.4 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386 or 486, with at least 2Mb of RAM and a single floppy, to
try it out.  To do anything useful more RAM and a hard disk are required.
Reportedly Linux also works on a Pentium.

Linux doesn't currently work on machines using MCA (IBM's proprietary
bus), because of lack of available documentation.  You may be able to get
it to work if your hard disk is on certain kinds of controller (some SCSI
controllers work, I understand), but you're on your own.

VESA local bus and PCI are both supported.  However, a driver for the NCR
SCSI chip in many PCI machines is not yet available, but is under
development.

Linux is reported to run on 386/486-based laptops, with X on most of them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware Compatibility HOWTO [Q2.1 `Where
can I get the HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386/486 processors.

A project has been underway for nearly a year now to port Linux to
suitable 68000-series based systems such as Amigas and Ataris, but this is
still at an early stage of development.  Don't post asking about it unless
you think you can contribute to it, and don't hold your breath.

Work has just been started on a port to the PowerPC.  Currently this will
be based on the PowerMAC architecture.  Again, don't post asking about it
unless you have experience to offer, and don't hold your breath.

Neither of these ports will be capable of running Linux/386 binaries.

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

Question 1.4.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  The SLS 1.03 distribution (which I would recommend you stay well
clear of - it has a number of serious and annoying bugs) takes around
100Mb.

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

Question 1.5.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The copyright 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

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

Question 1.6.  How should I pronounce Linux ?

This is a matter of religious debate, of course !

If you want to hear the Linus himself say how he pronounces it download
english.au or swedish.au from ftp.funet.fi (in
/pub/OS/Linux/PEOPLE/Linus/SillySounds).  If you have a soundcard 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 of you who don't have the equipment or
inclination: Linus pronounces Linux approximately as Leenus, where the ee
is 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).

When speaking English I pronounce it Lie-nucks (u as in bucket) --- this
is an anglicised pronunciation based on the analogy with Linus' name,
which in English is usually pronounced Lie-nus (u as in put).  It is of
course quite acceptable and common to modify the pronunciation of a proper
noun when it changes languages.

I think I can safely say that the pronunciation Linnucks (short i as in
pit, short u as in bucket) is wrong in English, as it is not the original
Swedish pronunciation, not a sensible direct anglicisation of it, and not
based on the anglicised version of Linus' name.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.
   ftp.funet.fi (128.214.6.100)   /pub/OS/Linux/doc/HOWTO
   tsx-11.mit.edu (18.172.1.2)    /pub/linux/docs/HOWTO
   sunsite.unc.edu (152.2.22.81)  /pub/Linux/docs/HOWTO
For a complete list of Linux FTP sites see Q2.4 `How do I install Linux
?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

          Installation HOWTO            Electronic Mail HOWTO
          Linux INFO-SHEET              UUCP HOWTO
          Linux META-FAQ                SCSI HOWTO
          NET-2 HOWTO                   Printing HOWTO
          Ethernet HOWTO                Hardware Comaptibility HOWTO
          News HOWTO                    XFree86 HOWTO
          Distribution HOWTO            MGR HOWTO
          Ftape HOWTO                   Sound HOWTO
          JE HOWTO                      Busmouse HOWTO

Some more of these documents are in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.  There are also a few mini-HOWTOs in the docs/HOWTO/mini
directory.

The HOWTO.INDEX also contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

          The Linux Documentation Project manifesto
          Installation and Setup Guide for Linux
          The Kernel Hacker's Guide
          Network Administration Guide
          Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format and those which aren't.

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

Question 2.3.  What newsgroups are there for Linux ?

There are five international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@tc.cornell.edu.

comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.misc are also worth reading -- you may find that many common
problems are too recent to find in this FAQ but are answered in the
newsgroups.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q9.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup.  Crossposting is
rarely a good idea.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
there is probably also a German one.  In Australia, try
aus.computers.linux.

There may well be Linux groups local to your institution or area - check
there first.

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

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of these releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].

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

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:
   ftp.funet.fi (128.214.248.6)   /pub/OS/Linux
   sunsite.unc.edu (152.2.22.81)  /pub/Linux
   tsx-11.mit.edu (18.172.1.2)    /pub/linux
The MCC-Interim release is available from:
   ftp.mcc.ac.uk (130.88.200.7)   /pub/linux
The TAMU release is available from:
   net.tamu.edu (128.194.177.1)   /pub/linux

The contents of these sites is mirrored (copied, usually approximately
daily) by a number of other sites.  Please use one close to you -- that
will be faster for you and easier on the network.
   src.doc.ic.ac.uk                     wuarchive.wustl.edu
   sunacm.swan.ac.uk                    ftp.eecs.umich.edu
   ftp.ibp.fr                           mrcnext.cso.uiuc.edu

   ftp.informatik.tu-muenchen.de        bond.edu.au
   ftp.ibr.cs.tu-bs.de                  monu1.cc.monash.edu.au
   ftp.dfv.rwth-aachen.de               ftp.sun.ac.za
   ftp.informatik.rwth-aachen.de        cair.kaist.ac.kr
Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

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

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

Linux is also available via traditional mail on diskette, CD-ROM and tape.
The Installation HOWTO, and the file /pub/Linux/docs/distributions on
sunsite.unc.edu, contains information on these distributions.

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

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

Question 2.7.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the comp.os.linux.* groups are available by
subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

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

Question 2.8.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
for the benefit of those without Usenet access.  However since
niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
digestifier instead [Q2.7 `I don't have Usenet access.  Where do I get
information ?'].

There is also a NEWBIE channel where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

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

Question 2.9.  Are the newsgroups archived anywhere ?

Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
comp.os.linux.announce and the old group comp.os.linux, in their Linux
areas.  The comp.os.linux.announce archives are mirrored from /usenet on
src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

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

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

Linux can also access Minix and System V UFS filesystems.

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

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.4 `How do I install Linux ?'.

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

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
filesystem under Linux or using mtools.

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

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q6.19 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

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

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is an alpha test read-only Amiga filesystem on
sunsite.unc.edu, probably in /pub/Linux/kernel/misc-patches/ffs-patch.
Work may well be progressing on upgrading this to read-write for the 680x0
Linux project.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

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

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.os.linux.announce.

The advert from Softlanding (producers of SLS) stating that Linux could
run MS Windows binaries was at best grossly exaggerated.  I'm told that
you can run Windoze 3.0 in real mode in a dosemu [Q3.1 `Can Linux coexist
with DOS ?  OS/2 ?  386BSD ?  Minix ?'].

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

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

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS.  This is so
that OS/2 knows about the partition being formatted.

3. Add the partition to the Boot Manager.

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

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

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

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How can I have more than 16Mb of swap ?
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?
 Q4.12       My AHA1542C doesn't work with Linux.

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

Question 4.1.  How can I undelete files ?

In general, this is very hard to do on Unices.  Undelete functionality for
the ext2fs is being worked on, but don't hold your breath.

In the meantime you can search the raw disk device which holds the
filesystem in question.  The strings command may help you do this, if the
file you've lost was a text file: for example strings /dev/hdb3.  You will
need to be root to do this, and you should take care to put the output
file on a different filesystem, of course ! The output will be large and
full of extra unwanted crud, so make sure you have enough space.

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

Question 4.2.  Is there a defragmenter for ext2fs etc. ?

You can probably do without, since the ext2 filesystem code tries to
reduce fragmentation as it goes, during normal operation.

If you really need to defragment a filesystem you could back it up,
reinitialise the partition using mkfs -t ext2 and restore it.

I'm told that a defragmenter for Minix and old-style `ext' filesystems is
available on sunsite.unc.edu in system/Filesystems/defrag-0.4.tar.z.

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

Question 4.3.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  If you don't have the fsutils package
you'll have to run mke2fs instead of mkfs -t ext2.  The -m 0 option tells
mkfs.ext2 not to reserve any space on the disk for the superuser ---
usually the last 10% is reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

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

Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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 bootutils 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 fsutils package) will be able to repair your filesystem; if
you're unlucky the filesystem is trashed and you'll have to reinitialise
it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

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

Question 4.5.  My swap area isn't working.

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 or /etc/rc.local (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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

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

Question 4.6.  How can I have more than 16Mb of swap ?

Use a recent kernel -- from at least 0.99.14 Linux can use swap partitions
of up to 128Mb.

If you use an older kernel which only supports swap area sizes up to 16Mb
you have to set up more than one swap partition or swapfile.

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

Question 4.7.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
into FDISK in the normal way and then select the `Re-write Master Boot
Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

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

Question 4.8.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

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

Question 4.9.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

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

Question 4.10.  My ext2fs partitions are checked each time I reboot.

See Q7.11 `EXT2-fs: warning: mounting unchecked filesystem'.

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

Question 4.11.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

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

Question 4.12.  My AHA1542C doesn't work with 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.
The option to allow disks with more than 1024 cylinders is only required
as a workaround for a DOS misfeature and should be turned *off* under
Linux.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        During linking I get Undefined symbol _mcount
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        How do I port XXX to Linux ?
 Q5.5        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.6        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.7        What does gcc -O6 do ?
 Q5.8        Where are <linux/*.h> and <asm/*.h> ?
 Q5.9        I get errors when I try to compile the kernel.
 Q5.10       How do I make a shared library ?
 Q5.11       How do I make my executables smaller ?

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

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

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

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

Question 5.2.  During linking I get Undefined symbol _mcount

This is usually due to a bad interaction between a brokenness in SLS and
the C library release notes.  Your libc.a has been replaced by the
profiling library.  You should remove libc.a, libg.a and libc_p.a and once
again install the new libraries (following the release notes, of course).

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

Question 5.3.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sties.

Check the FTP sites (see Q2.1 `Where can I get the HOWTOs and other
documentation ?') first --- search the find-ls or INDEX files for
appropriate strings.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.4 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to linux-announce@tc.cornell.edu).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

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

Question 5.4.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

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

Question 5.5.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

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

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 overriden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.

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

Question 5.6.  GCC sometimes uses huge amounts of virtual memory and thrashes

Older versions of GCC had a bug which makes it use lots of memory if you
try to compile a program which has a large static data table in it.

You can either upgrade your version of GCC, or add more swap if necessary
and just grin and bear it; it'll work in the end.

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

Question 5.7.  What does gcc -O6 do ?

The same as -O2; any number greater than 2 currently works just like 2.
The Makefiles of newer kernels use -O2, and so should you.

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

Question 5.8.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q6.19 `How do I
upgrade/recompile my 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 /usr/include/asm

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

Question 5.9.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.8 `Where are <linux/*.h> and <asm/*.h> ?'.

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 manpage for
patch for details.

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

Question 5.10.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
It comes with documentation that will tell you what to do.

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

Question 5.11.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (check the GCC documentation) and -s which strips 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.

===============================================================================

The remainder of the FAQ is in the next part ...

-- 
Ian Jackson, at home    <ijackson@nyx.cs.du.edu> or <iwj10@cus.cam.ac.uk>
PGP2 public key available.   Escoerea on IRC.   Urgent: <iwj@cam-orl.co.uk>
2 Lexington Close, Cambridge, CB4 3LS, England;  phone: +44 223 575512


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1994-05-12 11:26 Ian Jackson
  1994-05-12 11:26 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1994-05-12 11:26 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 12 May 1994

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486 [see Q1.1 `What is Linux ?' for more details].  It should be
read in conjunction with the HOWTO documents, which are available in
   ftp.funet.fi (128.214.6.100)   /pub/OS/Linux/doc/HOWTO
   tsx-11.mit.edu (18.172.1.2)    /pub/linux/docs/HOWTO
   sunsite.unc.edu (152.2.22.81)  /pub/Linux/docs/HOWTO
and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q9.1 `You still
haven't answered my question !', before posting your question to the
newsgroup comp.os.linux.help.

You can skip to a particular question by searching for `Question n.n'.
See Q10.2 `Formats in which this FAQ is available' for details of where to
get the PostScript and Emacs Info versions of this document.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How can I have more than 16Mb of swap ?
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        During linking I get Undefined symbol _mcount
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        How do I port XXX to Linux ?
 Q5.5        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.6        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.7        What does gcc -O6 do ?
 Q5.8        Where are <linux/*.h> and <asm/*.h> ?
 Q5.9        I get errors when I try to compile the kernel.
 Q5.10       How do I make a shared library ?
 Q5.11       How do I make my executables smaller ?

 Section 6.  Miscellaneous questions and problems
 Q6.1        How many people use Linux ?
 Q6.2        How can I get scrollback on text VC's ?
 Q6.3        Setuid scripts don't seem to work.
 Q6.4        Free memory as reported by free keeps shrinking.
 Q6.5        What is a BogoMip ?
 Q6.6        How do I set the timezone ?
 Q6.7        What version of Linux and what machine name am I using ?
 Q6.8        When I add more memory it slows to a crawl.
 Q6.9        Some programs (e.g. xdm) won't let me log in.
 Q6.10       Some programs let me log in with no password.
 Q6.11       My machine runs very slowly when I run GCC / X / ...
 Q6.12       I can only log in as root.
 Q6.13       How can I produce core files ?
 Q6.14       How do I stop producing core files ?
 Q6.15       My keyboard goes all funny after I switch VC's.
 Q6.16       My screen is all full of weird characters instead of letters.
 Q6.17       What is a .gz file ? And a .tgz ? And ... ?
 Q6.18       I have screwed up my system and can't log in to fix it.
 Q6.19       How do I upgrade/recompile my kernel ?
 Q6.20       Can I have more than 3 serial ports by sharing interrupts ?
 Q6.21       Emacs just dumps core.
 Q6.22       How do I make a bootable floppy ?
 Q6.23       How do I remap my keyboard to UK, French, etc. ?
 Q6.24       I've discovered a huge security hole in rm !
 Q6.25       lpr and lpd aren't working.
 Q6.26       What does VFS stand for ?

 Section 7.  Frequently Encountered Error messages
 Q7.1        fdisk says Partition X has different phsyical/logical ...
 Q7.2        fdisk: Partition 1 does not start on cylinder boundary
 Q7.3        lp1 on fire
 Q7.4        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q7.5        ld: unrecognized option '-m486'
 Q7.6        GCC says Internal compiler error
 Q7.7        make says Error 139
 Q7.8        df says Cannot read table of mounted filesystems
 Q7.9        shell-init: permission denied when I log in.
 Q7.10       No utmp entry.  You must exec ... when I log in.
 Q7.11       EXT2-fs: warning: mounting unchecked filesystem
 Q7.12       EXT2-fs warning: maximal count reached
 Q7.13       EXT2-fs warning: checktime reached
 Q7.14       fdisk says cannot use nnn sectors of this partition
 Q7.15       fdisk says partition n has an odd number of sectors
 Q7.16       mtools says cannot initialise drive XYZ
 Q7.17       My AHA1542C doesn't work with Linux.

 Section 8.  The X Window System
 Q8.1        Does Linux support X Windows ?
 Q8.2        Where can I get an Xconfig for my video card and monitor ?
 Q8.3        xterm logins show up strangely in who, finger
 Q8.4        I can't get X Windows to work right.

 Section 9.  How to get further assistance
 Q9.1        You still haven't answered my question !
 Q9.2        What to put in a posting to comp.os.linux.help

 Section 10. Administrative information and acknowledgements
 Q10.1       Feedback is invited
 Q10.2       Formats in which this FAQ is available
 Q10.3       Authorship and acknowledgements
 Q10.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

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

Question 1.1.  What is Linux ?

Linux is a Unix clone for 386/486-based PCs written from scratch by Linus
Torvalds with assistance from a loosely-knit team of hackers across the
Net.  It aims towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It uses the hardware features of the 386 processor family (TSS segments et
al) to implement these features.

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

It is distributed under the GNU General Public License - see Q1.5 `Is
Linux PD ?  Copyrighted ?' for more details.

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

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP --- PPP support is being developed) and all the hundreds
of programs that people have compiled or ported for it.

There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
386BSD ?  Minix ?'] and work is progressing on a facilities to allow SVR4
ELF, SVR3.2 COFF and Microsoft Windows binaries [Q3.6 `Can I run Microsoft
Windows programs under Linux ?'] to be run under Linux and X Windows.

For more information see the INFO-SHEET, which is one of the the HOWTOs
--- see above, or Q2.1 `Where can I get the HOWTOs and other documentation
?'.  See also Q5.4 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.9 `Are the newsgroups archived anywhere ?'].

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

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386 or 486, with at least 2Mb of RAM and a single floppy, to
try it out.  To do anything useful more RAM and a hard disk are required.
Reportedly Linux also works on a Pentium.

Linux doesn't currently work on machines using MCA (IBM's proprietary
bus), because of lack of available documentation.  You may be able to get
it to work if your hard disk is on certain kinds of controller (some SCSI
controllers work, I understand), but you're on your own.

VESA local bus and PCI are both supported.  However, a driver for the NCR
SCSI chip in many PCI machines is not yet available, but is under
development.

Linux is reported to run on 386/486-based laptops, with X on most of them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware Compatibility HOWTO [Q2.1 `Where
can I get the HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386/486 processors.

A project has been underway for nearly a year now to port Linux to
suitable 68000-series based systems such as Amigas, but this is still at
an early stage of development.  Don't post asking about it unless you
think you can contribute to it, and don't hold your breath.

Work has just been started on a port to the PowerPC.  Currently this will
be based on the PowerMAC architecture.  Again, don't post asking about it
unless you have experience to offer, and don't hold your breath.

Neither of these ports will be capable of running Linux/386 binaries.

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

Question 1.4.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  The SLS 1.03 distribution (which I would recommend you stay well
clear of - it has a number of serious and annoying bugs) takes around
100Mb.

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

Question 1.5.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The copyright 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

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

Question 1.6.  How should I pronounce Linux ?

This is a matter of religious debate, of course !

If you want to hear the Linus himself say how he pronounces it download
english.au or swedish.au from ftp.funet.fi (in
/pub/OS/Linux/PEOPLE/Linus/SillySounds).  If you have a soundcard 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 of you who don't have the equipment or
inclination: Linus pronounces Linux approximately as Leenus, where the ee
is 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).

When speaking English I pronounce it Lie-nucks (u as in bucket) --- this
is an anglicised pronunciation based on the analogy with Linus' name,
which in English is usually pronounced Lie-nus (u as in put).  It is of
course quite acceptable and common to modify the pronunciation of a proper
noun when it changes languages.

I think I can safely say that the pronunciation Linnucks (short i as in
pit, short u as in bucket) is wrong in English, as it is not the original
Swedish pronunciation, not a sensible direct anglicisation of it, and not
based on the anglicised version of Linus' name.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        Where should I look on the World Wide Web for Linux stuff ?
 Q2.3        What newsgroups are there for Linux ?
 Q2.4        How do I install Linux ?
 Q2.5        Where can I get Linux material by FTP ?
 Q2.6        I don't have FTP access.  Where do I get Linux ?
 Q2.7        I don't have Usenet access.  Where do I get information ?
 Q2.8        What's this mailing list thing at niksula.hut.fi ?
 Q2.9        Are the newsgroups archived anywhere ?

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

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.
   ftp.funet.fi (128.214.6.100)   /pub/OS/Linux/doc/HOWTO
   tsx-11.mit.edu (18.172.1.2)    /pub/linux/docs/HOWTO
   sunsite.unc.edu (152.2.22.81)  /pub/Linux/docs/HOWTO
For a complete list of Linux FTP sites see Q2.4 `How do I install Linux
?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

          Installation HOWTO            Electronic Mail HOWTO
          Linux INFO-SHEET              UUCP HOWTO
          Linux META-FAQ                SCSI HOWTO
          NET-2 HOWTO                   Printing HOWTO
          Ethernet HOWTO                Hardware Comaptibility HOWTO
          News HOWTO                    XFree86 HOWTO
          Distribution HOWTO            MGR HOWTO
          Ftape HOWTO                   Sound HOWTO

Some more of these documents are in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.

The HOWTO.INDEX also contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

          The Linux Documentation Project manifesto
          Installation and Setup Guide for Linux
          The Kernel Hacker's Guide
          Network Administration Guide
          Linux System Administrator's Guide

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

Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?

Matt Welsh maintains the Linux Home Page, at
http://sunsite.unc.edu/mdw/linux.html.

This page refers to all the FAQs and HOWTOs, both those which are
available in HTML (WWW) format and those which aren't.

-------------------------------------------------------------------------------

Question 2.3.  What newsgroups are there for Linux ?

There are five international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@tc.cornell.edu.

comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.misc are also worth reading -- you may find that many common
problems are too recent to find in this FAQ but are answered in the
newsgroups.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q9.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup.  Crossposting is
rarely a good idea.

See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
there is probably also a German one.  In Austrilia, try
aus.computers.linux.

There may well be Linux groups local to your institution or area - check
there first.

-------------------------------------------------------------------------------

Question 2.4.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of these releases are available via anonymous FTP from the Linux
archive sites [Q2.5 `Where can I get Linux material by FTP ?'].

-------------------------------------------------------------------------------

Question 2.5.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:
   ftp.funet.fi (128.214.248.6)   /pub/OS/Linux
   sunsite.unc.edu (152.2.22.81)  /pub/Linux
   tsx-11.mit.edu (18.172.1.2)    /pub/linux
The MCC-Interim release is available from:
   ftp.mcc.ac.uk (130.88.200.7)   /pub/linux
The TAMU release is available from:
   net.tamu.edu (128.194.177.1)   /pub/linux

The contents of these sites is mirrored (copied, usually approximately
daily) by a number of other sites.  Please use one close to you -- that
will be faster for you and easier on the network.
   src.doc.ic.ac.uk                     wuarchive.wustl.edu
   sunacm.swan.ac.uk                    ftp.eecs.umich.edu
   ftp.ibp.fr                           mrcnext.cso.uiuc.edu

   ftp.informatik.tu-muenchen.de
   ftp.ibr.cs.tu-bs.de                  monu1.cc.monash.edu.au
   ftp.dfv.rwth-aachen.de
   ftp.informatik.rwth-aachen.de        cair.kaist.ac.kr
Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

-------------------------------------------------------------------------------

Question 2.6.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

Linux is also available via traditional mail on diskette, CD-ROM and tape.
The Installation HOWTO, and the file /pub/Linux/docs/distributions on
sunsite.unc.edu, contains information on these distributions.

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

-------------------------------------------------------------------------------

Question 2.7.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the comp.os.linux.* groups are available by
subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

-------------------------------------------------------------------------------

Question 2.8.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
for the benefit of those without Usenet access.  However since
niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
digestifier instead [Q2.7 `I don't have Usenet access.  Where do I get
information ?'].

There is also a NEWBIE channel where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

-------------------------------------------------------------------------------

Question 2.9.  Are the newsgroups archived anywhere ?

Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
comp.os.linux.announce and the old group comp.os.linux, in their Linux
areas.  The comp.os.linux.announce archives are mirrored from /usenet on
src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and MS Windows ?

-------------------------------------------------------------------------------

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

Linux can also access Minix and System V UFS filesystems.

-------------------------------------------------------------------------------

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.4 `How do I install Linux ?'.

-------------------------------------------------------------------------------

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
filesystem under Linux or using mtools.

-------------------------------------------------------------------------------

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q6.19 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

-------------------------------------------------------------------------------

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is an alpha test read-only Amiga filesystem on
sunsite.unc.edu, probably in /pub/Linux/kernel/misc-patches/ffs-patch.
Work may well be progressing on upgrading this to read-write for the 680x0
Linux project.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

-------------------------------------------------------------------------------

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.os.linux.announce.

The advert from Softlanding (producers of SLS) stating that Linux could
run MS Windows binaries was at best grossly exaggerated.  I'm told that
you can run Windoze 3.0 in real mode in a dosemu [Q3.1 `Can Linux coexist
with DOS ?  OS/2 ?  386BSD ?  Minix ?'].

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

-------------------------------------------------------------------------------

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS.  This is so
that OS/2 knows about the partition being formatted.

3. Add the partition to the Boot Manager.

4. Boot Linux, and create a filesystem on the partition using mkfs -t ext2
or mke2fs.  At this point you may, if you like, use Linux's fdisk to
change the partition type code of the new partition to type 83 (Linux
Native) -- this may help some automated installation scripts find the
right partition to use.

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

-------------------------------------------------------------------------------

Question 3.8.  How can I share a swap partition between Linux and MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How can I have more than 16Mb of swap ?
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?
 Q4.10       My ext2fs partitions are checked each time I reboot.
 Q4.11       I have a huge /proc/kcore !  Can I delete it ?

-------------------------------------------------------------------------------

Question 4.1.  How can I undelete files ?

In general, this is very hard to do on Unices.  Undelete functionality for
the ext2fs is being worked on, but don't hold your breath.

In the meantime you can search the raw disk device which holds the
filesystem in question.  The strings command may help you do this, if the
file you've lost was a text file: for example strings /dev/hdb3.  You will
need to be root to do this, and you should take care to put the output
file on a different filesystem, of course ! The output will be large and
full of extra unwanted crud, so make sure you have enough space.

-------------------------------------------------------------------------------

Question 4.2.  Is there a defragmenter for ext2fs etc. ?

You can probably do without, since the ext2 filesystem code tries to
reduce fragmentation as it goes, during normal operation.

If you really need to defragment a filesystem you could back it up,
reinitialise the partition using mkfs -t ext2 and restore it.

I'm told that a defragmenter for Minix and old-style `ext' filesystems is
available on sunsite.unc.edu in system/Filesystems/defrag-0.4.tar.z.

-------------------------------------------------------------------------------

Question 4.3.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 -m 0 /dev/fd0H1440 1440
For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  If you don't have the fsutils package
you'll have to run mke2fs instead of mkfs -t ext2.  The -m 0 option tells
mkfs.ext2 not to reserve any space on the disk for the superuser ---
usually the last 10% is reserved for root.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

-------------------------------------------------------------------------------

Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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 bootutils 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 fsutils package) will be able to repair your filesystem; if
you're unlucky the filesystem is trashed and you'll have to reinitialise
it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

-------------------------------------------------------------------------------

Question 4.5.  My swap area isn't working.

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 or /etc/rc.local (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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

-------------------------------------------------------------------------------

Question 4.6.  How can I have more than 16Mb of swap ?

Use a recent kernel -- from at least 0.99.14 Linux can use swap partitions
of up to 128Mb.

If you use an older kernel which only supports swap area sizes up to 16Mb
you have to set up more than one swap partition or swapfile.

-------------------------------------------------------------------------------

Question 4.7.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
into FDISK in the normal way and then select the `Re-write Master Boot
Record' option.

If you don't have DOS 5 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 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
which will erase your partition table and boot sector completely: you can
then reformat the disk using your favourite software; however 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.

-------------------------------------------------------------------------------

Question 4.8.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

-------------------------------------------------------------------------------

Question 4.9.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
(administrative information) and directories as well as file contents any
corruption is quite likely to be serious.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

-------------------------------------------------------------------------------

Question 4.10.  My ext2fs partitions are checked each time I reboot.

See Q7.11 `EXT2-fs: warning: mounting unchecked filesystem'.

-------------------------------------------------------------------------------

Question 4.11.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        During linking I get Undefined symbol _mcount
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        How do I port XXX to Linux ?
 Q5.5        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.6        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.7        What does gcc -O6 do ?
 Q5.8        Where are <linux/*.h> and <asm/*.h> ?
 Q5.9        I get errors when I try to compile the kernel.
 Q5.10       How do I make a shared library ?
 Q5.11       How do I make my executables smaller ?

-------------------------------------------------------------------------------

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

It can be obtained from tsx-11.mit.edu in /pub/linux/packages/GCC and
mirror sites thereof.  The latest version at the time of writing is
ld.so.1.4.tar.gz.

-------------------------------------------------------------------------------

Question 5.2.  During linking I get Undefined symbol _mcount

This is usually due to a bad interaction between a brokenness in SLS and
the C library release notes.  Your libc.a has been replaced by the
profiling library.  You should remove libc.a, libg.a and libc_p.a and once
again install the new libraries (following the release notes, of course).

-------------------------------------------------------------------------------

Question 5.3.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sties.

Check the FTP sites (see Q2.1 `Where can I get the HOWTOs and other
documentation ?') first --- search the find-ls or INDEX files for
appropriate strings.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.4 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to linux-announce@tc.cornell.edu).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

-------------------------------------------------------------------------------

Question 5.4.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

-------------------------------------------------------------------------------

Question 5.5.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

The -m486 option to GCC, which is used to compile binaries for 486
machines, merely makes GCC change certain optimisations.  This makes for
slightly larger binaries which run somewhat faster on a 486.  They still
work fine on a 386, though, with little performance hit.

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 overriden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.

-------------------------------------------------------------------------------

Question 5.6.  GCC sometimes uses huge amounts of virtual memory and thrashes

Older versions of GCC had a bug which makes it use lots of memory if you
try to compile a program which has a large static data table in it.

You can either upgrade your version of GCC, or add more swap if necessary
and just grin and bear it; it'll work in the end.

-------------------------------------------------------------------------------

Question 5.7.  What does gcc -O6 do ?

The same as -O2; any number greater than 2 currently works just like 2.
The Makefiles of newer kernel use -O2, and so should you.

-------------------------------------------------------------------------------

Question 5.8.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q6.19 `How do I
upgrade/recompile my 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 /usr/include/asm

-------------------------------------------------------------------------------

Question 5.9.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.8 `Where are <linux/*.h> and <asm/*.h> ?'.

-------------------------------------------------------------------------------

Question 5.10.  How do I make a shared library ?

Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC.  It
comes with documentation that will tell you what to do.

-------------------------------------------------------------------------------

Question 5.11.  How do I make my executables smaller ?

The most common cause of large executables is the -g compiler flag.  This
produces (as well as debugging information in the output file) a program
which is statically linked, i.e. one which includes a copy of the C
library instead of using a dynamically linked copy.

Other things that are worth investigating are -O and -O2 which enable
optimisation (check the GCC documentation) and -s which strips 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.

===============================================================================

The remainder of the FAQ is in the next part ...

-- 
Ian Jackson, at home  <ijackson@nyx.cs.du.edu> or <iwj10@cus.cam.ac.uk>
PGP2 public key available on server.  Urgent email: <iwj10@phx.cam.ac.uk>
2 Lexington Close, Cambridge, CB4 3LS, England;  phone: +44 223 64238


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1994-04-10 12:05 Ian Jackson
  1994-04-10 12:05 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1994-04-10 12:05 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 10 Apr 1994

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486 [see Q1.1 `What is Linux ?' for more details].  It should be
read in conjunction with the HOWTO documents, which are available in
   ftp.funet.fi (128.214.6.100)   /pub/OS/Linux/doc/HOWTO
   tsx-11.mit.edu (18.172.1.2)    /pub/linux/docs/HOWTO
   sunsite.unc.edu (152.2.22.81)  /pub/Linux/docs/HOWTO
and mirror sites thereof -- see Q2.4 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q9.1 `You still
haven't answered my question !', before posting your question to the
newsgroup comp.os.linux.help.

You can skip to a particular question by searching for `Question n.n'.
See Q10.2 `Formats in which this FAQ is available' for details of where to
get the PostScript and Emacs Info versions of this document.

Note that this posting has been split into two parts because of its size.

A new version of this document appears approximately monthly.  If this
copy is more than a month old it may be out of date.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        What newsgroups are there for Linux ?
 Q2.3        How do I install Linux ?
 Q2.4        Where can I get Linux material by FTP ?
 Q2.5        I don't have FTP access.  Where do I get Linux ?
 Q2.6        I don't have Usenet access.  Where do I get information ?
 Q2.7        What's this mailing list thing at niksula.hut.fi ?
 Q2.8        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and OS/2 or MS Wind

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How can I have more than 16Mb of swap ?
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        During linking I get Undefined symbol _mcount
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        How do I port XXX to Linux ?
 Q5.5        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.6        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.7        What does gcc -O6 do ?
 Q5.8        Where are <linux/*.h> and <asm/*.h> ?
 Q5.9        I get errors when I try to compile the kernel.
 Q5.10       My ext2fs partitions are checked each time I reboot.
 Q5.11       I have a huge /proc/kcore !  Can I delete it ?

 Section 6.  Miscellaneous questions and problems
 Q6.1        How do I make my executables smaller ?
 Q6.2        How many people use Linux ?
 Q6.3        How can I get scrollback on text VC's ?
 Q6.4        Setuid scripts don't seem to work.
 Q6.5        Free memory as reported by free keeps shrinking.
 Q6.6        What is a BogoMip ?
 Q6.7        How do I set the timezone ?
 Q6.8        What version of Linux and what machine name am I using ?
 Q6.9        When I add more memory it slows to a crawl.
 Q6.10       Some programs (e.g. xdm) won't let me log in.
 Q6.11       Some programs let me log in with no password.
 Q6.12       My machine runs very slowly when I run GCC / X / ...
 Q6.13       I can only log in as root.
 Q6.14       How can I produce core files ?
 Q6.15       How do I stop producing core files ?
 Q6.16       My keyboard goes all funny after I switch VC's.
 Q6.17       My screen is all full of weird characters instead of letters.
 Q6.18       What is a .gz file ? And a .tgz ? And ... ?
 Q6.19       I have screwed up my system and can't log in to fix it.
 Q6.20       How do I upgrade/recompile my kernel ?
 Q6.21       Can I have more than 3 serial ports by sharing interrupts ?
 Q6.22       Emacs just dumps core.
 Q6.23       How do I make a bootable floppy ?
 Q6.24       How do I remap my keyboard to UK, French, etc. ?
 Q6.25       I've discovered a huge security hole in rm !
 Q6.26       lpr and lpd aren't working.
 Q6.27       How do I make a shared library ?
 Q6.28       What does VFS stand for ?

 Section 7.  Frequently Encountered Error messages
 Q7.1        fdisk says Partition X has different phsyical/logical ...
 Q7.2        fdisk: Partition 1 does not start on cylinder boundary
 Q7.3        lp1 on fire
 Q7.4        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q7.5        ld: unrecognized option '-m486'
 Q7.6        GCC says Internal compiler error
 Q7.7        make says Error 139
 Q7.8        df says Cannot read table of mounted filesystems
 Q7.9        shell-init: permission denied when I log in.
 Q7.10       No utmp entry.  You must exec ... when I log in.
 Q7.11       EXT2-fs: warning: mounting unchecked filesystem
 Q7.12       EXT2-fs warning: maximal count reached
 Q7.13       EXT2-fs warning: checktime reached
 Q7.14       fdisk says cannot use nnn sectors of this partition
 Q7.15       fdisk says partition n has an odd number of sectors
 Q7.16       mtools says cannot initialise drive XYZ
 Q7.17       My AHA1542C doesn't work with Linux.

 Section 8.  The X Window System
 Q8.1        Does Linux support X Windows ?
 Q8.2        Where can I get an Xconfig for my video card and monitor ?
 Q8.3        xterm logins show up strangely in who, finger
 Q8.4        I can't get X Windows to work right.

 Section 9.  How to get further assistance
 Q9.1        You still haven't answered my question !
 Q9.2        What to put in a posting to comp.os.linux.help

 Section 10. Administrative information and acknowledgements
 Q10.1       Feedback is invited
 Q10.2       Formats in which this FAQ is available
 Q10.3       Authorship and acknowledgements
 Q10.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

-------------------------------------------------------------------------------

Question 1.1.  What is Linux ?

Linux is a Unix clone for 386/486-based PCs written from scratch by Linus
Torvalds with assistance from a loosely-knit team of hackers across the
Net.  It aims towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It uses the hardware features of the 386 processor family (TSS segments et
al) to implement these features.

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

It is distributed under the GNU General Public License - see Q1.5 `Is
Linux PD ?  Copyrighted ?' for more details.

-------------------------------------------------------------------------------

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP --- PPP support is being developed) and all the hundreds
of programs that people have compiled or ported for it.

There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
386BSD ?  Minix ?'] and work is progressing on a facilities to allow SVR4
ELF, SVR3.2 COFF and Microsoft Windows binaries [Q3.6 `Can I run Microsoft
Windows programs under Linux ?'] to be run under Linux and X Windows.

For more information see the INFO-SHEET, which is one of the the HOWTOs
--- see above, or Q2.1 `Where can I get the HOWTOs and other documentation
?'.  See also Q5.4 `How do I port XXX to Linux ?'.

Some companies have commercial software available, including Motif.  They
announce their availability in comp.os.linux.announce --- try searching
the archives [Q2.8 `Are the newsgroups archived anywhere ?'].

-------------------------------------------------------------------------------

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386 or 486, with at least 2Mb of RAM and a single floppy, to
try it out.  To do anything useful more RAM and a hard disk are required.
Reportedly Linux also works on a Pentium.

Linux doesn't currently work on machines using MCA (IBM's proprietary
bus), because of lack of available documentation.  You may be able to get
it to work if your hard disk is on certain kinds of controller (some SCSI
controllers work, I understand), but you're on your own.

It should work with VESA local bus machines, provided that the local bus
cards really are equivalent to the equivalent ISA ones.  Linux is reported
to run on 386/486-based laptops, with X on most of them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware Compatibility HOWTO [Q2.1 `Where
can I get the HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386/486 processors.  There are
currently no plans to port it to the PowerPC architecture.

A project is underway to port Linux to suitable 68000-series based systems
such as Amigas, but this is still at an early stage of development.  Don't
post asking about it unless you think you can contribute to it, and don't
hold your breath.

-------------------------------------------------------------------------------

Question 1.4.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  The SLS 1.03 distribution (which I would recommend you stay well
clear of - it has a number of serious and annoying bugs) takes around
100Mb.

-------------------------------------------------------------------------------

Question 1.5.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution, and that you must make the source
code available.

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The copyright 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

-------------------------------------------------------------------------------

Question 1.6.  How should I pronounce Linux ?

This is a matter of religious debate, of course !

If you want to hear the Linus himself say how he pronounces it download
english.au or swedish.au from ftp.funet.fi (in
/pub/OS/Linux/PEOPLE/Linux/SillySounds).  If you have a soundcard 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 of you who don't have the equipment or
inclination: Linus pronounces Linux approximately as Leenus, where the ee
is 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).

When speaking English I pronounce it Lie-nucks (u as in bucket) --- this
is an anglicised pronunciation based on the analogy with Linus' name,
which in English is usually pronounced Lie-nus (u as in put).  It is of
course quite acceptable and common to modify the pronunciation of a proper
noun when it changes languages.

I think I can safely say that the pronunciation Linnucks (short i as in
pit, short u as in bucket) is wrong in English, as it is not the original
Swedish pronunciation, not a sensible direct anglicisation of it, and not
based on the anglicised version of Linus' name.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        What newsgroups are there for Linux ?
 Q2.3        How do I install Linux ?
 Q2.4        Where can I get Linux material by FTP ?
 Q2.5        I don't have FTP access.  Where do I get Linux ?
 Q2.6        I don't have Usenet access.  Where do I get information ?
 Q2.7        What's this mailing list thing at niksula.hut.fi ?
 Q2.8        Are the newsgroups archived anywhere ?

-------------------------------------------------------------------------------

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.
   ftp.funet.fi (128.214.6.100)   /pub/OS/Linux/doc/HOWTO
   tsx-11.mit.edu (18.172.1.2)    /pub/linux/docs/HOWTO
   sunsite.unc.edu (152.2.22.81)  /pub/Linux/docs/HOWTO
For a complete list of Linux FTP sites see Q2.3 `How do I install Linux
?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

          Installation HOWTO            Electronic Mail HOWTO
          Linux INFO-SHEET              UUCP HOWTO
          Linux META-FAQ                SCSI HOWTO
          NET-2 HOWTO                   Printing HOWTO
          Ethernet HOWTO                Hardware Comaptibility HOWTO
          News HOWTO                    XFree86 HOWTO
          Distribution HOWTO            MGR HOWTO
          Ftape HOWTO                   Sound HOWTO

Some more of these documents are in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the HOWTOs.

The HOWTO.INDEX also contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

          The Linux Documentation Project manifesto
          Installation and Setup Guide for Linux
          The Kernel Hacker's Guide
          Network Administration Guide
          Linux System Administrator's Guide

-------------------------------------------------------------------------------

Question 2.2.  What newsgroups are there for Linux ?

There are five international Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@tc.cornell.edu.

comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.misc are also worth reading -- you may find that many common
problems are too recent to find in this FAQ but are answered in the
newsgroups.

Remember that since Linux is a Unix clone, most all of the material in
comp.unix.* and 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 the right place to start.

Please read Q9.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup.  Crossposting is
rarely a good idea.

See also Q2.6 `I don't have Usenet access.  Where do I get information ?'.

Other regional and local newsgroups also exist - you may find the traffic
more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
there is probably also a German one.  In Austrilia, try
aus.computers.linux.

There may well be Linux groups local to your institution or area - check
there first.

-------------------------------------------------------------------------------

Question 2.3.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Slackware.  If you prefer a small, clean distribution to one
with everything but the kitchen sink you might like to try the MCC-Interim
release.

All of these releases are available via anonymous FTP from the Linux
archive sites [Q2.4 `Where can I get Linux material by FTP ?'].

-------------------------------------------------------------------------------

Question 2.4.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:
   ftp.funet.fi (128.214.248.6)   /pub/OS/Linux
   sunsite.unc.edu (152.2.22.81)  /pub/Linux
   tsx-11.mit.edu (18.172.1.2)    /pub/linux
The MCC-Interim release is available from:
   ftp.mcc.ac.uk (130.88.200.7)   /pub/linux
The TAMU release is available from:
   net.tamu.edu (128.194.177.1)   /pub/linux

The contents of these sites is mirrored (copied, usually approximately
daily) by a number of other sites.  Please use one close to you -- that
will be faster for you and easier on the network.
   src.doc.ic.ac.uk                     wuarchive.wustl.edu
                                        ftp.eecs.umich.edu
   sunacm.swan.ac.uk
                                        ftp.ibp.fr
   ftp.informatik.tu-muenchen.de
   ftp.ibr.cs.tu-bs.de                  monu1.cc.monash.edu.au
   ftp.dfv.rwth-aachen.de               kuis.kyoto-u.ac.jp
   ftp.informatik.rwth-aachen.de        cair.kaist.ac.kr
Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

-------------------------------------------------------------------------------

Question 2.5.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

Linux is also available via traditional mail on diskette, CD-ROM and tape.
The Installation HOWTO, and the file /pub/Linux/docs/distributions on
sunsite.unc.edu, contains information on these distributions.

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

-------------------------------------------------------------------------------

Question 2.6.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the comp.os.linux.* groups are available by
subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

-------------------------------------------------------------------------------

Question 2.7.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
for the benefit of those without Usenet access.  However since
niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
digestifier instead [Q2.6 `I don't have Usenet access.  Where do I get
information ?'].

There is also a NEWBIE channel where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

-------------------------------------------------------------------------------

Question 2.8.  Are the newsgroups archived anywhere ?

Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
comp.os.linux.announce and the old group comp.os.linux, in their Linux
areas.  The comp.os.linux.announce archives are mirrored from /usenet on
src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?
 Q3.8        How can I share a swap partition between Linux and OS/2 or MS Wind

-------------------------------------------------------------------------------

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

Linux can also access Minix filesystems.

-------------------------------------------------------------------------------

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.3 `How do I install Linux ?'.

-------------------------------------------------------------------------------

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
filesystem under Linux or using mtools.

-------------------------------------------------------------------------------

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q6.20 `How do I upgrade/recompile my
kernel ?'].  Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

-------------------------------------------------------------------------------

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is an alpha test read-only Amiga filesystem on
sunsite.unc.edu, probably in /pub/Linux/kernel/misc-patches/ffs-patch.
Work may well be progressing on upgrading this to read-write for the 680x0
Linux project.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

-------------------------------------------------------------------------------

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.os.linux.announce.

The advert from Softlanding (producers of SLS) stating that Linux could
run MS Windows binaries was at best grossly exaggerated.  I'm told that
you can run Windoze 3.0 in real mode in a dosemu [Q3.1 `Can Linux coexist
with DOS ?  OS/2 ?  386BSD ?  Minix ?'].

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

-------------------------------------------------------------------------------

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS.  This is so
that OS/2 knows about the partition being formatted.

3. Add the partition to the Boot Manager.

4. Boot Linux, and create a filesystem on the partition using mkfs -t ext2
or mke2fs.  At this point you may, if you like, use Linux's fdisk to
change the partition type code of the new partition to type 83 (Linux
Native) -- this may help some automated installation scripts find the
right partition to use.

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

-------------------------------------------------------------------------------

Question 3.8.  How can I share a swap partition between Linux and OS/2 or MS Windows ?

See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
It is available on sunsite.unc.edu in /pub/Linux/docs.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How can I undelete files ?
 Q4.2        Is there a defragmenter for ext2fs etc. ?
 Q4.3        How do I format and create a filesystem on a floppy ?
 Q4.4        I get nasty messages about inodes, blocks, and the suchlike
 Q4.5        My swap area isn't working.
 Q4.6        How can I have more than 16Mb of swap ?
 Q4.7        How do I remove LILO so my system boots DOS again ?
 Q4.8        Why can't I use fdformat except as root ?
 Q4.9        Is there something like Stacker or Doublespace for Linux ?

-------------------------------------------------------------------------------

Question 4.1.  How can I undelete files ?

In general, this is very hard to do on Unices.  Undelete functionality for
the ext2fs is being worked on, but don't hold your breath.

In the meantime you can search the raw disk device which holds the
filesystem in question.  The strings command may help you do this, if the
file you've lost was a text file: for example strings /dev/hdb3.  You will
need to be root to do this, and you should take care to put the output
file on a different filesystem, of course ! The output will be large and
full of extra unwanted crud, so make sure you have enough space.

-------------------------------------------------------------------------------

Question 4.2.  Is there a defragmenter for ext2fs etc. ?

You can probably do without, since the ext2 filesystem code tries to
reduce fragmentation as it goes, during normal operation.

If you really need to defragment a filesystem you could back it up,
reinitialise the partition using mkfs -t ext2 and restore it.

I'm told that a defragmenter for Minix and old-style `ext' filesystems is
available on sunsite.unc.edu in system/Filesystems/defrag-0.4.tar.z.

-------------------------------------------------------------------------------

Question 4.3.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 /dev/fd0H1440 1440
For a 5.25 floppy inch use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  If you don't have the fsutils package
you'll have to run mke2fs instead of mkfs -t ext2.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

-------------------------------------------------------------------------------

Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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 bootutils 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 fsutils package) will be able to repair your filesystem; if
you're unlucky the filesystem is trashed and you'll have to reinitialise
it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

-------------------------------------------------------------------------------

Question 4.5.  My swap area isn't working.

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 or /etc/rc.local (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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

-------------------------------------------------------------------------------

Question 4.6.  How can I have more than 16Mb of swap ?

Use a recent kernel -- from at least 0.99.14 Linux can use swap partitions
of up to 128Mb.

If you use an older kernel which only supports swap area sizes up to 16Mb
you have to set up more than one swap partition or swapfile.

-------------------------------------------------------------------------------

Question 4.7.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
into FDISK in the normal way and then select the `Re-write Master Boot
Record' option.

If you don't have DOS 5 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 sda if you're using a SCSI disk).  This may also wipe out your
partition table, so beware !

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.

-------------------------------------------------------------------------------

Question 4.8.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

-------------------------------------------------------------------------------

Question 4.9.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is a compressing block device driver that can provide
filesystem-independant on the fly disk compression in the kernel.  It is
called `DouBle'.  There is a source only distribution on sunsite.unc.edu
in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
<jmv@receptor.mgh.harvard.edu>.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.4 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        During linking I get Undefined symbol _mcount
 Q5.3        Has anyone ported / compiled / written XXX for Linux ?
 Q5.4        How do I port XXX to Linux ?
 Q5.5        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.6        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.7        What does gcc -O6 do ?
 Q5.8        Where are <linux/*.h> and <asm/*.h> ?
 Q5.9        I get errors when I try to compile the kernel.
 Q5.10       My ext2fs partitions are checked each time I reboot.
 Q5.11       I have a huge /proc/kcore !  Can I delete it ?

-------------------------------------------------------------------------------

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

It can be obtained from tsx-11.mit.edu in /pub/linux/packages/GCC and
mirror sites thereof.  The latest version at the time of writing is
ld.so.1.4.tar.gz.

-------------------------------------------------------------------------------

Question 5.2.  During linking I get Undefined symbol _mcount

This is usually due to a bad interaction between a brokenness in SLS and
the C library release notes.  Your libc.a has been replaced by the
profiling library.  You should remove libc.a, libg.a and libc_p.a and once
again install the new libraries (following the release notes, of course).

-------------------------------------------------------------------------------

Question 5.3.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sties.

Check the FTP sites (see Q2.1 `Where can I get the HOWTOs and other
documentation ?') first --- search the find-ls or INDEX files for
appropriate strings.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.4 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to linux-announce@tc.cornell.edu).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

-------------------------------------------------------------------------------

Question 5.4.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

-------------------------------------------------------------------------------

Question 5.5.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

The -m486 option to GCC, which is used to compile binaries for 486
machines, merely makes GCC change certain optimisations.  This makes for
slightly larger binaries which run somewhat faster on a 486.  They still
work fine on a 386, though, with little performance hit.

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 overriden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.

-------------------------------------------------------------------------------

Question 5.6.  GCC sometimes uses huge amounts of virtual memory and thrashes

Older versions of GCC had a bug which makes it use lots of memory if you
try to compile a program which has a large static data table in it.

You can either upgrade your version of GCC, or add more swap if necessary
and just grin and bear it; it'll work in the end.

-------------------------------------------------------------------------------

Question 5.7.  What does gcc -O6 do ?

The same as -O2; any number greater than 2 currently works just like 2.
The Makefiles of newer kernel use -O2, and so should you.

-------------------------------------------------------------------------------

Question 5.8.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q6.20 `How do I
upgrade/recompile my 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 /usr/include/asm

-------------------------------------------------------------------------------

Question 5.9.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.8 `Where are <linux/*.h> and <asm/*.h> ?'.

-------------------------------------------------------------------------------

Question 5.10.  My ext2fs partitions are checked each time I reboot.

See Q7.11 `EXT2-fs: warning: mounting unchecked filesystem'.

-------------------------------------------------------------------------------

Question 5.11.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

===============================================================================

The remainder of the FAQ is in the next part ...

-- 
Ian Jackson, at home  <ijackson@nyx.cs.du.edu> or <iwj10@cus.cam.ac.uk>
PGP2 public key available on server.  Urgent email: <iwj10@phx.cam.ac.uk>
2 Lexington Close, Cambridge, CB4 3LS, England;  phone: +44 223 64238


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1994-03-09  0:04 Ian Jackson
  1994-03-09  0:04 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1994-03-09  0:04 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 09 Mar 1994

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486 [see Q1.1 `What is Linux ?' for more details].  It should be
read in conjunction with the HOWTO documents, which are available in
   ftp.funet.fi (128.214.6.100)   /pub/OS/Linux/doc/HOWTO
   tsx-11.mit.edu (18.172.1.2)    /pub/linux/docs/HOWTO
   sunsite.unc.edu (152.2.22.81)  /pub/Linux/docs/HOWTO
and mirror sites thereof -- see Q2.4 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q9.1 `You still
haven't answered my question !', before posting your question to the
newsgroup comp.os.linux.help.

You can skip to a particular question by searching for `Question n.n'.
See Q10.2 `Formats in which this FAQ is available' for details of where to
get the PostScript and Emacs Info versions of this document.

Note that this posting has been split into two parts because of its size.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        What newsgroups are there for Linux ?
 Q2.3        How do I install Linux ?
 Q2.4        Where can I get Linux material by FTP ?
 Q2.5        I don't have FTP access.  Where do I get Linux ?
 Q2.6        I don't have Usenet access.  Where do I get information ?
 Q2.7        What's this mailing list thing at niksula.hut.fi ?
 Q2.8        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How do I format and create a filesystem on a floppy ?
 Q4.2        I get nasty messages about inodes, blocks, and the suchlike
 Q4.3        My swap area isn't working.
 Q4.4        How can I have more than 16Mb of swap ?
 Q4.5        How do I remove LILO so my system boots DOS again ?
 Q4.6        Why can't I use fdformat except as root ?
 Q4.7        Is there something like Stacker or Doublespace for Linux ?

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.6        What does gcc -O6 do ?
 Q5.7        Where are <linux/*.h> and <asm/*.h> ?
 Q5.8        I get errors when I try to compile the kernel.
 Q5.9        My ext2fs partitions are checked each time I reboot.
 Q5.10       I have a huge /proc/kcore !  Can I delete it ?

 Section 6.  Miscellaneous questions and problems
 Q6.1        How many people use Linux ?
 Q6.2        How can I get scrollback on text VC's ?
 Q6.3        Setuid scripts don't seem to work.
 Q6.4        Free memory as reported by free keeps shrinking.
 Q6.5        What is a BogoMip ?
 Q6.6        How do I set the timezone ?
 Q6.7        What version of Linux and what machine name am I using ?
 Q6.8        When I add more memory it slows to a crawl.
 Q6.9        Some programs (e.g. xdm) won't let me log in.
 Q6.10       Some programs let me log in with no password.
 Q6.11       My machine runs very slowly when I run GCC / X / ...
 Q6.12       I can only log in as root.
 Q6.13       How can I produce core files ?
 Q6.14       How do I stop producing core files ?
 Q6.15       My keyboard goes all funny after I switch VC's.
 Q6.16       My screen is all full of weird characters instead of letters.
 Q6.17       What is a .gz file ? And a .tgz ? And ... ?
 Q6.18       I have screwed up my system and can't log in to fix it.
 Q6.19       How do I upgrade my kernel ?
 Q6.20       Can I have more than 3 serial ports by sharing interrupts ?
 Q6.21       Emacs just dumps core.
 Q6.22       How do I make a bootable floppy ?
 Q6.23       How do I remap my keyboard to UK, French, etc. ?
 Q6.24       I've discovered a huge security hole in rm !

 Section 7.  Frequently Encountered Error messages
 Q7.1        lp1 on fire
 Q7.2        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q7.3        ld: unrecognized option '-m486'
 Q7.4        GCC says Internal compiler error
 Q7.5        make says Error 139
 Q7.6        df says Cannot read table of mounted filesystems
 Q7.7        shell-init: permission denied when I log in.
 Q7.8        No utmp entry.  You must exec ... when I log in.
 Q7.9        EXT2-fs: warning: mounting unchecked filesystem
 Q7.10       EXT2-fs: warning: maximal count reached
 Q7.11       fdisk says cannot use nnn sectors of this partition
 Q7.12       fdisk says partition n has an odd number of sectors
 Q7.13       mtools says cannot initialise drive XYZ

 Section 8.  The X Window System
 Q8.1        Does Linux support X Windows ?
 Q8.2        Where can I get an XConfig for my video card and monitor ?
 Q8.3        I can't get X Windows to work right.

 Section 9.  How to get further assistance
 Q9.1        You still haven't answered my question !
 Q9.2        What to put in a posting to comp.os.linux.help

 Section 10. Administrative information and acknowledgements
 Q10.1       Feedback is invited
 Q10.2       Formats in which this FAQ is available
 Q10.3       Authorship and acknowledgements
 Q10.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

-------------------------------------------------------------------------------

Question 1.1.  What is Linux ?

Linux is a Unix clone for 386/486-based PCs written from scratch by Linus
Torvalds with assistance from a loosely-knit team of hackers across the
Net.  It aims towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It uses the hardware features of the 386 processor family (TSS segments et
al) to implement these features.

Linux is still considered to be in beta testing; due to the rapid pace of
development new bugs are often introduced.  Despite this, Linux is very
stable if you don't always immediately use the latest alpha-release kernel
software.

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

It is distributed under the GNU General Public License - see Q1.5 `Is
Linux PD ?  Copyrighted ?' for more details.

-------------------------------------------------------------------------------

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP --- PPP support is being developed) and all the hundreds
of programs that people have compiled or ported for it.

There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
386BSD ?  Minix ?'] and work is progressing on a facilities to allow SVR4
ELF, SVR3.2 COFF and Microsoft Windows binaries [Q3.6 `Can I run Microsoft
Windows programs under Linux ?'] to be run under Linux and X Windows.

For more information see the INFO-SHEET, which is one of the the HOWTOs
--- see above, or Q2.1 `Where can I get the HOWTOs and other documentation
?'.  See also Q5.3 `How do I port XXX to Linux ?'.

-------------------------------------------------------------------------------

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386 or 486, with at least 2Mb of RAM and a single floppy, to
try it out.  To do anything useful more RAM and a hard disk are required.
Reportedly Linux also works on a Pentium.

Linux doesn't currently work on machines using MCA (IBM's proprietary
bus), because of lack of available documentation.  You may be able to get
it to work if your hard disk is on certain kinds of controller (some SCSI
controllers work, I understand), but you're on your own.

It should work with VESA local bus machines, provided that the local bus
cards really are equivalent to the equivalent ISA ones.  Linux is reported
to run on 386/486-based laptops, with X on most of them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware Compatibility List [Q2.1 `Where
can I get the HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386/486 processors.

A project is underway to port Linux to suitable 68000-series based
systems, but this is still at a very early stage of development.  Don't
post asking about it unless you think you can contribute to it, and don't
hold your breath.

-------------------------------------------------------------------------------

Question 1.4.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  The SLS 1.03 distribution (which I would recommend you stay well
clear of - it has a number of serious and annoying bugs) takes around
100Mb.

-------------------------------------------------------------------------------

Question 1.5.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution.

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The copyright 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

-------------------------------------------------------------------------------

Question 1.6.  How should I pronounce Linux ?

Linus says: `li' is pronounced with a short (ee) sound: compare prInt,
mInImal etc.  `nux' is also short, non-diphtong, like in pUt.  It's partly
due to Minix: Linux was just my working name for the thing, and as I wrote
it to replace Minix on my system, the result is what it is...  Linus'
minix became Linux.

I originally intended it to be called freax (although buggix was one
contender after I got fed up with some of the more persistent bugs :) and
I think the kernel makefiles up to version 0.11 had something to that
effect (`Makefile for the freax kernel' in a comment).  But arl called the
linux directory at nic.funet.fi [now ftp.funet.fi - iwj] pub/OS/Linux, and
the name stuck.  Maybe just as well: freax doesn't sound too good either
(freax is obviosly free + freak + the obligatory -x).

Rik Faith's note for English speakers: Linux --- `LIH-nuhks'.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        What newsgroups are there for Linux ?
 Q2.3        How do I install Linux ?
 Q2.4        Where can I get Linux material by FTP ?
 Q2.5        I don't have FTP access.  Where do I get Linux ?
 Q2.6        I don't have Usenet access.  Where do I get information ?
 Q2.7        What's this mailing list thing at niksula.hut.fi ?
 Q2.8        Are the newsgroups archived anywhere ?

-------------------------------------------------------------------------------

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.
   ftp.funet.fi (128.214.6.100)   /pub/OS/Linux/doc/HOWTO
   tsx-11.mit.edu (18.172.1.2)    /pub/linux/docs/HOWTO
   sunsite.unc.edu (152.2.22.81)  /pub/Linux/docs/HOWTO
For a complete list of Linux FTP sites see Q2.3 `How do I install Linux
?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

          Installation HOWTO            Electronic Mail HOWTO
          Linux INFO-SHEET              UUCP HOWTO
          Linux META-FAQ                SCSI HOWTO
          NET-2 HOWTO                   Printing HOWTO
          Ethernet HOWTO                Hardware Comaptibility HOWTO
          News HOWTO                    XFree86 HOWTO
          Distribution HOWTO

Some more of these documents are in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the new-style HOWTOs.

The HOWTO.INDEX also contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

          The Linux Documentation Project manifesto
          Installation and Setup Guide for Linux
          The Kernel Hacker's Guide
          Network Administration Guide
          Linux System Administrator's Guide

-------------------------------------------------------------------------------

Question 2.2.  What newsgroups are there for Linux ?

There are five Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@tc.cornell.edu.

comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.misc are also worth reading -- you will find that many
common problems are too recent to find in this FAQ but are answered in the
newsgroups.

Since Linux is a Unix clone, many of the comp.unix.* and comp.windows.x.*
groups will also contain relevant material.

Please read Q9.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup.  Crossposting is
rarely a good idea.

See also Q2.6 `I don't have Usenet access.  Where do I get information ?'.

-------------------------------------------------------------------------------

Question 2.3.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Linux.  Note, though, that despite its heavy emphasis on the
SLS release I would strongly recommend against using SLS for any new Linux
installation; you should consider using MCC-Interim, TAMU or Slackware
instead.

All of these releases are available via anonymous FTP from the Linux
archive sites [Q2.4 `Where can I get Linux material by FTP ?'].

-------------------------------------------------------------------------------

Question 2.4.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:
   ftp.funet.fi (128.214.248.6)   /pub/OS/Linux
   sunsite.unc.edu (152.2.22.81)  /pub/Linux
   tsx-11.mit.edu (18.172.1.2)    /pub/linux
The MCC-Interim release is available from:
   ftp.mcc.ac.uk (130.88.200.7)   /pub/linux
The TAMU release is available from:
   net.tamu.edu (128.194.177.1)   /pub/linux

The contents of these sites is mirrored (copied, usually approximately
daily) by a number of other sites.  Please use one close to you -- that
will be faster for you and easier on the network.
   src.doc.ic.ac.uk                     wuarchive.wustl.edu
                                        ftp.eecs.umich.edu
   ftp.informatik.tu-muenchen.de
   ftp.ibr.cs.tu-bs.de                  monu1.cc.monash.edu.au
   ftp.dfv.rwth-aachen.de               kuis.kyoto-u.ac.jp
   ftp.informatik.rwth-aachen.de        cair.kaist.ac.kr
   sunacm.swan.ac.uk
Not all of these mirror all of the other `source' sites, and some have
material not available on the `source' sites.

-------------------------------------------------------------------------------

Question 2.5.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

Linux is also available via traditional mail on diskette, CD-ROM and tape.
The Installation HOWTO, and the file /pub/Linux/docs/distributions on
sunsite.unc.edu, contains information on these distributions.

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

-------------------------------------------------------------------------------

Question 2.6.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the comp.os.linux.* groups are available by
subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

-------------------------------------------------------------------------------

Question 2.7.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
for the benefit of those without Usenet access.  However since
niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
digestifier instead [Q2.6 `I don't have Usenet access.  Where do I get
information ?'].

There is also a NEWBIE channel where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

-------------------------------------------------------------------------------

Question 2.8.  Are the newsgroups archived anywhere ?

Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
comp.os.linux.announce and the old group comp.os.linux, in their Linux
areas.  The comp.os.linux.announce archives are mirrored from /usenet on
src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?

-------------------------------------------------------------------------------

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

Linux can also access Minix filesystems.

-------------------------------------------------------------------------------

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.3 `How do I install Linux ?'.

-------------------------------------------------------------------------------

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
filesystem under Linux or using mtools.

-------------------------------------------------------------------------------

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q6.19 `How do I upgrade my kernel ?'].
Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

-------------------------------------------------------------------------------

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

I'm told that there is an alpha test read-only Amiga filesystem on
sunsite.unc.edu, probably in /pub/Linux/kernel/misc-patches/ffs-patch.
Work may well be progressing on upgrading this to read-write for the 680x0
Linux project.

There is no support for the rest of those yet; I have not heard of any
recent work on providing some.

-------------------------------------------------------------------------------

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.os.linux.announce.

The advert from Softlanding (producers of SLS) stating that Linux could
run MS Windows binaries was at best grossly exaggerated.  I'm told that
you can run Windoze 3.0 in real mode in a dosemu [Q3.1 `Can Linux coexist
with DOS ?  OS/2 ?  386BSD ?  Minix ?'].

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

-------------------------------------------------------------------------------

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS.  This is so
that OS/2 knows about the partition being formatted.

3. Add the partition to the Boot Manager.

4. Boot Linux, and create a filesystem on the partition using mkfs -t ext2
or mke2fs.  At this point you may, if you like, use Linux's fdisk to
change the partition type code of the new partition to type 83 (Linux
Native) -- this may help some automated installation scripts find the
right partition to use.

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How do I format and create a filesystem on a floppy ?
 Q4.2        I get nasty messages about inodes, blocks, and the suchlike
 Q4.3        My swap area isn't working.
 Q4.4        How can I have more than 16Mb of swap ?
 Q4.5        How do I remove LILO so my system boots DOS again ?
 Q4.6        Why can't I use fdformat except as root ?
 Q4.7        Is there something like Stacker or Doublespace for Linux ?

-------------------------------------------------------------------------------

Question 4.1.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 /dev/fd0H1440 1440
For a 5.25 floppy inch use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  If you don't have the fsutils package
you'll have to run mke2fs instead of mkfs -t ext2.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

-------------------------------------------------------------------------------

Question 4.2.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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 bootutils 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 fsutils package) will be able to repair your filesystem; if
you're unlucky the filesystem is trashed and you'll have to reinitialise
it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

-------------------------------------------------------------------------------

Question 4.3.  My swap area isn't working.

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 or /etc/rc.local (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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

-------------------------------------------------------------------------------

Question 4.4.  How can I have more than 16Mb of swap ?

Use a recent kernel -- from at least 0.99.14 Linux can use swap partitions
of up to 128Mb.

If you use an older kernel which only supports swap area sizes up to 16Mb
you have to set up more than one swap partition or swapfile.

-------------------------------------------------------------------------------

Question 4.5.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
into FDISK in the normal way and then select the `Re-write Master Boot
Record' option.

If you don't have DOS 5 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 sda if you're using a SCSI disk).  This may also wipe out your
partition table, so beware !

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.

-------------------------------------------------------------------------------

Question 4.6.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

-------------------------------------------------------------------------------

Question 4.7.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.4 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.6        What does gcc -O6 do ?
 Q5.7        Where are <linux/*.h> and <asm/*.h> ?
 Q5.8        I get errors when I try to compile the kernel.
 Q5.9        My ext2fs partitions are checked each time I reboot.
 Q5.10       I have a huge /proc/kcore !  Can I delete it ?

-------------------------------------------------------------------------------

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

It can be obtained from tsx-11.mit.edu in /pub/linux/packages/GCC and
mirror sites thereof.  The latest version at the time of writing is
ld.so.1.4.tar.gz.

-------------------------------------------------------------------------------

Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sties.

Check the FTP sites (see Q2.1 `Where can I get the HOWTOs and other
documentation ?') first --- search the find-ls or INDEX files for
appropriate strings.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to linux-announce@tc.cornell.edu).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

-------------------------------------------------------------------------------

Question 5.3.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

-------------------------------------------------------------------------------

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

The -m486 option to GCC, which is used to compile binaries for 486
machines, merely makes GCC change certain optimisations.  This makes for
slightly larger binaries which run somewhat faster on a 486.  They still
work fine on a 386, though, with little performance hit.

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 overriden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.

-------------------------------------------------------------------------------

Question 5.5.  GCC sometimes uses huge amounts of virtual memory and thrashes

Older versions of GCC had a bug which makes it use lots of memory if you
try to compile a program which has a large static data table in it.

You can either upgrade your version of GCC, or add more swap if necessary
and just grin and bear it; it'll work in the end.

-------------------------------------------------------------------------------

Question 5.6.  What does gcc -O6 do ?

The same as -O2; any number greater than 2 works just like 2.  It's put
there for luck, I think, and in case future compilers do something with
it.

-------------------------------------------------------------------------------

Question 5.7.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q6.19 `How do I
upgrade my 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 /usr/include/asm

-------------------------------------------------------------------------------

Question 5.8.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.7 `Where are <linux/*.h> and <asm/*.h> ?'.

-------------------------------------------------------------------------------

Question 5.9.  My ext2fs partitions are checked each time I reboot.

See Q7.9 `EXT2-fs: warning: mounting unchecked filesystem'.

-------------------------------------------------------------------------------

Question 5.10.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

===============================================================================

The remainder of the FAQ is in the next part ...

-- 
Ian Jackson, at home  <ijackson@nyx.cs.du.edu> or <iwj10@cus.cam.ac.uk>
PGP2 public key available on server.  Urgent email: <iwj10@phx.cam.ac.uk>
2 Lexington Close, Cambridge, CB4 3LS, England;  phone: +44 223 64238


^ permalink raw reply	[flat|nested] 20+ messages in thread
* Linux Frequently Asked Questions with Answers (FAQ: 1/2)
@ 1994-02-01 22:21 Ian Jackson
  1994-02-01 22:21 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  0 siblings, 1 reply; 20+ messages in thread
From: Ian Jackson @ 1994-02-01 22:21 UTC (permalink / raw)


Archive-Name: linux/faq/part1
Last-Modified: 01 Feb 1994

This is the list of Frequently Asked Questions about Linux, the free Unix
for 386/486 [see Q1.1 `What is Linux ?' for more details].  It should be
read in conjunction with the HOWTO documents, which are available in
   ftp.funet.fi (128.214.6.100)   /pub/OS/Linux/doc/HOWTO
   tsx-11.mit.edu (18.172.1.2)    /pub/linux/docs/HOWTO
   sunsite.unc.edu (152.2.22.81)  /pub/Linux/docs/HOWTO
and mirror sites thereof -- see Q2.4 `Where can I get Linux material by
FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
for a list of the HOWTOs and more information.  The INFO-SHEET and
META-FAQ, found in the same place, also list other sources of Linux
information.

The Linux Documentation Project documentation is available on
sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
preparation) are invaluable to the newcomer or for use as a reference
work.

Please check out these documents and this FAQ, especially Q9.1 `You still
haven't answered my question !', before posting your question to the
newsgroup comp.os.linux.help.

You can skip to a particular question by searching for `Question n.n'.
See Q10.2 `Formats in which this FAQ is available' for details of where to
get the PostScript and Emacs Info versions of this document.

Note that this posting has been split into two parts because of its size.

===============================================================================

Index

 Section 1.  Introduction and General Information
 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

 Section 2.  Network sources and resources
 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        What newsgroups are there for Linux ?
 Q2.3        How do I install Linux ?
 Q2.4        Where can I get Linux material by FTP ?
 Q2.5        I don't have FTP access.  Where do I get Linux ?
 Q2.6        I don't have Usenet access.  Where do I get information ?
 Q2.7        What's this mailing list thing at niksula.hut.fi ?
 Q2.8        Are the newsgroups archived anywhere ?

 Section 3.  Compatibility with other operating systems
 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?

 Section 4.  Linux's handling of filesystems, disks and drives
 Q4.1        How do I format and create a filesystem on a floppy ?
 Q4.2        I get nasty messages about inodes, blocks, and the suchlike
 Q4.3        My swap area isn't working.
 Q4.4        How can I have more than 16Mb of swap ?
 Q4.5        How do I remove LILO so my system boots DOS again ?
 Q4.6        Why can't I use fdformat except as root ?
 Q4.7        Is there something like Stacker or Doublespace for Linux ?

 Section 5.  Porting, compiling and obtaining programs
 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.6        What does gcc -O6 do ?
 Q5.7        Where are <linux/*.h> and <asm/*.h> ?
 Q5.8        I get errors when I try to compile the kernel.
 Q5.9        My ext2fs partitions are checked each time I reboot.
 Q5.10       I have a huge /proc/kcore !  Can I delete it ?

 Section 6.  Miscellaneous questions and problems
 Q6.1        How many people use Linux ?
 Q6.2        How can I get scrollback on text VC's ?
 Q6.3        Setuid scripts don't seem to work.
 Q6.4        Free memory as reported by free keeps shrinking.
 Q6.5        What is a BogoMip ?
 Q6.6        How do I set the timezone ?
 Q6.7        What version of Linux and what machine name am I using ?
 Q6.8        When I add more memory it slows to a crawl.
 Q6.9        Some programs (e.g. xdm) won't let me log in.
 Q6.10       Some programs let me log in with no password.
 Q6.11       My machine runs very slowly when I run GCC / X / ...
 Q6.12       I can only log in as root.
 Q6.13       How can I produce core files ?
 Q6.14       How do I stop producing core files ?
 Q6.15       My keyboard goes all funny after I switch VC's.
 Q6.16       My screen is all full of weird characters instead of letters.
 Q6.17       What is a .gz file ? And a .tgz ? And ... ?
 Q6.18       I have screwed up my system and can't log in to fix it.
 Q6.19       How do I upgrade my kernel ?
 Q6.20       Can I have more than 3 serial ports by sharing interrupts ?
 Q6.21       Emacs just dumps core.
 Q6.22       How do I make a bootable floppy ?
 Q6.23       How do I remap my keyboard to UK, French, etc. ?
 Q6.24       I've discovered a huge security hole in rm !

 Section 7.  Frequently Encountered Error messages
 Q7.1        lp1 on fire
 Q7.2        INET: Warning: old style ioctl(IP_SET_DEV) called!
 Q7.3        ld: unrecognized option '-m486'
 Q7.4        GCC says Internal compiler error
 Q7.5        make says Error 139
 Q7.6        df says Cannot read table of mounted filesystems
 Q7.7        shell-init: permission denied when I log in.
 Q7.8        No utmp entry.  You must exec ... when I log in.
 Q7.9        EXT2-fs: warning: mounting unchecked filesystem
 Q7.10       EXT2-fs: warning: maximal count reached
 Q7.11       fdisk says cannot use nnn sectors of this partition
 Q7.12       fdisk says partition n has an odd number of sectors

 Section 8.  The X Window System
 Q8.1        Does Linux support X Windows ?
 Q8.2        Where can I get an XConfig for my video card and monitor ?
 Q8.3        I can't get X Windows to work right.
 Q8.4        mtools says cannot initialise drive XYZ

 Section 9.  How to get further assistance
 Q9.1        You still haven't answered my question !
 Q9.2        What to put in a posting to comp.os.linux.help

 Section 10. Administrative information and acknowledgements
 Q10.1       Feedback is invited
 Q10.2       Formats in which this FAQ is available
 Q10.3       Authorship and acknowledgements
 Q10.4       Disclaimer and Copyright

===============================================================================

Section 1.  Introduction and General Information

 Q1.1        What is Linux ?
 Q1.2        What software does it support ?
 Q1.3        Does it run on my computer ?  What hardware is supported ?
 Q1.4        How much hard disk space does Linux need ?
 Q1.5        Is Linux PD ?  Copyrighted ?
 Q1.6        How should I pronounce Linux ?

-------------------------------------------------------------------------------

Question 1.1.  What is Linux ?

Linux is a Unix clone for 386/486-based PCs written from scratch by Linus
Torvalds with assistance from a loosely-knit team of hackers across the
Net.  It aims towards POSIX compliance.

It has all the features you would expect in a modern fully-fledged Unix,
including true multitasking, virtual memory, shared libraries, demand
loading, shared copy-on-write executables, proper memory management and
TCP/IP networking.

It uses the hardware features of the 386 processor family (TSS segments et
al) to implement these features.

Linux is still considered to be in beta testing; due to the rapid pace of
development new bugs are often introduced.  Despite this, Linux is very
stable if you don't always immediately use the latest alpha-release kernel
software.

See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
documentation ?'] for more details.

It is distributed under the GNU General Public License - see Q1.5 `Is
Linux PD ?  Copyrighted ?' for more details.

-------------------------------------------------------------------------------

Question 1.2.  What software does it support ?

Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
(including SLIP --- PPP support is being developed) and all the hundreds
of programs that people have compiled or ported for it.

There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
386BSD ?  Minix ?'] and work is progressing on a facilities to allow SVR4
ELF, SVR3.2 COFF and Microsoft Windows binaries [Q3.6 `Can I run Microsoft
Windows programs under Linux ?'] to be run under Linux and X Windows.

For more information see the INFO-SHEET, which is one of the the HOWTOs
--- see above, or Q2.1 `Where can I get the HOWTOs and other documentation
?'.  See also Q5.3 `How do I port XXX to Linux ?'.

-------------------------------------------------------------------------------

Question 1.3.  Does it run on my computer ?  What hardware is supported ?

You need a 386 or 486, with at least 2Mb of RAM and a single floppy, to
try it out.  To do anything useful more RAM and a hard disk are required.
Reportedly Linux also works on a Pentium.

Linux doesn't currently work on machines using MCA (IBM's proprietary
bus), because of lack of available documentation.  You may be able to get
it to work if your hard disk is on certain kinds of controller (some SCSI
controllers work, I understand), but you're on your own.

It should work with VESA local bus machines, provided that the local bus
cards really are equivalent to the equivalent ISA ones.  Linux is reported
to run on 386/486-based laptops, with X on most of them.

For details of exactly which PC's, video cards, disk controllers, etc.
work see the INFO-SHEET and the Hardware Compatibility List [Q2.1 `Where
can I get the HOWTOs and other documentation ?'].

Linux will never run on a 286, because it uses task-switching and memory
management facilities only found on 386/486 processors.

A project is underway to port Linux to suitable 68000-series based
systems, but this is still at a very early stage of development.  Don't
post asking about it unless you think you can contribute to it, and don't
hold your breath.

-------------------------------------------------------------------------------

Question 1.4.  How much hard disk space does Linux need ?

10Mb for a very minimal installation, suitable for trying it out and not
much else.

You can squeeze a more complete installation including X Windows into
80Mb.  The SLS 1.03 distribution (which I would recommend you stay well
clear of - it has a number of serious and annoying bugs) takes around
100Mb.

-------------------------------------------------------------------------------

Question 1.5.  Is Linux PD ?  Copyrighted ?

The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
under the GNU General Public Licence, which basically means that you may
freely copy, change and distribute it, but that you may not impose any
restrictions on further distribution.

Full details are in the file COPYING in the Linux kernel sources (probably
in /usr/src/linux on your system).

The copyright 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.

Note that discussion about the merits or otherwise of the GPL should be
posted to gnu.misc.discuss and not to the comp.os.linux groups.

-------------------------------------------------------------------------------

Question 1.6.  How should I pronounce Linux ?

Linus says: `li' is pronounced with a short (ee) sound: compare prInt,
mInImal etc.  `nux' is also short, non-diphtong, like in pUt.  It's partly
due to Minix: Linux was just my working name for the thing, and as I wrote
it to replace Minix on my system, the result is what it is...  Linus'
minix became Linux.

I originally intended it to be called freax (although buggix was one
contender after I got fed up with some of the more persistent bugs :) and
I think the kernel makefiles up to version 0.11 had something to that
effect (`Makefile for the freax kernel' in a comment).  But arl called the
linux directory at nic.funet.fi [now ftp.funet.fi - iwj] pub/OS/Linux, and
the name stuck.  Maybe just as well: freax doesn't sound too good either
(freax is obviosly free + freak + the obligatory -x).

Rik Faith's note for English speakers: Linux --- `LIH-nuhks'.

===============================================================================

Section 2.  Network sources and resources

 Q2.1        Where can I get the HOWTOs and other documentation ?
 Q2.2        What newsgroups are there for Linux ?
 Q2.3        How do I install Linux ?
 Q2.4        Where can I get Linux material by FTP ?
 Q2.5        I don't have FTP access.  Where do I get Linux ?
 Q2.6        I don't have Usenet access.  Where do I get information ?
 Q2.7        What's this mailing list thing at niksula.hut.fi ?
 Q2.8        Are the newsgroups archived anywhere ?

-------------------------------------------------------------------------------

Question 2.1.  Where can I get the HOWTOs and other documentation ?

Look in the following places, and on sites that mirror them.
   ftp.funet.fi (128.214.6.100)   /pub/OS/Linux/doc/HOWTO
   tsx-11.mit.edu (18.172.1.2)    /pub/linux/docs/HOWTO
   sunsite.unc.edu (152.2.22.81)  /pub/Linux/docs/HOWTO
For a complete list of Linux FTP sites see Q2.3 `How do I install Linux
?'.

If you don't have access to FTP try using the FTP-by-mail servers at
ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

A complete list of HOWTO's is available in the file HOWTO.INDEX in the
docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
list:

          Installation HOWTO            Electronic Mail HOWTO
          Linux INFO-SHEET              UUCP HOWTO
          Linux META-FAQ                SCSI HOWTO
          NET-2 HOWTO                   Printing HOWTO
          Ethernet HOWTO                Hardware Comaptibility HOWTO
          News HOWTO                    XFree86 HOWTO
          Distribution HOWTO

Some more of these documents are in preparation.  You should check in
nearby directories on the FTP sites if you can't find the answer in one of
the new-style HOWTOs.

The HOWTO.INDEX also contains information on how to write a new HOWTO.

The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.

The `books' produced by the Linux Documentation Project are available in
/pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
to Unix and Linux.  Here is a list of those released so far:

          The Linux Documentation Project manifesto
          Installation and Setup Guide for Linux
          The Kernel Hacker's Guide
          Network Administration Guide
          Linux System Administrator's Guide

-------------------------------------------------------------------------------

Question 2.2.  What newsgroups are there for Linux ?

There are five Usenet newsgroups devoted to Linux.

comp.os.linux.announce is the moderated announcements group; you should
read this if you intend to use Linux.  Submissions for that group should
be emailed to linux-announce@tc.cornell.edu.

comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
comp.os.linux.misc are also worth reading -- you will find that many
common problems are too recent to find in this FAQ but are answered in the
newsgroups.

Since Linux is a Unix clone, many of the comp.unix.* and comp.windows.x.*
groups will also contain relevant material.

Please read Q9.1 `You still haven't answered my question !' before
posting, and make sure you post to the right newsgroup.  Crossposting is
rarely a good idea.

See also Q2.6 `I don't have Usenet access.  Where do I get information ?'.

-------------------------------------------------------------------------------

Question 2.3.  How do I install Linux ?

There are several pre-packaged releases of Linux available, including the
MCC-Interim release, the TAMU release and the Slackware release.  Each
contains the software you need to run linux, ready to install and use.
The exact details of which software is included and how to install them
vary from release to release.

You should read the Installation HOWTO for more details on how to go about
installing Linux.  Note, though, that despite its heavy emphasis on the
SLS release I would strongly recommend against using SLS for any new Linux
installation; you should consider using MCC-Interim, TAMU or Slackware
instead.

All of these releases are available via anonymous FTP from the Linux
archive sites [Q2.4 `Where can I get Linux material by FTP ?'].

-------------------------------------------------------------------------------

Question 2.4.  Where can I get Linux material by FTP ?

There are three main archive sites for Linux:
   ftp.funet.fi (128.214.248.6)   /pub/OS/Linux
   sunsite.unc.edu (152.2.22.81)  /pub/Linux
   tsx-11.mit.edu (18.172.1.2)    /pub/linux
The MCC-Interim release is available from:
   ftp.mcc.ac.uk (130.88.200.7)   /pub/linux
The TAMU release is available from:
   net.tamu.edu (128.194.177.1)   /pub/linux

The contents of these sites is mirrored (copied, usually approximately
daily) by a number of other sites.  Please use one close to you -- that
will be faster for you and easier on the network.
   src.doc.ic.ac.uk                     wuarchive.wustl.edu
                                        ftp.eecs.umich.edu
   ftp.informatik.tu-muenchen.de
   ftp.ibr.cs.tu-bs.de                  monu1.cc.monash.edu.au
   ftp.dfv.rwth-aachen.de               kuis.kyoto-u.ac.jp
   ftp.informatik.rwth-aachen.de        cair.kaist.ac.kr
Not all of these mirror all of the other `source' sites.

-------------------------------------------------------------------------------

Question 2.5.  I don't have FTP access.  Where do I get Linux ?

The easiest thing is probably to find a friend with FTP access.  If there
is a Linux users 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@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
ftp-mailer@informatik.tu-muenchen.de.

Linux is also available via traditional mail on diskette, CD-ROM and tape.
The Installation HOWTO, and the file /pub/Linux/docs/distributions on
sunsite.unc.edu, contains information on these distributions.

You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
which is posted regularly (1st and 15th of each month) to
comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
echoes.

-------------------------------------------------------------------------------

Question 2.6.  I don't have Usenet access.  Where do I get information ?

Digests of postings to the comp.os.linux.* groups are available by
subscribing to the bidirectional gateway at
linux-*-request@news-digests.mit.edu, where * is one of announce,
development, help, misc or admin.

You are strongly advised to subscribe to at least
linux-announce-request@news-digests.mit.edu, as this carries important
information and documentation about Linux.

Please remember to use the -request addresses for your subscription and
unsubscription messages; mail to the other address is posted to the
newsgroup !

-------------------------------------------------------------------------------

Question 2.7.  What's this mailing list thing at niksula.hut.fi ?

It's a multi-channel mailing list, mainly used by the developers of Linux
to talk about technical issues and future developments.  Most of the
channels are not intended for new users to ask their questions on.

The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
for the benefit of those without Usenet access.  However since
niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
digestifier instead [Q2.6 `I don't have Usenet access.  Where do I get
information ?'].

There is also a NEWBIE channel where `no question is too stupid';
unfortunately it seems that few of the experienced users read that
channel, probably because of all the `stupid' questions !

If you want to subscribe to one or more of the channels at the
multi-channel list, send an empty mail message to
linux-activists-request@niksula.hut.fi and you'll receive the instructions
for operating the list subscription software.

If you want to unsubscribe send a mail message like this
  From: you@domain.org
  To: linux-activists-request@niksula.hut.fi
  Subject: irrelevant

  X-Mn-Admin: leave CHANNEL
to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
message - that will cause it to be posted to the list.

Note that you *must* remember to unsubscribe *before* you change your
email address, as due to a design flaw in the list server it is virtually
impossible to get yourself unsubscribed after such a change.

-------------------------------------------------------------------------------

Question 2.8.  Are the newsgroups archived anywhere ?

Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
comp.os.linux.announce and the old group comp.os.linux, in their Linux
areas.  The comp.os.linux.announce archives are mirrored from /usenet on
src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).

===============================================================================

Section 3.  Compatibility with other operating systems

 Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
 Q3.2        How do I access files on my DOS partition or floppy ?
 Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
 Q3.4        Can I access OS/2 HPFS partitions from Linux ?
 Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
 Q3.6        Can I run Microsoft Windows programs under Linux ?
 Q3.7        How can I boot Linux from OS/2's Boot Manager ?

-------------------------------------------------------------------------------

Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?

Yes.  Linux uses the standard PC partitioning scheme, so it can share your
disk with other operating systems.

Linux can read and write the files on your DOS and OS/2 FAT partitions and
floppies using either the DOS filesystem type built into the kernel or
mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
/pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
DOS applications.

Linux can also access Minix filesystems.

-------------------------------------------------------------------------------

Question 3.2.  How do I access files on my DOS partition or floppy ?

Use the DOS filesystem, i.e. 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 filesystem as they appear under Linux.
If you mount your DOS filesystem 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 Q2.3 `How do I install Linux ?'.

-------------------------------------------------------------------------------

Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?

Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
filesystem under Linux or using mtools.

-------------------------------------------------------------------------------

Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?

Yes, but it's only read-only at the moment.  To use it you must compile a
kernel with support for it enabled [Q6.19 `How do I upgrade my kernel ?'].
Then you can mount it using the mount command, for example:
        mkdir /hpfs
        mount -t hpfs /dev/hda5 /hpfs

-------------------------------------------------------------------------------

Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?

There is no support for those yet; I have not heard of any recent work on
providing some.

-------------------------------------------------------------------------------

Question 3.6.  Can I run Microsoft Windows programs under Linux ?

Not yet.  There is a project, known as WINE, to build an MS Windows
emulator for Linux, but it is not ready for users yet.  Don't ask about it
unless you think you can contribute; look out for the status reports in
comp.os.linux.announce.

The advert from Softlanding (producers of SLS) stating that Linux could
run MS Windows binaries was at best grossly exaggerated; the word `lie'
springs readily to mind.

In the meantime if you need to run MS Windows programs your best bet is
probably to reboot when you want to switch environments.  LILO (the Linux
bootloader) has the facility for a boot menu --- see its documentation for
more details.

-------------------------------------------------------------------------------

Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?

1. Create a partition using OS/2's FDISK (Not Linux's fdisk).

2. Format the partition under OS/2, either with FAT or HPFS.  This is so
that OS/2 knows about the partition being formatted.

3. Add the partition to the Boot Manager.

4. Boot Linux, and create a filesystem on the partition using mkfs -t ext2
or mke2fs.  At this point you may, if you like, use Linux's fdisk to
change the partition type code of the new partition to type 83 (Linux
Native) -- this may help some automated installation scripts find the
right partition to use.

5. Install Linux on the partition.

6. 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
config file.  To do this you should put
   boot = /dev/hda2
(where /dev/hda2 is the *partition* you want to boot off) in your
/etc/lilo/config or /etc/lilo.config file.

7. 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.

===============================================================================

Section 4.  Linux's handling of filesystems, disks and drives

 Q4.1        How do I format and create a filesystem on a floppy ?
 Q4.2        I get nasty messages about inodes, blocks, and the suchlike
 Q4.3        My swap area isn't working.
 Q4.4        How can I have more than 16Mb of swap ?
 Q4.5        How do I remove LILO so my system boots DOS again ?
 Q4.6        Why can't I use fdformat except as root ?
 Q4.7        Is there something like Stacker or Doublespace for Linux ?

-------------------------------------------------------------------------------

Question 4.1.  How do I format and create a filesystem on a floppy ?

For a 3.5 inch high density floppy:
   fdformat /dev/fd0H1440
   mkfs -t ext2 /dev/fd0H1440 1440
For a 5.25 floppy inch use fd0h1200 and 1200 as appropriate.  For the `B'
drive use fd1 instead of fd0.  Full details of which floppy devices do
what can be found in the Linux Device List [Q2.1 `Where can I get the
HOWTOs and other documentation ?'].  If you don't have the fsutils package
you'll have to run mke2fs instead of mkfs -t ext2.

The first command low-level formats the floppy; the second creates an
empty filesystem on it.  After doing this you can mount the floppy like a
hard disk partition and simply cp and mv files, etc.

-------------------------------------------------------------------------------

Question 4.2.  I get nasty messages about inodes, blocks, and the suchlike

You probably have a corrupted filesystem, 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 bootutils 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 fsutils package) will be able to repair your filesystem; if
you're unlucky the filesystem is trashed and you'll have to reinitialise
it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.

NB don't try to check a filesystem that's mounted read-write - this
includes the root partition if you don't see
   VFS: mounted root ... read-only
at boot time.

-------------------------------------------------------------------------------

Question 4.3.  My swap area isn't working.

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 or /etc/rc.local (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 manpage for details; it works
much like mkfs.

Check the Installation HOWTO for detailed instructions of how to set up a
swap area.

-------------------------------------------------------------------------------

Question 4.4.  How can I have more than 16Mb of swap ?

Use a recent kernel -- from at least 0.99.14 Linux can use swap partitions
of up to 128Mb.

If you use an older kernel which only supports swap area sizes up to 16Mb
you have to set up more than one swap partition or swapfile.

-------------------------------------------------------------------------------

Question 4.5.  How do I remove LILO so my system boots DOS again ?

Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
into FDISK in the normal way and then select the `Re-write Master Boot
Record' option.

If you don't have DOS 5 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
(or sda if you're using a SCSI disk).  This will also wipe out your
partition table, so beware !

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.

-------------------------------------------------------------------------------

Question 4.6.  Why can't I use fdformat except as root ?

The system call to format a floppy may 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.

-------------------------------------------------------------------------------

Question 4.7.  Is there something like Stacker or Doublespace for Linux ?

Currently none of the Linux filesystems can do compression in the
filesystem.

There is a transparently uncompressing C library, which is a drop-in
replacement for the standard C library.  It allows programs to read
compressed (ie, GNU zipped) files as if they were not compressed.  You
install it, and then you can compress files using gzip and have programs
still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
is Alain Knaff <Alain.Knaff@imag.fr>.

There is also a package available called tcx (Transparently Compressed
Executables) which allows you to keep infrequently used executables
compressed and only uncompress them temporarily while you use them.
You'll find it on the Linux FTP sites [Q2.4 `Where can I get Linux
material by FTP ?']; it was also announced in comp.os.linux.announce.
Note - this is not the same as gzexe, which is an inferior implementation
of the same concept.

===============================================================================

Section 5.  Porting, compiling and obtaining programs

 Q5.1        What is ld.so and where do I get it ?
 Q5.2        Has anyone ported / compiled / written XXX for Linux ?
 Q5.3        How do I port XXX to Linux ?
 Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
 Q5.5        GCC sometimes uses huge amounts of virtual memory and thrashes
 Q5.6        What does gcc -O6 do ?
 Q5.7        Where are <linux/*.h> and <asm/*.h> ?
 Q5.8        I get errors when I try to compile the kernel.
 Q5.9        My ext2fs partitions are checked each time I reboot.
 Q5.10       I have a huge /proc/kcore !  Can I delete it ?

-------------------------------------------------------------------------------

Question 5.1.  What is ld.so and where do I get it ?

ld.so is the new 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.

It can be obtained from tsx-11.mit.edu in /pub/linux/packages/GCC and
mirror sites thereof.  The latest version at the time of writing is
ld.so.1.3.tar.gz.

-------------------------------------------------------------------------------

Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?

First, look in the Linux Software Map (LSM) --- it's in the docs directory
on sunsite.unc.edu, and on the other FTP sties.

Check the FTP sites (see Q2.1 `Where can I get the HOWTOs and other
documentation ?') first --- search the find-ls or INDEX files for
appropriate strings.

If you don't find anything, you could either download the sources to the
program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
?' -- or, if it's a large package which may require some porting, post a
message to the newsgroup.

If you compile a largeish program please upload it to one or more of the
FTP sites and post a message to comp.os.linux.announce (submit your
posting to linux-announce@tc.cornell.edu).

If you're looking for an application-type program the chances are someone
has already written a free verson.  Try reading the FAQ in
comp.sources.wanted for instructions on how to find sources.

-------------------------------------------------------------------------------

Question 5.3.  How do I port XXX to Linux ?

In general Unix 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 or by 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.

-------------------------------------------------------------------------------

Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?

Yes.

The -m486 option to GCC, which is used to compile binaries for 486
machines, merely makes GCC change certain optimisations.  This makes for
slightly larger binaries which run somewhat faster on a 486.  They still
work fine on a 386, though, with little performance hit.

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 overriden on a
per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.

-------------------------------------------------------------------------------

Question 5.5.  GCC sometimes uses huge amounts of virtual memory and thrashes

Older versions of GCC had a bug which makes it use lots of memory if you
try to compile a program which has a large static data table in it.

You can either upgrade your version of GCC, or add more swap if necessary
and just grin and bear it; it'll work in the end.

-------------------------------------------------------------------------------

Question 5.6.  What does gcc -O6 do ?

The same as -O2; any number greater than 2 works just like 2.  It's put
there for luck, I think.

-------------------------------------------------------------------------------

Question 5.7.  Where are <linux/*.h> and <asm/*.h> ?

These are in the directories /usr/include/linux and /usr/include/asm.

However they should be symbolic links to your kernel sources in
/usr/src/linux and not real directories.

If you don't have the kernel sources download them --- see Q6.19 `How do I
upgrade my kernel ?'.

Then use ln to create the links:
        ln -sf /usr/src/linux/include/linux /usr/include/linux
        ln -sf /usr/src/linux/include/asm /usr/include/asm

-------------------------------------------------------------------------------

Question 5.8.  I get errors when I try to compile the kernel.

Make sure that /usr/include/linux and /usr/include/asm aren't actual
directories but instead symbolic links to /usr/src/linux/include/linux and
/usr/src/linux/include/asm respectively.

If necessary, delete them using rm and then use ln -s to make the links as
in Q5.7 `Where are <linux/*.h> and <asm/*.h> ?'.

-------------------------------------------------------------------------------

Question 5.9.  My ext2fs partitions are checked each time I reboot.

See Q7.9 `EXT2-fs: warning: mounting unchecked filesystem'.

-------------------------------------------------------------------------------

Question 5.10.  I have a huge /proc/kcore !  Can I delete it ?

None of the files in /proc are really there - they'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 ask to read it as a
file the kernel does memory reads.

===============================================================================

The remainder of the FAQ is in the next part ...

-- 
Ian Jackson, at home  <ijackson@nyx.cs.du.edu> or <iwj10@cus.cam.ac.uk>
PGP2 public key available on server.  Urgent email: <iwj10@phx.cam.ac.uk>
2 Lexington Close, Cambridge, CB4 3LS, England;  phone: +44 223 64238


^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~1996-03-06  5:00 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
1995-01-31 23:48 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1995-01-31 23:49 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
  -- strict thread matches above, loose matches on Subject: below --
1996-03-06  5:00 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1996-03-06  5:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1996-02-08  5:00 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1996-02-09  5:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1995-09-10  4:00 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1995-09-10  4:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1995-07-05  4:00 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1995-07-05  4:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1995-06-06  4:00 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1995-06-06  4:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1995-05-08  4:00 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1995-05-08  4:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1995-03-29  5:00 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1995-03-29  5:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1994-12-21 20:54 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1994-12-21 20:54 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1994-11-30 23:28 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1994-11-30 23:29 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1994-10-30 16:24 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1994-10-30 16:25 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1994-09-21 12:32 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1994-09-21 12:33 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1994-08-28 17:45 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1994-08-28 17:46 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1994-07-13  9:01 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1994-07-13  9:01 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1994-06-15 23:59 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1994-06-16  0:00 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1994-05-12 11:26 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1994-05-12 11:26 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1994-04-10 12:05 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1994-04-10 12:05 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1994-03-09  0:04 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1994-03-09  0:04 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson
1994-02-01 22:21 Linux Frequently Asked Questions with Answers (FAQ: 1/2) Ian Jackson
1994-02-01 22:21 ` Linux Frequently Asked Questions with Answers (FAQ: 2/2) Ian Jackson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox