Newsgroups: comp.os.linux,comp.os.linux.announce,comp.answers,news.answers Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!gatech!howland.reston.ans.net!usc!cs.utexas.edu!uunet!mcsun!julienas!geocub!labri.u-bordeaux.fr!corsini From: corsini@labri.u-bordeaux.fr Subject: Linux Frequently Asked Questions: TABLE OF CONTENTS [monthly posted] Message-ID: Followup-To: poster Summary: Linux, a small and free unix-like for 386-AT computers. Sender: corsini@greco-prog.fr (Marc-Michel CORSINI) Supersedes: Reply-To: linux@labri.u-bordeaux.fr Organization: Greco Prog. CNRS & LaBRI, Bordeaux France Date: Wed, 21 Jul 1993 09:52:03 GMT Approved: news-answers-request@MIT.Edu Expires: Fri, 3 Sep 1993 09:51:58 GMT Lines: 674 Xref: senator-bedfellow.mit.edu comp.os.linux:52219 comp.os.linux.announce:921 comp.answers:1371 news.answers:10584 Archive-name: linux-faq/TOC Last-Modified: 93/07/11 Version: 1.20 ********************************************************* * * * TOC of the Frequently Asked Questions about Linux * * * ********************************************************* This post contains the TOC of the Linux FAQ (6 parts) and a short introduction. Hi Linuxers! The original FAQ 1st version was posted on Dec. 19, 1991 by Robert Blum. Since Feb. 1992, I'm the maintainer of this FAQ. Most credits to Linus, Robert and Ted for the departure point of this work. I haven't systematically copyrighted all the contributions, so thanks to every one who participated even indirectly to this FAQ. Since September 1992, the FAQ is co-written by: WHO (WHAT) E-MAIL ============================================================================= Michael K. Johnson (META-FAQ) johnsonm@stolaf.edu Matt Welsh (GENERAL INFO) mdw@tc.cornell.edu Zane Healy (BBS INFO) healyzh@holonet.net Matt Welsh (INSTALLATION) mdw@tc.cornell.edu Peter MacDonald (SLS INFO) pmacdona@sanjuan.uvic.ca Mark Komarinski (DOS) komarimf@craft.camp.clarkson.edu Drew Eckhardt (SCSI) drew@cs.colorado.edu Rick Miller (DEVICE INFO) rick@ee.uwm.edu Hongjiu Lu (GCC) hlu@{eecs.wsu.edu,nynexst.com} Krishna Balasubramanian (X11) balasub@cis.ohio-state.edu Rick Sladkey (EMACS) jrs@world.std.com Philip Copeland (NET INFO) p_copela@csd.bristol-poly.ac.uk Brian McCauley (LPD) B.A.McCauley@bham.ac.uk Vince Skahan (UUCP/NEWS..) vince@victrola.sea.wa.us Dirk Hohndel (PROOF READER) hohndel@informatik.uni-wuerzburg.dbp.de Marc-Michel Corsini (FAQ collector) corsini@labri.u-bordeaux.fr ============================================================================= If anyone is interested in participating with this FAQ, just send me a note with: your name/e-mail and the section you want to maintain. Many of the questions could be avoided, if people had read the FAQ of the following newsgroups: news.announce.newusers, comp.lang.c, gnu.emacs.help, comp.unix.questions, comp.windows.x.i386unix. This article contains a listing of the sections *AND* queries answered in the Linux FAQ. This FAQ is supposed to reduce the noise level ;-) in the comp.os.linux newsgroup, and spare the time of many activists. I will cross-post it each month to news.answers. The Linux FAQ is NOT an introduction to UNIX, there are many books for unix, and there is *also* a FAQ for unix (it's the one of comp.unix.questions which contains things such as "How do I remove a file named -". I DO NOT WANT TO ADD SUCH THINGS IN THIS FAQ DEVOTED TO LINUX. This FAQ is available at the main Linux sites in the doc directory, the addresses are given in section II. of this FAQ. There is also an archive of (all) FAQs at rtfm.mit.edu [18.70.0.224]. Have a look in the anonymous ftp directory: /pub/usenet/news.answers/linux-faq. If you do not have anonymous ftp access, you can access the archive by mail server. Send mail to mail-server@rtfm.mit.edu with the words "help" and "index" in the body on separate lines for more information. The information in this multi-parts FAQ is likely to change relatively quickly. If this is more than two months old (it was released on July 1993) then you should obtain a new copy. See the paragraph above for details of where to find a more recent version. Please suggest any change, rephrasing, deletions, new questions, answers ... Please include "FAQ" in the subject of messages sent to me about FAQ. Please send them to linux@labri.u-bordeaux.fr whatever will be the From part of this message. Finally discussion about the FAQ can be done on the DOC Channel (see section II). Regards, Marc-Michel Thanks to Martin Schulze (Martin.Schulze@Informatik.Uni-Oldenburg.de), the FAQ can be found in LaTeX version --- the first attempt was done by Pepe de flores --- at tsx-11.mit.edu in pub/linux/docs. Future Plan: This document is under re-organization. Send suggestions to linux@labri.u-bordeaux.fr with a meaningful subject line. ================================8<=====8<============================== CONTENTS 0. WARNINGS (part1) I. LINUX GENERAL INFORMATION (part1) II. LINUX USEFUL ADDRESSES (part1) III. INSTALLATION and COMMON PROBLEMS (part2) IV. SOME CLASSICAL PROBLEMS (part2) V. LINUX and DOS (part2) VI. MISCELLANEOUS HINTS (part3) VII. MORE HINTS (part3) VIII. FEATURES (part4) IX. GCC MISC INFORMATION (part4) X. SCSI SPECIAL (part4) XI. EMACS for LINUX (part5) XII. X11, THE MINIMUM and MORE (part5) XIII. NETWORKING and LINUX (part5) XIV. EVERYTHING FOR PRINTING (part6) XV. UUCP/NEWS/MAIL for LINUX (part6) ================================8<=====8<============================== 0. WARNINGS =========== I. LINUX GENERAL INFORMATION ============================= I.01) What is linux? I.02) Does Linux support GCC, TCP/IP, X-Windows, MGR, etc.? I.03) What is the current state of Linux? I.04) Linux sounds great, but where do I get it and how do I install it? I.05) Sounds good, but all of these docs are very confusing. Is Linux really difficult to install and use? I.06) What's the best advice you can give to a Linux newbie? I.07) Does it run on my computer? I.08) How much space will Linux take up on my hard drive? I.09) Will Linux run on a PC or 286-AT? If not, why? I.10) Will Linux run on a 386 Laptop? I.11) Why the suggested 4Meg, for Linux? I.12) How would this operate in an OS/2 environment? I.13) How long has Linux been publicly available? I.14) How reliable is Linux, anyway? I.15) What is the proper pronounciation for "Linux"? I.16) What's about the copyright of linux? I.17) Should I be a UNIX and/or a DOS wizard to install/use Linux? I.18) Does Linux use TSS segments to provide multitasking? I.19) If my PC runs under Linux, is it possible to ftp, rlogin, rsh etc.. to other Unix boxes? I.20) Does linux do paging? Can I have virtual memory on my small machine? I.21) Can I have tasks spanning the full 4GB of addressable 386 memory? No more 64kB limits like in coherent or standard minix? I.22) Does the bigger program sizes mean I can run X? I.23) What are the differences, pros and cons compared to Minix ? I.24) What are the pros and cons compared to 386BSD ? I.25) Can't we split comp.os.linux ? II. LINUX USEFUL ADDRESSES ========================= II.A. LINUX ON THE NET: ftp, mailing-list II.B. OBTAINING LINUX FROM BBS'S: everything about bbs II.A. LINUX ON THE NET ~~~~~~~~~~~~~~~~~~~~~~ II.01) Where can I get linux? II.02) I do not have FTP access, what can I do to get linux? II.03) Is there a newsgroup or mailing-list about linux? II.04) Where can I get my questions answered? How about bug-reports? What do I put into a post to comp.os.linux? II.05) Could you be more explicit about the multi-channel list? II.06) How can I join the channel XXX on the linux-activists mailing list? II.07) How can I leave the channel XXX on the linux-activists mailing list? II.08) I'm not an hacker, what are the channels I could be interested in? II.09) Does there exist a place where the traffic of the newsgroup is kept? II.B OBTAINING LINUX FROM BBS'S ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ II.10) I don't have access to FTP, how can I obtain Linux? II.11) I got this FAQ from a local BBS, or a friend, and I see there is a newsgroup called comp.os.linux . I don't have access to USENET or mail, so how can I get the messages? II.12) Do BBS's offer anything that the Internet does not? II.13) What is a BBS? II.14) How can I get a (Near) complete list of BBS's that carry Linux? III. INSTALLATION, SETUP, and COMMON PROBLEMS ============================================= III.A. WHERE TO START: What are the reliable sources of information III.B. LINUX PACKAGES: Where and how install a complete Linux package III.C. SOME COMMON PROBLEMS: Simple problems and simple solutions III.A. WHERE TO START ~~~~~~~~~~~~~~~~~~~~~ III.01) I want to install Linux on my machine. Where do I start? III.02) Is there some kind of limit on how large my Linux partitions and/or filesystems can be? III.B. LINUX PACKAGES ~~~~~~~~~~~~~~~~~~~~~ III.03) Is there an easy way to get all of the Linux stuff? III.04) Where can I get these releases of Linux? III.05) What files do I need to get for the SLS release? III.06) Now that I have the files, how do I install SLS? III.07) Any other information about SLS? III.08) How do I get and install H.J. Lu's "bootable rootdisk" release? III.C. SOME COMMON PROBLEMS ~~~~~~~~~~~~~~~~~~~~~~~~~~~ III.09) What filetype is the extension ".z"? What about ".taz", ".tpz", and ".tgz"? I see these files on the archives but I don't know how to unpack them. III.10) How do I make partitions and/or filesystems for Linux? III.11) Why does fdisk say "Linux cannot currently use XXXX sectors of this partition"? III.12) What does the message "MINIX-fs: Magic match failed" on bootup mean? III.13) Linux mkfs doesn't accept the size I give the device, although I double-checked with fdisk, and it's correct. III.14) How can I get mkfs/mkefs to check for bad blocks? III.15) How can I boot Linux off of my hard drive? III.16) How can I remove LILO from my hard drive? III.17) When installing SLS, I get the error "You may have inserted the wrong disk" when putting in the next disk in a series. What's going on? III.18) When installing SLS, the installation script creates a "boot floppy" for me to boot Linux with. How can I make these myself (or fix problems with them?) III.19) How can I set the default video mode used by Linux? Do I have to recompile the kernel to do this? III.20) How else can I use rdev? III.21) When I login as non-root, I get tons of errors about "shell-init: permission denied". Also, some things work as root but not as a normal user. What's the deal? III.22) I have the previous version of the Linux kernel, how can I upgrade it? III.23) Where is /usr/include/linux and /usr/include/asm, or, Why won't the kernel compile correctly? III.24) How can I upgrade to the newest version of GCC and/or libraries? III.25) What's the deal with these things called "jump tables"? III.26) How to upgrade jump tables? (Without hanging my system) III.27) How can I be sure I won't be writing over anything important when installing Linux? I have to use DOS on my machine, and I don't want to lose any files. III.28) I just rebooted my machine, and now Linux dies with a "panic: trying to free unused inode". What's going on? III.29) Can I use both OS/2 and Linux on my machine?? III.30) I use OS/2's Boot Manager on my hard drive. How can I get it to recognize Linux? III.31) When I run Linux's fdisk it says "OPUS" for OS/2's Boot Manager partition. Is this right? What's OPUS? IV. SOME CLASSICAL PROBLEMS =========================== IV.01) While running du I get "Kernel panic: free_inode: bit already cleared". Also, du produces a ENOENT error for all the files in certain of my directories. What's going on? IV.02) How can I partition my hard-drive to use Linux? IV.03) What must I do to mkfs a floppy? IV.04) I can do this as root but not as non-root, is it a bug? IV.05) Sometimes, I get "mount can't open lock file"; what does this means? IV.06) When I try "mount /dev/hd?? /user", I get error 2. IV.07) Since I have upgrade my Linux kernel, ps won't work anymore, why? IV.08) Since Linux 0.96b I have a lot of core file all over my disk. How can I sweep them away ? IV.09) I can only log-in as "root", is it normal ? IV.10) Sometimes my Linux virtual console get messed up when I cat a binary file. The characters shown are above ascii 127, any clue ? V. LINUX and DOS ================= V.01) Is is possible to access DOS from Linux? V.02) Why use mtools if you can just mount a drive? V.03) How do I get the mtools package set up correctly? V.04) What is the format of the file /etc/mtools? V.05) Where can I find out more about mtools? V.06) How do I use the DOS file system? V.07) When I mount an MS-DOS disk, I get two lines of what seem to be error messages and the message: No bmap support. Is my disk bad? V.08) I want to use the DOS file system with either conv=binary or conv=auto, but I want to convert text files from DOS to UNIX format, or from UNIX to DOS format. V.09) Where can I find out more about the DOS file system? V.10) This sounds me like a chicken and eggs problem, how can I install the mtools package at the very beginning. V.11) Could someone explain how to use rawrite? V.12) What is as86.tar.Z ? V.13) Turbo (Microsoft) Assembler won't compile the Linux boot code. In fact, some of the opcodes in these files look completely unfamiliar. Why? V.14) What about the dos emulator (dosemu)? V.15) I have a Stacker volume on my hard drive. Can I access that? V.16) How about OS/2 HPFS partitions, or MacIntosh/Amiga floppies? Can I mount any of them? VI. MISCELLANEOUS HINTS ======================= VI.A Misc Information VI.B Minor/Major Information VI.A. Misc information ~~~~~~~~~~~~~~~~~~~~~~ VI.01) It seems that $#@! ported on linux don't run correctly, what do I do about reporting bugs? VI.02) Has $#@! been ported to Linux? VI.03) I've ported $#@! to Linux, what should i do to add it in the standard distribution? VI.04) I want to port $#@! to Linux, what are the flags? VI.B.Major/Minor device number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ VI.05) What are the device minor/major numbers? VI.06) (Chuck Boyer) Could some one clear up the devices meaning? VII. MORE HINTS =============== VII.01) Where is 'which' ? VII.02) How to use setterm: for the novice? VII.03) I've tried clear/reset which exist on most of unix but it doesn't work, have I missed something? VII.04) I know there are VC, but where is the setterm stuff? VII.05) I know there are shared libraries; does there exist an easy way to check an executable for sharing ? VII.06) What is the rdev program provided in the images? VII.07) How to start Linux from drive B? VII.08) The program boot_b works fine /but/ once the first disk is read the system go back to the first drive, any hints? VII.09) How can I get Linux to boot directly from the harddisk? VII.10) Sometimes, when I want to remove a directory, I get an error message, is it a (known) bug? VII.11) I'm looking for init, getty, login, passwd stuff, where can I find them? VII.12) How can I setup a user account other than root ? VII.13) I've been trying to get Linux to run on my [3/4]86 box. It can't even boot. Any suggestions? VII.14) Does there exist games, languages (other than C), and anything which make the system more friendly? VII.15) I have an SVGA, but Linux detect an EGAc/EGAm; is it normal? VII.16) How can I change the keyboard repeat rate? VII.17) I compiled fdformat.c and ran it on 1.44Mb and 1.2Mb, the results are unreadable, any clue? VII.18) Is it possible to disable the 3-fingers salute (ctrl-alt-del) ? VII.19) Could some one explain the information provided at boot-time? VII.20) I have upgraded the kernel from XX to YY (XX > YY), however the login screen still says YY. VII.21) What is doshell good for ? VII.22) I don't have the kernel sources, how can I change the keyboard language? VII.23) Does there exist a possibility to track down the source of kernel pannic messages ? VIII. FEATURES ============== VIII.01) I've read that linux has virtual consoles, what must I do to get them? VIII.02) When Linux boots, I get the following message "8 virtual consoles"; how can I acess to the 5-8 vc's ? VIII.03) What kind of shell is /bin/sh ? VIII.04) Does there exist a man page for **** ? VIII.05) Is there a simple man package (groff is too big): VIII.06) What are the editors available in linux? VIII.07) Does there exist a printer package for Linux? VIII.08) Are uucp, mail, and/or USENET news available for Linux? VIII.09) How do I make swapping work? VIII.10) When I boot I get one of the following messages: "Unable to find swap signature" or "Bad swap-space bitmap" VIII.11) How do I know if it is swapping? VIII.12) How is it possible to remove a swap file? VIII.13) How is it possible to remove a swap device? VIII.14) How much swap space do I need ? VIII.15) Could someone explain the swap process on Linux?, is it swapping or paging ? VIII.16) Is there any way to tell how much swap space you are using or have left? VIII.17) I have a 2Megs box, but "free" reports only 1Meg why? VIII.18) What tape drives work with Linux ? VIII.19) Is there a driver for my Colorado Jumbo tape drive ? VIII.20) Does there exist shared libs ? VIII.21) Does Linux work for SCSI drives? VIII.22) Linux is supposed to work with ESDI drive. However I have trouble with my Magtron MT-4115E (Joincom controler), any clue? VIII.23) How does one go about applying a patch to Linux ? VIII.24) I got the patches on some ftp sites, and applied them to the kernel and tried to compile. It didn't !!. Are the patches buggy? VIII.25) What is VFS? VIII.26) What's about Bus Mice ? VIII.27) What's about TeX ? VIII.28) What's about MGR ? VIII.29) What's about X11 ? IX. GCC MISC INFORMATION ======================== IX.01) What C compiler should I use for Linux ? IX.02) Where can I found information about the C compiler ? IX.03) I seem to be unable to compile anything with gcc. Why? IX.04) How to compile programs which may be debugged with gdb? IX.05) When compiling some code, cc1 complains about some insn code, what's that? IX.06) How can I write codes suitable for building shared library ? X. SCSI SPECIAL =============== X.01) What hardware is supported? X.02) What hardware is not supported? X.03) How do I get SCSI information? X.04) Where is the latest version maintained? X.05) I've found one of the following bugs : X.06) What do I do if I find a bug that still looks like a bug after I've read the FAQ? X.07) What SCSI disks are supported? X.08) What about CD ROMS? X.09) What about SCSI tapes ? X.10) How do I partition the disk? X.11) The linux partitioning programs don't work. X.12) My partitioning program can't figure out the disk geoemetry X.13) What are the major / minor numbers for SCSI drives? X.14) My tape drive or other removeable media device isn't recognized at boot time. X.15) How do I reduce kernel bloat and eliminate the drivers I don't want? X.16) I get SCSI timeouts. X.17) My Seagate / Future Domain TMC-88x board is not detected. X.18) The Seagate / Future Domain TMC-88x driver doesn't work. X.19) The Adaptec driver doesn't work. X.20) The WD-7000FASST driver doesn't work X.21) My Ultrastor 14F or 34F isn't detected X.22) When using a Seagate / Future Domain TMC-88x, why does my system hang when syncing to disk? X.23) My system is dog slow (ie, 60k/sec) XI. EMACS for LINUX ===================== XI.A. GENERAL INFORMATION XI.B. GNU EMACS for LINUX XI.A. GENERAL INFORMATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~ XI.B. GNU EMACS for LINUX ~~~~~~~~~~~~~~~~~~~~~~~~~~~ XI.01) What versions of GNU Emacs are available for Linux? XI.02) Which files do I need? XI.03) What if I want to compile Emacs myself? XI.04) How do I get Emacs to recognize my cursor keys? XI.05) What packages are particularly useful under Linux? XI.06) Why does Emacs from the SLS dump core? XII. X11 THE MAXIMUM and MORE ============================= XII.A. X386 GENERAL INFORMATION XII.B. HARDWARE REQUIREMENTS: Supported Video cards, mice. XII.C. LINUX DISTRIBUTION: Files required, Current version. XII.D. LEARNING/USING X: Pointers to X documentation. XII.E. DEBUGGING STARTUP PROBLEMS: Checklist, Screen restoration, Hanging. XII.F. XCONFIG: Video mode settings and common errors in Xconfig. XII.G. X-APPLICATIONS: Compiling X programs. XII.H. ATI: SVGA server for ATI boards. XII.I. BUGS XII.A. X386 GENERAL INFORMATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XII.01) What is the X11 release supported by Linux? XII.02) What is X386/XFree86? XII.03) Where can I get X386 1.2 (X11R5)? XII.04) Any tips on compiling X11R5? XII.B HARDWARE REQUIREMENTS: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XII.05) What VGA boards are supported? XII.06) What Mouses are supported? XII.C. LINUX DISTRIBUTION ~~~~~~~~~~~~~~~~~~~~~~~~~ XII.07) What is the current version? XII.08) What Files do I need to download? XII.09) Where do the X11 files go? What are they? XII.D. LEARNING/USING X ~~~~~~~~~~~~~~~~~~~~~~~~ XII.10) Where can I find the basic help for learning/using X ? XII.11) What docs are available besides man pages? XII.12) How do I start up X? XII.13) How can I start X directly with xdm after booting ? XII.14) How do I configure X .. colors, menu, keyboard? XII.15) [suggested by Thomas Koenig] How do I support national keyboards in X11 ? XII.E. DEBUGGING STARTUP PROBLEMS: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XII.16) What do I use in my Xconfig file to use the bus mouse? Logitech doesn't work with my Logitech busmouse. XII.17) My busmouse works fine with windows but ... XII.18) Does anyone have a working PS/2 mouse? Has anyone gotten the "Mini-DIN" mouse on an HP Vectra 486/33T to work? The slight info I've been able to find says it's PS/2 compatible. Does anyone have a working MouseMan on a PS/2 port ? XII.19) I have trouble with my logitech Pilot mouse and X under Linux, any clue ? XII.20) I cannot type in my xterm XII.21) What are some of the common omissions and errors? XII.22) Why is the server unable to find some of the fonts? XII.23) My server "hangs" Why? XII.24) When I started X11 I got "Cannot connect to server" or "process does not exist", any clue ? XII.25) Why cant I run more than 4 xterms? How can I have more than 4 pty's ? XII.26) How does X11 start up? XII.27) What devices does X depend on: XII.F. Xconfig: Xconfig and Video mode settings. ~~~~~~~~~~~~~~~ XII.28) What do the mode names in Xconfig mean? XII.29) How do I compute the numbers for the video modes? XII.30) How can I determine the clocks on the video chip? Where can I find clock.exe or clock.pas ? XII.31) What are the settings used with a trident-8900C? XII.32) Oh what, Oh what, Oh what can I do with a trident 8900b? XII.33) What are common problems with Xconfig? XII.34) Where can I get Xconfig-files for various hardware? XII.G X-APPLICATIONS: Compiling X Programs. ~~~~~~~~~~~~~~~~~~~~~ XII.35) Does anyone know where I can find the libobz.a library ? XII.36) I get _setjmp undefined when linking xv from .a files. XII.37) How do I compile an X application that has an Imakefile? XII.38) How do I compile a program that has no Imakefile? XII.39) gcc complains the X libraries are not found or links static. XII.40) When using Makefiles generated by xmkmf why do I get many error messages? XII.41) (Ton van Rosmalen wrote): I recently compiled XFree86 1.2A for Linux and it compiled fine with gcc-2.3.3 and libc-4.3.3 iff I skipped the make depend. XII.42) What are the development tools available for X under Linux? XII.H ATI: SVGA server for ATI boards. ~~~~~~~~~ XII.43) What's new? XII.44) What is the ATI SVGA driver? XII.45) What is the ATI SVGA driver *NOT*? XII.46) What cards will the driver work with? XII.47) What should I put in my Xconfig file? XII.48) What is the history of the driver? XII.49) What is the future of the driver? XII.I BUGS: ~~~~~~~~~~~ XIII. NETWORKING and LINUX ============================ XIII.01) Where can I find useful information about networking for Linux ? XIV. EVERYTHING FOR PRINTING ============================= XIV.01) What _is_ the Linux lpr/lpd package? XIV.02) What is _the_ Linux lpr/lpd package? XIV.03) How do I get lpr to work properly other than for root? Where do the files go and what should their permissions be? XIV.04) What are all these diretrories for? (/etc, /usr/etc, /etc/inet, /usr/spool, /var/spool) XIV.05) Why do I get ``jobs queued, but cannot start daemon'' or ``lpc: connect: No such file or directory'' ? XIV.06) Where do I get a printcap for a xxxxx? XIV.07) What is the content of /etc/printcap? XIV.08) What is the format of a /etc/printcap? XIV.09) My /etc/printcap looks identical to someone else's but it doesn't work - why? XIV.10) What's the minimum /etc/printcap? XIV.11) How do I prevent the `staircase effect'? XIV.12) How do I get my printer to go back to the default font after each printout? XIV.13) How do I prevent a formfeed at the end of every printout? XIV.14) How do I print to a serial port? XIV.15) What serial settings do I have to put in my printcap? How do I know how to set them? XIV.16) I can cat to the serial port, but lpd won't print anything (1). XIV.17) I can cat to the serial port, but lpd won't print anything (2). XIV.18) How do I use a printer that's doesn't present a normal device interface? XIV.19) How do I get burst/banner pages? XIV.20) How do I print text on a PS printer? XIV.21) Why do files with a lot of graphics get truncated? XIV.22) Why doesn't `lpr -i' work? XIV.23) Why doesn't `lpr -p' work? XIV.24) Why does lprm say `too many users'? XIV.25) Why does lpc complain that it hasn't stopped a daemon? XIV.26) Why does XIV.27) How do I print over a Network? XIV.28) Which /dev/{tty,cua,lp}* is my printer? XIV.29) When the kernel boots it says `using polling driver,' is there an interrupt driven driver? XIV.30) What's the difference between the polling driver and an the interrupt driven one? XIV.31) How do I write filters? XIV.32) I've written a filter in shell script which works OK when I use it from the shell prompt but fails when I tell lpd to use it? XIV.33) When should I define an `of' filter? XIV.34) Where do I get filters for given printers? XIV.35) How do I get a program that won't read from STDIN to act as a filter? XIV.36) The set of filters supported by lpd seem strange - why aren't there filters for Postscript, GIF, TIFF and so on? XIV.37) What are magic filters? XV. UUCP/NEWS/MAIL for LINUX ============================ XV.A. General Information XV.B. UUCP XV.C. News XV.D. Mail XV.A. General Information ~~~~~~~~~~~~~~~~~~~~~~~~~ XV.01) What uucp, news, and mail software works under Linux ? XV.02) So where are the sources ? XV.03) Do I really need the sources ? XV.04) How do I get my system a news/mail/uucp feed ? XV.B. UUCP ~~~~~~~~~~ XV.05) Why do I get 'timeout' on connections when I upgraded to uucp-1.04 ? XV.06) Why doesn't anonymous uucp seem to work ? XV.C News ~~~~~~~~~ XV.07) What newsreader is best ? XV.08) with trn - why do I get the message 'dbinit failed' ? XV.09) why is my 'nn' database getting continuously corrupted ? XV.10) why can't I post to moderated groups ? XV.11) Why do I have problems that appear to be permission-related ? XV.12) Why doesn't SLS have the 'Performance Release' of C-news? INN ? NNTP ? XV.13) Why does doexpire say "severe space shortage" when there's lots of room ? XV.14) How do I set up NNTP? XV.D. Mail ~~~~~~~~~~ XV.15) Why is my hostname.domainname not in my headers and something funky's there ? XV.16) Why can't elm write to my mailbox ? XV.17) is sendmail+IDA available for Linux instead of smail ? -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # LaBRI | # # 351 cours de la Liberation | e-mail: corsini@geocub.greco-prog.fr # # 33405 Talence Cedex | e-mail: corsini@labri.u-bordeaux.fr # # | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- There will be a sig when our local net is reliable. For now, I would rather stay anonymous. Newsgroups: comp.os.linux,comp.os.linux.announce,comp.answers,news.answers Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!gatech!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!uunet!mcsun!julienas!geocub!labri.u-bordeaux.fr!corsini From: corsini@labri.u-bordeaux.fr Subject: Linux Frequently Asked Questions 1/6 [monthly posted] Message-ID: Followup-To: poster Summary: Linux, a small and free unix-like for 386-AT computers. Sender: corsini@greco-prog.fr (Marc-Michel CORSINI) Supersedes: Reply-To: linux@labri.u-bordeaux.fr Organization: Greco Prog. CNRS & LaBRI, Bordeaux France References: Date: Wed, 21 Jul 1993 09:52:10 GMT Approved: news-answers-request@MIT.Edu Expires: Fri, 3 Sep 1993 09:51:58 GMT Lines: 954 Xref: senator-bedfellow.mit.edu comp.os.linux:52221 comp.os.linux.announce:923 comp.answers:1373 news.answers:10586 Archive-name: linux-faq/part1 Last-Modified: 93/07/11 Version: 1.20 ********************************************************* * * * Answers to Frequently asked questions about Linux * * * ********************************************************* This post contains Part 1 of the Linux FAQ (6 parts) Hi Linuxers! The original FAQ 1st version was posted on Dec. 19, 1991 by Robert Blum. Since Feb. 1992, I'm the maintainer of this FAQ. Most credits to Linus, Robert and Ted for the departure point of this work. I haven't systematically copyrighted all the contributions, so thanks to every one who participated even indirectly to this FAQ. Since September 1992, the FAQ is co-written by: WHO (WHAT) E-MAIL ============================================================================= Michael K. Johnson (META-FAQ) johnsonm@stolaf.edu Matt Welsh (GENERAL INFO) mdw@tc.cornell.edu Zane Healy (BBS INFO) healyzh@holonet.net Matt Welsh (INSTALLATION) mdw@tc.cornell.edu Peter MacDonald (SLS INFO) pmacdona@sanjuan.uvic.ca Mark Komarinski (DOS) komarimf@craft.camp.clarkson.edu Drew Eckhardt (SCSI) drew@cs.colorado.edu Rick Miller (DEVICE INFO) rick@ee.uwm.edu Hongjiu Lu (GCC) hlu@eecs.wsu.edu Krishna Balasubramanian (X11) balasub@cis.ohio-state.edu Rick Sladkey (EMACS) jrs@world.std.com Philip Copeland (NET INFO) p_copela@csd.bristol-poly.ac.uk Brian McCauley (LPD) B.A.McCauley@bham.ac.uk Vince Skahan (UUCP/NEWS..) vince@victrola.sea.wa.us Dirk Hohndel (PROOF READER) hohndel@informatik.uni-wuerzburg.dbp.de Marc-Michel Corsini (FAQ collector) corsini@labri.u-bordeaux.fr ============================================================================= If anyone is interested in participating with this FAQ, just send me a note with: your name/e-mail and the section you want to maintain. Many of the questions could be avoided, if people had read the FAQ of the following newsgroups: news.announce.newusers, comp.lang.c, gnu.emacs.help, comp.unix.questions, comp.windows.x.i386unix. [The last-change-date of this posting is always "two minutes ago". :-)] This is the introduction to a list of frequently asked questions (FAQ for short) about Linux with answers (Yeap!). This article contains a listing of the sections and queries. This FAQ is supposed to reduce the noise level ;-) in the comp.os.linux newsgroup, and spare the time of many activists. I will cross-post it each month to news.answers. This FAQ is NOT an introduction to UNIX, there are many books for unix, and there is *also* a FAQ for unix (it's the one of comp.unix.questions which contains things such as "How do I remove a file named -". I DO NOT WANT TO ADD SUCH THINGS IN THIS FAQ DEVOTED TO LINUX. Some books to read: The C Programming Language: Kernighan & Ritchie POSIX Programmer's Guide: D. Lewine Unix System Administration Handbook: Nemeth, Snyder & Seebass. Unix for the Impatient: Abrahams & Larson Unix System V Release 4, An Introduction, by Rosen, Rosinski and Farber; Publisher Osborne MacGraw-Hill. The UNIX Programming Environment: Brian Kernighan and Rob Pike; Prentice-Hall, 1984 The X Windows System in a Nutshell: O'Reilly. ..... This FAQ is available at the main Linux sites in the doc directory, the addresses are given in section II. of this FAQ. There is also an archive of (all) FAQs at rtfm.mit.edu [18.70.0.224]. Have a look in the anonymous ftp directory: /pub/usenet/news.answers/linux-faq. If you do not have anonymous ftp access, you can access the archive by mail server. Send mail to mail-server@rtfm.mit.edu with the words "help" and "index" in the body on separate lines for more information. The information in this multi-parts FAQ is likely to change relatively quickly. If this is more than two months old (it was released on July 1993) then you should obtain a new copy. See the paragraph above for details of where to find a more recent version. Please suggest any change, rephrasing, deletions, new questions, answers ... Please include "FAQ" in the subject of messages sent to me about FAQ. Please send them to linux@labri.u-bordeaux.fr whatever will be the From part of this message. Finally discussion about the FAQ can be done on the DOC Channel (see section II). Regards, Marc-Michel Thanks to Martin Schulze (Martin.Schulze@Informatik.Uni-Oldenburg.de), the FAQ can be found in LaTeX version --- the first attempt was done by Pepe de flores --- at tsx-11.mit.edu in pub/linux/docs. Future Plan: This document is under re-organization. Send suggestions to linux@labri.u-bordeaux.fr ================================8<=====8<============================== CONTENTS (of this part) 0. WARNINGS (part1) I. LINUX GENERAL INFORMATION (part1) II. LINUX USEFUL ADDRESSES (part1) ================================8<=====8<============================== 0. WARNINGS =========== The FAQ contains a lot of information sometimes I've put it down in 3 different ways because people seems not to understand what they read (or what I wrote, you know I'm just a froggy and english is not my natural language). What I mean is that not all is in the FAQ but many things are there, so please just take time to read it this will spare a lot of the other linuxers [and if you think I should rephrase some Q/A just drop me a note with the corrections]. As the Linux kernel changes monthly (and even more ...), I define 2 pseudo variables a la C one for the version, and one for the date of the release. #define CURRENT_VERSION 0.99 /* the current version */ #define PATCH_LEVEL pl11 /* the patch level */ #define KERNEL_DATE 18, Jul. /* Date of the CURRENT_VERSION */ In what follows I'll consider CURRENT_VERSION as the current version. > From: torvalds@cs.Helsinki.FI (Linus Torvalds) > Newsgroups: comp.os.linux.announce > Subject: [ANNOUNCE]: linux 0.99 patchlevel 11 > Followup-To: comp.os.linux > Date: 18 Jul 1993 20:13:34 -0400 > Organization: University of Helsinki, Department of Computer Science > Reply-To: torvalds@cs.Helsinki.FI (Linus Torvalds) > > > Nic.funet.fi now contains the newest linux kernel: this is 0.99 > patchlevel 11. I've had a few problems with the "ls" and "dir" commands > on nic, so if this is true for others as well, you may not be able to > see the files, but they are available as: > > pub/OS/Linux/PEOPLE/Linus: > > - RELEASE-0.99.11 -- release notes > - README -- same as RELEASE.. > - linux-0.99.11.tar.gz -- full sources > - linux-0.99.patch11.gz -- patches against pl10 > > I don't know if I'll actually have the energy to update the RELEASE > files every time, but that's the idea (with README being a copy of the > latest one). The README gives info on what changed, how to install > it, how to compile the kernel, and what to do with error dumps like "unable > to handler kernel paging request" and the like. Maybe it results in > better bug-reports. Maybe not. > > Pl11 uses (as you all know by now) C++, so you'll need to have g++ > installed. Also, there seems to be problems compiling the newer kernels > with gcc-2.3.3: there have been various reports that even pl10 (which > isn't C++) had problems which go away when compiled with gcc-2.4.3 or > newer. > > As always, please send any bug-reports etc at least Cc'd to me: I'll be > wanting to know if things work or not. > > Linus > > ---------- cut-down version of README ---------- > > Linux kernel release 0.99 patchlevel 11 > > These are the release notes for linux version 0.99.11. Read them > carefully, as they explain how to install the kernel, and what to do if > something goes wrong. > > CHANGES since 0.99 patchlevel 10 and earlier: > > - The keyboard is dynamically changeable (this is true of pl10 as > well), and you need to get the "keytables.tar.z" archive to set the > keyboard to suit your taste unless you want to live with the default > US keymaps. > > Use the "loadkeys map/xxx.map" command to load the keyboard map: you > can edit the maps to suit yourself if you can't find a suitable one. > The syntax of the keyboard maps should be obvious after looking at > the examples. > > - The memory manager has been cleaned up substantially, and mmap() > works for MAP_PRIVATE. MAP_SHARED is still not supported for > anything else than /dev/mem, but even so it actually is usable for a > lot of applications. The shared library routines have been rewritten > to use mmap() instead of the old hardcoded behaviour. > > - The kernel is now compiled with C++ instead of plain C. Very few > actual C++ features are used, but even so C++ allows for more > type-checking and type-safe linkage. > > - The filesystem routines have been cleaned up for multiple block > sizes. None of the filesystems use it yet, but people are working on > it. > > - named pipes and normal pipes should hopefully have the right select() > semantics in the presense/absense of writers. > > - QIC-02 tape driver by Hennus Bergman > > - selection patches in the default kernel > > - fixed a bug in the pty code which led to busy waiting in some > circumstances instead of sleeping. > > - Compressed SLIP support (Charles Hedrick). See net/inet/CONFIG > > [ rest deleted - see the README for more info ] I. LINUX GENERAL INFORMATION ============================= *** This section is maintained by Matt Welsh (mdw@tc.cornell.edu). Mail *** him if you have corrections, additions, other questions, etc. *** Last update July 1993. I.01) What is linux? ANSWER: Linux is a free, copylefted full-featured UNIX for 386 and 486 machines which use the AT bus. It is still in "beta testing" (the current version number of the kernel is less than 1.0) but is being used worldwide by thousands (?) of people. (*) Free means that you may use it, change it , redistribute it, as long as you don't change the copyright. Free does not mean public domain. Linux is copylefted under the GNU General Public License. Linux is a freely distributable UNIX clone. It implements a subset of System V and POSIX functionality, and contains a lot of BSD-isms. LINUX has been written from scratch, and therefore does not contain any AT&T or MINIX code--not in the kernel, the compiler, the utilities, or the libraries. For this reason it can be made available with the complete source code via anonymous FTP. LINUX runs only on 386/486 AT-bus machines; porting to non-Intel architectures is likely to be difficult, as the kernel makes extensive use of 386 memory management and task primitives. I.02) Does Linux support GCC, TCP/IP, X-Windows, MGR, etc.? ANSWER: Linux currently supports and uses a large amount of the GNU software (i.e. GCC, bison, groff, etc) so all of that functionality is there. X-Windows is also available, along with many client applications. MGR is there too. TCP/IP is available. I use Linux boxes as Xterminals and my "own" asterix has mounted half a Gig via NFS. Mitch DSuoza is running an anonymous FTP server on his Linux box. This is definitely more than testing. See section IX of this FAQ ("Features")! In short, Linux supports many, many features and programs. One of the biggest questions is: "Does ***** work on Linux? Does Linux have *****?" The answer, usually, is "yes". Just check out the rest of this FAQ, the newsgroup, as well as the files on the FTP sites. I.03) What is the current state of Linux? ANSWER: There are two main groups devoted to linux: The original one: comp.os.linux newsgroup, where the INFO-SHEET is periodically posted. The selective one: comp.os.linux.announce, which is a moderated newsgroup, has a lot less traffic, and contains all of the "IMPORTANT" information on Linux. I.04) Linux sounds great, but where do I get it and how do I install it? ANSWER: FIRST read this FAQ, and especially section III (installation). There is no single, "official" release of Linux--- instead, there are several independent releases, all with their own advantages and disadvantages. The SLS release is the de facto standard. Choose a "release" of Linux (such as the SLS release, TAMU, bootdisk/ rootdisk, etc). Download from your nearest FTP site, and put it on floppies. Specific instructions are given in section III and in the README files for each release. Note that some releases only give you the kernel and a few utilities, and others give you everything you need (including X11, GCC, and more) in that latter case the downloading is close to a douzen of SOFT. Just check out section III for more info. I.05) Sounds good, but all of these docs are very confusing. Is Linux really difficult to install and use? ANSWER: This FAQ, as you can see, if very large. This is mostly because it's full of every single frequently asked question about Linux on the net. In essence, it's very simple: to get started with Linux, download the SLS release, put it onto floppies (see section III), repartition your drive, and install the software. If you're new to the UNIX world, Linux (as with any UNIX) is going to be difficult to understand at first. There isn't a lot of real documentation (other than this FAQ) out there. The Linux Doc Project (mail `mdw@tc.cornell.edu' for info) is working on a set of Linux manuals which should solve this problem. However, Linux is a hacker's UNIX, in many ways: it was developed by experienced UNIX hacks for experienced UNIX hacks. People are working on making it more "newbie-friendly", however, keep in mind that this is an afterthought. Linux was never meant to be the huge popular free UNIX that it has become, and the lack of documentation doesn't bother UNIX wizards who can figure it out from just poking around. I.06) What's the best advice you can give to a Linux newbie? ANSWER: Go read a *good* book on using UNIX before you even get started. Jumping cold-turkey into the Linux world from DOS is going to be quite difficult. Also remember that you'll be running the system, as well as using it, so get a book on UNIX system administration. Too many folks post questions to comp.os.linux which aren't Linux specific at all, and thus aren't covered in this FAQ. (i.e. "How to remove a file called '-i'?). If you can't figure out something, it's more than likely a misunderstanding of UNIX concepts, not a bug in Linux. Please read up on UNIX (see the comp.unix.questions FAQ; that's a good one) before you get started. I.07) Does it run on my computer? ANSWER: Linux has been written on a clone-386, with IDE drives and a VGA screen. It should work on most similar setups. The harddisk should be AT-standard, and the system must be ISA. (though *some* EISA success has been reported [T. Koenig], Linux doesn't take advantage of the EISA structure). A high density floppy drive -- either 5.25" or 3.5"-- is required for installation. Finally, most common SCSI controllers are supported (see the section devoted to SCSI in this FAQ). {Drew's information: Linux supports anything that's register compatable with a WD1003 MFM disk controller (ie, the original PC-AT disk controller.) Most AT MFM, RLL, ESDI, and IDE setups look like this. There is an alpha driver for the XT disk controller, but in general it's best to have an AT controller. Mail smackinla@cc.curtin.edu.au about the XT controller. Generally, the rule is if you have the disk configured into the CMOS setup of your machine, it will work (because the BIOS is talking to a WD 1003 compatable board), otherwise it won't.} IDE and MFM seem to work with no problem. It works, also, for some ESDI drive (you might have to comment out the "unexpected hd interrupt"-messages). There exists a high-level SCSI driver, under which low-level drivers are placed; a ST-01/ST-02 low driver has been completed see the FEATURES and the USEFUL ADDRESSES sections. Otherwise the requirements seem relatively small: a 386 (SX, DX or any 486). Any video card of the following: Hercules, CGA, EGA, (S)VGA. It needs at least 2M to run (with SWAP), and 4M is definitely a plus. It can happily use up to 16M (and more if you want). BTW There are problems with some MAXTOR drives on high speed machines (sometimes switching off "turbo" helps). There may also be a problem with "slow" memory (under 60ns) on fast machines. Again, the solution is to turn off "turbo". Mixed SIMMs (3 and 9 chip versions) have also reported to be problematic. NOTE: It doesn't run (yet?) on a MCA machine (such as the IBM PS/2 line). I.08) How much space will Linux take up on my hard drive? ANSWER: It depends on which release you choose. See the section INSTALLATION below. Usually it's somewhere between 10 megs (for a nominal system+swap space) and 80 megs (for everything plus space for user directories, etc.). I.09) Will Linux run on a PC or 286-AT? If not, why? ANSWER: Linux uses the 386 chip protected mode functions extensively, and is a true 32-bit operating system. Thus x86 chips, x<3, will simply not run it. I.10) Will Linux run on a 386 Laptop? ANSWER: It works, including X on most of them. I.11) Why the suggested 4Meg, for Linux? ANSWER: Linux uses the first 640k for kernel text, kernel data and buffercache. Your mother board may eat up 384K because of the chipset. Moreover there is: init/login, a shell, update possibly other daemons. Then, while compiling there is make and gcc (2.01 ~770k). So you don't have enough real memory and have to page. I.12) How would this operate in an OS/2 environment? ANSWER: Linux will coexist with *ANY* other operating system(s) which respects the "standard" PC partioning scheme - this includes Dos, Os/2, Minix etc. WARNING: Linux and OS/2 *can* co-exist on the same machine. BUT, you cannot use Linux's fdisk to make Linux partitions! See the warnings in section III about Linux and OS/2. I.13) How long has Linux been publicly available? ANSWER (partial): Few months, v0.10 went out in Nov. 91, v0.11 in Dec. and the current version CURRENT_VERSION is available since KERNEL_DATE. But even it is recent it is quite reliable. There are very few and small bugs and in its current state it is mostly useful for people who are willing to port code and write new code. As Linux is very close to a reliable/stable system, Linus decided that v0.13 will be known as v0.95. Believe it or not: the whole story started (nearly) with two processes that printed AAAA... and BBBB... I.14) How reliable is Linux, anyway? ANSWER: Very much so. The only real "bugs" that we see are with alpha drivers (that's why they're alpha) and with some parts of the TCP/IP code. For 99% of applications, however, Linux is very robust. Linux and Xwindows is faster on a 486-33 than on many Sun workstations with the same amount of RAM, running SunOS. I.15) What is the proper pronounciation for "Linux"? ANSWER: (Linus himself) 'li' is pronounced with a short [ee] sound: compare prInt, mInImal etc. 'nux' is also short, non-diphtong, like in pUt. It's partly due to minix: linux was just my working name for the thing, and as I wrote it to replace minix on my system, the result is what it is... linus' minix became linux. I originally intended it to be called freax (although buggix was one contender after I got fed up with some of the more persistent bugs :) and I think the kernel makefiles up to version 0.11 had something to that effect ("Makefile for the freax kernel" in a comment). But arl called the linux directory at nic.funet.fi pub/OS/Linux, and the name stuck. Maybe just as well: freax doesn't sound too good either (freax is obviosly free + freak + the obligatory -x). (Rick's note for English speakers: Linux - "LIH-nuhks".) I.16) What's about the copyright of linux? ANSWER: This is an except of the RELEASE Notes v.095a: Linux is NOT public domain software, but is copyrighted by Linus Torvalds. The copyright conditions are the same as those imposed by the GNU copyleft: The GNU GENERAL PUBLIC LICENSE Version 2, June 1991 is part of the source tree. I.17) Should I be a UNIX and/or a DOS wizard to install/use Linux? ANSWER: Not at all, just follow the install rules, of course it will be easier for you if you know things about Unix. Right now Linux is used by more than BIGNUM persons, very few of them enhance the kernel, some adds/ports new soft, most of us are only (but USEFUL) beta testers. Last but not least, various Linuxers work on manpages, newuser_help, file-system organization. So join us and choose your "caste". It is even used in production environments (Dr. G.W. Wettstein). I.18) Does Linux use TSS segments to provide multitasking? ANSWER: Yes! I.19) If my PC runs under Linux, is it possible to ftp, rlogin, rsh etc.. to other Unix boxes? ANSWER: Yes; Linux supports serial communications (kermit), pseudo-SLIP (with ka9q), and TCP/IP. SLIP is included in the CURRENT_VERSION.PATCH_LEVEL. Read the NET-FAQ (see section XIII) for information on networking. I.20) Does linux do paging? Can I have virtual memory on my small machine? ANSWER: Yes, it does. Generally you set up a swap file or partition, and enable it with the "swapon" command. Voila! Virtual memory. I.21) Can I have tasks spanning the full 4GB of addressable 386 memory? No more 64kB limits like in coherent or standard minix? ANSWER: Since 0.97 it uses 4 GB Process Space, 3 for userspace and 1 for the kernel space. I.22) Does the bigger program sizes mean I can run X? ANSWER: Yes! See section XII below for details on X11. I.23) What are the differences, pros and cons compared to Minix ? ANSWER (partial): Cons: - Linux only works on 386 and 486 processors. - Linux needs 2M of memory just to run, 4M to be useful. - Linux is a more traditional unix kernel, it doesn't use message passing. Pros: - Linux is free, and freely distributable, BUT copyrighted. - Linux has some advanced features such as: - Memory paging with copy-on-write - Demand loading of executables - Page sharing of executables - Multi-threaded file system - job control and virtual memory, virtual consoles and pseudo-ttys. - Linux is a more traditional unix kernel, it doesn't use message passing. I.24) What are the pros and cons compared to 386BSD ? ANSWER: Linux and 386BSD started out as completely different projects, with completely different goals and design criteria in mind. there are newsgroups devoted to 386BSD : comp.os.386bsd.* - I have seen in may 93 the first attempt for 386BSD FAQ. Nevertheless the Linux FAQ is not bug free, and contains some outdated information. - 386BSD can do POSIX and BSD - Linux can do POSIX, SYSV and some BSD stuff - Linux was developed with portability in mind. So it's not directly System V, nor is it directly BSD. It's the best of both worlds, a la SunOS. :) For most of the *nix* users both systems are fairly usable, but none of them are bug free. I.25) Can't we split comp.os.linux ? ANSWER: The process is underway to split comp.os.linux in 4 different groups: comp.os.linux.admin comp.os.linux.development comp.os.linux.help comp.os.linux.misc The vote will continue until 4 august 1993 at 23:59 UTC send mail to ikluft@amdahl.com to get the Call For Vote II. LINUX USEFUL ADDRESSES ========================= II.A. LINUX ON THE NET: ftp, mailing-list II.B. OBTAINING LINUX FROM BBS'S: everything about bbs II.A. LINUX ON THE NET ~~~~~~~~~~~~~~~~~~~~~~ II.01) Where can I get linux? ANSWER: Linux (all the software, binaries, sources, releases, and so on), can be retrieved via anonymous FTP from : [ Major sites ] EUROPE: nic.funet.fi (128.214.6.100): directory /pub/OS/Linux ftp.uni-erlangen.de (131.188.1.43) directory /pub/Linux US: tsx-11.mit.edu (18.172.1.2): directory /pub/linux sunsite.unc.edu (152.2.22.81): directory /pub/Linux [ Mirroring sites (some of them, there are lots now) ] AUSTRALIA: kirk.Bond.edu.au (131.244.1.1) directory /pub/OS/Linux EUROPE: src.doc.ic.ac.uk (146.169.2.1): directory packages/Linux ftp.mcc.ac.uk (130.88.200.7): directory pub/linux ftp.dfv.rwth-aachen.de (137.226.4.105): directory /pub/linux ftp.informatik.rwth-aachen.de (137.226.112.172): directory /pub/Linux ftp.ibr.cs.tu-bs.de (134.169.34.15): directory /pub/os/linux JAPAN: kuis.kyoto-u.ac.jp (130.54.20.1): directory /Linux /Linux/mirror (for the tsx mirror) KOREA: cair.kaist.ac.kr (143.248.11.170): mirror of sunsite; directory pub/Linux US: wustl.wuarchive.edu (128.252.135.4): directory /pub/mirrors4/linux ftp.eecs.umich.edu (141.212.99.7): directory linux You might want to check out which of these is the most up-to-date. > (From: Lee M J McLoughlin ) > src.doc.ic.ac.uk: > > We are also on Janet (the main UK academic network) as > uk.ac.ic.doc.src (000005102000). > > More useful perhaps is we are the only big archive available via FTAM, > the ISO equivalent to FTP. We can be reached either over the > internet or janet (see above addresses) or via the European IXI > network on 204334504108 If you have no FTP capability, you are in trouble. See the next Q/A. Also, you'll need the "UNCOMP.EXE" and "RAWRITE2.EXE" programs for DOS (to make your install disks). These are usually found in the Linux directories on the above FTP sites. II.02) I do not have FTP access, what can I do to get linux? ANSWER: You can either read the next subsection related to BBS's otherwise, read the following. The SLS release is distributable by snail-mail on floppies for those without net access; see the SLS section in section III of this FAQ for more. Try to contact a friend on the net with those access, or try mailserver/ftpmail server otherwise contact tytso@ATHENA.MIT.EDU. You might try mailing "mailserver@nic.funet.fi" with "help" in the body of the mail. If you choose ftpmail server (example: ftpmail@doc.ic.ac.uk, ftpmail@decwrl.dec.com), with "help" in the body, the server will send back instructions and command list. As an exemple to get the list of files available at tsx-11 in /pub/linux send: mail ftpmail@decwrl.dec.com subject: anything reply connect tsx-11.mit.edu chdir /pub/linux dir -R quit In Europe ftp.informatik.tu-muenchen.de is accessible via e-mail (send "help" in the body to ftp-mailer@informatik.tu-muenchen.de) II.03) Is there a newsgroup or mailing-list about linux? ANSWER: The comp.os.linux.announce is the place were all the announces related to linux are posted. The comp.os.linux newsgroup is literally *teeming* with postings. So, to the first question, yes. :) The older newsgroup, alt.os.linux, is being phased out and shouldn't be used anymore. If you don't have news access you can get the digest of postings via e-mail from: Linux-activists-request@news-digests.mit.edu. This list is gatewayed to the newsgroup as well. Only use the 'request' address for subscribe/unsubscribe messages; don't post those to the newsgroup or to the actual mailing list. And last but not least there is the original mailing-list, which is now a multi-channel list. contact linux-activists-request@niksula.hut.fi This multi-channel list is for developpers mainly, see section II for more information. II.04) Where can I get my questions answered? How about bug-reports? What do I put into a post to comp.os.linux? ANSWER: (Paul Gortmaker pg@cain.mmtc.rmit.oz.au) You can post your problem to the above group, comp.os.linux. BUT, BEFORE YOU DO THIS, PLEASE READ THE FOLLOWING GUIDELINES. If you have read the FAQ, man pages, etc, and you still haven't solved your problem, then check to make sure you have got the latest version of whatever it is that you are working with. Check the dates and revision numbers of your versions with the versions on your local ftp site (tsx-11.mit.edu , sunsite.unc.edu ?). This includes (most importantly) the kernel itself. Make sure you have applied the latest patches and recompiled the kernel, or have got the kernel "Image" from someone who has done so. And, of course check comp.os.linux for info too. If you have a genuine problem, chances are that you aren't the first one to find it. So it has probably already been reported (...and fixed???). For example, if you are having trouble with say Xconfig for some strange VGA card, and you use nn to read comp.os.linux, then you could invoke nn as follows: nn -x -s 'config' comp.os.linux and it will find all the latest articles with the word config in their subject for you. This will be one of the most up to date sets of information that you can get -- DON'T OVERLOOK IT !!! (You can check the man pages of your news reader to determine the options that do the same as the above.) OK, so you've done all the above, spent 40 hours trying to figure it out, have had a nervous breakdown, your girlfriend/boyfriend has stopped talking to you, and you decide that you will turn to the Linux community for help. Here are some guidelines on posting that will ensure that you get a quick response, and that you hopefully don't get flamed. 1) Choosing a Subject: It is important to try and squeeze as much information into as few words as possible. If you can manage it, try and put the package name, version, and problem into the subject. But don't make it too long, or the middle will get chopped out. For example "I'm having problems with poeig-1.1.tar.Z on my 486 with 0.99p6" will probably appear to everybody as "I'm having prob <> ith 0.99p6" Not very useful... What should have been used was something like: "poeig-1.1 w 99p6 wont compile" would be much better, and relays that you are having trouble with getting it to compile. (Note that this is just an example, I have no knowledge of problems with poeig!) Also, (unless you like bugs -> getting flamed!) DON'T claim you have found a bug, unless you are ABSOLUTELY SURE! Nothing p***es developers off more than erroneous bug reports. 2) Keywords: If your news poster program asks for keywords, try and put in some useful descriptive words, so that others can use them for a meaningful search. 3) Body of the Article: There are some key things that need to be included in the body of the article. (a) The name and version of the thing that you are having the problem with. (b) The type of problem, ie compilation, execution, etc. -- (c) versions of related software, ie if compilation is the problem, then the version of GCC you are runnning is relevant. If you are having trouble with a program that uses X, then the version of X you are using is relevant. (d) The version and patchlevel of the kernel you are using at present. (ie. 0.99p7 or whatever) (e) the type or brand of any related hardware, ie. if you are having problems with networking, then you would want to say that you are using a Western Digital SMC Elite 16 or whatever your ethernet card is. (f) Any relevant error messages that were reported by the system during the problem. And, of course, there are some things that one should NOT put in the article. For example, don't post a 30 page configuration file and expect anybody in their right mind to look through it. And similarly for any HUGE files. If they are relevant to your problem, then someone will respond by asking you something like "Did you check line 32 in file such and such???" And try to avoid negative comments like "The documentation isn't fit for my dog." If you have a bone to pick, do it via e-mail, so the rest of us don't have to read a flame war! It just adds to the amount of useless noise on comp.os.linux, which already takes too long to scan through. Besides, the developers are doing this FOR FREE. THEY ARE NOT OBLIGATED TO DO ANYTHING. DON'T ABUSE THEM!!! (Or they might just go away, which hurts us all.) Well, with all this in mind, hopefully you will get a quick response to your problem, and maybe someday you will be able to answer someone else's problem from the experience you gain! II.05) Could you be more explicit about the multi-channel list? ANSWER: Well, there are many things to say: - these channels are rather devoted to hackers - the ones I am aware of are: GCC, MGR, X11, SCSI, NEW-CHANNELS, MSDOS (emulator discussion) , NORMAL, KERNEL, FTP, LAPTOP, DOC, NET, CONFIGS, LINUXNEWS ... - whenever you want to JOIN or LEAVE a channel you have to contact the request address - you have to use special header (X-Mn-Key and Mn-Admin); X-Mn-Key is *ONLY* for regular post, the X-Mn-Admin is for *REQUEST* (Ari Lemmke: 1 Nov. 1992): Hmmm.... It seems our list has now about 1500 users in 21 channels (mailing lists). 3960 without uniq. "echo foo | mail linux-activists-request@niksula.hut.fi" to get the Mail-Net User Guide. II.06) How can I join the channel XXX on the linux-activists mailing list? ANSWER: just send a mail to the request address with help in the body; you will get back a mail which gives you the list of channels and the way to join/leave them. Basically you send mail to the request address with the line: X-Mn-Admin: join II.07) How can I leave the channel XXX on the linux-activists mailing list? ANSWER: Same as above, basically. You send mail to the request address that contains the line: X-Mn-Admin: leave II.08) I'm not an hacker, what are the channels I could be interested in? ANSWER: Probably these are the most interesting for you (IMHO) Channel NORMAL: ~~~~~~~~~~~~~~~ Channel normal is the former Linux-Activists mailing list (all the people who were on the old Linux-Activists list are moved to this channel). Channel DOC: ~~~~~~~~~~~~ This channel is for Linux document "project". Discussion about Linux documents, manuals, papers, etc. Channel CONFIGS: ~~~~~~~~~~~~~~~~ This channel will be devoted to send submissions of systems that have Linux already running, AND those that, for any reason, can't get it to work yet. Mainly, what it's need from all the channel users is to send their hardware configuration list (as complete as possible). Include anything that you feel pertinent for information: CPU, motherboard, RAM amount, HD & floppy controller, BIOS, monitor, video card & memory, network adapter, etc. If you are having trouble with your current system, or you find out that a program doesn't work properly on your system due to a HARDWARE problem, it may be useful for us to know your configuration; maybe you can get a lot of help. Channel LINUXNEWS: ~~~~~~~~~~~~~~~~~~ The LINUXNEWS channel will be used for distribution of Linux News, a weekly (if I can find the time) summary of things that happen in the Linux community. Discussion is not encouraged, if you have complaints or suggestions, send them directly to me (Lars.Wirzenius@helsinki.fi). Channel NEW-CHANNELS: ~~~~~~~~~~~~~~~~~~~~~ On the future users on this channel get the information about new channels created. By this way you can join the channels you want, and do not need to send mail to Mail-Net info server or listen rumours. II.09) Does there exist a place where the traffic of the newsgroup is kept? ANSWER: Yes, on nic and tsx-11 (see the ftp addresses above), and since 12th March, a Gopher server is up at beryl.daimi.aau.dk (130.225.16.86). The archives go back to Nov. 18. 91. Also recently a WAIS server for the linux mail archive has been setup at fgb1.fgb.mw.tu-muenchen.de. Contact tw@fgb1.fgb.mw.tu-muenchen.de for more info. All back issues of the Digest are available on tsx-11.mit.edu [18.172.1.2] in the following place(s): pub/linux/mail-archive ~/Volume? /* where '?' in volume # ~/digestnnn.Z * and nnn is issue # */ II.B OBTAINING LINUX FROM BBS'S ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *** Last Update July 1993. II.10) I don't have access to FTP, how can I obtain Linux? ANSWER: Linux is available from various BBS's around the world. II.11) I got this FAQ from a local BBS, or a friend, and I see there is a newsgroup called comp.os.linux . I don't have access to USENET or mail, so how can I get the messages? ANSWER: Some of the BBS's on FidoNet carry comp.os.linux as a FidoNet conference. Also some of the other BBS's carry it in some form or other. II.12) Do BBS's offer anything that the Internet does not? ANSWER: Yes, on the information side there are the UNIX conferences on both the RIME network and FidoNet. Although they are not dedicated to linux, a large amount of the messages are linux related. Also at least one software package being developed for linux, and also one port is available via BBS's long before they are available via anonymous FTP. II.13) What is a BBS? ANSWER: A BBS is a Bulletin Board System, it let's you transfer message's and file's via your phone line and all you need is a computer with communications software and a modem. Some BBS's transfer message's among each other forming large computer network's similar to USENET. The most popular of these in the US are FidoNet and RIME. II.14) How can I get a (Near) complete list of BBS's that carry Linux? ANSWER: Zane Healy (healyzh@holonet.net) posts a list of all known BBS's that carry Linux to comp.os.linux.announce as well as the RIME and Fidonet UNIX conferences on the 1st and 15th of each month. ===================8<==========>8================ -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # LaBRI | # # 351 cours de la Liberation | e-mail: corsini@geocub.greco-prog.fr # # 33405 Talence Cedex | e-mail: corsini@labri.u-bordeaux.fr # # | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- There will be a sig when our local net is reliable. For now, I would rather stay anonymous. Newsgroups: comp.os.linux,comp.os.linux.announce,comp.answers,news.answers Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!gatech!swrinde!cs.utexas.edu!uunet!mcsun!julienas!geocub!labri.u-bordeaux.fr!corsini From: corsini@labri.u-bordeaux.fr Subject: Linux Frequently Asked Questions 2/6 [monthly posted] Message-ID: Followup-To: poster Summary: Linux, a small and free unix-like for 386-AT computers. Sender: corsini@greco-prog.fr (Marc-Michel CORSINI) Supersedes: Reply-To: linux@labri.u-bordeaux.fr Organization: Greco Prog. CNRS & LaBRI, Bordeaux France References: Date: Wed, 21 Jul 1993 09:52:17 GMT Approved: news-answers-request@MIT.Edu Expires: Fri, 3 Sep 1993 09:51:58 GMT Lines: 1312 Xref: senator-bedfellow.mit.edu comp.os.linux:52223 comp.os.linux.announce:925 comp.answers:1375 news.answers:10588 Archive-name: linux-faq/part2 Last-Modified: 93/07/11 Version: 1.20 ********************************************************* * * * Answers to Frequently asked questions about Linux * * * ********************************************************* This post contains Part 2 of the Linux FAQ (6 parts). It must be read *after* the first part. ================================8<=====8<============================== CONTENTS (of this part) III. INSTALLATION, and COMMON PROBLEMS (part2) IV. SOME CLASSICAL PROBLEMS (part2) V. LINUX and DOS (part2) ===================================8<====>8============================ III. INSTALLATION, SETUP, and COMMON PROBLEMS ============================================= *** Note: this FAQ section should be the most 'reliable' source for *** installation info. Please mail any corrections or changes to this *** section's coordinator, Matt Welsh (mdw@tc.cornell.edu). *** Last update July 93. III.A. WHERE TO START: What are the reliable sources of information III.B. LINUX PACKAGES: Where and how install a complete Linux package III.C. SOME COMMON PROBLEMS: Simple problems and simple solutions III.A. WHERE TO START ~~~~~~~~~~~~~~~~~~~~~ III.01) I want to install Linux on my machine. Where do I start? ANSWER: The first thing you should do is read through the various introductory files, and ESPECIALLY the FAQ (this file). Especially this section :). A lot of effort has been done on these intro files, but note that some of them conflict with each other and cover older versions of Linux. When in doubt consult this file. These files are all found on tsx-11.mit.edu:/pub/linux/docs... FAQ The Linux Frequently Asked Questions list It's sitting in your hands now. This section is probably the best place to start to get the most up-to-date Linux installation information. INFO-SHEET Linux Information Sheet, by J. Winstead/L. Wirzenius/M. Welsh/M. Johnson This is a collection of general info about Linux. It's a good place to start if you've never heard of the package before. META-FAQ Linux Meta-FAQ, by L.Wirzenius/M. Welsh/M.Johnson This is a compilation of Linux sources of information: e.g., what the newsgroups are, where the FTP sites are, where to find FAQ's. README.kernel Kernel compilation README file, by L. Wirzenius/L. Torvalds This is the README notes for recompiling the Linux kernel from the sources. You don't need it unless you're planning to upgrade your kernel by compiling it yourself. Others Every "release" of Linux (such as SLS, boot/root, HLU's disks, etc., see below) has its own up-to-date README files and docs that explain how to install that release. This FAQ section summarizes, but for more info on how to install Linux, read the READMEs and docs for the release that you choose. Old docs There are a number of obsolete, old docs lying around. Most of these tell how to install Linux from the old boot/root disk combo. I DO NOT SUGGEST that you use these docs unless you know what you're doing-- the best thing for beginners to do is read this FAQ and install the SLS release (using the docs and READMEs for the SLS release). These old docs are things like "install.txt", "guide.txt", "RELNOTES", "CHANGES", and so on, and are all geared towards old versions of the boot/rootdisk. They are *NOT* relevant to current versions of Linux. III.02) Is there some kind of limit on how large my Linux partitions and/or filesystems can be? ANSWER: There's no limit on partition size (just the size of your drive), or filesystem size. The Minix filesystem type has a limit of 64 megs per filesystem. However, most folks use the Extended 2 filesystem or the Xia filesystem, which have limits of 4 terabytes per partition (virtually infinite). See section III.C below on creating partitions and filesystems for more info. III.B. LINUX PACKAGES ~~~~~~~~~~~~~~~~~~~~~ This section contains information about *SOME* of the current Linux packages available. III.03) Is there an easy way to get all of the Linux stuff? ANSWER: Yes. To install Linux, you're going to want to choose one of the "releases" of Linux, all of which have a different method of installation and set up. Each release also has its own README and installation docs, which you'll want to read first. But I'll summarize here. The major releases are: * The "Softlanding Linux System Release" Also known as the "SLS" release, consists of about 23 disks for Linux and 9 for X11. The nice thing about this release is that you can pick and choose which disks and packages you want to install. The first disk ("a1") must be "rawritten" (using rawrite.exe) on floppies, and the rest of the images are put onto DOS format floppies using the DOS "copy" command. Contains all of the softs you'll ever need, and is easy to install for newcomers. This is the release that I suggest everyone new to Linux should install. It's the most complete and up-to-date package. * The "TAMU" (Texas A&M University) Linux Release This release is supposedly like the SLS release, but has some different softs and a different installation procedure. From Dave Safford, "The installation procedure is the main difference from SLS. A single boot diskette is used, and it boots directly into an automated installation program." This installation program asks a few questions about the desired configuration, and sets up everything, including your filesystems, booting from the hard drive with LILO (see section III.C below), and a simplified X-Windows configuration. This humble author has never installed the TAMU release but I've heard good things about it. * H.J. Lu's "bootable rootdisk" This is a release of the Linux kernel and basic binaries on a single floppy. It, along with HLU's 'gccdisk', 'libdisk', and so on, are good for upgrading or installing basic Linux system by hand. It's not reccommended for newcomers, because there's no real install script, it's mostly meant as an upgrade of the basic system software. Beginners should install SLS or MCC-interim (see below) instead. * The Manchester Computing Centre Interim Release This is the fabled "MCC-Interim" Linux release, which was originally the de facto standard Linux distribution. A new version has appeared, recently--- the most recent release if for Linux 0.99.pl10. This release has almost all of the important Linux software, like SLS, but does not contain Emacs or Xwindows. III.04) Where can I get these releases of Linux? ANSWER: The SLS release is at tsx-11.mit.edu:/pub/linux/packages/SLS and sunsite.unc.edu:/pub/Linux/SLS. H.J. Lu's "bootable rootdisk" release is found at tsx-11.mit.edu: /pub/linux/packages/GCC, as well as the mirror sites. TAMU.99p4 is available from sc.tamu.edu in pub/free_unix/TAMU.99p4. MCC-Interim can be found on sunsite.unc.edu in /pub/Linux/distributions/MCC. III.05) What files do I need to get for the SLS release? ANSWER: You first need to get the DOS program 'rawrite.exe' (or 'rawrite2.exe'). This program takes a binary file and writes it, block by block, to a blank formatted floppy. This is the way to take a Linux floppy image and put it onto a disk from DOS. Rawrite can be found in tsx-11.mit.edu:/pub/linux/dos_utils. For the SLS release, you need to get the files: * SLS.README and SLS.FAQ. These files contain further information on the current release of SLS. You should read them in addition to this FAQ. * a1.3 or a1.5, depending on what type of floppy you boot from on your system. a1.3 is for high-density 3.5" floppies, and a1.5 for high-density 5.25" floppies. This file is the image of the SLS "a1" disk. You must use rawrite.exe (above) to rawrite the file to a high-density *formatted* MS-DOS floppy. (Once the file is rawritten, the floppy will no longer be recognized by DOS). * The files in the a2, a3, and a4 directories. These files must be copied to MS-DOS formatted floppies (using the MS-DOS 'copy' command). For example, the files in the a2 directory are copied to a floppy labeled 'a2', and so on. These files make up the "a" disk set. They are required. The rest of the files below are optional. * The files under the directories b1-bN, c1-cN, x1-xN, t1-tN, and so on. These files are copied to MS-DOS floppies just like a2-a4 above. (e.g. the files in the b2 directory are copied to a floppy labeled 'b2'). These floppies contain optional software for SLS: b1-bN: base system extras, such as emacs and man pages c1-cN: compilers such as gcc, g++, f2c, etc. x1-xN: the X Windows system i1-iN: Interviews (doc and idraw) t1-tN: TeX, LaTex, etc. (document processing system) s1-sN: sources for some of these utilities d1-dN: documentation for various things I suggest getting at least the a, b, and c disk series. If you want to run Xwindows, get the x series as well. When you're making these floppies, a2-a4 and so on must all be the same kind of floppy (i.e. either 3.5" or 5.25"). The a1 disk must be the floppy type that you boot from. The rest of the disks don't have to be the same type as the a1 disk. III.06) Now that I have the files, how do I install SLS? ANSWER: Before installing SLS you may need to resize your partitions for MS-DOS, etc. to make space for Linux on your hard drive. For this you generally use MS-DOS's "fdisk" and resize your partitions by first deleting them and then re-creating them with smaller sizes. Note that this procedure deletes everything on the affected partitions: you'll need to make backups first and restore from them later. See section III.C for more info on this. To install the system: First boot the a1 disk. You should see the prompt "LILO". Press or to get a list of instructions: at this point you'll be able to choose how you want to boot the a1 disk (i.e. choose the option "floppy" to boot without the ramdisk enabled, "ramdisk" to boot normally, and so on). If you just press you'll boot with the ramdisk enabled (recommended, but may not be possible for systems with less than 4 megs of RAM). Once the system boots up login as "root" (no password). You can now use 'fdisk' to create partitions for Linux, and reboot (from the a1 disk again). Again, login as "root" and use 'mke2fs', 'mkswap', and so on to create filesystems and swap space. See section III.C below for information on making partitions and filesystems. To install the software, use the command doinstall where is the location of your root filesystem that you just created. For example, if your Linux root filesystem is on /dev/hda2, use the command doinstall /dev/hda2 If you have more than one Linux filesystem (for example, a filesystem on /dev/hda3 for /usr), then use something like doinstall /dev/hda2 /dev/hda3 /usr Those with previous UNIX experience will know what this means. See section III.C below. Next, the system will ask how you want to install the system (from floppy, hard disk, tape, CD-ROM, or over the network). If you're installing from floppy, choose "floppy". (For info on installing from the hard drive, etc. see the file SLS.FAQ). For floppy installations you'll also be asked what drive to install from and how much software you're going to install. It's very self-explanatory. You must have a formatted high-density floppy on hand before you go on. It must be the type of floppy that you boot from (i.e. same type as the a1 disk). It will be used to make a boot disk at the end of the installation procedure. >From here on it's pretty automatic-- you simply flip disks while it installs the software. III.07) Any other information about SLS? ANSWER: This comes from the file SLS.FAQ, by Peter MacDonald. Please get the most recent version and read it: sunsite.unc.edu: /pub/Linux/SLS/SLS.FAQ. SLS (Softlanding Linux System) Copyright 1992, Softlanding Software. which is NOT just an image dump of someones Unix system. Also note that in the interest of preventing ftp storms, the version of SLS that appears on the internet, is not quite the same as the version distributed by Softlanding. Softlanding regularly gets a whole new version which has the changes integrated. But the updates to the Internet version are tailored to minimize the amount that has to be downloaded to become current. That is why bugs manage to creep in on me. I am not installing and testing the Internet version, although, functionally, it should be quite close to the Softlanding one. The purposes of the SLS are the following: 0) provide an initial installation program (for the queasy). 1) utilities compiled to use minimal disk space. 2) provide a reasonably complete/integrated U*ix system. 3) provide a means to install and uninstall packages. 4) permit partial installations for small disk configs. 5) add a menu driven, extensible system administration. 6) take the hassle out of collecting and setting up a system. 7) give non internet users access to Linux. 8) provide a distribution that can be easily updated. Highlights of the base are: gcc/g++, emacs, kermit, elm/mail/uucp, gdb, sc (spreadsheet), man pages, groff, elvis, zip/zoo/lh and menu. Highlights of X are: X, programmers libs, 75 dpi fonts, games (spider, tetris, xvier, chess, othello, xeyes, etc) and utilities like xmag, xmenu, xcolormap and ghostscript. Approximate usage is as follows: Tiny base system: 9 Meg (Series 'a') Main base system: 25 Meg (Series 'a', 'b' and 'c') Main base system + X11: 70 Meg (Series 'a', 'b', 'c' and 'x') Please read the file COPYING which outlines the GNU copying restrictions. The linux kernel is copywrite Linux B. Torvalds. Various other copywrites apply, but the upshot is that you may do whatever you like with SLS, except restrict others in any way from doing likewise, and you must leave all copywrites intact, and you can not misrepresent or take credit for others work. SLS is also available via mail from the address: Softlanding Software 910 Lodge Ave. Victoria, B.C., Canada V8X-3A8 (604) 360-0188 More details about SLS can be asked to pmacdona@sanjuan.uvic.ca. III.08) How do I get and install H.J. Lu's "bootable rootdisk" release? ANSWER: It's much like SLS release. Just get the bootroot disk image and use rawrite to transfer it to a floppy, and then boot it. You'll probably want to get the 'gccdisk' and 'libdisk', etc. images and rawrite them to floppies as well. Note that this release doesn't have a user-friendly installation script, it's meant mostly to upgrade or install the system by hand. Unless you're familiar with Linux this may prove difficult. :) This release is VERY USEFUL as a recovery disk in case you trash your Linux system. Everyone should have a copy of the newest bootroot disk for emergencies. It contains a full Linux system on one floppy. III.C. SOME COMMON PROBLEMS ~~~~~~~~~~~~~~~~~~~~~~~~~~~ III.09) What filetype is the extension ".z"? What about ".taz", ".tpz", and ".tgz"? I see these files on the archives but I don't know how to unpack them. ANSWER: Here's a list of common filename extensions on the archives. Extension Used by --------- ---------------------------------------------------------- .Z compress/uncompress. Use "uncompress foo.Z" to uncompress the file. .z, .gz gzip. Gzip is now used by many archive sites instead of compress; if you don't have gzip on your system, get it! To uncompress one of these files use "gzip -d foo.z". ".gz" is the new gzip extension. .tar Tar file. Use "tar xvf foo.tar" to unpack it. Or, you can fo "tar tvf foo.tar" to get an index listing of the tarfile. .taz Compressed tar file. You can do something like "zcat foo.taz | tar xvf -" or "tar xvfz foo.taz" to unpack it (some versions of tar don't have the z option). .tpz, .tgz Gzipped tar file. If you have gzip, zcat is linked to it, so you can do "zcat foo.tpz | tar xvf -" to unpack it. .tpz is the old extension; all gzipped tar files should now end in .tgz instead. The SLS distribution uses gzipped tar files (.tgz). III.10) How do I make partitions and/or filesystems for Linux? ANSWER: For most Linux installations (such as SLS) you'll need at least two partitions: one for swap space (used as virtual memory) and another for your "root filesystem" (that is, the actual Linux software itself). You can also make separate partitions for your /usr filesystem... if you have UNIX experience, you'll be able to figure out how to divide software between multiple partitions. For most installations simply having one root filesystem and one swap partition is the best way to go. The first thing you need to do is resize the existing partitions on your drive (if any) to make space for Linux; for example, if you have a DOS partition taking up all of your drive, you need to use FDISK under MS-DOS to delete it and recreate it with a smaller size. Of course, in so doing you'll lose everything on that DOS partition-- just back it up first and reinstall after you've recreated and reformatted the partition. That's life! :) (Please note that there is FIPS... an FDISK clone for MS-DOS which can non-destructively resize your partitions. You can find it on sunsite.unc.edu, in /pub/Linux/system/Install. It is a compressed tar file. So you need to uncompress and untar it before transferring it to DOS.) Now you can boot up Linux (say, from SLS, or from the boot/root disks). >From there you use the command 'fdisk' to create partitions for Linux: fdisk where is the name of the drive which you're installing Linux on. Valid drive names are: /dev/hda: first IDE drive /dev/hdb: second IDE drive /dev/sda: first SCSI drive /dev/sdb: second SCSI drive For example, to run fdisk on the first SCSI drive in your system, use the command fdisk /dev/sda If you don't specify a drive name for fdisk, it will assume /dev/hda. The fdisk command "m" prints a menu. The "n" command is used to create a new partition. "w" writes the partition table and exits fdisk; "q" quits without saving changes. The "p" command displays the current partition table. When creating partitions with fdisk, you may get an error message to the effect of "Warning: Linux cannot currently use xxxxx blocks of this partition." This simply means that the Minix filesystem type (which is the default) is limited to filesystems which are 64 megs in size. You can IGNORE this warning, because when creating your filesystems, you can use one of the other filesystem types (ext, ext2, or xia) which have a size limit of 4 terabytes. Just keep in mind that if you create a partition larger than 64 megabytes then you cannot use the Minix filesystem type ('mkfs') when creating the filesystem (see below). You must use the ext, ext2, or xia filesystem type instead. NOTE: An "extended partition" DOES NOT equal "extended filesystem". An "extended partition" acts as a container for logical partitions. This allows you to have more than 4 partitions on a hard drive. Extended partitions cannot hold data on their own. You must create logical partitions on the extended partition to hold data. On the other hand, an "extended filesystem" is a Linux filesystem which uses the "extended filesystem type" (as opposed to the Xia filesystem, the Minix filesystem, and so on). Extended partitions and extended filesystems have nothing to do with each other. The TYPE of the partition (in the rightmost field when you use the fdisk "p" command) does not matter to Linux. However, it does matter to other systems such as OS/2. Just make sure that your Linux partitions have a type such as "Linux/MINIX" to distinguish it from other systems. (i.e. It doesn't matter if you set the type of the swap partition to "Linux swap". All of your Linux partitions can use the default type "Linux/MINIX" which is fine). WARNING: DO NOT use Linux fdisk to manipulate partitions for operating systems other than Linux. This means don't use Linux fdisk to delete or create MS-DOS partitions, for example. Use MS-DOS fdisk for this instead. Linux fdisk doesn't properly know how to create partitions for MS-DOS and other operating systems. When creating partitions, write down the names and sizes of the partitions you create. You need this information later on. Use the fdisk "p" command to display this information. Once you have your partitions created, reboot the system (with the SLS disk, reboot with the a1 disk again). You can now create filesystems on those partitions (which is similar to "formatting" a partition under MS-DOS). For the swap partition, use the command mkswap then swapon For example, for a swap partition on /dev/hda2, with a size of 8208 blocks, you'd use the commands mkswap /dev/hda2 8208 swapon /dev/hda2 This will make the swap space and enable it. Swap space is used as virtual memory... if you have 4 megs of RAM in your machine, and a 16 meg swap partition, you have a total of 4 + 16 = 20 megs of RAM available for Linux. To make your filesystems, use the correct version of the 'mkfs' program, depending on the type of filesystem you wish to use: Filesystem type Command to create filesystem --------------- ---------------------------- Minix mkfs -c Extended (old) mkefs -c Second Extended mke2fs -c Xia filesystem mkxfs -c The Minix and Extended filesystem types are older, and while more robust, are slower and may eventually be phased out. The most popular filesystem type used right now is the Second Extended fs type ('mke2fs'). The Minix filesystem type is limited to 64 megs (and 14-character-long filenames). It's suggested that you use either mke2fs or mkxfs. For example, to create a 61000-block Second Extended filesystem on /dev/hda3, use the command mke2fs -c /dev/hda3 61000 The "-c" option checks for bad blocks on the filesystem. Apparently mkfs and mkefs do not actually use the bad block information correctly (see Q/A below). Now you're ready to install the software. For SLS this means just using the 'doinstall' command (see section III.B above). For other installations you may need to 'mount' the filesystems first. Just see the relevant READMEs for information. III.11) Why does fdisk say "Linux cannot currently use XXXX sectors of this partition"? ANSWER: See the previous Q/A. Fdisk is an older program which expected all filesystems to be Minix fs, which limited filesystems to 64 megs. You can ignore this warning because the extfs, xiafs, and ext2fs don't have this limit. III.12) What does the message "MINIX-fs: Magic match failed" on bootup mean? ANSWER: Basically, this means that you're trying to mount a non-Minix filesystem as a Minix filesystem, and mount is croaking on it because the type is wrong. If you use a filesystem type other than Minix fs (i.e. if you use the extfs, ext2fs, or xiafs) you'll probably see this message: the kernel tries to mount root as Minix, then extfs, then ext2fs, and so on... every time it fails for one type it tries the next type. In most situations, this can be ignored, if the kernel is able to mount your root partition as any one of its known types. However, if you have recompiled the kernel yourself and set the root device to the wrong partition, then the kernel should hang at this point and you'll have to use "rdev" to set it correctly. III.13) Linux mkfs doesn't accept the size I give the device, although I double-checked with fdisk, and it's correct. ANSWER: Be sure you give the size in Linux BLOCKS (1024 bytes), not sectors. Also make sure that you have the right partition: partitions are numbered "/dev/hda1", "/dev/hda2", and so on (and "/dev/hdb1", "/dev/hdb2" for the second hard drive)... DON'T use "/dev/hda" or "/dev/hdb" as they correspond to the entire disk, not just single partitions. Also remember that SCSI drives use /dev/sda1, /dev/sda2... and /dev/sdb1, /dev/sdb2, and so on for their partitions. III.14) How can I get mkfs/mkefs to check for bad blocks? ANSWER: Unfortunately the -c option on mk(e)fs does not work; it cannot detect bad blocks on the drive, and thus if you create a filesystem over a part of your hard drive with bad blocks, things will eventually go wrong. So you need to generate a bad block list (in a file) and use the -l option on mk(e)fs so it will flag those blocks when making a filesystem. mke2fs and mkxfs correctly flag bad blocks, so this only applies to mkfs and mkefs. This is also only needed for older RLL and MFM drives. SCSI and IDE drives have bad block logic on-board. How to generate a bad block list? Since this is only needed for older drives and older filesystem types (i.e. Minix and extfs), just mail mdw@tc.cornell.edu or kircher@neuro.tuwien.ac.at if you need instructions on this procedure. Your best bet is to use mke2fs or mkxfs anyway. III.15) How can I boot Linux off of my hard drive? ANSWER: You need to install the "LILO" program which changes the boot sector of your hard drive to allow you to choose between a DOS or a Linux partition to boot from. These programs are provided with most major releases, or you can get them seperately from one of the FTP sites. As of LILO version 8 there is a "quick install" script available which should make LILO installation quick and easy. See Section VII for LILO information. You can also see the "LILO QUICKSTART GUIDE" by Matt Welsh which should be available on sunsite.unc.edu:/pub/Linux/docs. III.16) How can I remove LILO from my hard drive? ANSWER: Simple. First you need an MS-DOS 5.0 (or OS/2) bootable floppy with FDISK.EXE on it. Boot it and run the command FDISK /MBR which will (hopefully) restore your hard drive's master boot record to a standard MS-DOS (resp. OS/2) boot record. Now you can go back and reinstall LILO. :) III.17) When installing SLS, I get the error "You may have inserted the wrong disk" when putting in the next disk in a series. What's going on? ANSWER: Each disk has a small file on it which contains the name of the disk. For example, the SLS a3 disk has a file on it called "diska3". If it doesn't exist, or is named something else (like "diska3.z"), then just create it/rename it. If you copied the files to the SLS floppies using "copy *.* ..." then you probably missed the "diska3" file because it doesn't have an extension in the filename! Also, the last disk in a series (i.e. the a4 disk, b5 disk, etc.) has a file on it called "install.end". You need this file as well. These files are used by the SLS doinstall program to keep track of where it is. III.18) When installing SLS, the installation script creates a "boot floppy" for me to boot Linux with. How can I make these myself (or fix problems with them?) ANSWER: The SLS install scripts just copy the kernel image to a blank floppy for you to boot Linux with. When SLS is installed, a copy of the kernel is stored in the file /Image on your hard drive: since you use the kernel on your boot floppy to boot, this file isn't used during the bootup process (unless you install LILO). To make a boot floppy yourself, you must do two things: 1) Run 'rdev' (a.k.a. 'rootdev') on the kernel in the file /Image to set the root partition it uses. For example, if your root partition is /dev/hda3, run the command rdev /Image /dev/hda3 2) Copy the kernel to a new floppy. You may need to DOS format the floppy first(*). Then run the command cp /Image /dev/fd0 if the floppy is in /dev/fd0 (the first floppy drive). You can use a command like dd if=/Image of=/dev/fd0 bs=16k as well; they should accomplish the same thing. (*) (From: "Michael L. Kaufman" kaufman@delta.eecs.nwu.edu) Formating the floppy lays down the track/sector information. If you have a completely unformated floppy, dd can fail in interesting ways. Many folks have problems with their SLS boot disks made in this manner because they forgot to run 'rdev' on the kernel image before copying it to the floppy. III.19) How can I set the default video mode used by Linux? Do I have to recompile the kernel to do this? ANSWER: No, you don't have to recompile the kernel. Just use "rdev" with the "-v" switch to set the video mode in the kernel (either on your hard drive (if booting from LILO) or on your boot floppy). For example, to change the kernel in /Image to prompt for the videomode on bootup, do rdev -v /Image -3 to change the kernel on your boot floppy do, rdev -v /dev/fd0 {video-mode} III.20) How else can I use rdev? ANSWER: rdev is very handy and also is used to set the root and swap partitions, ramdisk size, and more, in a compiled kernel. It means you don't have to recompile the kernel to make these changes. Use "rdev -?" for a list of options. III.21) When I login as non-root, I get tons of errors about "shell-init: permission denied". Also, some things work as root but not as a normal user. What's the deal? ANSWER: This is a really common problem which comes from not having permissions set right and a misunderstanding of some UNIX terms. Some installations won' t have the file permissions set correctly on the various directories that normal users (i.e. non-root) will use. For example, if your user directories are in /home, then /home must be of mode rwxr-xr-x, or 'chmod 755 /home'. Also, a home directory must be owned by the user who it belongs to (i.e. /home/mdw must be owned by 'mdw'... just 'chown mdw /home/mdw', for example). Also, the permissions must be set correctly for / (the root directory). Here's a list of permissions that should work (although you can use other permissions, these are just suggestions that shouldn't cause trouble): permissions (chmod) owner file ----------- ------- ----- --------------------------------------------- rwxr-xr-x (755) root / rwxr-xr-x (755) root /home rwxr-xr-x (755) mdw /home/mdw rwxr--r-- (744) mdw /home/mdw/.profile (or other startup files) rwxr--r-- (744) mdw /home/mdw/foo (normal files) In most cases the group of the file doesn't matter, but in general most files are set to group 'root' (except for binaries which are group bin, and so on) and user files are set to group 'user' (or whatever group users are in). In general you want directories that everyone can access to be rwxr-xr-x (chmod 755). Files that everyone can read are rwxr--r-- (chmod 744), and programs that everyone can run are rwxr-xr-x (chmod 755). Thus /bin, /usr, /usr/bin, /etc, and so on, should all be rwxr-xr-x. All binaries should be rwxr-xr-x (unless, of course, they're setuid programs). For UNIX newbies, setuid programs run under the user id of the owner, thus programs owned by root which have a permission of rwsr-xr-x (note the 's') run as root, with root's priveleges. So before changing permissions on a program check to see if it's setuid first. To make a program setuid prepend a '4' to the permissions you give to chmod, i.e. rwsr-xr-x is 'chmod 4755'. Here's a list of common uses for permissions: permission effect on files effect on directories ---------- ----------------------- --------------------------------- read lets you look lets you see what's in the directory at a file, lets you with ls run a shell script write lets you edit a file or lets you create or delete a file from copy over it the directory (*) execute lets you run a binary or lets you cd into the directory shell script (*) Note that you can delete a file from a directory even if you DON'T have write access to the file itself! Write access to the DIRECTORY that the file is in will let you delete any file in that directory. The permissions of the file itself have nothing to do with being able to delete a file. This is standard across all UNIX systems, nothing new with Linux. If any of this is confusing, please go buy a good book on using UNIX and read it. All of the above is standard UNIX fare. It's included here because many Linux newcomers don't take the time to learn UNIX before they dive in. :) III.22) I have the previous version of the Linux kernel, how can I upgrade it? ANSWER: If you've never done this before, get the kernel sources from your nearest FTP site (in a file named something like linux-*.tar.z) and unpack them into /usr/src/linux. (If you already have /usr/src/linux, you need to delete it or move it elsewhere.) As of Linux-0.99 there is a script to autoconfigure your kernel, and you need at least GCC version 2.4.5. You unpack these sources in /usr/src/linux. Make sure you have the logical links for /usr/include/linux and /usr/include/asm as described below. As of Linux 0.99.pl10 "Keytables" are used to configure your keyboard type. If you have a non-US keyboard, you need to get keytables.tar.z from sunsite.unc.edu:/pub/Linux/utils/nls. This allows you to dynamically load a keyboard map at bootup time. First run 'make config' and answer the various questions. Then edit /usr/src/linux/Makefile to set the root partition, etc. Finally, do a 'make dep' (to set dependencies: VERY important!) and finally 'make'. Assuming you have GCC installed correctly, the kernel should compile and you'll be left with a new "Image" which is your new kernel: if you boot from harddrive, copy the Image to wherever you told LILO to look for it, or if you boot from floppy dd the Image to a new floppy. Make sure that you run "rdev" on the Image to make it look for the correct partition for your root filesystem (if you specified this correctly in the Makefile you don't need to do this). You can also do "make zImage" which will compile a compressed kernel. The kernel takes up a lot less space on your drive, and when booting will automatically decompress itself. ** Make sure you read /usr/src/linux/README, which explains in detail ** what to do when recompiling the kernel. If you HAVE compiled your kernel before, you can just apply the source patches to your old sources and then recompile (i.e. you don't have to get the entire kernel sources all over again). Use the "patch" program to do this. Before you recompile the kernel do a 'make dep' to set dependencies and a 'make clean'. III.23) Where is /usr/include/linux and /usr/include/asm, or, Why won't the kernel compile correctly? ANSWER: The files /usr/include/linux and /usr/include/asm are symbolic links to /usr/src/linux/include/linux and /usr/src/linux/include/asm, respectively. In other words, all of the Linux include files are actually under /usr/src/linux/include, but to access them you need two symbolic links in /usr/include: /usr/include/linux -> /usr/src/linux/include/linux /usr/include/asm -> /usr/src/linux/include/asm To make these, run the commands ln -sf /usr/src/linux/include/linux /usr/include/linux ln -sf /usr/src/linux/include/asm /usr/include/asm NOT the other way around. :) If you dont have these links then many compilations will surely fail. III.24) How can I upgrade to the newest version of GCC and/or libraries? ANSWER: See section IX on GCC for more information, but essentially all you need to do is FTP to sunsite.unc.edu (or one of the other Linux FTP sites) and look in /pub/Linux/GCC. You'll see a number of .tar.gz files there (often abbreviated .tpz). The names change from time to time: you need to get the compiler (often in a file such as 'gcc233.tpz'), header files, and library files. At this point, the compiler lives in /usr/bin, the compiler's setup files are under /usr/lib/gcc-lib/i386-linux, and the libraries (shared, jump table, and static) are all in /usr/lib. It's all very straightforward once you actually unpack the tar files and everything falls into place. Just see the "release" files in this directory. They tell you everything that you need to know to install and upgrade GCC and your libraries. III.25) What's the deal with these things called "jump tables"? ANSWER: There's more information in section X and VII, but to be brief: There are two kinds of libraries for Linux. As of gcc v2.3.3 they all live in /usr/lib. The files are... /usr/lib/*.a static (non-shared) libraries (use gcc -static ...) /usr/lib/*.sa jump table shared lib stubs (use gcc -jump ...) There is an older form of the shared libraries which is no longer widely used. Nonetheless, you may run across it from time to time. /usr/lib/*.ca classic shared lib stubs When you compile a program, depending on the options you give gcc (-jump is the default) it will link it against one set of these libraries. The static libs contain all of the code and thus make your executable very big; no shared code is used. The classic shared libs were actually 'stubs' which reference the shared code in /lib/libc.so.VERSION (where VERSION is a number like '4.2'). /lib/libc.so.VERSION is a file which contains the actual code of the library, which is accessed at runtime by your executable. The jump-table library stubs are also shared libs, but they are built in such a way that you can upgrade the /lib/libc.so.VERSION file without having to recompile the programs that use it. So when we say "uses Jump Tables version 4.2" we mean it uses the actual library itself, /lib/libc.so.4.2. To compile programs that use jump tables version 4.2 you need the right version of /usr/lib/*.sa installed, but you don't need them to RUN programs that use jump tables. However programs that are compiled to use, for example, jump table version 4.2 (in the file /lib/libc.so.4.2) won't work if you only have libc.so.4.1 installed. They're only backwards-compatible. If you get errors about 'can't find /lib/libc.so.4.1' then the executable you're using is looking at runtime for a jump table version that you don't have. Basically you're safe if you have the most recent version of the /lib/libc.so.VERSION file installed (which is found on sunsite.unc.edu:/pub/Linux/GCC and comes with the GCC stuff). You should always have a symbolic link with the major version number of the library in /lib, because that's what's actually read. For instance, if you have /lib/libc.so.4.2 installed, then you need the symbolic link /lib/libc.so.4 -> /lib/libc.so.4.2 Make this with the command ln -s /lib/libc.so.4.2 /lib/libc.so.4 III.26) How to upgrade jump tables? (Without hanging my system) ANSWER: Be careful! If you upgrade your /lib/libc.so.VERSION file and either remove the symlink or delete the old libc.so.VERSION file before the new one is in place (and the link points to it), then more than likely all of your binaries like "cp", "mv", "ls" and "ln" use the library, so they'll all stop working once you kill the link or the library file. So to upgrade the file, copy the new version to /lib and switch the link in one step with a command such as ln -sf /lib/libc.so.NEW_VERSION /lib/libc.so.4 where NEW_VERSION is the new version of the library you're installing. This will switch the link in one step and everything should work. You just can't copy over the old file because the old version is in use by 'cp', 'mv', and so on. BTW you get new versions of GCC, jump tables, libraries, include files, etc. from tsx-11.mit.edu:/pub/linux/GCC. III.27) How can I be sure I won't be writing over anything important when installing Linux? I have to use DOS on my machine, and I don't want to lose any files. ANSWER: Back up everything. Just in case. As long as your DOS and Linux partitions don't overlap you should be okay. III.28) I just rebooted my machine, and now Linux dies with a "panic: trying to free unused inode". What's going on? ANSWER: You probably forgot to "sync" before rebooting, which stores on the disk physically the contents of the kernel buffers. You can either run "fsck" on the partition to TRY to correct the problem (it might fail), or re-mkfs and re-install the software on that partition. For the extended filesystem use "efsck" instead. The best way to shutdown your system is the "shutdown" command. To shutdown and reboot the system, use shutdown -r now or substitute a number of minutes in place of "now". Leave off the "-r" switch if you just want to shutdown and not reboot. III.29) Can I use both OS/2 and Linux on my machine?? ANSWER: Yes! See the following two Q/A's about getting your OS/2 Boot Manager to work. But, be warned: IF YOU USE OS/2, DO NOT USE LINUX's FDISK TO CREATE LINUX PARTITIONS!! The problem is with a bug/feature in OS/2's fdisk that tries to correct 'errors' in partitions that it doesn't like... Linux partitions included. The solution: make your Linux partitions with OS/2's fdisk, then use Linux's fdisk to change the partition ID's to the right values (this is self-explanatory with Linux's fdisk). If you made your Linux partitions with Linux's fdisk, and OS/2 sees them, it will think they have errors and end up trashing them. III.30) I use OS/2's Boot Manager on my hard drive. How can I get it to recognize Linux? ANSWER: To do this, install LILO on your Linux root partition, NOT on your hard drive's master boot record. The LILO config file should look like the following. In the below setup, the Linux root partition is /dev/hda1, the MSDOS partition is /dev/hda2, and OS/2 lives on /dev/hdb1. boot = /dev/hda install = /etc/lilo/boot.b delay = 20 compact image = /Image label = linux root = /dev/hda1 vga=ask other = /dev/hda2 table = /dev/hda label = dos other = /dev/hdb1 loader = /etc/lilo/os2_d.b table = /dev/hdb label = os2 Then use OS/2's fdisk to add your Linux partition to the Boot Manager. Thanks to Thomas Brodt . III.31) When I run Linux's fdisk it says "OPUS" for OS/2's Boot Manager partition. Is this right? What's OPUS? ANSWER: It's correct. OPUS is BBS software that used partition type 0x0A long before OS/2. IV. SOME CLASSICAL PROBLEMS =========================== IV.01) While running du I get "Kernel panic: free_inode: bit already cleared". Also, du produces a ENOENT error for all the files in certain of my directories. What's going on? ANSWER: These are both consistent with a bad file-system. That's relatively easy to produce by not syncing before rebooting, as linux usually has 1.5MB of buffer space held in memory (unless you have <=4M RAM, in which case the buffers are only about 0.5MB). Also linux doesn't do anything special about the bit-map blocks, and as they are used often, those are the thing most likely to be in memory. If you reboot, and they haven't been written to disk ... Just do an fsck on the device, the -a flag might repair it otherwise, the only thing to do is to reinstall the filesystem from the Images. A sync is done only every 30 seconds normally (standard unix practice), so do one by hand (some people think you should do 3 syncs after each other, but that's superstition, you just have to give time to the first sync to finish), or by logging out from the startup-shell, which automatically syncs the system. Unmounting a filesystem also syncs it (but of course you can never unmount root). Another (sad) possibility is that you have bad blocks on your disk. Not very probable, as they would have to be in the inode-tables, just a couple of blocks in size. Again there aren't programs available to read a disk for bad sectors and put them in some kind of "bad-sector-file". On IDE drives this is no problem (bad sectors are automatically mapped away). IV.02) How can I partition my hard-drive to use Linux? ANSWER: See section III of the FAQ on installation. IV.03) What must I do to mkfs a floppy? ANSWER: blocks are of size 1K so 1.44 floppy is 1440 blocks. The floppy has to be formatted before this will work (e.g., fdformat can do this from within Linux). IV.04) I can do this as root but not as non-root, is it a bug? ANSWER: Except for an early make utility, the problem is caused by an incorrect permission flag. The most common problems are about /tmp which should be 1777 and /dev/ttys? which might be 766. So as root do chmod 1777 /tmp ; chmod 766 /dev/ttys? IV.05) Sometimes, I get "mount can't open lock file"; what does this means? ANSWER: This can happened for two reasons: A) You try to mount something as non-root. In that case you can either retry as root, or set the setuid bit to mount as follows: - be sure that mount belongs to root, if not do 'chown root /bin/mount' - set the setuid bit with 'chmod u+s /bin/mount' BTW you have to do the same with umount (in order to be able to unmount) Remark that it is NOT safe to allow anyone to perform mount/umount. B) You are root. mount wants to open /etc/mtab and /etc/mtab~ - the first one for reading, the second as lock file. If there is already a mtab~ remove it. This can happen if you used once gnuemacs on mtab. To forbid that case, just add the following entry in your /etc/rc file: rm -f /etc/mtab~ IV.06) When I try "mount /dev/hd?? /user", I get error 2. ANSWER: Be sure, that your mount point /user does exist; if not perform a "mkdir /user". BTW the error numbering is explained in /usr/include/errno.h IV.07) Since I have upgrade my Linux kernel, ps won't work anymore, why? ANSWER: Each time you upgrade (or re-compile the kernel), you should perform a 'ps -U' (-U is for update the /etc/psdatabase). Every time you boot a new kernel you have to do a 'ps -U' to update the psdatabase, after doing this you can remove the system file or even have to patch the ps-suite. BTW: sometimes a patch makes recompiling ps necessary. Sometimes you do a make clean. NOTE: As of 0.99 there is now a ps package which uses the "/proc filesystem". This is a meta-filesystem which has an entry for each process that's running... create the directory /proc and do a 'mount -t proc /proc /proc' to see it, or else add the following entry in your /etc/fstab: none /proc proc You can get the "procps" package from tsx-11.mit.edu in /pub/linux/BETA/procps. The nice thing about this is: you don't have to upgrade it for every kernel version (and thus ps -U is meaningless if you use procps). MKJ wrote in c.o.l.a: tsx-11.mit.edu:/pub/linux/BETA/procps contains the latest version of procps. Most of the reported bugs (i.e. all I can remember at the moment ;-) have been fixed, a man page for ps has been added, and several new programs have been added and/or fixed. A list of the stuff provided: ps free (a real one, from Linus) uptime (this needs work to be good, mine is a hack) tload (a hack, but who cares?) xload (from drew) fuser (perl script prototype, hopefully the real thing in a later release) IV.08) Since Linux 0.96b I have a lot of core file all over my disk. How can I sweep them away ? ANSWER: Use the following command find / -name core -exec rm {} \; BTW: think twice before using this command, there might be a John Core user on your system; this command will erase his mail :) If you never want to see another core file, put this line into your /etc/rc file: for a bash user ulimit -c 0 for a csh or tcsh user limit coredumpsize 0 IV.09) I can only log-in as "root", is it normal ? ANSWER: No, add "rm -f /etc/nologin" in your /etc/rc.local file IV.10) Sometimes my Linux virtual console get messed up when I cat a binary file. The characters shown are above ascii 127, any clue ? ANSWER: (J. Stuckey stuckey@mrcnext.cso.uiuc.edu) It's a vt-100 thing I think. echo "^V^O" should fix it. Control-V is the literal-next character that stty reports for me, and Control-O is the "magic" character that returns you to livability. V. LINUX and DOS ================= *** This section is co-written by Mark Komarinski, A. V. Le Blanc and *** MM. Corsini. The official maintainer is Mark, if you have *any* *** questions, mail him at komarimf@craft.camp.clarkson.edu *** Last Update June 1993 V.01) Is is possible to access DOS from Linux? ANSWER: Yes. (1) The mtools package allows you to access DOS files; it emulates the DOS commands CD, COPY, DEL, DIR, TYPE, and others. (2) Since approximately version 0.97 of the kernel, you can mount DOS file systems as part of your Linux directory tree, providing you have an appropriate mount command. (3) A DOS emulator is in alpha test, which will allow some DOS programs and utilities to run under Linux. V.02) Why use mtools if you can just mount a drive? ANSWER: Mtools is good if you want to do something quickly. For example, if you want to get directories on a bunch of floppies. The mount procedure requires you to mount the drive, get a directory, then umount it. Mtools lets you get the directory with one command. (Dirk Hohndel:) Mtools is really fast when copying disks. I mount the SLS directory of my SUN to my linux box and use mcopy to get the files on the disks. 3 times faster than using xcopy under DOS V.03) How do I get the mtools package set up correctly? ANSWER: The mtools package is available in source form on most Linux ftp sites. The most recent version (As of Sept 1992) is mtools.n2, and there are linked binaries and library (.a) files available as well (for example, as part of MCC interim releases of Linux). In the n2 release of mtools, there is only one executable binary which works differently depending on its name: you can create hard or symbolic links to it named mcopy, mdel, mdir, mtype, etc; this is how the Makefile in version n2 of mtools does it, and it saves several hundred kilobytes of disk space. Finally, you need the correct information in the file /etc/mtools, which is described below. Mtools also comes with the SLS release of linux. V.04) What is the format of the file /etc/mtools? ANSWER: A complete entry in the file /etc/mtools contains the following fields: drive, device, fat, cylinders, heads, sectors, offset. Two examples of entries from /etc/mtools are A /dev/fd0 12 80 2 15 C /dev/hda1 16 0 0 0 which defines the DOS disk A: as accessible through the device /dev/fd0, having a 12-bit FAT, 80 cylinders, 2 heads, and 15 sectors per track; DOS disk C: is accessible through the device /dev/hda1, has a 16-bit FAT, and its geometry is simply that of the hard disk where it lives. The last three numbers can be 0 if you wish; this allows mtools to try to figure out the disk's geometry itself, and perhaps to fail. A 12-bit FAT is common for floppies, but may occur in small hard disk partitions. A 16-bit FAT is common for hard disks. This is an extract of my /etc/mtools file: A /dev/fd0 12 0 0 0 # 3.5 1.4 Meg (autodetect) B /dev/fd1 12 0 0 0 # 5.25 1.2 Meg (autodetect) C /dev/hda1 16 0 0 0 # 1st partition of my Disk V.05) Where can I find out more about mtools? ANSWER: There are two detailed README files in the mtools.n2 distribu- tion. These files treat compiling and using mtools. There is a file README.mtools which treats only using mtools, which is a part of the MCC interim version of Linux. V.06) How do I use the DOS file system? ANSWER: The DOS file system is part of the kernel. If you have a kernel of level .97.1 or above, and an appropriate mount command, type mount -t msdos [-o conv=text] /dev/hda1 /dos to mount the partition /dev/hda1 as an MS/DOS file system on the directory /dos. You'll need a recent mount command, from at least release 97 or later of the root disk. Recent mount commands also accept the options conv=binary|text|auto (default is binary) to specify that text end-of-lines in DOS files are to be converted to UNIX end-of-lines (by omitting carriage return characters) in no cases (binary) or in all cases (text) or in cases that don't have 'well- known binary extensions' (e.g., .EXE or .COM) (auto). V.07) When I mount an MS-DOS disk, I get two lines of what seem to be error messages and the message: No bmap support. Is my disk bad? ANSWER: No. Since the dosfs is still in ALPHA mode, the two lines are used for displaying information about the disk that was mounted, just in case you have problems. The 'No bmap support' message means that you cannot run linux programs from that partition. This has been fixed in the latest release (alpha.9) V.08) I want to use the DOS file system with either conv=binary or conv=auto, but I want to convert text files from DOS to UNIX format, or from UNIX to DOS format. ANSWER: Use the utility todos/fromdos which comes as part of the dosfs package, currently (Sept 92) in released in version 8, or use the flip utility by Rahul Dhesi. V.09) Where can I find out more about the DOS file system? ANSWER: There is a README file included in dosfs.XX.tar.Z (the current value of XX is 10) V.10) This sounds me like a chicken and eggs problem, how can I install the mtools package at the very beginning. ANSWER: You have to use rawrite or the mount procedure. V.11) Could someone explain how to use rawrite? ANSWER: Rawrite is a DOS util which write sequential sectors of a formatted disk/floppy. When a floppy has been rawritten, you can (under Linux) untar it (use x, v, z and f flags). As an example: a) under Dos use rawrite rawrite source: kermit.z destination: a b) boot under Linux, and perform a tar tar zxvf /dev/fd0 tar zxvp < /dev/fd0 You DO NOT NEED TO MOUNT a rawritten disk V.12) What is as86.tar.Z ? ANSWER: It's the port of Bruce Evans' minix assembler, you need it to be able to recompile Linux at your convenience. In fact this is ONLY used for boot/setup.S and boot/bootsect.S they create 80x86 REAL mode code. V.13) Turbo (Microsoft) Assembler won't compile the Linux boot code. In fact, some of the opcodes in these files look completely unfamiliar. Why? ANSWER: The Linux boot codes are written in Bruce Evans' minix assembler, which has the same opcodes as the original minix assembler ported to linux get as86.tar.Z There are a few differences between these and normal DOS assemblers. V.14) What about the dos emulator (dosemu)? ANSWER: Dosemu is in alpha testing now, so it is very unstable and crashes easily. Some programs (such as earlier versions of Turbo Pascal; TP 5.5 too) seem to work fine, but other programs such as dir /p will crash the emulator. Look in your favorite FTP site for the dosemu kit. For a semi-complete list of programs that do and do not work under the emulator, get the file /pub/Linux/docs/emusucc.txt at sunsite.unc.edu or tsx-11.mit.edu. V.15) I have a Stacker volume on my hard drive. Can I access that? ANSWER: Yes, but you will have to do that through the dosemu program. For more information on it, check out the file /pub/Linux/docs/stacker.doc at sunsite.unc.edu V.16) How about OS/2 HPFS partitions, or MacIntosh/Amiga floppies? Can I mount any of them? ANSWER: There is no support for any of those filesystems yet. ===================8<==========>8================ -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # LaBRI | # # 351 cours de la Liberation | e-mail: corsini@geocub.greco-prog.fr # # 33405 Talence Cedex | e-mail: corsini@labri.u-bordeaux.fr # # | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- There will be a sig when our local net is reliable. For now, I would rather stay anonymous. Newsgroups: comp.os.linux,comp.os.linux.announce,comp.answers,news.answers Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!gatech!swrinde!cs.utexas.edu!uunet!mcsun!julienas!geocub!labri.u-bordeaux.fr!corsini From: corsini@labri.u-bordeaux.fr Subject: Linux Frequently Asked Questions 3/6 [monthly posted] Message-ID: Followup-To: poster Summary: Linux, a small and free unix-like for 386-AT computers. Sender: corsini@greco-prog.fr (Marc-Michel CORSINI) Supersedes: Reply-To: linux@labri.u-bordeaux.fr Organization: Greco Prog. CNRS & LaBRI, Bordeaux France References: Date: Wed, 21 Jul 1993 09:52:23 GMT Approved: news-answers-request@MIT.Edu Expires: Fri, 3 Sep 1993 09:51:58 GMT Lines: 834 Xref: senator-bedfellow.mit.edu comp.os.linux:52224 comp.os.linux.announce:926 comp.answers:1376 news.answers:10589 Archive-name: linux-faq/part3 Last-Modified: 93/07/11 Version: 1.20 ********************************************************* * * * Answers to Frequently asked questions about Linux * * * ********************************************************* This post contains Part 3 of the Linux FAQ (6 parts). It must be read *after* the 2 first parts. ===================================8<====>8============================ CONTENTS (of this part) VI. MISCELLANEOUS HINTS (part3) VII. MORE HINTS (part3) ===================================8<====>8============================ VI. MISCELLANEOUS HINTS ======================= Special gcc information are located in section IX. A special section is devoted to it since it's *the* compiler of Linux. I have subsectionned this part in 2 subsections: VI.A Misc Information VI.B Minor/Major Information VI.A. Misc information ~~~~~~~~~~~~~~~~~~~~~~ *** This section is maintained by Matt Welsh (mdw@tc.cornell.edu). Please *** mail me if you have any changes/updates/questions. Thanks -mdw VI.01) It seems that $#@! ported on linux don't run correctly, what do I do about reporting bugs? ANSWER: (Matt Welsh) It's possible that either the program itself has a bug or that Linux has a problem that this program brings out. :) But first check that the size of the file(s) corresponds that of the files(s) on the FTP sites where it's available. If they're different, either you downloaded them incorrectly (i.e. you forgot to turn on "bin") or whoever put them on the FTP site uploaded them incorrectly. If that's not the problem, then post to comp.os.linux asking about the program, to verify that it is a bug. PLEASE: when posting possible "bug reports" include all error and output information from running/compiling the program. Just saying "it doesn't work" isn't very helpful. Also mention your specific setup, Linux version, GCC version, etc. Some of these things depend on running under certain versions and you may have missed that information. Note that my "ml-linux-bugs@dg-rtp.dg.com" bug reporting list has been phased out. It turns out that Linux has so few bugs, most of which are resolved on the newsgroup or through Linus before I can accumulate them and post. :) In short: if there's a bug in Linux or in Linux-ported software, it will usually be fixed in the next patchlevel or version. VI.02) Has $#@! been ported to Linux? ANSWER: First check out the FTP sites and read the monthly INFO-SHEET, as well as the new "Linux News" and the META-FAQ's (all of which are either available on the FTP sites and/or posted to the newsgroup as they're written). Also check out the "Linux Project Registry" (posted to the newsgroup and on the FTP sites) which lists ongoing/current Linux projects. Also look in the "old" Linux digests and mailing-list archives, kept on tsx-11.mit.edu and nic.funet.fi. Also, see if there's a GNU(*) version of the program you're looking for (which are available everywhere). Since Linux uses GCC as its native compiler, most GNU software ports directly to Linux without problems. If all else fails, ask on the mailing list or newsgroup if the program is ported and where it's available. (*) GNU stands for GNU's Not Unix, which (besides being a recursive acronym) is a project started by the Free Software Foundation (the FSF) to write a freely distributable version of Unix. The GNU kernel is named HURD, and is based on Mach. It is currently being written, and is not yet done. Many of the GNU utilities, however, are completed and are much more functional than the original Unix utilities. Since they are freely available, Linux is using them as well. VI.03) I've ported $#@! to Linux, what should i do to add it in the standard distribution? ANSWER: (Matt Welsh) First read the previous Q/A, then talk to the maintainers of the various releases (MCC interim, SLS, and so on) about including your program with those releases. The best way to make programs available to the rest of the world is to upload it to one of the Linux FTP sites (such as tsx-11.mit.edu:/pub/incoming or sunsite.unc.edu:/pub/Linux/Incoming). BTW Whenever you submit binaries, please think that if you link them with shared libraries, this might cause problems for those who (gasp!) don't have the shared libraries installed. You can either link them using -static, and if someone wants to build a shared version on their own machine they can get the sources (which you should also make available) and build it themself. Or else provide the shared lib. VI.04) I want to port $#@! to Linux, what are the flags? ANSWER: Recall that Linux implements subset of SYSV and POSIX, so -DUSG and -DPOSIX work in general. NOTE1: SIGBUS is not there, and can be safely commented out in general. NOTE2: see section related to GCC, in the third part of this FAQ, for more details. VI.B.Major/Minor device number ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *** This section is maintained by Rick Miller, any comments, *** suggestions, remarks should be mailed to him at *** Last Update: April 1993. A list of the device names, along with Major and minor numbers, which the Linux kernel may currently recognize. I say "may" because some of them may require patches to your kernel, others must be configured-in using the Linux kernel's "make config" routine before compiling. My profuse thanks to all the writers of device drivers for Linux, and to all those patient folks who took the time to explain their devices to me. May they become obscenely rich. Until then, I hope this list will help prevent driver collisions and perhaps lend a clue to a newbie or two. IF YOU WANT ANY CHANGES OR ADDITIONS TO THIS LIST, *TELL ME*! DEVICES NOT LISTED HERE SHOULD USE MAJOR NUMBERS *ABOVE 127* UNTIL ALLOCATED A MORE PERMANENT NUMBER IN THE LOWER RANGE. (I suggest using a more-or-less random number to avoid the chance of collisions with any other experimental drivers.) TO HAVE MAJOR/MINOR NUMBERS ALLOCATED (OFFICIALLY) FOR YOUR DEVICE DRIVER, SEND E-MAIL TO: RICK@EE.UWM.EDU VI.05) What are the device minor/major numbers? Majors: 0. Unnamed ....... (unknown) .... for proc-fs, NFS clients, etc. (???) 1. Memory ........ (character) .. mem ramdisk kmem null port zero core 2. Floppy ........ (block) ...... fd[0-3]<[dhDH]{360,720,1200,1440}> 3. AT-Disk ....... (block) ...... hd[a-b]<[0-8]> 4. Tty ........... (character) .. tty's and pty's 5. Dial-out ...... (character) .. tty cua* 6. Parallel ...... (character) .. par[0-2] lp[0-2] 8. SCSI-Disk ..... (block) ...... sd[a-h]<[0-8]> 9. SCSI-Tape ..... (character) .. st[0-1] or rmt[0-1] 10. Mouse ......... (character) .. logibm psaux inportbm atibm (mouse) 11. CD-ROM ........ (block) ...... scd[0-1] 12. QIC-tape? ..... (character) .. rmt{8,16} tape<{-d,-reset}> 13. XT-disk ....... (block) ...... xd[a-b]<[0-8]> 14. Audio ......... (character) .. audio dsp midi mixer sequencer 15. Joystick ...... (character) .. js[0-1] 16. Socket ........ (character) .. net arp 17. AF_UNIX ....... (character) .. unix 18. AF_INET ....... (character) .. inet ip icmp tcp udp 19. WE-driver ..... (character) .. we[0-3] 20. DP8390-driver . (character) .. wd[0-3] ec[0-3] ne[0-3] 21. Sony-CD-ROM ... (block) ...... sonycd 22. 2nd AT-Cntrlr . (block) ...... hd1[a-b]<[0-8]> 23. Mitsumi CD-ROM (block) ...... mcd 31. Link Interface (character?) . ??? Breakdown of minors by Majors: ------------------------------ 0. Unnamed ....... (unknown) .... for proc-fs, NFS clients, etc. Minors? 1. Memory ........ (character) .. ram mem kmem null port zero core (0. /dev/ram: was supposed to be the ramdisk, but never got used. As of this date it has not been implemented and probably won't be.) 1. /dev/mem 1. /dev/ramdisk: a BLOCK device (the RAM-disk) 2. /dev/kmem 3. /dev/null 4. /dev/port 5. /dev/zero 6. /dev/core: like /dev/mem, but in "core"-file format for gdb 2. Floppy ........ (block) ...... fd[0-3]<[dhDH]{360,720,1200,1440}> Minors are [[4 * type] + drive] where drive 0-3 == A:-D: (floppy) and type is: 0: Autodetect 4: 720k on 3.5" DD 1: 360k on 5.25" DD 5: 360k on 5.25" HD 2: 1.2M on 5.25" HD 6. 720k on 5.25" HD 3: 360k on 3.5" DD 7. 1.44M on 3.5" HD 0. /dev/fd0: Autodetected first floppy. 1. /dev/fd1: Autodetected second floppy. 2. /dev/fd2: Autodetected third floppy. 3. /dev/fd3: Autodetected fourth floppy. 4. /dev/fd0d360: 360k on 5.25" DD in first drive 5. /dev/fd1d360: 360k on 5.25" DD in second drive (You can work out the rest of the intermediates...) 8. /dev/fd0h1200: 1.2M on 5.25" HD in first drive 12. /dev/fd0D360 (/dev/fd0H360): 360k on 3.5" DD in first drive 16. /dev/fd0D720 (/dev/fd0H720): 720k on 3.5" DD in first drive 20. /dev/fd0h360: 360k on 5.25" HD in first drive 24. /dev/fd0h720: 720k on 5.25" HD in first drive 28. /dev/fd0H1440: 1.44M on 3.5" HD in first drive Naming goes like this: fd[drive][media][size] where: [drive]=0-3: Corresponds to DOS's "A:"-"D:". [media]={d,h,D,H}: d=Double Density 5.25" diskette h=High Density 5.25" diskette D=Double Density 3.5" diskette H=High Density 3.5" diskette [size]={360,720,1200,1440} kilobytes. Floppies are assumed to be double-sided (DS), and drives are assumed to be high-density devices. 3. AT-Disk ....... (block) ...... hd[a-d]<[0-8]> (For IDE, MFM, and RLE drives and controllers.) On the first AT controller card: 0. /dev/hda (/dev/hda0): The whole first HD, including its MBR. 1-4. /dev/hda{1-4}: Primary partitions on the first hard drive. 5-8. /dev/hda{5-8}: Extended partitions on the first hard drive. 64. /dev/hdb (/dev/hdb0): The whole second HD, including its MBR. 65-68. /dev/hdb{1-4}: Primary partitions on the second hard drive. 69-72. /dev/hdb{5-8}: Extended partitions on the second hard drive. On the second AT controller card: 128. /dev/hdc (/dev/hdc0): The whole third HD, including its MBR. 129-132. /dev/hdc{1-4}: Primary partitions on the third hard drive. 133-136. /dev/hdc{5-8}: Extended partitions on the third hard drive. 192. /dev/hdd (/dev/hdd0): The whole fourth HD, including its MBR. 193-196. /dev/hdd{1-4}: Primary partitions on the fourth hard drive. 197-200. /dev/hdd{5-8}: Extended partitions on the fourth hard drive. Notes: BE *VERY* CAREFUL WITH the four "whole drive" devices (hda, hdb, hdc, and hdd)!! These four devices embody the *entire* *drive*, not just one partition. The only things that use them are things that need to read/change the partition table (like fdisk). Linux doesn't order anything. It perceives partitions in the order in which they appear in the partition table. Thus, /dev/hd?1 may follow /dev/hd?2 in the cylinder numbering. The names of the hard drives are not the same as under Minix. 4. Tty ........... (character) .. tty's and pty's 0. /dev/tty0: This is the currently active Virtual Console. 1-9. /dev/tty[1-9]: Specific virtual consoles. 10-63. /dev/ttyV[10-63]: More virtual consoles that nobody uses. 64-127. /dev/tty[0-?][0-63]: Dial-in serial ([controller][port]). 128-191. /dev/pty[p-s][0-f]: PTY Masters. 192-255. /dev/tty[p-s][0-f]: PTY Slaves. ([0-f]=0123456789abcdef) Notes: NOTICE THE NEW NAMING FOR SERIAL LINES. Serial lines will be named either "tty..." or "cua..." (See Major #5) followed by the one-digit number of the *board* the line is from, and the number of the line on that board. The four default lines are considered to be on board "0", so what DOS calls "COM2:" should now be known as "/dev/tty01" or "/dev/cua01". For more information on the use of multi-port boards, read the documentation which accompanies the serial patches. 5. Dial-out ...... (character) .. tty cua* 0. /dev/tty: the tty that owns the process calling it. 64-127. /dev/cua[0-?][0-63]: Dial-out serial ([controller][port]). (See Major #4 for NEW NAMING CONVENTION.) 6. Parallel ...... (character) .. par[0-2] lp[0-2] Parallel (printer) ports. (Increasable in include/linux/lp.h) 0. /dev/par0 (/dev/lp0): First XT parallel port 1. /dev/par1 (/dev/lp1): First AT parallel port 2. /dev/par2 (/dev/lp2): Second AT parallel port Notes: The number of line printers is defined by LP_NO which is found in [/usr/src]/linux/include/lp.h. 7. Unused. (First come, first serve.) This one's getting old. No minor numbers are yet assigned. It's not even in the source code. Maybe it never will be... 8. SCSI-Disk ..... (block) ...... sd[a-h]<[0-8]> Minors numbers are ((16 * Drive) + Partition) where Drive is the number of the physical drive in order of detection and Partition is as follows: 0 is the whole drive 1-4 are the DOS "primary" partitions 5-15 are the DOS "extended" (or "logical") partitions, so... 0. /dev/sda (/dev/sda0): The first (detected) SCSI drive. 1-4. /dev/sda[1-4]: Primary partitions on the first SCSI drive. 5-15. /dev/sda[5-15]: Extended partitions on the first SCSI drive. 16. /dev/sdb (/dev/sdb0): The second (detected) SCSI drive. 17-20. /dev/sdb[1-4]: Primary partitions on the second drive. 21-31. /dev/sdb[5-15]: Extended partitions on the second drive. 32. /dev/sdc (/dev/sdc0): The third (detected) SCSI drive. ...and so on. 9. SCSI-Tape ..... (character) .. st[0-1] or rmt[0-1] 0. /dev/st0: First (detected) SCSI tape drive, rewind-on-close. 1. /dev/st1: Second (detected) SCSI tape drive, rewind-on-close. 128. /dev/nst0: First (detected) SCSI tape, *no* rewind-on-close. 129. /dev/nst1: Second (detected) SCSI tape, *no* rewind-on-close. 10. Mouse ......... (character) .. logibm psaux inportbm atibm (mouse) (MGR may require that /dev/mouse be linked to one of these...) NOTE THE CHANGES TO DIFFERENTIATE MOUSE TYPES! (Please implement these in the distributions.) 0. /dev/logibm: Logitec-'compatible' bus mouse 1. /dev/psaux: PS/2 mouse port (may not work on some lap-tops, yet) 2. /dev/inportbm: MicroSoft "InPort" bus mouse 3. /dev/atibm: ATI XL bus mouse 11. CD-ROM ........ (block) ...... scd[0-1] 0. /dev/scd0: The first (detected) SCSI CD-ROM. 1. /dev/scd1: The second (detected) SCSI CD-ROM. ("There's not much more to it than that" says Eric Youngdale.) 12. QIC-tape? ..... (character) .. rmt{8,16} tape<{-d,-reset}> (I really don't have much info on this one... ) 6. /dev/rmt8: QIC-120 8. /dev/rmt16 (/dev/tape): QIC-150 136. /dev/tape-d: (It has something to do with being 128+8... ?) 255. /dev/tape-reset: For resetting only. 13. XT-disk ....... (block) ...... xd[a-b]<[0-8]> XT (8-bit) hard disk controller devices. Minor numbers are assigned in the same manner as for the normal (AT-type) Hard Drive devices ("/dev/hd*"). 14. Audio ......... (character) .. audio dsp midi mixer sequencer 0. /dev/mixer: Mixer and Control Device 1. /dev/sequencer: FM-synthesizer and Midi 2. /dev/midi: (for future use) 3. /dev/dsp: Digitized voice (DAC/ADC) 4. /dev/audio: (Reserved for compatibility with Sun) 15. Joystick ...... (character) .. js[0-1] 0. /dev/js0: (Left/Right?) joystick. 1. /dev/js1: (Right/Left?) joystick. 16. Socket ........ (character) .. net arp 0. /dev/net: Generic layer (sockets) 1. /dev/arp: Address Resolution Protocol (ARP) 17. AF_UNIX ....... (character) .. unix 0. /dev/unix: AF_UNIX protocol layer 18. AF_INET ....... (character) .. inet ip icmp tcp udp 0. /dev/inet: AF_INET protocol layer 1. /dev/ip: Inernet Protocol (IP) 2. /dev/icmp: Internet Control Message Protocol (ICMP) 3. /dev/tcp: Transmission Control Protocol (TCP) 4. /dev/udp: User Datagram Protocol (UDP) 19. WE-driver ..... (character) .. we[0-3] 0-3. /dev/we[0-3]: "WE" driver 20. DP8390-driver . (character) .. wd[0-3] ec[0-3] ne[0-3] 0-3. /dev/wd[0-3]: "DP8390" driver, WD8003 8-11. /dev/ec[0-3]: "DP8390" driver, 3C503 16-19. /dev/ne[0-3]: "DP8390" driver, NE2000 21. Sony-CD-ROM ... (block) ...... sonycd 0. /dev/sonycd: Sony CDU-535 CD-ROM, I think. 22. 2nd AT-Cntrlr . (block) ...... hd1[a-b]<[0-8]> Minor numbers are like those of the primary AT-Disk controller. THIS MAY WORK FOR HARD-CARDS. (Note the "1" in the device name for the secondary controller. This is because we may eventually wish to change the names of the primary-controller drives to "hd0[a-b]...".) 23. Mitsumi CD-ROM (block) ...... mcd I don't know much about this one. 31. Link Interface (character?) . ??? 0. ??? Link Interface for use with Christoph Niemann's driver for the INMOS C012-based high-speed serial link interface card (useful for talking to transputers or video digitizers). VI.06) (Chuck Boyer) Could some one clear up the devices meaning? ANSWER: (Jim Winstead Jr) >port This allows programs to access the hardware ports directly. Not something you generally mess around with much. >ptyp0-3 >ptypa...tty These are the pseudo-tty 'master' devices. Each pty connection uses a slave-master set of tty devices. >tty0... tty[1-8] are the virtual consoles associated with Alt-F[1-8]. tty0 is the current virtual console (so writing something to tty0 goes to the current vc). >tty64 I've figured out is the modem connection Yes, that would correspond to COM1 under DOS. However, the tty64 name is obsolete - ttys[1-4] should be used instead. >ttyp0... >ttypa... These are the pseudo-tty 'slave' devices. >ttys1... These are the serial devices. ttys1 corresponds to COM1 under DOS, ttys2 corresponds to COM2, etc. VII. MORE HINTS =============== This part try to keep track of the different information that appeared in comp.os.linux and on the list since beginning of March. I tried to update it for KERNEL_VERSION, so there might be some mistakes. Moreover take care to use the correct library and include stuff, and the ad-hoc gcc you use !!! VII.01) Where is 'which' ? ANSWER: It depends on the sh you are running: in bash 'type -path' in tcsh it's a builtin for rc you can try the following (untested by me) script from Kevin Brown: #!/bin/sh for i in `echo $PATH | sed 's/:/ /g'` ; do for j in ""$@" ; do if test -x "$i/$j" ; then echo "$i/$j" fi done done VII.02) How to use setterm: for the novice? ANSWER:The setterm utility provides access to most of Virtual Consoles (VCs) functionality. You can set your screen up to blank at 10 minutes using: setterm -blank 10 You can set colors, and clear the screen. For a full list of commands, just type "setterm" with no arguments. There are a few tricks with the screen dumper can really make VCs go a long way. Here are a few of the common ones that I use: setterm dump Dumps the contents of the current VC to screen.dump (in the current dir). setterm dump 4 Dumps the contents of VC 4 to screen.dump setterm -file mydumpfile -dump 4 Dump the contents of VC 4 to the file mydumpfile setterm -file /dev/tty0 -dump 4 Dumps the contents of VC 4 to the current VC. setterm -file /dev/tty4 -dump Dumps the contents of the current VC to VC 4. setterm -file /dev/ttys1 -dump Dumps the contents of the current VC to the serial port. Handy if you are logged on and want to paste a screen full without having to resort to doing a file transfer. setterm -file mydumpfile -append 4 Appends to instead of overwriting the dump file. Useful if you have several screens you wish to concatenate. VII.03) I've tried clear/reset which exist on most of unix but it doesn't work, have I missed something? ANSWER: setterm -clear or setterm -reset will solve your missing. For clear, you can also write a small script (which use the cl: part of /etc/termcap wrt your TERM), or use bash where ctrl-l will do it for you. VII.04) I know there are VC, but where is the setterm stuff? ANSWER: It's in the current distribution (i.e. on the images), the source can be found in virtcons.tar.Z at nic.funet.fi VII.05) I know there are shared libraries; does there exist an easy way to check an executable for sharing ? ANSWER: (Claude Morin:) There exists at tsx-11 ldd.tar.Z If you follow the instructions, you will be able to type "ldd " to List the Dynamic Dependencies of the executables. In other words 'ldd' prints the name of the shared libraries needed by the executable, nothing appears for static one. VII.06) What is the rdev program provided in the images? ANSWER: It's a program from Werner Almesberger of ETH. With no argument it prints the first line of /etc/mtab. With one argument, a boot-image, it prints the device configured as the root device, and with two arguments, a boot image and a device, it sets the device as default root in the specified image. VII.07) How to start Linux from drive B? ANSWER: There is a DOS utility called boot_b.exe (look at DOS ftp). Another simple way is to open the box and invert the cables. VII.08) The program boot_b works fine /but/ once the first disk is read the system go back to the first drive, any hints? ANSWER: Yes, change the bootimage in just the same way that you change it to boot on the hard drive, execept that the major/minor pair is different. All these information are in the file INSTALL-0.10. Remember that if you use a sun or other endian machine, you will need to reverse the byte order when you run the filter program (also in the same file). VII.09) How can I get Linux to boot directly from the harddisk? ANSWER: (Rick) The best option right now is LILO. You can find the last version in the following places: on sunsite.unc.edu in /pub/Linux/system/Linux-boot/lilo on tsx-11.mit.edu in /pub/linux/packages/lilo. The files are lilo.nn.tar.z source and documentation lilo.u.nn.ps.z user's guide in PostScript format lilo.t.nn.ps.z technical overview in PostScript format (*) lilo.u.nn.dj.z user's guide for HP DeskJet (*) lilo.t.nn.dj.z technical overview for HP DeskJet Where nn is the last version (in July it's 11). (*) The HP DeskJet files are only on sunsite.unc.edu. See Section III of this FAQ for LILO information. VII.10) Sometimes, when I want to remove a directory, I get an error message, is it a (known) bug? ANSWER: No, There is no bug at all, you probaly have another shell on another VC whose working directory is either the one you try to remove, either a subdirectory of it. VII.11) I'm looking for init, getty, login, passwd stuff, where can I find them? ANSWER: You should find it in shadow.tar.Z (only sources), at least at tsx in the usr.bin directory. Many people have reported some troubles with the *OLD* shadow-passwd (shadow-bin.tar.Z and shadow-src.tar.Z, so do not use them anymore); an alternative might be the mcc-interim which contains standard passwd binary. There is also the Peter Orbaek's admutil-1.?.tar.Z and poeigl-1.?.tar.Z which contains source for shutdown, su, chsh, passwd and a system V init compatible. VII.12) How can I setup a user account other than root ? ANSWER: You can either use the adduser program, either do it manually. In the later case, you have to: a) edit /etc/passwd as root and add a line of the following format: user:passwd:uid:gid:user name:home directory:login shell user is the login name; uid is the numeric user id, it should be unique; gid is the numeric group id, this number should correspond to an entry in /etc/group. The passwd field should be left blank 'cause it is stored in an encrypted form [to set this field just use the passwd program]. example faq::200:5:Marc-Michel:/home/faq:/bin/sh b) Still as root, you shoud now create the home directory and set the correct ownership. mkdir /home/faq chown faq /home/faq chgrp 5 /home/faq VII.13) I've been trying to get Linux to run on my [3/4]86 box. It can't even boot. Any suggestions? ANSWER: The most common error/problem is writing the bootimage to a low density disk. It fits, but the bootstrap code will only recognize high density disk. So try to format explicitely disk as high density: - for 3.5", 'format a: /n:18 /t:80 ' - for 5.25", 'format a: /n:15 /t:80 ' VII.14) Does there exist games, languages (other than C), and anything which make the system more friendly? ANSWER: Yes, among other things there are rogue and yahtzee; TeX; Prolog, Perl.. but in general, if you want some extra tool port it to Linux this is also a good beta-testing exercice. VII.15) I have an SVGA, but Linux detect an EGAc/EGAm; is it normal? ANSWER: (Jim Winstead) This is correct actually. You have an EGA+ card (SVGA) with a Color/Mono monitor. The only four possibilties are EGAc, EGAm, *MDA and *CGA (according to the code in kernel/chr_drv/console.c). The true test, if Linux detects your video card, is if you press at the "Press to see SVGA- ..." boot-time message. If you have a SVGA recognized card, it will ask you to choose a screen size. If not detected, the default is 80x50 mode. BTW if you have no SVGA, press the and you are in 80x25 mode. If you have dowloaded the kernel, you can automatically skip this query at boot-time if you set the SVGA_MODE variable in the main Makefile before compiling a new bootimage. VII.16) How can I change the keyboard repeat rate? ANSWER: (Michael K Johnson) In boot/setup.S there are the lines: ! set the keyboard repeat rate to max mov ax,#0x0305 mov bx,0x0000 int 0x16 If you don't want to change the repeat rate at all, just comment out these lines. If you want something in the middle, change the mov bx,0x000 by mov bx,0x??yy where ??yy is determined by (Ralf Brown's interrupt list) bh= delay value (0x00 = 250ms to 0x03= 1000ms (one sec)) this is the delay before the repeat is performed bl= repeat rate (0x00 =30/sec to 0x1f=2/sec; 0x0c=10/sec [default]) VII.17) I compiled fdformat.c and ran it on 1.44Mb and 1.2Mb, the results are unreadable, any clue? ANSWER: (M. Pereckas) fdformat only low-level formats the disk. to use the fdformatted disk with DOS filesystem, run mformat on the disk. Mformat writes DOS filesystem information but is unable to low-format :). In order to put a Linux filesystem on a (low)formatted disk you have to mkfs it. VII.18) Is it possible to disable the 3-fingers salute (ctrl-alt-del) ? ANSWER: Yes, in kernel/sys.c you can read the following: /* * this indicates wether you can reboot with ctrl-alt-del: the deault is yes */ static int C_A_D = 1; there is also a small utility written by Linus in digest242 vol#2 VII.19) Could some one explain the information provided at boot-time? ANSWER: (Jim Winstead Jr) > serial port at 0x03f8 is a 16450 > serial port at 0x02f8 is a 16450 (what's that the uart chip?) Right, the last number should either be 8250, 16450, 16550, or 16550a, and on the two 16550 models, it will report that FIFO's have been disable (16550) or enabled (16550a). > 8 virtual consoles (that's how many alt-F's I can get going? > but only F1-4 actually work) You can get sessions running on Alt-F[1-8], but the 'standard' /etc/inittab only runs getty/login on Alt-F[1-4]. You can start sessions on the other consoles by using 'doshell' or adding lines to /etc/inittab. > 4 pty's (are these the consoles F1-4?) No, those are 'pseudo' ttys, which programs like MGR use to simulate tty connections. That's probably a gross over-simplification, but it gives you the general idea, I think. :) > p_init: lp1 exists (0) (is that the (l)ine (p)rinter?) Right. VII.20) I have upgraded the kernel from XX to YY (XX > YY), however the login screen still says YY. ANSWER: Just change the message in one of these files: /etc/issue and /etc/motd. The former contains the message before the login, the later is the one after you are logged in. VII.21) What is doshell good for ? ANSWER: It's an old program provided in the early Linux version (0.12) when the getty was not already there, it spawns a shell on any tty's. (Mattew Gream): I do this quite often ( getty on tty1, 2, 3 and my rc.local spawns a shell on tty4 as follows '/usr/bin/doshell /dev/tty4 /bin/tcsh &' VII.22) I don't have the kernel sources, how can I change the keyboard language? ANSWER: You can use the fixkbd program written by Laurent JULLIARD (Laurent_JULLIARD@grenoble.hp.com). Its purpose is to fix the keyboard map used in your kernel image. It works more or less a la "rootdev" (or rdev). It can be found on tsx-11.mit.edu in /pub/linux/binaries/sbin/fixkbd.tar.Z. VII.23) Does there exist a possibility to track down the source of kernel pannic messages ? ANSWER: Here's info from Linus on how to track down the source of kernel panic messages. The values for EIP, address, and so on are JUST EXAMPLES: the EIP, EFLAGS, etc. can be anything. The lines after ">" were written by me; the responses by Linus. > Unable to handle kernel paging request at address C000000A This means something in the kernel tried to access kernel memory at address 0x00A (the C0000000 offset is due to the kernel starting at virtual address 0xC0000000). The first page of kernel address space is unmapped to find these kinds of incorrect references (it's probably a NULL dereference to a structure member at offset 0xA). > Oops: 0002 Error code. This tells you if it's a read or write (forget which ritgh now, and don't have any books handy) > EIP: 0008:000290D2 This is where it happened: segment 0008 (kernel code segment) and offset 0x290D2 into the kernel. So to find this, you generally do something like nm /usr/src/linux/tools/system | sort | less and search for the function that contains the address 0x290D2. > EFLAGS: 00010087 > fs: 0017 Eflags and fs when the exception happened. You usually don't need this. > base: C0000000, limit: 000A0000 > Pid: 0, process nr: 0 In what process the exception happened. This is the swapper, which also means the thing is fatal (other processes you can just kill). That it's in the swapper process probably means that it's an interrupt that did it, as the swapper doesn't really do anything. > 89 50 04 c7 03 00 00 00 00 c7 This is the instruction that resulted in the error. I usually disassemble them by hand and see what it is, then I try to find out exactly where in the function this assembly sequence comes up (probably by compiling the .c file to a .s file and looking around). Alternatively you can just run 'gdb' on /usr/src/linux/tools/system, but gdb has some problems. > task[0] (swapper) killed: unable to recover > kernel panic: Trying to free up swapper memory space > In swapper task - not syncing This is just to tell you not to expect anything from the kernel any more: linux cannot go on without the swapper task. > How can I decode the numbers in the message? > Also, note that sometimes the "Unable to handle..." > message is followed by the "Oops: 0002" block, but > the last message is sometimes something else (i.e. not > always a "task[0] (swapper)...." message, but something > from the TCP driver in this case. It depends on where it happened. If it's an interrupt, it can essentially happen in any task (all interrupts are handled in the task that happens to be currently active), while "normal" code happens in the task that calls it. ===================8<==========>8================ -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # LaBRI | # # 351 cours de la Liberation | e-mail: corsini@geocub.greco-prog.fr # # 33405 Talence Cedex | e-mail: corsini@labri.u-bordeaux.fr # # | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- There will be a sig when our local net is reliable. For now, I would rather stay anonymous. Newsgroups: comp.os.linux,comp.os.linux.announce,comp.answers,news.answers Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!gatech!howland.reston.ans.net!math.ohio-state.edu!cs.utexas.edu!uunet!mcsun!julienas!geocub!labri.u-bordeaux.fr!corsini From: corsini@labri.u-bordeaux.fr Subject: Linux Frequently Asked Questions 4/6 [monthly posted] Message-ID: Followup-To: poster Summary: Linux, a small and free unix-like for 386-AT computers. Sender: corsini@greco-prog.fr (Marc-Michel CORSINI) Supersedes: Reply-To: linux@labri.u-bordeaux.fr Organization: Greco Prog. CNRS & LaBRI, Bordeaux France References: Date: Wed, 21 Jul 1993 09:52:30 GMT Approved: news-answers-request@MIT.Edu Expires: Fri, 3 Sep 1993 09:51:58 GMT Lines: 784 Xref: senator-bedfellow.mit.edu comp.os.linux:52220 comp.os.linux.announce:922 comp.answers:1372 news.answers:10585 Archive-name: linux-faq/part4 Last-Modified: 93/07/11 Version: 1.20 ********************************************************* * * * Answers to Frequently asked questions about Linux * * * ********************************************************* This post contains Part 4 of the Linux FAQ (6 parts). It must be read *after* the 3 first parts. ===================================8<====>8============================ CONTENTS (of this part) VIII. FEATURES (part4) IX. GCC MISC INFORMATION (part4) X. SCSI SPECIAL (part4) ===================================8<====>8============================ VIII. FEATURES ============== VIII.01) I've read that linux has virtual consoles, what must I do to get them? ANSWER: Yes there are, you can access them with the left -key together with -key. With the Linux Images distribution, 4 consoles are available, getty runs on them. Notice that they are NOT accessible when running X (contrary to some commercial unices). VIII.02) When Linux boots, I get the following message "8 virtual consoles"; how can I acess to the 5-8 vc's ? ANSWER: If you want the getty to run on the 5-8, you should add the corresponding entries in /etc/inittab. You can also just run sh on them by using the doshell soft. And then in either case, the ALT-F[5-8] will access the corresponding vc. VIII.03) What kind of shell is /bin/sh ? ANSWER: It's the Bourne Again Shell, bash-1.12.3 BTW There does exist different shells for Linux, these are: bash, rc, zsh, tcsh and pdksh (a korn shell). VIII.04) Does there exist a man page for **** ? ANSWER: Download man.tar.Z from your favorite linux ftp site, there is most of the fileutils man page -- either **** or g****, example there is nothing on ld, but there is for gld :) --, check the whatis database provided. The files in the cat1 dir are pre-formatted man pages that the man program can use. Quite recently the man pages for section 2 have been written (thanks Drew) and can be found, at least at tsx-11 in /pub/linux/docs/man/man2.tar.Z Also manpages are in the SLS on the b? disks. BTW there is nroff and groff for Linux. Cawf 2.0 works just fine for simple man pages, and a partial ms support too. Moreover Michael Johnson is the coordinator for man pages under Linux, he is looking for volunteers, so contact the DOC Channel. VIII.05) Is there a simple man package (groff is too big): ANSWER: "Cawf -man" also "fm -m" (Al Clark) tsx-11 in /pub/linux/binaries/usr.bin/fm.tar.Z VIII.06) What are the editors available in linux? ANSWER: Right now there are uemacs-3.11, elvis-1.4 (1.5). Gnu Emacs is there, read the section devoted to it in the 5th part of this FAQ. Also the port of mg (micro gnu) has been done and can be found at least at athos.rutgers.edu (128.6.4.4) in pub/linux, mg is the binary and mg.tar.Z is the sources file. You can also find a PD ed, and elvis has an ex mode. Also available is Lucid Emacs (available on sunsite.unc.edu in pub/Linux/apps/editors/lemacs), including binary and info and lisp trees (it takes about 18MB of disk space). Finnally there are joe, vile-3.11, elle (Elle Looks Like Emacs), Xedit and aXe. VIII.07) Does there exist a printer package for Linux? ANSWER: Read the lpd-FAQ, also included in this FAQ (section XIV). VIII.08) Are uucp, mail, and/or USENET news available for Linux? ANSWER: Yes !!! Read the section UUCP/NEWS/MAIL for LINUX in this FAQ. Moreover if you are interested in the last uucp features, join the UUCP channel (see part1 of this FAQ for more details about the multi channels list). VIII.09) How do I make swapping work? ANSWER: Quite simply, you need the swapon and the mkswap binaries. Then you can choose between a swap partition or a swap file. The mkswap is used to write the "swap signature", whilst the swapon binary is to activate the swapping. First of all you need a partition :), I assume it's the second of your first disk namely /dev/hda2, and it's 10MB big A) swap partition: you have to indicate it's a swap area, this is done via mkswap (instead of mkfs) which needs the name of the partition and the size in blocks (a block is 1Ko big); the optional -c flag is for bad block checking. So for our example you should perform: mkswap [-c] /dev/hda2 10000 Then you need to indicate that you want linux to use the swap area, this is done via swapon. In general it is set in the /etc/rc file, just put the following entry: /bin/swapon /dev/hda2 It can also be achieved via the /etc/fstab file B) swap file: The process is quite close; you need a partition, and a swap file. Assume that I prefer a swap area of 4MB (I want to keep some place in /dev/hda2). I need first to "dd" the file. dd if=/dev/hda2 of=/swap_file bs=1024 count=4096 bs stands for block size, and count is the number of blocks then I have to put the "swap signature" on that file: mkswap /swap_file 4096 At this point, you should 'sync', just to be sure the signature is effective. And finally add an entry in the rc file: /bin/swapon /swap_file VIII.10) When I boot I get one of the following messages: "Unable to find swap signature" or "Bad swap-space bitmap" ANSWER: You probably forgot to make your swap-device, use the mkswap command. VIII.11) How do I know if it is swapping? ANSWER: You will notice it :)) First of all, Linux tells you at boot time, "Adding swap: XXX pages of swap space", and if you start running out of memory, you will notice that the disk will work overtime, and things slow down. Generally a 2Meg RAM will make the system swap constantly while running gcc, 4 Meg will swap occasionnaly when optimizing big files (and having other things active, such as make). Also, the command 'free' (from the ps package) reports total enabled swap space and current swap use. VIII.12) How is it possible to remove a swap file? ANSWER: Simply perform a rm on that file, and remove the swapon of your /etc/rc file. VIII.13) How is it possible to remove a swap device? ANSWER: mkfs the device, and remove the swapon of your /etc/rc file. VIII.14) How much swap space do I need ? ANSWER: Linux does not perform real swapping, it's rather paging (see below for a more complete explanation). The swap area is *added* to the memory and can be viewed as virtual memory, so choose the size you need, example: 8MB RAM + 6MB swap => 14MB virtual memory VIII.15) Could someone explain the swap process on Linux?, is it swapping or paging ? ANSWER: (Linus) Linux uses swap as /additional/ memory, one page of the swap-space is used for the good-page bitmap and the swapspace signature. In fact Linux does only paging, no swaping in the meaning "write out one whole process to disk". The reason it's called swapping is that Linux used paging for memory management on a low level since the very beginning, but didn't page to disk at all until 0.12. VIII.16) Is there any way to tell how much swap space you are using or have left? ANSWER: The free program provided with the ps package handles this. VIII.17) I have a 2Megs box, but "free" reports only 1Meg why? ANSWER: (Linus:) "free" doesn't concern with the memory the kernel has allocated for itself. In other words what you see is the *user* memory available. The kernel has taken the low 1Meg for it's use (~250Ko for it and the rest for buffer cache and kernel data structures); for big memory machine it could be even 2Megs. VIII.18) What tape drives work with Linux ? ANSWER: (24 sept. P. Riipinen) - There is a working QIC-02 device driver for Linux, supporting (at least) Everex/Wangtek cards. - There are additional patches for the QIC-02 to support Archive SC402/499R. You can find them in /pub/linux/alpha/qic-02 at tsx-11 There are some bugs in the driver but you can backup. - Newer drivers are all SCSI, so check the SCSI section in this FAQ. VIII.19) Is there a driver for my Colorado Jumbo tape drive ? ANSWER: (Charlie Brady 93/06) Not at this stage, although some are trying. The Colorado Memory Systems tape drive connects to the standard floppy disk controller as a third device on the cable. Similar drives are sold by Irwin, Mountain, Wangtek and others and they are collectively known as QIC-40 and QIC-80 drives. The medium is a DC-2000 or DC-2120 minicartridge. There is a pre-pre-alpha version of a driver, and appropriately skilled volunteers are encouraged to try to finish it. Be warned, the timing constraints of the interface may be a significant problem. VIII.20) Does there exist shared libs ? ANSWER: (H.J. Lu, hlu@eecs.wsu.edu, 09/01/92) The shared library under Linux started at 0.12. Peter MacDonald collaborating with Linus made the first generation of shared library, which is the base of the classic shared library which is no longer widely used. The kernel support of shared library under Linux is system call extern int uselib (const char *__filename); which loads an executable image with fixed entry point into memory, just like the ordinary executables. In crt0.s, a function which can find out if and which shared images are needed and loads them is invoked before `main ()' is called if necessary. David Engel and I developed a way to tell the loader which shared images have to be loaded, utilizing the similar technique used in global constructor in g++ 2.x with the help from GNU binary utilities. In the classic Linux shared library, we build a big executable image for several libraries and make sure no external variables outside of the participating libraries are referenced. Then we can get the absolute addresses of all the global variables defined in the libraries used to build that executable image. After that, we make a stub library for each participating library which just has the absolute addresses of all the global variable in it. Starting with libc.4.3, a form of dynamic linking developed by Eric Youngdale was introduced into the shared libraries. As part of this, the tools that were used to generate the sharable libraries were completely redone which made the job of building the libraries much easier, and thus the libX*.so.3.0 libraries were made as DLL jumptable libraries. VIII.21) Does Linux work for SCSI drives? ANSWER: Yes since v0.96. Read the section devoted to SCSI in this FAQ (check the TOC file to find the section). VIII.22) Linux is supposed to work with ESDI drive. However I have trouble with my Magtron MT-4115E (Joincom controler), any clue? ANSWER: (Linus) Some harddisk don't like linux (even though they should). Maybe not a bug but a deficiency. (Mika) I had to remove the printk "unexpected hd interrupt" statement in hd.c because I was getting so many of those messages. Be warned that if there is any read error the system just hangs, even the ctrl-alt-del won't work. You should be able to use your ESDI drives if you could live with those nuisances. VIII.23) How does one go about applying a patch to Linux ? ANSWER: (Drew Eckhardt) In the unix world most of distribution are in source form. This includes the operating system. To apply a patch, you apply it with the 'patch' program to the affected sources. The patch program takes as input the differences between the old and the new version. After patching you need to recompile the sources. Assume I want to apply a patch enclosed in the file XXX. First of all I will look at the top of XXX, where the file affected is identified. This may have aleading path attached to it. Either cd out to the "root" of the patch, ie if I see linux/kernel/blk_drv/blk.h I would cd into /usr/src (assuming it's the place where I can find linux/kernel...) and then patch as follows patch -p0 < whatever_place/XXX or, you can specify a number of path components to strip from the path. If I am in the blk_drv directory patching would be patch -p3 < whatever_place/XXX VIII.24) I got the patches on some ftp sites, and applied them to the kernel and tried to compile. It didn't !!. Are the patches buggy? ANSWER: Before remake, just do a make clean in the directories involved by the patches. This will force a rebuild of the .o and .a files. If you have a RCS running on your source tree, did you checked a patched version of the files changed before /any/ CO either by you or make Finally, make sure the patches succeded. Normally, failed patches on a file FILE will leave a FILE# file. Moreover you will get a "chunk failed" message. It is possible to capture the output while patching, with the following: patch -p0 < patchfile | 2>&1 patch.result | more VIII.25) What is VFS? ANSWER: (Ted) Linux 0.96 already has Virtual FileSystem, which means that it acts as a filesystem switch. It makes it easy for someone to design another filesystem format and include it in the Linux kernel along with the standard minix filesystem format. So it /enables/ someone to design a robust filesystem which would have some nice properties (no 14 chars file name limitation, nor 64Meg limit), and could be included in the kernel in such a way that both the Minix and the new one could be mounted at the same time. This solves the uncompability problem; since the root disk could still use the Minix filesystem, while the hardisk could be using the new one. VIII.26) What's about Bus Mice ? ANSWER: (Nathan I. Laredo) Since the Linux v0.96c-pl2 the kernel does support LOGITECH and BUS MICE If you are unsure that you have a bus mouse or not, check to see if your mouse card has a selection for a sample rate switchable between 30Hz and 60Hz (or possibly 25/50Hz), if it does not, then it is NOT a true bus mouse (InPort mice for example will not work with this driver). To create a bus mouse device: mknod /dev/mouse c 10 0 VIII.27) What's about TeX ? ANSWER: The primary site for Linux TeX is 129.78.66.1, this is P. Williams' site in Australia. The stuff at tsx-11 was posted by T. Dunbar who does support/maintain the dvilj stuff. VIII.28) What's about MGR ? ANSWER: (General Information grabbed from various sources) There is a MGR channel available , contact the request adress with help in the body: linux-activists-request@niksula.hut.fi The stuff can be found at tsx-11 in pub/linux/packages/MGR In brief: MGR provides: - multiple overlapping windows - multiple fonts - text and graphics in each windows - a simple popup menu package - a client/server model 'a la' X - independance from any peculiar networking technology MGR consist of a server process and some clients. Each client has his own window, and can create subwindows. Clients communicate with the server via a bidirectionnal channel. A C library is provided. When a new window starts, it is as a terminal emulator running the shell; for more information you can grab the mgr-man.out from bellcore.com A MGR-FAQ is underway, contact u31b3hs@POOL.Informatik.RWTH-Aachen.DE for more information. VIII.29) What's about X11 ? ANSWER: See the section XII. devoted to X11 in this FAQ. IX. GCC MISC INFORMATION ======================== **** Last update July 1993 IX.01) What C compiler should I use for Linux ? ANSWER: The C compiler of Linux is GCC (from GNU). You can find it at tsx-11.mit.edu in pub/linux/GCC. If you want to use the testing release, first join the GCC channel on the Linux mailing list, and then send a note to hlu@eecs.wsu.edu. Don't use gcc older than the one on tsx-11.mit.edu. IX.02) Where can I found information about the C compiler ? ANSWER: Have a look at tsx-11.mit.edu in pub/linux/GCC. There are a README file, release notes and the GCC FAQ written by Hongjiu Lu. IX.03) I seem to be unable to compile anything with gcc. Why? ANSWER: If you have only 2 MB RAM, gcc will die silently without compiling anything. You must have at least 4 MB to do compilations BTW Since swapping is possible, I have heard that compilation works with only 2Meg and a lot disk traffic :) Isn't it great? IX.04) How to compile programs which may be debugged with gdb? ANSWER: There are different ways to handle this problem. If you have the gcc2.2.2 or later it's simple, use the -g flag. Otherwise there are different possibilities: IX.05) When compiling some code, cc1 complains about some insn code, what's that? ANSWER: An insn is an internal representation that gcc uses when compiling. The main part of gcc is to take ordinary c (or c++) code, and compile it, while ding optimizations in insn part, which is soft/hard independant. Then another part which is hard/Os dependant takes the insns and translate it in assembly language. The fix is only to turn off the optimization flag (-O). IX.06) How can I write codes suitable for building shared library ? ANSWER: (Eric Youngdale, eric@tantalus.nrl.navy.mil, 3/1/93) In general there are very few restrictions as long as you are using the new tools for building sharable libraries. Before the DLL libraries were available there were all kinds of things you had to watch out for, but currently you can more or less build a sharable library out of the box without making any source code modifications. See the README in the tools-m-n.tar.z distribution for more information on how to build a sharable library. X. SCSI SPECIAL =============== *** This section is written by Drew Eckhardt, mail him for *** information, questions related to this section. *** Last update July 1993. X.01) What hardware is supported? ANSWER: The Adaptec 154x, Adaptec 174x, Adaptec 1540 compatable boards like the Bustek, DTC3290 and DTC3292, Future Domain 850, 885, 950, and probably other boards in that series but NOT the 880 board unless you make the appropriate patch, 16x0, Seagate ST0x, Ultrastor 14F (Some of the new ALPHA code makes attempts to deal with the 34F) and Western Digital 7000 are supported (revision 5 only, revision 3 boards don't work). Various Adaptec clones from Bustek and Future Domain are known to work, in both ISA and EISA flavors. There is an alpha driver for the Ultrastor 24F, that also works for the 14F and 34F : tsx-11.mit.edu:/pub/alpha/scsi/u24f-driver.tar.z There is also an alpha driver for the ALWAYS IN-2000, in his News posting Eric said that people could contact the author through him - "Eric Youngdale" Some of the SCSI drivers will not autodetect your SCSI host if the BIOS is disabled, and there may be IRQ, DRQ, address restrictions compiled into the distribution kernel. Virtually all SCSI disks, CD ROMS, and tapes should work. SCSI-I, SCSI-I CCS, and SCSI-II devices will work, all though beyond a few CD-ROM ioctl()'s no attempt is made to use SCSI-II specific features. X.02) What hardware is not supported? ANSWER: The Adaptec 152x, 151x, and AIC-6260, non-Adaptec compatable DTC, Mylex, PS/2 SCSI boards, all SCSI ports on sound boards, the trantor parallel->SCSI adapter, Rancho SCSI boards, Grass Roots SCSI boards, Trantor SCSI boards (although a T128/T128F/T228 driver is being written) If you want to run Linux on one of the other boards, you'll have to get technical docs on it, and write a driver yourself or bribe someone to do it. X.03) How do I get SCSI information? ANSWER: Subscribe to the SCSI channel of the linux-activists mailing list. mail linux-activists@joker.cs.hut.fi And put in the header. X-MN-Admin: join SCSI X.04) Where is the latest version maintained? ANSWER: It's in the .99.10 kernel, if we release anything newer it will appear in tsx-11.mit.edu:/pub/linux/ALPHA/scsi Please join the SCSI channel of linux-activists@joker.cs.hut.fi before you grab anything there. X.05) I've found one of the following bugs : - I can't swap to a SCSI disk, or mount one as / - I get a READ CAPACITY FAILED message on bootup. - I have a removeable disk (ie Sysquest) and have problems when I change media. - I have a Seagate / Future Domain TMC-88x and the kernel panics with a kernel paging message. - I have an Adaptec 1742 and am experiencing data corruption - I have an Insite floptical drive and it won't work. - I have a TANDBERG TDC 3600 revision U07, SONYCD-ROM CDU-541 revision 4.3d, DENON DRD-25X revision V, or a SEAGATE ST296 revision 921 and the system hangs or reports multiple devices. - My Adaptec 1542C isn't recognized. ANSWER: All of these bugs have been fixed, so UPGRADE. X.06) What do I do if I find a bug that still looks like a bug after I've read the FAQ? ANSWER: Your best bet is to send it to the SCSI channel of the mailing list, where it will be seen by all of the people who've contributed to the SCSI drivers. In your bug report, please provide as much information as possible regarding your hardware configuration, and all of the messages that Linux prints when it boots. Your chances of getting the bug fixed increase exponentially with the amount of information provided. The bottom line is that if we can't reproduce your bug, and you can't point at us what's broken, it won't get fixed. X.07) What SCSI disks are supported? ANSWER: Flopticals, Bernoulis, Sysquests, and other removeable media devices are supported by the normal SCSI disk driver. X.08) What about CD ROMS? ANSWER: CD ROMS are supported. The ISO-9660 file system with Rockridge extensions is supported. You will have to make sure that you have configured the kernel to include the isofs filesystem or otherwise you will not be able to use the cdrom. X.09) What about SCSI tapes ? ANSWER: Tapes are supported. You may wish to obtain the utility program mt, which is usually available from tsx-11.mit.edu in pub/linux/ALPHA/scsi. X.10) How do I partition the disk? ANSWER: Use fdisk, efdisk, pfdisk or the DOS parititioning program of your choice. X.11) The linux partitioning programs don't work. ANSWER: Some of these default to /dev/hd*, which are disks on WD-1003 compatable controllers (IDE, MFM, RLL, ESDI, etc), rather than /dev/sd* (SCSI disks). Your solutions are to 1. Call the partitioning program with a device name, ie pfdisk /dev/sda 2. Make links from /dev/hd* to /dev/sd*. X.12) My partitioning program can't figure out the disk geoemetry The problem with partitioning SCSI disks and Linux is that Linux talks directly to the SCSI interface. Each disk is viewed as the SCSI host sees it : N blocks, numbered from 0 to N-1, all error free. There is no portable way to get disk geometry. However, DOS doesn't like things like this, it demmands that BIOS present it with a normal Cylinder / Head / Sector coordinates. So, BIOS does, and it comes up with some fabrication that fits what DOS wants to see. You don't want to disagree with what BIOS thinks when you write the partition table. The newest SCSI code will return the mapped geometry for some host adapter / disk combinations. Kernel release 0.99 and later should have this capability. QUESTION : I can't make a filesystem on /dev/hd* ANSWER : /dev/hd* aren't your SCSI disks. /dev/sd* are. See below for approproate major / minor numbers if they do not exist on your root diskette. X.13) What are the major / minor numbers for SCSI drives? ANSWER: Because of the large number of devices that can be hung off of a SCSI bus (as many as 56 if you use SCSI fanouts or bridge boards), and the possibility of 16 partitions on a SCSI disk, we'd run out of minor numbers if they were statically allocated - so a dynamic numbering scheme is used. Block device major 8 is used for SCSI drives, 11 for CD-ROMs. Character device major 9 is used for SCSI tapes. Minors are assigned in increments of 16 to SCSI disks as they are found, scaning from host 0, ID 0 to host n, ID 7, excluding the host ID. Most hosts use ID 7 for themselves. A minor where minor mod 16 = 0 is the whole drive, where minor mod 16 is between 1 and 4, that partition, extended partitions dynamically assigned from 5 to 15 inclusive. Note that the gendisk.c module prints partition tables on initialization - you should be able to see them there. Example : I have three SCSI disks, set up as follows Seagate ST02, ID=0 Seagate ST02, ID = 5 Adaptec 1542, ID = 0 The first disk on the seagate at ID 0 will become minors 0-15 inclusive, the second at ID5 16-31 inclusive, the disk on the Adaptec 48-63. X.14) My tape drive or other removeable media device isn't recognized at boot time. ANSWER: Try booting with a tape in the drive. X.15) How do I reduce kernel bloat and eliminate the drivers I don't want? ANSWER: For kernel release 0.99 and later, just go to the to directory in the kernel source tree, and type ``make config'', and answer the questions. For older kernel distributions, simply #undef CONFIG_DISTRIBUTION in include/linux/config.h, and define the macros for the SCSI hosts you want enabled. X.16) I get SCSI timeouts. ANSWER: Make sure your board has interrupts enabled correctly, and that there are no conflicts with other devices (Sound boards and serial boards sometimes try to use IRQ5). X.17) My Seagate / Future Domain TMC-88x board is not detected. ANSWER: The Seagate and Future Domain boards have memory mapped registers. To detect them, Linux scans for a signature in the ROM BIOS (typically, a copyright message) and sets the register addresses relative to that. This can fail for two reasons 1) If the BIOS is disabled. In this case, you should edit kernel/blk_drv/scsi/Makefile and add -DOVERIDE=x -DCONTROLLER=y where x is the base address of your controller (the factory default setting is 0xc8000) - note that this is *not* the segment (ie, 0xc800), and y is the controller type, either SEAGATE or FD. 2) If we don't know about your BIOS yet Please use DOS and DEBUG to find us a signature that will detect your board - Ie, if your board lives at 0xc800 do debug d c800:0 q and send me (drew@cs.colorado.edu) the nearest convienient ASCII message, with the length and offset from c800:0 or whereever. X.18) The Seagate / Future Domain TMC-88x driver doesn't work. ANSWER: There are several possibilities 1) Is the board jumpered for IRQ5 ? The factory settings are for MSDOS, and have interrupts disabled. On the Seagate, Interrupts are controlled by the W3 (ST01) or JP3 (ST02) jumper. Shorting pins F-G selects IRQ5. 2) Cached machines will not have problems if the Seagate's address space (typically C8000 - CAFFFF) is not marked "non cacheable." This applies to the i486 internal cache as well as i386/i486 external caches. This can be set in the XCMOS of most machines. If you can't disable cache for the Seagate's area (16K in size, starting at the base address), then you must disable the cache entirely, otherwise it won't work. 3) If you've defined -DFAST or -DFAST32 in the kernel, blind transfers will be used. This works fine with most disks, but some won't respond fast enough, the read/write will timeout and things will get out of sync, resulting in timeouts. Try recompiling your kernel without -DFAST or -DFAST32. X.19) The Adaptec driver doesn't work. ANSWER: A common source of difficulty is a conflict between two different boards for an IRQ level, a DMA channel, or an I/O address. Check the settings for the boards you have in your system (music boards are known to use similar IRQ or I/O addresses as the Adaptec. In the new scsi code the Adaptec can use any of the IRQ levels that it can be strapped for, it can use I/O address 0x330 or 0x334, and it can use DMA channels 5, 6 or 7. X.20) The WD-7000FASST driver doesn't work ANSWER: There are at least two different revisions of the WD7000/FASST, built arround different chip revisions with different firmware. Revision 5 boards work, Revision 3 boards do not. X.21) My Ultrastor 14F or 34F isn't detected ANSWER: The Ultrastor 14F driver won't probe for an Adapter at address 0x310. Either move it do a different address, or recompile the kernel, adding a rule to kernel/blk_drv/scsi/Makefile ultrastor.o: ultrastor.c $(CC) $(CFLAGS) -DOVERIDE_PORT=0x310 -c ultrastor.c X.22) When using a Seagate / Future Domain TMC-88x, why does my system hang when syncing to disk? ANSWER: The Seagate boards are an incredibly brain dead piece of hardware. They can only generate an interrupt when a target raises the SEL signal. So, as long as a target is connected, the Seagate driver must spin its wheels waiting for the actual data transfer. Some devices agravate the situation by connecting for long periods of time while not doing anything. X.23) My system is dog slow (ie, 60k/sec) ANSWER: SCSI commands have an incredible amount of overhead. For every command, you need to arbitrate for the bus, select the target, establish an I_T_L nexus, and send the command. Processing of that command may take as much as 1ms on older devices. Add this overhead to what you already have coming through the file system, buffer cache, etc, and you have a real problem. To work around this, we needed to maximize the amount of data that could be transfered in a single command. So, we implemented scatter-gather, which allows reads/writes from/to contiguous disk sectors to non-contiguous buffers. This typically gets you a 3-5 fold improvement in performance. The current kernel has scatter-gather support for the Adaptec, Western Digital, Ultrastor, Future Domain 16xx, Future Domain 8xx and Seagate boards. ===================8<==========>8================ -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # LaBRI | # # 351 cours de la Liberation | e-mail: corsini@geocub.greco-prog.fr # # 33405 Talence Cedex | e-mail: corsini@labri.u-bordeaux.fr # # | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- There will be a sig when our local net is reliable. For now, I would rather stay anonymous. Newsgroups: comp.os.linux,comp.os.linux.announce,comp.answers,news.answers Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!gatech!swrinde!cs.utexas.edu!uunet!mcsun!julienas!geocub!labri.u-bordeaux.fr!corsini From: corsini@labri.u-bordeaux.fr Subject: Linux Frequently Asked Questions 5/6 [monthly posted] Message-ID: Followup-To: poster Summary: Linux, a small and free unix-like for 386-AT computers. Sender: corsini@greco-prog.fr (Marc-Michel CORSINI) Supersedes: Reply-To: linux@labri.u-bordeaux.fr Organization: Greco Prog. CNRS & LaBRI, Bordeaux France References: Date: Wed, 21 Jul 1993 09:52:36 GMT Approved: news-answers-request@MIT.Edu Expires: Fri, 3 Sep 1993 09:51:58 GMT Lines: 1191 Xref: senator-bedfellow.mit.edu comp.os.linux:52225 comp.os.linux.announce:927 comp.answers:1377 news.answers:10590 Archive-name: linux-faq/part5 Last-Modified: 93/07/11 Version: 1.20 ********************************************************* * * * Answers to Frequently asked questions about Linux * * * ********************************************************* This post contains Part 5 of the Linux FAQ (6 parts). It must be read *after* the 4 first parts. ===================================8<====>8============================ CONTENTS (of this part) XI. EMACS for LINUX (part5) XII. X11, THE MAXIMUM and MORE (part5) XIII. NETWORKING and LINUX (part5) ===================================8<====>8============================ XI. EMACS for LINUX ===================== *** This section is maintained by Rick Sladkey (jrs@world.std.com) *** Last Update July 1993. XI.A. GENERAL INFORMATION XI.B. GNU EMACS for LINUX XI.A. GENERAL INFORMATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~ This is a short list of Frequently Asked Questions about GNU Emacs under Linux. It does not address general questions about Emacs which are not Linux specific. For general help about Emacs, 1) learn to use and read the online documentation, 2) read the real Emacs FAQ found in emacs/etc/FAQ, and 3) read the newsgroup gnu.emacs.help. Rick Sladkey XI.B. GNU EMACS for LINUX ~~~~~~~~~~~~~~~~~~~~~~~~~~~ XI.01) What versions of GNU Emacs are available for Linux? ANSWER: All of them. GNU Emacs 18, Epoch, Lucid Emacs, and FSF Emacs 19. Even MULE and Nemacs are rumored to work. In addition, there are other Emacs-like but non-GNU editors such as Micro Emacs, Vile, JOVE, etc. XI.02) Which files do I need? ANSWER: GNU Emacs 18.59 -- tsx-11.mit.edu:/pub/linux/packages/emacs-19.59/* Epoch 4.1 -- sunsite.unc.edu:/pub/Linux/X11/epoch/* Lucid Emacs 19.4 -- sunsite.unc.edu:/pub/Linux/apps/editors/lemacs/* GNU Emacs 19.16 -- sunsite.unc.edu:/pub/Linux/apps/editors/emacs-19.16/* XI.03) What if I want to compile Emacs myself? ANSWER: It is fairly easy (and highly recommended) to compile Emacs yourself if you have the the disk space. In this case you only need the standard Emacs distribution (emacs-18.59.tar.Z from any GNU archive) and the Linux diffs and support files (emacs-18.59b.tar.Z from a Linux archive). The diffs are quite small and mostly amount to a configuration file. GNU Emacs 19.17 is even easier: just unpack it, type `./configure --prefix=/usr' and then `make' and `make install'. XI.04) How do I get Emacs to recognize my cursor keys? ANSWER: Simple. Don't use them. :-) For Emacs 19.59 try putting the linux.el file (from emacs-18.59b.tar.Z) in ~emacs/lisp/term and the sample default.el in ~emacs/lisp. For FSF Emacs 19 you need a decent /etc/termcap file. X11-based Emacsen don't need any support files to get the cursor and function keys right. XI.05) What packages are particularly useful under Linux? ANSWER: Because info format is the documentation standard of the GNU project and just about everything except the kernel comes from FSF, you will find that Dave Gillespie's enhanced info package is very useful. It allows multiple info directories, space bar paging, and supports compressed info files. Please learn to use info. Imagine Unix life without man. Others that I highly recommend are Sebastian Kremer's enhanced dired directory editor, Dave Gillespie's calc calculator, Masanobu UMEDA's gnus for usenet news, and Kyle Jone's vm for mail. All can be found in the OSU Emacs archive, ftp.cis.ohio-state.edu, /pub/gnu/emacs/elisp-archive. See the real FAQ for more details. XI.06) Why does Emacs from the SLS dump core? ANSWER: The version of Emacs included with the SLS requires the X shared libraries. Either install X or get the terminal-only version of Emacs 18.59. XII. X11 THE MAXIMUM and MORE ============================= *** This section is maintained by Krishna Balasubramanian *** . Mail him if you have corrections, *** additions, etc. *** Last update: July 1993 XII.A. X386 GENERAL INFORMATION XII.B. HARDWARE REQUIREMENTS: Supported Video cards, mice. XII.C. LINUX DISTRIBUTION: Files required, Current version. XII.D. LEARNING/USING X: Pointers to X documentation. XII.E. DEBUGGING STARTUP PROBLEMS: Checklist, Screen restoration, Hanging. XII.F. XCONFIG: Video mode settings and common errors in Xconfig. XII.G. X-APPLICATIONS: Compiling X programs. XII.H. ATI: SVGA server for ATI boards. XII.I. BUGS The X11 directories on linux systems are: XLIB = /usr/X386/lib/X11/ (or /usr/lib/X11/) XBIN = /usr/X386/bin/ (or /usr/bin/X11/) XDOC = XLIB/etc/ cwxi = the comp.windows.x.i386unix newsgroup Subscribe to this group if you are an xfree86 user. Post general questions on xfree86 to cwxi instead of c.o.l. Very few problems with using xfree86 are Linux specific. XII.A. X386 GENERAL INFORMATION ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XII.01) What is the X11 release supported by Linux? ANSWER: It's the X11R5 (XFree86-1.3). There are (currently separate) servers for 8514 and S3 chips. You should get newer versions of any applications that are older than the XFree86-1.2 release. XII.02) What is X386/XFree86? ANSWER: X386 is the port of the X11 server to System V/386 that was done by Thomas Roell (roell@informatik.tu-muenchen.de). It supports a wide variety of VGA boards. X386 1.2 is included in MIT's X11R5 distribution. The Linux X386 port was based on the stock distribution from X11R5, from MIT and was done by Orest Zborowski (obz@sisd.kodak.com). It has since moved to becoming part of the standard XFree86 distribution. See the FAQ on cwxi for more information on XFree86. XII.03) Where can I get X386 1.2 (X11R5)? ANSWER: The X386 1.2 and xfree86 sources are available at any site that distributes the X11R5 source (too numerous to list here, but includes export.lcs.mit.edu) XII.04) Any tips on compiling X11R5? ANSWER: - Dont do it. - XFree86 is distributed with a link kit so you can optionally include what you like in the server. - Join the XFree86 beta team (how to? see cwxi FAQ) - Instructions are in the README file in XDOC/ and the cwxi FAQ. XII.B HARDWARE REQUIREMENTS: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Approx: at least 4 megs of ram + swap ...slooooww. 10 Meg disk for X. Another 6-10 meg of disk for GCC if you want to compile X11 programs. XII.05) What VGA boards are supported? ANSWER: et3000, et4000, gvga, pvga1, wd890c00, trident, cirrus, ncr, compaq. X386mono supports generic vga's and hercules. This is covered completely in the XFree86 README file. Diamond cards are not supported and will not be supported. If you are the unfortunate owner of such a card, you can probably get the server up by booting in specific modes or using dos to set your modes before warm booting into linux or using an external clock setting program. You will have to bear with these irks until you can convince diamond to alter their non-disclosure policy. ATI See the ATI section below. Those with 8514 compatible cards may want to get the X8514 server for speed (~2x xstones?). MONO Any vga card should be able to use X386mono server. (At least 640x480 with 800x600 virtual). Use the vga2 section of Xconfig. Support for hercules monochrome card (usable as 2nd display). The following servers will usually not handle all the options supported by XFree86. Read the documentation that comes with them carefully. They will be merged with the XFree86 distribution in some time. 8514 ATI graphics ULTRA, ATI graphics Vantage Should work with any VESA standard 8514/A register compatible card? Courtesy Kevin Martin (martin@cs.unc.edu). Scott Laird (lair@midway.uchicago.edu) writes: I uploaded a new version of the X8514 X Server to sunsite and tsx-11. It is in /pub/Linux/X11/X-servers/X8514/X8514scale.tar.Z on sunsite. It's linked with version 4.2 of the jumptable libraries, includes TCP/IP support, support for compressed bitmap fonts, Type 1 and Speedo scalable fonts. There's a README file in the same directory that will answer more questions. XS3 S3 chipset server (Jon Tombs jon@robots.ox.ac.uk) Get the FAQ on ftp.robots.ox.ac.uk (pub/linux/S3 check sunsite). Xega Generic 640x480x16 compatible server (originally for laptops). This requires a microsoft mouse at /dev/mouse for now and it does not use Xconfig so use environment variables to define the font path etc. in .xinitrc: export FONT_PATH=/usr/lib/X11/fonts/misc:/usr/lib/X11/fonts75dpi Works better with courier fonts so add to .Xresources: *Font: -*-courier-medium-r-*--10* ..or whatever.. A link kit is available at tsx-11 (you need gcc2.2.2). in pub/linux/ALPHA/Xega/X386.ega.T.Z (Obselete? Unusable? Anyone?) WARNING: Do not try to bring up an Xserver that does not support your hardware. There have been cases where damage has resulted from pushing the monitor (specially fixed frequency monitors) beyond its specs. XII.06) What Mouses are supported? ANSWER: Serial : Logitech, Microsoft, MouseSystems .... compatibles ... Busmouses : Logitech, microsoft, ATI_XL, PS/2 (aux). XII.C. LINUX DISTRIBUTION ~~~~~~~~~~~~~~~~~~~~~~~~~ XII.07) What is the current version? ANSWER: The newest public Linux release is XFree86-1.3. It was compiled with gcc-2.4.3 (jump tables 4.4) and is available for example at tsx-11 in pub/linux/packages/X11/XFree86-1.3/. XII.08) What Files do I need to download? ANSWER: For XFree86: There is a README file in the distribution directory. Bring this down first and read it. Then get xbin, xman and xfonts. You need xprog and xlibman only if you plan to compile X applications. You need xkit if you want to relink the server. **** You need The shared images libc.so.4 (4.4 or later) and libm.so.4 in /lib/. All the X11 binaries use these. These are available with the GCC distribution or any new rootdisk. To compile programs you should get gcc-2.3 or later and the 4.4 libraries. To get a different server, see the notes in the previous section. X11 directories in the archive sites are: tsx-11 : pub/linux/packages/X11, pub/linux/usr.bin.X11 sunsite : pub/Linux/X11/ XII.09) Where do the X11 files go? What are they? ANSWER: The linux X binary distribution looks something like: /usr/X386/ lib/ libX11.a ... (X libraries needed for compiling stuff). X11/ config/ (template files for compiling ... xmkmf) fonts/ misc/ , 75dpi/ .... etc/ (documentation). bin/ (XF86_SVGA, XF86_Mono, xterm, X linked to XF86_SVGA). include/X11/ (include files needed for compiling). bitmaps/ (icons, bitmaps used by some applications). man/ man1/, man3/, cat1/, cat3/ /lib libX??.so.?? (Shared images needed by all X11 binaries). Its best you do a tar -tvzf on the distribution you get or find some means of extracting the distribution file list. The support files include default/example Xconfig, xinitrc, twmrc which you could copy to your HOME directory (as Xconfig, .xinitrc and .twmrc) and edit them to define your hardware and X11 setup. The directory XLIB/etc/ contains much documentation on how to configure video modes. Read the files XDOC/README and XDOC/README.Linux. XII.D. LEARNING/USING X ~~~~~~~~~~~~~~~~~~~~~~~~ XII.10) Where can I find the basic help for learning/using X ? ANSWER: Try man X386; man Xserver; man xterm; man twm; man xinit on any machine with X11. The man pages on xterm and twm will reflect behaviour on Linux systems quite accurately. The others will give you some bearing though not every option will work. These man pages are part of the xfree86 distribution. XII.11) What docs are available besides man pages? ANSWER: The FAQ in comp.windows.x is extensive and has a bibliography. There is also the Xt-FAQ. Both are available from export.lcs.mit.edu in pub/contrib/. There is a collection of (mit) X11 documents on tsx-11 (pub/linux/doc/xdoc.tar.Z ?) or export (pub/R5-Untarred) if you are interested in internals. Also of interest if you use motif, open-look/xview or interviews: comp.windows.x.motif, comp.windows.open-look, comp.windows.interviews. XII.12) How do I start up X? ANSWER: Type 'startx' at the shell prompt. Before doing this you should: 0) Untar the xfree86 distribution from / (read XDOC/README, XDOC/README.Linux). 1) copy the file Xconfig.sample from the XLIB/ directory to your HOME directory (/usr/root/Xconfig?) or to XLIB/Xconfig. 2) Edit Xconfig and set the video data for your card and monitor. Use the clocks appropriate for your card and the modes appropriate for your monitor for those clock values. To determine what values are appropriate the Xconfig section below and the files in XDOC/. 3) Set the mouse device in Xconfig correctly....Use the busmouse entry for Logitech only. For other busmouses use microsoft (try all :-). 4) Ensure that there is a termcap entry for xterm in /etc/termcap (One is available in the subdir /doc/). 5) Ensure that the X11 binaries are in the path example: add the line PATH=${PATH}:/usr/X386/bin to ~/.profile. 6) If your system is not configured for networking you must use the -pn (partial network) option ... this is probably the default in startx anyway. XII.13) How can I start X directly with xdm after booting ? ANSWER: (durka@informatik.tu-muenchen.de) 1. You need a file .xsession identical to .xinitrc 2. Add the line DisplayManager*terminateServer: true in the file /usr/X386/lib/X11/xdm/xdm-config Then X is restarted after logout. 3. You have to add /usr/X386/bin/xdm at the end of your rc.local file 4. Now you can reboot If you prefer to test it first, perform step 1. and 2. only. Then as root call xdm from the console. XII.14) How do I configure X .. colors, menu, keyboard? ANSWER: makes me ... dizzy ... server : video, keyboard Xconfig : man X386, man Xserver, XDOC/VideoModes.doc man X386keybd, man xset, man xmodmap. resources: global and application preferences. XLIB/xinit/.Xresources or ~/.Xresources : man xrdb? twm : menus, title bars, colors .. look and feel. ~/.twmrc or XLIB/twm/system.twmrc : man twm xinit : startup. ~/.xinitrc or XLIB/xinit/xinitrc -- man xinit applications : XLIB/app-defaults/Xxx (also ~/.Xresources) man xxx You can start with files from any X11 setup. Backup the files you change. See the FAQ on comp.windows.x. XII.15) [suggested by Thomas Koenig] How do I support national keyboards in X11 ? ANSWER: Put a .Xmodmap file into the user's home directory specifying which keys to use for what; or else replace the /usr/lib/X11/xinit/.Xmodmap with the national keyboard keys customized. Do man xmodmap for more details. enclosed an excerpt of mine (french keyboard): keycode 8 = keycode 9 = Escape keycode 10 = ampersand 1 keycode 11 = eacute 2 asciitilde keycode 12 = quotedbl 3 numbersign keycode 13 = apostrophe 4 braceleft keycode 14 = parenleft 5 bracketleft keycode 15 = minus 6 bar keycode 16 = egrave 7 grave keycode 17 = underscore 8 backslash keycode 18 = ccedilla 9 asciicircum keycode 19 = agrave 0 at keycode 20 = parenright degree bracketright keycode 21 = equal plus braceright keycode 22 = BackSpace keycode 23 = Tab keycode 24 = A ........ XII.E. DEBUGGING STARTUP PROBLEMS: ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ XII.16) What do I use in my Xconfig file to use the bus mouse? Logitech doesn't work with my Logitech busmouse. ANSWER: (Nathan I. Laredo) Here are the mouse lines from my Xconfig: BusMouse "/dev/mouse" You may add a sample rate if you want, but chances are, unless the model number on your mouse matches mine: PC-93-9MD it probably will cause your machine to lock up, as I've gotten several reports saying that. According to the X386 documentation, non-logitech mice do not support a sample rate. XII.17) My busmouse works fine with windows but ... ANSWER: (Les Troyer t2078@dcs2.nfuel.com) If your busmouse is not on the kernel default of IRQ 5 then you need to change /usr/include/linux/busmouse.h to reflect what your IRQ is. and if you use IRQ2 then put 9 in for the define. XII.18) Does anyone have a working PS/2 mouse? Has anyone gotten the "Mini-DIN" mouse on an HP Vectra 486/33T to work? The slight info I've been able to find says it's PS/2 compatible. Does anyone have a working MouseMan on a PS/2 port ? ANSWER: (heeb@watson.ibm.com) First you need to create an entry in /dev for it: mknod /dev/psaux c 10 1 The other steps depend on the version of XFree: for XFree86-1.2 add the following line to your Xconfig (and you are done): PS/2 "/dev/psaux" This works even for 3 button mice (e.g. the MouseMan)! There is no direct PS/2 mouse support in XFree86-1.1, so to use the mouse with X you'll have either to upgrade or use the mconv mouse protocol conversion utility, which can be found on nic.funet.fi, in /pub/OS/Linux/utils/tools/mconv.c. This program converts the packets sent by the PS/2 mouse into the corresponding ones from a Microsoft mouse, so you can fool X telling it you have a Microsoft serial mouse instead. Instructions for use are included in the source file. (Johan Myreen jem@cs.hut.fi) XII.19) I have trouble with my logitech Pilot mouse and X under Linux, any clue ? ANSWER: (Thomas Roell?) There are TWO lines of Logitech mice out there. One is the programmable and uses MouseSystems protocol at startup. X386 reprogramms them to use another protocol. If you specify 'Logitech' in the Xconfig, X386 assumes a mouse like C7 or S9 (notC7-M). The second line is the MicroSoft compatible. Currently all newer Logitech mice follows this practice, like the MouseMan. In that case you have to say 'MicroSoft' or 'MouseMan'. XII.20) I cannot type in my xterm ANSWER: /dev/console must have major=4, minor=0 rm -f /dev/console; ln /dev/console /dev/tty0 XII.21) What are some of the common omissions and errors? ANSWER: (Peter) 1) Add /usr/X386/bin/ (or /usr/bin/X11) to your path. 2) Add the xterm termcap entry to /etc/termcap. 3) ln -s X386 X in the XBIN directory. ln -s X386mono X (if you want to use the mono server). 4) Run X as root first. This avoids some trivial problems. 5) If you change the font path entry .... X386 is finicky about the syntax. 6) Make sure your mouse entry in Xconfig points to a legitimate serial device (or busmouse)... usually something like: microsoft "/dev/ttyS1" serial devices have major # 4 minor 64,65 ... busmouses are major 10. ls -l in /dev will show you the major and minor entries. 7) Need read/write/exec access to /tmp directory 8) Use startx 2> x.err to log your error messages. If the server sticks and you have to reboot you'll probably loose this stuff... see notes on `hanging' below. 9) You must have a free vt (eg. /dev/tty5 with no getty (see /etc/rc)). 10) Delete /tmp/.Xn-lock if recovering from a crash. 11) Note the new probeonly option for the server (man X386): startx -- -pn -probeonly 12) The following message is not the cause of your problems: Setting TCP SO_LINGER: Protocol not available no SIOCGIFCONF 13) See Xconfig problems and the device list below. XII.22) Why is the server unable to find some of the fonts? ANSWER: First check that the directories listed in the font path exist and have font files in them. Some of the servers are not set up to use compressed fonts. In such cases you have to uncompress the fonts in the directory and run `mkfontdir .`. Read the man page on mkfontdir. XII.23) My server "hangs" Why? ANSWER: (Peter) Quite often it isn't a hang. If the server grabs the screen(and enters graphics mode) and then dies, it may return you to bash *without* restoring the screen. In other words, just because you see no output, don't assume it's running/hanging. The way to test this is to see if you can use a bash command to spin your disk. eg.: sync; ls -l /bin. Also - I *suspect* that (at least for me), you can kill the server if you include the servernum option in the Xconfig (Obselete?) You can kill the server when you want to by typing ctrl-alt-backspace. Then a couple of ctrl-C 's in case your stuck in xinit. The two line message X386 version ..... (protocol Version .... is returned from the X386 programme itself, so if you get this (or if the screen blanks) X must be starting. XII.24) When I started X11 I got "Cannot connect to server" or "process does not exist", any clue ? ANSWER: The cause might be a wrong fontpath variable, mouse device or video settings in your Xconfig. XII.25) Why cant I run more than 4 xterms? How can I have more than 4 pty's ? ANSWER: set the number in the header include/linux/tty.h and recompile the kernel. Also make nodes : mknod /dev/ptypxx 4 minor (where minor = 128 + xx) mknod /dev/ttypxx 4 minor (minor = 192 + xx) This is for before linux-0.97pl6.... for later versions you only need to make the nodes. XII.26) How does X11 start up? ANSWER: The startup involves the server (XBIN/X), and some programs like startx and xinit. Typing startx runs the script XBIN/startx. Look through startx. For explanation of the server arguments try man Xserver. startx does little other than gather arguments and then call xinit. xinit runs the server X (X is linked to X386) and the client programs specified in ~/.xinitrc. xinit continues to run, and is often the source of the error messages you see when you exit. If you get the message "giving up", it means X has died (quite probably it died immediately) and xinit has been unable to start clients from the xinitrc script. (The scripts must be executable). XII.27) What devices does X depend on: ANSWER: check your device numbers with ls -l /dev. You should have: 5 0 tty 4 0 tty0 4 0 console 4 1 tty1 (etc) virtual consoles (vt's) : eg. startx -- vt8 1 1 mem 4 128 ptyp0 pseudo ttys used by xterm/emacs etc 4 129 ptyp1 (etc) to talk to unix programs. 4 192 ttyp0 4 193 ttyp1 (etc) 4 64 ttyS1 one of these is the mouse 4 65 ttyS2 or you have a busmouse. 10 x mouse busmouse x = 0 => logitech 1 => ps/2 (aux) 2 => microsoft 3 => ATI_XL. /tmp/.X11-unix/Xn n = display number. Socket used by X11 programs to talk to the server. This is created by X386. /tmp/.Xn-lock n = display number. Lock file. Note that unix programs dont expect standard names for serial devices and mice. So you can give these devices any name as long as you tell the server what its called (in Xconfig). XII.F. Xconfig: Xconfig and Video mode settings. ~~~~~~~~~~~~~~~ XII.28) What do the mode names in Xconfig mean? ANSWER: Mode names like "640x480" are used to match entries in the modes line with the modeDB entry which actually defines the mode. You can toggle between modes in the modes line with ctrl-alt-numericplus. If you're experimenting with 640x480 you can define modes "640x480a" "641x480b" "642x480c" with different entries for each under ModeDB so you can toggle between these three modes. XII.29) How do I compute the numbers for the video modes? ANSWER: See if there is an entry that matches your chip/monitor in XDOC/modeDB.txt. Use the clock entries for your chip and the mode entry for that clock appropriate for your monitor. If you cant find a mode entry for a particular clock 'needed_clock' but can find a mode entry (for your monitor) for a nearby clock value 'found_clock', scale all numbers in the modeDB entry by (needed_clock/found_clock). Read XDOC/VideoModes.doc XII.30) How can I determine the clocks on the video chip? Where can I find clock.exe or clock.pas ? ANSWER: The XFREE Team discourages the use of clocks.exe and wants it to be removed from all docs, since the new Server is better at guessing the clocks than clocks.exe. You can get X to tell you what it finds by commenting the clocks entry in Xconfig. Use 'startx -- -probeonly 2> x.err' to log the output. If X starts up this file gets the clocks only after you exit. I strongly advise using the 'modegen' spreadsheets to generate the appropriate settings. If I remember correctly you can find them in 'pub/linux/packages/SLS/x4' called modegen.taz or something equally as obvious ... Good luck. (Andy asb@cs.nott.ac.uk) The clocks entry in Xconfig serves as an index. example: clocks 1 2 ModeDB 1 640x480 ..... 2 800x600 ..... means the first clock on the chip will be used for the 640x480 mode and so on. Usually one uses the MHz value for the clock for convenience instead of 1 2 you probably have 25 28 ... etc. XII.31) What are the settings used with a trident-8900C? ANSWER: To get X/SLS/Linux working with a trident-8900C : 1) From Frank Houston fh8n@uvacs.cs.Virginia.EDU vga256 Virtual 1024 768 ViewPort 0 0 Modes "1024x768" "800x600" "640x480" Use the VESA monitor timings from the modeDB in the example Xconfig. You do not need to specify the chipset or clocks. 2) From: Henk Vandecasteele henkv@cs.kuleuven.ac.be TRIDENT TVGA 8900C card with BIOS C2.11, A cheap color monitor AOC (CM-335) with a maximum horizontal frequence of 39.5 vga256 Virtual 1024 1024 ViewPort 0 0 Modes "912x684" "800x600" "640x480" # This mode drives my monitor to the limit (VESA timings for the rest). "912x684" 45 912 944 1104 1136 684 684 690 712 XII.32) Oh what, Oh what, Oh what can I do with a trident 8900b? ANSWER: (drew@cs.colorado.edu) 1. While the 8900b works with the Xfree 8900c driver, you must specify a chipset line for the 8900c in your Xconfig. 2. The tridents are miserably slow in a Color mode. If you don't mind black and white, you should use X386mono. Not only is it faster, but it requires less video memory, and you'll be able to run a 1k X 1k virtual desktop. Again, you must specify the Chipset line to use the banked mono server for virtual resolutions > ~800x600. XII.33) What are common problems with Xconfig? ANSWER: If X isn't firing at all, or even if it clears the screen and crashes (see below) you almost certainly have a fault in Xconfig. 1. Note that the server X interprets Xconfig. (not xinit) 2. test with only one graphics mode included - one you are most sure of. 3. If you make a mistake in the mouse section, you will (I understand) get an error message, so if you don't get some mouse error, try elsewhere first. (eg "No such file or directory" indicates you have a fault in the "/dev/ttyxx" line, or /dev/ttyxx doesn't exist. 4. *NB* X looks in your home directory first to find an Xconfig. make certain it's using the one you've been working on! 5. you need double quotes (") around your chipset and modes: eg chipset "et4000" Modes "640x480" "640x480a" "800x600" and around the /dev/ttyxx eg.: microsoft "/dev/ttys1" 6. Check your VGA section and modeDB first. 9. ensure ModeDB clock speeds match the VGA section. Comment out any unused lines in MODEDB. eg clocks 25 36 00 00 00 00 00 00 then you *must* have (and only have) lines under modeDB corresponding to speeds 25 and 36. If you have one with (say) 62 uncommented out in the modeDB section in place of the 36 line, you will cause the server to die immediately with no error message. 10. videoram must equal the amount of display ram on your chip. 11. The virtual resolution screen must fit in the videoram. eg: 512kB => 800x600 (for the 1 byte per pixel color server) XII.34) Where can I get Xconfig-files for various hardware? ANSWER: If you have access to e-mail, e-mail bcr@physics.purdue.edu a message with the subject: help If you do create a new Xconfig file or improve on an old one please mail it to bcr@physics.purdue.edu to save others from having to duplicate your work. XII.G X-APPLICATIONS: Compiling X Programs. ~~~~~~~~~~~~~~~~~~~~~ XII.35) Does anyone know where I can find the libobz.a library ? ANSWER: This library contained the socket stuff, when X386 V0.1 was released. Meanwhile it has found it's way into the kernel, so remove -lobz from the link step in the Makefile. Any program asking for libobz needs to be recompiled anyway. XII.36) I get _setjmp undefined when linking xv from .a files. ANSWER: You are trying to link a program compiled with gcc-2.2.2 and setjmp has changed sice then. Recompile xv from the source using the latest gcc. XII.37) How do I compile an X application that has an Imakefile? ANSWER: Type xmkmf to generate the Makefile. Type make. XII.38) How do I compile a program that has no Imakefile? ANSWER: Use compiler options generated with programs that do have Imakefiles. Look in XLIB/config/ for the linux definitions. In particular you need -fwritable-strings. XII.39) gcc complains the X libraries are not found or links static. ANSWER: Check out the -nojump -static options of GCC ... read the GCC FAQ. You can tell gcc what directories to search with -L. XII.40) When using Makefiles generated by xmkmf why do I get many error messages? ANSWER: The old xmkmf under Linux doesn't like # comments in Imakefiles. Therefore you must change the #'s to XCOMM. But be careful. Don't change any pre-compiler directives. (mal11@po.CWRU.Edu Matthew A. Lewis) XII.41) (Ton van Rosmalen wrote): I recently compiled XFree86 1.2A for Linux and it compiled fine with gcc-2.3.3 and libc-4.3.3 iff I skipped the make depend. ANSWER: (Rik Faith) The source for ed.c is available from (Linux binaries are in utilb13.taz) ftp.cs.unc.edu:/pub/faith/linux/utils/utilb-1.3.src.tar.Z This version of ed.c has a 4096 character line limit and will work correctly when building XFree86 under Linux. XII.42) What are the development tools available for X under Linux? ANSWER: Some of the X development packages available on Linux: (XS = sunsite.unc.edu pub/Linux/X11) (Contact the people who distribute them in case of problems.) Libraries: Xpm, tiff .. are in XS/libs/. If you are compiling a package that uses these libraries it is best to pick up the standard DLLs. hooft@chem.ruu.nl, mitchum.dsouza@mrc-apu.cam.ac.uk (Some older libraries are in XS/libs/oldlibs). Interviews: SLS package Shared libraries are not yet available so doc ~1M, idraw ~1.5M, ibuild? KHOROS: This is the second release of my patches (~15K XS/xapps) to the Khoros system for image processing. If you want to compile it, you need Khoros 1.0, patchlevel 5 (source distribution) and up to 100MB free disk space (including package 0.). Wolfram Gloger wmglo@dent.med.uni-muenchen.de Apr 04 1993. MOTIF XS/$$$:-) Metro Link, Inc. is pleased to announce the availability of OSF/Motif 1.2.2 for Linux at the introductory price of $199 for a complete runtime and development system (shared libs, UIL, source for some demos + 1 Orielly book). You can order OSF/Motif 1.2.2 for Linux by calling Metro Link,Inc. at (305) 970-7353 (voice) or (305) 970-7351 (fax) or by mailing us at sales@metrolink.com. SUIT: XS/devel Simple User Interface Toolkit. Included are shared libs and static libs. Compiled with the SLS kit. To use these shared libs you need libX11 3.0 and libc 4.3. Rob Robert-Jan Kooper rob@is.twi.tudelft.nl kooper@dutiws.twi.tudelft.nl tk+tcl: XS/devel Here is tk3.0 and tcl6.5 sources and libraries. Compiled this with gcc2.3.3 I have also included the wish (X11) binary. Mitch mitchum.dsouza@mrc-apu.cam.ac.uk mitch%markab@mrc-apu.cam.ac.uk xview: XS/devel New libxview.a and libolgx.a that correct some problems with the ones found in SLS (and maybe in the other xview releases, I don't know). Kenneth Osterberg ?? XII.H ATI: SVGA server for ATI boards. ~~~~~~~~~ Last Revised: Mon May 10 15:17:57 1993 by faith@cs.unc.edu XII.43) What's new? ANSWER: For XFree86 version 1.2 (and later versions), there are two changes to the extregPlusXLAndOrMasks table: 1) ER_B0 was changed from 0x28 to 0x31. (In the Linux world, this was distributed as a binary patch long ago.) 2) ER_BE was changed from 0x08, but only for cards EARLIER than the 28800-5. Both of these changes allow more 28800-4 cards to work, although either one may be sufficient for any one card. You can find these changes in the driver by searching for the Feb 3 timestamps. XII.44) What is the ATI SVGA driver? ANSWER: The ATI SVGA driver is a 256 color driver for the XFree86 server. The driver was written for the ATI WONDER series of graphics adapters. In general, the following modes are supported for cards with 512kb of memory: 640x480x256 600x800x256 The following modes are supported for cards with 1024kb of memory: 1024x768x256 XII.45) What is the ATI SVGA driver *NOT*? ANSWER: The ATI SVGA driver is *NOT* a black and white (2 bit) driver. Therefore, it will *NOT* work with the XFree86 monoserver. The ATI SVGA driver is *NOT* a 16 color driver. Even though your manual says that your graphics adapter has a 1024x768x16 mode, the ATI SVGA driver will *NOT* use this mode. If you want to use 1024x768, you *MUST* have 1MB of memory on your board and use the 1024x768x256 mode. The ATI SVGA driver will *NOT* support more than 8 bits of pixel depth. Therefore, even though your manual says that your graphics adapter supports modes using more than 256 colors, the ATI SVGA driver will *NOT* use these modes. The ATI SVGA driver is *NOT* an accelerated driver. If you have an ATI GRAPHICS ULTRA series card, the ATI SVGA driver will *NOT* use the accelerated hardware. It will only use the SVGA hardware. This will probably not be any faster than a VGA WONDER card, unless the card is on a local bus (and then, it won't be faster than a VGA WONDER card on a local bus, if a card of this type existed). XII.46) What cards will the driver work with? ANSWER: This is a difficult question, because there are many different ATI video cards, and it is sometimes difficult to tell them apart. The best way is to look on the card itself for the ATI chip numbers. Here is a partial list of ATI VGA WONDER cards. The MOST IMPORTANT number is the CHIP VERSION. Adapter version Dot clock Chip version VGA WONDER V3 ATI18800 NOT SUPPORTED VGA WONDER V4 ATI18800-1 NOT SUPPORTED VGA WONDER V5 ATI18810 ATI18800-1 NOT SUPPORTED VGA WONDER + (V6) ATI18810 ATI28800-2 ? MAY WORK ? VGA WONDER (1 MB) ATI18810 ATI28800-4 SUPPORTED VGA WONDER (1 MB) ATI18810 ATI28800-5 SUPPORTED VGA WONDER XL ATI18810 ATI28800-5 SUPPORTED Note that the ATI SVGA driver code has hooks and some support for all of the cards listed. However, with the earlier cards, there are serious differences in the programmer's interface. The only people who have ever worked on the code have had 28800-4 and 28800-5 chips, so these chips are the only ones that are actually known to work. The ATI GRAPHICS ULTRA chips seem to have SVGA support which is equivalent to the 28800-4, 28800-5, and 28800-a, although I can find no documentation on this in the technical manuals provided by ATI. The ULTRA PLUS and ULTRA PRO boards have been tested to some extent, and seem to work fine, but the original ULTRA may have some problems at greater than 640x480 resolution. XII.47) What should I put in my Xconfig file? ANSWER: THE MOST IMPORTANT LINE IS THE CLOCKS LINE: Clocks 18 22 25 28 36 44 50 56 30 32 37 39 40 0 75 65 The first row of clocks is usable on all VGA Wonder cards. The second row is usable only on V5, PLUS, and XL cards (28800-2, 28800-4, and 28800-5). However, you should include *BOTH* rows for *ALL* cards. The specification is different from the specification used with the ET-4000 cards. Programs with claim to detect the clocks usually work only with ET-4000 based cards. No such program exists for the ATI cards, since it isn't needed. THE CLOCKS LINE SHOULD NEVER BE CHANGED. The order of numbers in the clocks line *is* significant. The actual frequencies, which can be used to calculate the ModeDB lines, are as follows: 18 = 18.000 22 = 22.450 25 = 25.175 28 = 28.320 36 = 36.000 44 = 44.900 50 = 50.350 56 = 56.640 30 = 30.240 32 = 32.000 37 = 37.500 39 = 39.000 40 = 40.000 0 = 56.640 75 = 75.000 65 = 65.000 The Chipset will be automatically detected. The chipset name for this driver is "ati". Here is a sample Xconfig (which I use): RGBPath "/usr/lib/X11/rgb" FontPath "/usr/lib/X11/fonts/misc/,/usr/lib/X11/fonts/75dpi/" Keyboard AutoRepeat 500 5 ServerNumLock #Microsoft "/dev/mouse" #MouseSystems "/dev/mouse" #MMSeries "/dev/mouse" #Logitech "/dev/mouse" #MouseMan "/dev/mouse" Busmouse "/dev/mouse" # BaudRate 1200 SampleRate 150 # Emulate3Buttons vga256 ViewPort 0 0 #Modes "1024x768v" "800x600v" Modes "800x600v" Clocks 18 22 25 28 36 44 50 56 30 32 37 39 40 0 75 65 Displaysize 260 184 ModeDB # From NEC MultiSync 3FGx manual (copied by faith@cs.unc.edu) # active_area front_porch pulse_width back_porch for horiz and vert # VESA 640x480 at 72Hz (37.860kHz) # 20.317us 0.762us 1.270us 4.603us; 12.678ms 0.238ms 0.079ms 0.740ms # (I couldn't find a good clock rate for this one) # VESA 800x600 at 72Hz (48.077kHz) # 16.000us 1.120us 2.400us 1.280us; 12.480ms 0.770ms 0.125ms 0.478ms "800x600v" 50 800 856 976 1040 600 637 643 693 # VESA 1024x768 at 60Hz (48.363kHz) # 15.754us 0.369us 2.092us 2.462us; 15.880ms 0.062ms 0.124ms 0.600ms "1024x768v" 65 1024 1048 1184 1344 768 771 777 806 XII.48) What is the history of the driver? ANSWER: The complete history of the driver is cloudy. I have tried to reconstruct the history from several email messages from a few of the people involved. The history is probably incomplete and inaccurate. Apparently, Per Lindqvist (pgd@compuram.bbt.se) first got an ATI driver working with an early ATI card under X386 1.1a. (This original driver may have actually been based on an non-functional ATI driver written by Roell.) Then Doug Evans (dje@cygnus.com) ported the driver to the ATI XL, trying in the process to make the driver work with all other ATI cards. I (Rik Faith) obtained the X11R4 driver from Doug Evans in the summer of 1992, and ported the code to the X386 part of X11R5. This subsequently became part of XFree86. Per and Doug did the majority of work, making the port somewhat trivial. I am grateful for their contribution. The port to X11R5 required writing the ATIProbe and ATIEnterLeave routines, and re-organizing the ATISave and ATIRestore routines. Someone else added the operating system specific code, but I don't know who. The major reference that I used was manual from ATI: "VGA WONDER Programmer's Reference" ATI Technologies, 1991. Release 1.2 -- Reference #PRG28800 (Part No. 10709B0412) However, Chapter 11 (ATI 18800 ATI VGAWONDER) of George Sutty and Steve Blair's "Advanced Programmer's Guide to SuperVGAs" (Brady/Simon & Schuster, 1990) was also useful. Further, someone e-mailed be a random document from the ATI BBS which was dated 3Jul91 and which may have been named PROGINFO.DOC. XII.49) What is the future of the driver? ANSWER: I no longer use an ATI Wonder card and have no interest in this driver. Since I have received no bug reports or patches for the driver during the past 3 months, I think it is about as stable as it is going to get. (I suspect that support for the 28800-2, 28800-4, and 28800-5 chips can be made more robust, but I doubt that the other chips will ever be fully supported.) I have absolutely *NO* intention of porting the code to the mono or 16 color servers. If *you* want ATI support in the mono or 16 color servers, they *you* should do the port. (Since I no longer use my ATI Wonder card, please feel free to take over the current driver as well.) XII.I BUGS: ~~~~~~~~~~~ Restoration of the text screen fails on some hardware. You can get the program runx from the vgalib distribution (tsx-11 pub/linux/sources/libs/). Report the problem to the xfree86 team. Cant compile Xaw programs without -static in versions x11v1.1 or older. Fix for missing numlock control in xfree86-1.1. use xmodmap to change the mapping: clear mod1 add mod1 = Alt_L keysym Alt_R = Mode_switch add mod5 = Mode_switch David (Dawes) Sources for X11_FAQ: Steve Kotsopoulos, Peter Hawkins, John Morris, MM. Corsini, K. Balasubramanian. Direct comments, questions, complaints to krishna at: balasub@cis.ohio-state.edu XIII. NETWORKING and LINUX ============================ *** This section is maintained by Matt Welsh (mdw@tc.cornell.edu). XIII.01) Where can I find useful information about networking for Linux ? ANSWER: As of Linux 0.99.pl10 a new suite of networking and TCP/IP software has been added to the Linux kernel, known as ``NET-2'' (no relationship to the BSD NET-2 software distribution). In order to use TCP/IP, SLIP, or other networking with Linux, you should upgrade to the newest version of the kernel (at least 0.99.pl10). All of the information that you need to get started with networking is in the NET-2-FAQ by Matt Welsh and Terry Dawson. You can find it on sunsite.unc.edu:/pub/Linux/docs. Note that the NET-2-FAQ supercedes the old NET-FAQ, which was for kernels before 0.99.pl10. If the NET-FAQ you find does not say anything about ``NET-2'', then you have the wrong version. You can direct questions about networking and TCP/IP either to the NET channel of the mailing list (see section II of the FAQ on how to join), or to mdw@tc.cornell.edu. ===================8<==========>8================ -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # LaBRI | # # 351 cours de la Liberation | e-mail: corsini@geocub.greco-prog.fr # # 33405 Talence Cedex | e-mail: corsini@labri.u-bordeaux.fr # # | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- There will be a sig when our local net is reliable. For now, I would rather stay anonymous. Newsgroups: comp.os.linux,comp.os.linux.announce,comp.answers,news.answers Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!gatech!swrinde!cs.utexas.edu!uunet!Germany.EU.net!mcsun!julienas!geocub!labri.u-bordeaux.fr!corsini From: corsini@labri.u-bordeaux.fr Subject: Linux Frequently Asked Questions 6/6 [monthly posted] Message-ID: Followup-To: poster Summary: Linux, a small and free unix-like for 386-AT computers. Sender: corsini@greco-prog.fr (Marc-Michel CORSINI) Supersedes: Reply-To: linux@labri.u-bordeaux.fr Organization: Greco Prog. CNRS & LaBRI, Bordeaux France References: Date: Wed, 21 Jul 1993 09:52:42 GMT Approved: news-answers-request@MIT.Edu Expires: Fri, 3 Sep 1993 09:51:58 GMT Lines: 1276 Xref: senator-bedfellow.mit.edu comp.os.linux:52222 comp.os.linux.announce:924 comp.answers:1374 news.answers:10587 Archive-name: linux-faq/part6 Last-Modified: 93/07/11 Version: 1.20 ********************************************************* * * * Answers to Frequently asked questions about Linux * * * ********************************************************* This post contains Part 6 of the Linux FAQ (6 parts). It must be read *after* the 5 first parts. ===================================8<====>8============================ CONTENTS (of this part) XIV. EVERYTHING FOR PRINTING (part6) XV. UUCP/NEWS/MAIL for LINUX (part6) ===================================8<====>8============================ XIV. EVERYTHING FOR PRINTING ============================= **** This is the lpd FAQ version 1.4 (last update july), this **** section is maintained by Brian McCauley. Please send any **** suggestion to: B.A.McCauley@bham.ac.uk XIV.01) What _is_ the Linux lpr/lpd package? ANSWER: To quote the net-FAQ: Lpr is a utility that is used to print files out to local and remote printers. As with all networking, there are configuration files which have to be tailored to your needs. These files are concerned with access control, accounting and page setup of your printer(s). Now all control of the printer is performed by a process called lpd Lpd is a laser printer daemon (yes I know an epson isn't a laser printer but thats besides the point). The program lpd is normally started in /etc/rc.local in either the forground or the background. What happens is that lpd will sink back as a daemon, only ever being invoked when a printer request is generated. lpd itself has some options which are of possible intrest to some people chiefly that of the '-l' flag which causes lpd to log requests recieved from the network (useful for debugging). The other option is for what port lpd should listen for data on and is generally not used. [ Note: lp really stands for line printer but as technology has advanced laser printer makes more sense. Note also that lpr can be used for queuing requests to use any specialised resource on a network not just hardcopy output devices. ] XIV.02) What is _the_ Linux lpr/lpd package? ANSWER: Up until 28th May 1993, as far as there is a definitive Linux version of anything _the_ Linux lpr/lpd is Ross Biro's port of the BSD sources dated 20th November 1992 (so if you're used to AT&T's you'll find some differences). Ross's binaries and the diffse wer found in: tsx-11.mit.edu:pub/linux/binaries/usr.bin/lpr.tar.Z sunsite.unc.edu:pub/Linux/system/Daemons/lpr.tar.Z The SLS file lpr.tgz on disk b2 contained the same stuff. In addition to the standard BSD lpr capabilities Ross Biro's port should have had better support for serial printers (but it didn't work in the old binaries). Ross's port was not based on the latest BSD sources (by about 3 years, '88 vs '91). His new release will also be based on these sources which can be found are at: gatekeeper.dec.com and /afs/ir.stanford.edu/src/... However this changed as of about 28th May 1993 so from now on this version will be called the "old" binaries. On or about that date two different new releases of lpd appeared. One of these was a version of Ross's with bug fixes in: sunsite.unc.edu:pub/Linux/system/Daemons/lpr.tar.z tsx-11.mit.edu:pub/linux/binaries/usr.bin/lpr.tar.z The other is a port of the '91 BSD sources by Fred van Kempen port and is availble as source: tsx-11.mit.edu:pub/linux/packages/net/net-2/sources/lpd/ or as part of the net-2 binary release in: tsx-11.mit.edu:pub/linux/packages/net/net-2/binaries/net-std.tar.z Original '91 BSD sources are all over the place. ftp.uu.net:systems/unix/bsd-sources/usr.sbin/lpr/ src.doc.ic.ac.uk:unix/bsd-sources/usr.sbin/lpr/ to name but two. The BSD sources have unGNU things in their Makefiles so they don't compile ``out of the box''. Ross agrees that Fred's version should be thought of as _the_ Linux lpd package. There are no significant differences that I know of and much of this FAQ refers to the BSD lpd package or Linux in general so this is probably not too important. There are some other versions of lpd stuff about but I have to draw the line somewhere. If anyone whants to maintain FAQ sections on these they are welcome to do so. The other versions include plp and the ka9q lp facility. There are also rumours of SysV spoolers being ported. XIV.03) How do I get lpr to work properly other than for root? Where do the files go and what should their permissions be? ANSWER: There is quite a bit of variation between the various releases but I'll try where possible to offer solutions that are universally applicable. Put /etc/lpd& in your /etc/rc or /etc/rc.local (usually in /etc/rc.local after you start syslogd (if you use syslogd)). Set the group fields of the file permissons/ownership as follows: -rwxr-s--- 1 root daemon 37892 Nov 19 23:32 /etc/lpd -rwx--s--x 1 root daemon 21508 Nov 19 23:32 /usr/bin/lpc -rws--s--x 1 root daemon 17412 Nov 19 23:32 /usr/bin/lpq -rwx--s--x 1 root daemon 17412 Nov 19 23:32 /usr/bin/lpr -rwx--s--x 1 root daemon 17412 Nov 19 23:32 /usr/bin/lprm -r-xr-xr-x 1 root daemon 2816 May 10 13:37 /usr/bin/lptest srwxrwxrwx 1 root daemon 0 Feb 4 20:54 /dev/printer ...and for each of the spool directories listed in the sd fields of /etc/printcap... /usr/spool/lpd: total 5 drwxrwxr-x 2 root daemon 1024 May 18 23:00 . drwxr-xr-x 11 root root 1024 Feb 19 20:56 .. -rw-rw-r-- 1 root daemon 4 May 18 23:00 .seq -rw-rw-r-- 1 root daemon 18 May 18 23:00 lock -rw-rw-r-- 1 root daemon 25 May 18 23:00 status Note these 3 files are created by lpr and lpd so if you've never run these they could be missing so touch them into being. In Fred's port the group is ``lp'' not ``daemon''. You don't need the socket /dev/printer for Fred's port as it keeps it's socket in /tmp/.printer and creates/deletes it as needed. Some of these permissions may be overkill so don't be surprised if your system works with different permissions. The fact that lpq needs to be suid root is inelegant and may change in the future. People tell me that lpr must be setuid(root) but I've not seen evidence that this is really the case as long as the file permissions on the spool queues are right. Still as far as I know lpr is designed to be secure when installed setuid(root). Alternative approach: just make lpc, lpr and lprm setuid(root) then you can almost forget the file permissions on the spool queues! You're free to choose different directories for the executables on your system (notably lpc is usually in /etc even though it has commands that are useful to non-root). There location of master lpd lock file is fixed at compile time. It is either in /usr/spool/lpd.lock or /var/spool/lpd/lpd.lock depending on which version of lpd you get. My advise is keep your primary spool queue in /usr/spool/lpd and make /var a symlink to usr or keep it in /var/spool/lpd and make /usr/spool a symlink to ../var/spool. This gives the greatest compatibility with the pathnames that are compiled into the various distributed binaries. The main configuration file is /etc/printcap although the old binaries look for it in /usr/etc/. The old binaries' README says hosts.equiv and hosts.lpd files are looked for in /etc/inet but again the more accepted convention is to locate them in /etc. Since, IMHO, working out in which particular etc directory each file should reside is tedious, I would advise having only one: mv -i /usr/etc/inet/* /etc/inet/* /usr/etc/* /etc/ rmdir /usr/etc/inet /etc/inet /usr/etc ln -s ../etc /usr/etc ln -s . /etc/inet [But make sure the files in /usr/etc and /etc/inet are not already symlinks into /etc or you'll be in deep water.] This makes your /etc huge but I think it's safe as I'm not aware of any packages that require different files or the same name in /etc and /usr/etc. [Health warning: this is IMHO - other people have different ideas.] XIV.04) What are all these diretrories for? (/etc, /usr/etc, /etc/inet, /usr/spool, /var/spool) ANSWER: This is one to which I can't find a staight answer. For various reasons including the difficulties of fsck'ing / some people like to put all things that aren't needed during bootstrap in /usr so that / is as small as possible. They therefore move unessential big files (usually the binaries) from /etc/ to /usr/etc/. Unless you know what you are doing I'd advise keeping it all in /etc with /usr/etc and /etc/inet being symlinks back to /etc. (In fact these links are probably soon to be redundant as most recent binaires now look in /etc/.) The alternative approach is to have a real /usr/etc directory containing all the non-essential stuff and make symlinks to each file therein from its namesake in /etc. Also a few people like all their internet stuff in /etc/inet but as recent binaries excpect to find this stuff in /etc they must create links for each file from /etc into /etc/inet. If you want to spread out your configuration files for the sake of tidiness then a better solution is to have a directory tree called /conf and make the files in /etc symlinks into this tree. To avoid the problem of your /usr filesystem filling up as a result of stuff in spool queues some poeple perfer to keep their spool queues and such like in a separate filesystem called /var. If you don't have a /var file system then you should make /var a symlink to usr. If you _do_ have a /var filesystem to may want to make /usr/spool a symlink to ../var/spool so that any programs expecting to find /usr/spool will not be dissapointed. XIV.05) Why do I get ``jobs queued, but cannot start daemon'' or ``lpc: connect: No such file or directory'' ? ANSWER: Firstly this "start" in the context of this error really means "wake". If ``ps ax'' does not reveal a lpd then you daemon has died (or was never started). If you so have an lpd then you are having trouble with the socket connection to lpd. I don't really understand this but the problem was common in early days with the old binaries but developments in the TCP/IP code in the kernel fixed it for most people. Using the new lpd from the net-2 package without the net-2 kernel stuff sometimes gives this problem. When I get it I find that kill and restarting lpd a few times will eventually get rid of the problem. There has also been a suggestion that recompiling your kernel without TCP/IP at all can help. If linux-0.99pl10 with it's all new TCP/IP stuff doesn't fix this then further research is probably called for. XIV.06) Where do I get a printcap for a xxxxx? ANSWER: This question is essentially meaningless - see next question. XIV.07) What is the content of /etc/printcap? ANSWER: Given the similarity in appearence and name between /etc/termcap and /etc/printcap one could be forgiven for assuming that they contain analogous infomation. This is not the case. Whereas termcap contains informations about terminal *types* - (mostly escape seqences) printcap contains information about *specific* printers (like the directory that holds the spool queue and the device name of the printer). The information about a printer model's escape sequences and so on are held in the various filters which are _programs_ called by lpd to drive the printer. /etc/printcap simply gives the locations of these filters. For details RTFM(printcap). [Alternatively the net-FAQ has a summary of some of the more important fileds.] One last point you should always specify ``suppress header'' ``:sh:'' unless you have *text* (_not_ postscript) printer and want banners. On a text printer they are usually a waste of time and paper. On a postscript printer they usually stop your printer working. (See the banners question for further expanation). XIV.08) What is the format of a /etc/printcap? ANSWER: Ideally RTFM(termcap) (yes, I said *termcap*) but since most people don't have TFM(termcap) here are the essentials. Lines starting # are comments (as you might have guessed). For each printer usable from the lpr command on your system there is one logical line in the file. For the sake of readability each logical line may be spread over several physical lines by making the last character on all but the last physical line a backslash. Each logical line has the following format: name1|name2|name3:string_capability=string:\ :numeric_capability#number:boolean_capability: The leading spaces and colon on the second line are for readability only. A printer can have as many names as you like but conventionally the final name is used as a longhand description of the printer. (Still people are free to say `lpr -P "Fred's grotty teletype"' if that's the description you've given.) The list of capabilities can be as long as needed and the order is not significant. Each ``capability'' is denoted by a two character code. (The name ``capability'' comes form the file format's termcap heritage - parameter or attribute would be a more sensible terms.) [Note from Ross Biro: capabilities with 3 character names don't work properly which is why the serial port stuff in the old binaries failed.] Capabilities having string value and have a = delimiter between the capability name and the value while those having a numeric value use a # (actually they can use either a # or an =). Boolean ``capablilties'' are true if they appear in the list and false if they do not. Special characters in a string value can be expressed using `\'-escape sequences as in C; in addition, `\E' stands for ESC. `^' is also a kind of escape character; `^' followed by CHAR stands for the control-equivalent of CHAR. Thus, `^a' stands for the character control-a, just like `\001'. `\' and `^' themselves can be represented as `\\' and `\^' respectively. `\:' for `:' seems to work but the source code contains a comment to the effect that it is unsafe and `\072' is a better idea. Example: lp|bam|BAM's Epson FX-80:lp=/dev/lp1:sd=/usr/spool/lp1:sh:mx#0:\ :df=/usr/local/lib/magic-filter/lp.df:\ :if=/usr/local/lib/magic-filter/lp.if: Name is lp (this is the printer that lpr uses by default). It's also known as bam or "BAM's Epson FX-80". The printer is on /dev/lp1 (aka AT-bus LPT1:). I don't want a burst page. I don't want a file length limit. Files queued by `lpr -d' are passed through /usr/local/lib/magic-filter/lp.df and those queued by `lpr' through /usr/local/lib/magic-filter/lp.lf. See also the next question. XIV.09) My /etc/printcap looks identical to someone else's but it doesn't work - why? ANSWER: See if lpc stat reports a printer called ` :'. The last character on a continued line must be a \. If there are whitespace characters after the \ then it doesn't register the next line as a continuation. XIV.10) What's the minimum /etc/printcap? ANSWER: This is a silly question but it _is_ frequently asked. The answer is ``lp:sh'' (that's 6 bytes including the required linefeed character on the end). To use this /etc/printcap you must make /dev/lp a symlink to your printer and create your spool queue directory as /usr/spool/lpd. (You might think that if you wanted banner pages you could loose the ``:sh'' but the termcap syntax requires at least one capability per entry). XIV.11) How do I prevent the `staircase effect'? ANSWER: Unix terminates each line of a file with a linefeed but not a carriage return so taken literally a Unix text file printed on an ASCII device will start each line below the end of the previous line. Some printers can be set to treat "linefeed" as "carriage return, linefeed", others can't. If yours can then do simply do that. If the printer cannot be fixed create a shell script filter that reads: #!/bin/sh if [ $1 = -c ]; then cat else sed -e s/$/^M/ fi # the ``echo -ne'' assumes that /bin/sh is realy bash echo -ne \\f where ^M is a carriage return character not a ^ followed by a M. To type ^M in emacs use the sequence C-q C-m and in vi use C-v C-m. Conventionally this script is called /usr/lib/lpf. The test of $1 allows the isertion of carriage returns to be switched off by the `-l' switch on lpr. Alternatively your printer may have an escape sequence that will set the way it handles linefeed characters. A simple filter that uses an `echo -ne' command to send this sequence may be appropriate. #!/bin/sh # Filter for HP printers to treat LF as CRLF # the ``echo -ne'' assumes that /bin/sh is realy bash echo -ne \\033\&k2G cat echo -ne \\f [Ross Biro's new release includes a slightly more complex filter stript called /usr/lib/hpof that does this and a few other things to make an HP printer behave sensibly even if it was in the wrong language when you started.] XIV.12) How do I get my printer to go back to the default font after each printout? ANSWER: Either make your filters do it or define the `tr' ``capability'' in /etc/printcap to be your printer's font reset command. For details of the format of this string see the question on the format of printcap. This may not work if a printout crashes in the middle of an escape sequence - putting a lot of ^@ on the front may help but this probably won't be enough it you were printing raster graphics when the filter died. XIV.13) How do I prevent a formfeed at the end of every printout? ANSWER: If you don't have an `if' specified in /etc/printcap then lpd will automatically put a formfeed at the end of each file. If you're using a filter then it's up to the filter to decide if it wants to put a formfeed. To disable formfeed completely if you don't have an `if' put :ff=: in your /etc/printcap. But please note this suppresses the formfeed that would usually be printed if a filter dies. If you want formfeeds after text printouts but not on printouts printed with `lpr -l' then create the following `if' filter: #!/bin/sh # the ``echo -ne'' assumes that /bin/sh is realy bash cat if [ "$1" != -c ]; then echo -ne \\f fi If you want a formfeed after `lpr -l' to be optional you can misuse the `-i' switch to suppress the formfeed with the following trick (after all `lpr -i -l' would usually not be implemented). #!/bin/sh cat # use lpr -i -l to print raw without trailing formfeed if [ "$1" != -c -o "$4" = -i0 ]; then # the ``echo -ne'' assumes that /bin/sh is realy bash echo -ne \\f fi XIV.14) How do I print to a serial port? ANSWER: This answer and the following ones are supplied by Andrew Tefft and apply to those using a local serial printer. The first section applies to both net-2 and pre-net-2 implementations of lpd; then there is a section applicable only to the older implementation; the rest applies to net-2 only. First, there is a kernel patch you need to make. This applies to pre-net-2 lpd as well (actually, the use of this should probably just be commented out of the lpd source code). The change is for at least patchlevel 10, but probably all others as well. in /usr/src/linux/kernel/chr_drv/tty_ioctl.c, around line 390, you will see: case TIOCEXCL: return -EINVAL; /* not implemented */ Change this to return 0, recompile the kernel, and you'll be all set. The following applies only to the "old" lpd, before net-2. You cannot set any serial port settings (including baud rate) in your printcap. Leave them all out and use stty to set up the port (if necessary) in your rc.local, and you should be all set (to find the correct stty settings, start with the default and twiddle until you can correctly cat a file out the port). The rest of this applies only to net-2 lpd although it may be helpful to read. I put more detail into this because it's what I use. XIV.15) What serial settings do I have to put in my printcap? How do I know how to set them? ANSWER: There are two sets of flags which you will need to set, plus the baud rate (Note: the "fc" flag setting seems to override the br# capability, so be sure to set that correctly as well as the br#!). Each of the flags can have bits set and cleared. Clearing is done first, so specify the clear flags (fc# and xc#) before the set flags (fs and xs). Setting the br# capability is self-explanatory. Example: br#9600 It is very easy to translate from 'stty' settings to printcap flag settings. If you need to, see the man page for stty now. Use stty to set up the printer port so that you can cat a file to it and have it print correctly. Here's what "stty -a" looks like for my printer port: dina:/usr/users/andy/work/lpd/lpd# stty -a < /dev/ttyS2 speed 9600 baud; rows 0; columns 0; line = 0; intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = ; eol2 = ; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; min = 1; time = 0; -parenb -parodd cs8 hupcl -cstopb cread -clocal -crtscts -ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr -icrnl ixon -ixoff -iuclc -ixany -imaxbel -opost -olcuc -ocrnl -onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0 -isig -icanon -iexten -echo -echoe -echok -echonl -noflsh -xcase - tostop -echoprt -echoctl -echoke The only changes between this and the way the port is initialized at bootup are -clocal, -crtscts, and ixon. Your port may well be different depending on how your printer does flow control. Once you have your stty settings right, so that cat file > /dev/ttyS2 (in my case) sends the file to the printer, look at the file /usr/src/linux/include/linux/termios.h. This contains a lot of #defines and a few structs (You may wish to cat this file to the printer (you do have that working, right?) and use it as scratch paper -- I did!). Go to the section that starts out /* c_cflag bit meaning */ #define CBAUD 0000017 This section lists the meaning of the "fc#" and "fs#" bits. You will notice that the names there (after the baud rates) match up with one of the lines of stty output. Didn't I say this was going to be easy? Note which of those settings are preceded with a - in your stty output. Sum up all those numbers (they are octal). This represents the bits you want to *clear*, so the result is your fc# capability. Of course, remember that you will be setting bits directly after you clear, so you can just use fc#0177777 (I do). Now do the same for those settings (listed in this section) which do not have a - before them in your stty output. In my example the important ones are CS8 (0000060), HUPCL (0002000), and CREAD (0000200). Also note the flags for your baud rate -- mine is 0000015. Add those all up, and in my example you get 0002275. This goes in your fs# capability (fs#02275 works fine in my example). Do the same with set & clear for the next section of the include file, "c_lflag bits". In my case I didn't have to set anything, so I just use "xc#0157777" and "xs#0". Once your printcap is set up, try it out. If things don't work, see the next section. XIV.16) I can cat to the serial port, but lpd won't print anything (1). ANSWER: Generally getting lpd up and running is explained elsewhere, but if you are having trouble with serial port settings you can prevent lpd from trying to configure your port by treating you printer as one that does not present a normal device interface (qv). 1. Set your printer (in your printcap) to /dev/null1. Create /dev/null1 using mknod /dev/null1 c 1 3 (because you don't want /dev/null to be opened exclusively). remove the baud rate and flags settings from your printcap. 2. Create a script such as this: #!/bin/sh echo if: $* >> /var/spool/lpd/results # /dev/lp is linked to /dev/ttyS2 which has the printer exec your-old-input-filter $* > /dev/lp ...or if you didn't have an old if installed... #!/bin/sh echo if: $* >> /var/spool/lpd/results cat > /dev/lp # the ``echo -ne'' assumes that /bin/sh is realy bash echo -en \\f > /dev/lp Make sure it's world-executable and world-readable. I call my script /var/spool/lpd/if, to make things easy. Try out your script (/var/spool/lpd/if < somefile) and see if it prints. 3. Set the if= capability in your printcap to call this script, e.g. if=/var/spool/lpd/if 4. Use stty to correctly set your port settings. Try to print now. You should be able to tell if things are being spooled, and things *should* be printed, if your manual testing of the if script works. But this is a kludge, so the idea is not to use the if script. XIV.17) I can cat to the serial port, but lpd won't print anything (2). ANSWER: Assuming the above method using the "if" filter works and that you belive that you have specified what you think are the correct flags and baud rate in printcap; check ``stty -a < /dev/ttyS2'' (or whatever your printer port is). If the settings are not correct, check your flags against your printout from termios.h. If the settings are *way* not correct, you may need to fix lpd itself. The patch follows, and you can probably see why it's needed :-) It gets applied in the lpd/ subdirectory of the lpd source. (the patch is coming in just a sec) When I was setting mine up, I followed a sequence like this: lprm (whatever -- make sure queue is empty and lpd is running) stty (correct settings) < /dev/ttyS2 lpr (something small) stty -a < /dev/ttyS2 (often had to ctrl-c out of this one) (twiddle with flags) lprm (whatever -- make sure queue is empty again...) Here's the patch: -------------------------------Cut Here------------------------------- ------ *** printjob.c Thu Jul 8 20:56:59 1993 --- printjob.c~ Sat Feb 27 09:07:01 1993 *************** *** 1271,1277 **** } #ifdef LINUX ttybuf.c_cflag &= ~FC; /* not quite right! */ ! ttybuf.c_cflag |= FS; /* not quite right! */ #else ttybuf.sg_flags &= ~FC; ttybuf.sg_flags |= FS; --- 1271,1277 ---- } #ifdef LINUX ttybuf.c_cflag &= ~FC; /* not quite right! */ ! ttybuf.c_cflag |= ~FS; /* not quite right! */ #else ttybuf.sg_flags &= ~FC; ttybuf.sg_flags |= FS; -------------------------------Cut Here------------------------------- ------ XIV.18) How do I use a printer that's doesn't present a normal device interface? ANSWER: [Firstly I'll explain the question.] The most common example is a printer that is connected via a network in some strange way. For example consider a printer conneccted to a host running some esoteric OS with which you can only communicate via E-mail. To use this printer without going through lpr you would say something like: | uuencode tmp | mail printer-request@eosteric in place of: > /dev/lp To use such a printer through lpr the ``lp'' capability of the print queue should be directed to a /dev/null type device (e.g. ``mknod /dev/null1 c 1 3'') but not /dev/null itself as lpd opens the device exclusively. _Each_ filter must must explicitly uuencode and mail its output. In more complex cases if you already have an ``if'' or ``of'' filter for a strangely connected printer then other filters can pass their output to/through this filter to avoid duplication of effort. In this case the ``if'' filter should usually be called with the ``-c'' switch to minimise the further manipulations if performs. XIV.19) How do I get burst/banner pages? ANSWER: For a simple text printer (in particular not postscript) and a simple text banner simply take :sh: out of the printcap record. If you want to prevent the banner comming out in whatever font was last used on the printer then define the `tr' ``capability'' to be your printer's font reset command. If you want a fancy cusomised banner (or have a postscript printer) leave :sh: in the printcap and make each of your filters print the banner. All the information to put on the banner is included in the filter's positional parameters. RTFM(printcap) for details. [ If you're using 's magic-filter package then call the code to print the banners from the config script. ] XIV.20) How do I print text on a PS printer? ANSWER: You need a filter based on a program that converts ascii to postscript. The most well known of these is ``enscript'' but it's also the hardest to find. Others include ``a2ps'' and ``mpage'' (for details of these see the periodic c.o.l.a posting "How to print under Linux" by Grant Taylor) In order to get the Grant Taylor's document you can send mail To: mail-server@god.hounix.org Subject: send printing.how-to -or- Subject: printing.how-to.z.uue and for a list of other linux printing-related files: Subject: help The nearest thing to enscript that an archie search revealed was a package called ``nenscript-1.13++.tar.Z'' deep in the guts of gatekeeper.dec.com which appears to do the job but it's prone to trimming off the tops of your pages. (It didn't compile ``out of the box'' with the GNU libs but all it needed was one #undef.) [I've not looked into these in detail as I don't have a PS printer. I would like someone to send me an exaple of a filter that they use using one of these.] XIV.21) Why do files with a lot of graphics get truncated? ANSWER: Usually because you've got a limit set on the maximum size file that can sit in the spool queue. Put `mx#0' in your printcap. XIV.22) Why doesn't `lpr -i' work? ANSWER: To get lpr -i to work you need a filter istalled as `if' that implements it. The -i switch is simply passed on by lpd to the filter. There is such a filter usually called /usr/lib/lpf that can be obtained from bsd source archives in the directory bsd-source/lpr/filters. It's also part of Fred's port but he put it in /usr/bin/. If you whant to use this program but still want your filter to do some printer specific initialisation then write script thus: #!/bin/sh # My initialisation stuff goes here exec /usr/lib/lpf $* XIV.23) Why doesn't `lpr -p' work? ANSWER: Because it's broken. lpd always thinks that the printer is 0 characters wide regardless of what printcap says. This is still broken in Ross's new release and Fred's port of the '91 sources. Looking at the sources the fix for Fred's port appears to be: -------------------------------Cut Here------------------------------- ------ *** printjob.c.old Sat Feb 27 14:07:01 1993 --- printjob.c Sun Jun 6 11:02:36 1993 *************** *** 265,271 **** */ for (i = 0; i < 4; i++) strcpy(fonts[i], ifonts[i]); ! strcpy(width+2, "0"); strcpy(indent+2, "0"); /* --- 265,271 ---- */ for (i = 0; i < 4; i++) strcpy(fonts[i], ifonts[i]); ! sprintf(&width[2], "%d", PW); strcpy(indent+2, "0"); /* *************** *** 1081,1087 **** FF = DEFFF; if ((PW = pgetnum("pw")) < 0) PW = DEFWIDTH; - sprintf(&width[2], "%d", PW); if ((PL = pgetnum("pl")) < 0) PL = DEFLENGTH; sprintf(&length[2], "%d", PL); --- 1081,1086 ---- ----------------------------------Cut Here---------------------------- -- This patch is untested as I don't have a complete set of net-2 include files on my machine yet. One other thing: lpd calls pr by full pathname so if you keep pr somewhere different from where lpd looks you will need a symlink. Where lpd expects to find pr varies from version to version but I think /usr/bin/pr is the usual place. XIV.24) Why does lprm say `too many users'? ANSWER: This was a bug in the C library in the scandir() function which failed when an unsorted directory list was requested. This has been fixed now so just get a new libc.so. Alternatively there is a lprm with a workround (by toy@soho.crd.ge.com) in: sunsite.unc.edu:/pub/Linux/system/Daemons/lprm-fix.tar.z XIV.25) Why does lpc complain that it hasn't stopped a daemon? ANSWER: There's one lpd process that runs all the time and it spawns off children to handle each printer as needed. These children leave lock files lying about so lpc thinks that they are still running and tries to kill them. Was a bug but it was not serious and is fixed in the latest releases. XIV.26) Why does XIV.27) How do I print over a Network? ANSWER: To print on the printer "foo" connected to the machine "bar.baz.net" from the machine "mine.baz.net" you put an entry like this in your /etc/printcap (on mine.baz.net): foo:lp=:rm=bar.baz.net:rp=foo:sd=/usr/lpd/spool/foo: and, of course, create the spool directory /usr/lpd/spool/foo. There's no point specitying filters and the like in mine.baz.net:/etc/printcap as it's the one in bar.baz.net:/etc/printcap that will get used. On the machine bar.baz.foo, you need to put "mine.baz.net" on a line by itself in either /etc/hosts.equiv or /etc/hosts.lpd; note that putting it in /etc/hosts.equiv will allow for unauthenticated logins as well as printing. /etc/hosts.lpd is printing only. [ Editors note: I realise there are more questions about net printing but I don't know them. If you find any let me know (with answers if possible). See also the net FAQ ] XIV.28) Which /dev/{tty,cua,lp}* is my printer? ANSWER: On an XT bus system LPT1: becomes /dev/lp0 (major=6, minor=0), on an AT LPT1: becomes /dev/lp1 (major=6, minor=1). To be more precise: Name Major Minor I/O address lp0 6 0 0x3bc lp1 6 1 0x378 lp2 6 2 0x278 For a serial printer use the ttyS? (or ttys?, if you follow that scheme) device, not the cua? device. The ttyS? devices have major 4; the cua? devices have major 5. You must specify the device in printcap or make /dev/lp a symlink to the actual device. XIV.29) When the kernel boots it says `using polling driver,' is there an interrupt driven driver? ANSWER: Yes the latest kernels support parrallel port IRQs but to enable them you must ether: edit the IRQ number into lp_table[] in lp.c in the kernel source, or use `lpcntl'. The interrupt driver uses less processor time and gives a faster throughput but sometimes one may choose sacrifice this to free up an IRQ line. If your printer is /dev/lp1 using IRQ 7 put: /etc/lpcntl /dev/lp1 7 in your /etc/rc. If you don't have lpcntl get it from: tsx-11.mit.edu:/pub/Linux/BETA/lp/lpirq.4.tar.Z XIV.30) What's the difference between the polling driver and an the interrupt driven one? ANSWER: A polling sits in a loop repeatedly reading the port hardware to see if it is ready for another character and then gives it one. An interrupt driver goes to sleep and is woken by the port hardware (using a hardware interrupt) when it wants another character. Polling drivers are easier to write but in multitasking environments they are a bad thing.) I have seen some OSs for PC/AT machines where the polling printer drivers are more reliable than the interrupt ones but I doubt this is the case in Linux :-). XIV.31) How do I write filters? ANSWER: In normal Unix terminology, filters are just programs (so they must have execute permission) that read a stream from their standard input and write to their standard output. lpd filters are filters in the sense that thay read from their STDIN and write to their STDOUT but are not necessarily true filters in that they may assume that their standard input is a file and perform lseek() operations on it. I'm not sure that such filters are strictly conforming but they seem to work OK. All lpd filters must conform to a particular command line syntax (or more often simply ignore command line parameters). For details of the command line parameters RTFM(printcap). It's easier to debug filters if you test them in an immediate shell before you install them. (If your filter make use of its command line arguments you'll have to specify them too). my-new-filter /dev/lp1 If you want to write a shell script filter it must have a #!/bin/sh header. Here for example is my Epson FX-80 dvi filter: #!/bin/sh /usr/TeX/bin/dvips -f | \ /usr/bin/gs -q -sDEVICE=eps9high -r120x216 -dNOPAUSE -sOutputFile=- - More good specific examples can be found in the peroidic c.o.l.a posting "How to print under Linux" by Grant Taylor. The document also explains to print out the types of file you wouldn't normally have a filter for eg. texinfo. (Not that you can't have a texinfo filter - I have one but it does leave the printer idling for a long time while tex runs.) XIV.32) I've written a filter in shell script which works OK when I use it from the shell prompt but fails when I tell lpd to use it? ANSWER: You may need a #!/bin/sh header. You may also need to set PATH within the script since the daemon's PATH may not have everything you need. XIV.33) When should I define an `of' filter? ANSWER: Never. (Well strictly speaking there are circumstances but you're unlikey to meet them until you're so familar with lpd that you won't need this FAQ.) XIV.34) Where do I get filters for given printers? ANSWER: From BSD source archives (I think). [Editors note: I need a better answer here ]. If you already have a program to print say DVI on your printer by some mechanism then making it into a filter is usually a matter of writting trivial shell script - see this FAQ. If the program you are using insists on reading a names file as input see the next question. Text mode filters are trivial too (see this FAQ) unless you want lpr to have a choice of fonts in which case they are slightly harder than trivial. You will probably want to insert and `echo -ne' command at the beginning and end of your filter to set up the font etc to your liking. XIV.35) How do I get a program that won't read from STDIN to act as a filter? ANSWER: For example dvilj2p insists on a named file as its input (and what's more expects one with a .dvi suffix). To make a dvi filter for a laserjet you'll have to capture the STDIN into a temporary file. #!/bin/sh cat >/tmp/$$.dvi dvilj2p /tmp/$$ rm /tmp/$$.dvi The problem with this kludge is that is may have a very high disk overhead. (In the long term dvilj2p should be fixed). If you have procfs you can use the following trick: #!/bin/sh ln -s /proc/self/fd/0 /tmp/$$.dvi dvilj2p /tmp/$$ rm /tmp/$$.dvi Note: If it wasn't for the fact that dvilj2p adds a .dvi suffix you wouldn't need the temporary symlink and could just specify /proc/self/fd/0 directly. People who use this trick often usually keep permanent symlinks to /proc/self/fd/* in /dev. XIV.36) The set of filters supported by lpd seem strange - why aren't there filters for Postscript, GIF, TIFF and so on? ANSWER: History. You can, in fact, use any of the filters (with the possible exception of the default filter) for any reason. If you're never going to use Benson Varian raster files you could use the -v switch for GIF files. Remember that if you create a filter for a file format that takes a long time to process then your printer may sit idle between print jobs even when there are things in the queue. If you are on a network remember that the filter setups go on the print server so you will need to consider other people's needs too. One way to avoid running out of filter options is to define several logical printers in /etc/printcap that all point to the same physical one. One small problem with this is that you have no control over the order in which files from separate queues are printed. Another way to avoid running out of possible types is to use magic filters. XIV.37) What are magic filters? ANSWER: Magic filters deduce their input files' types from `magic numbers' (distictive byte patterns at particular offsets). Magic filters are usually perl scripts, shell scripts or C programs that simply identify the file type then call the appropriate non-magic filter. Blatent plug :-) I have a generic magic filter bash script that selects the right filter to use based on the output of the `file' command. With my magic ``dvi'' filter (and 3 associated non-magic filters) I can do things like: lpr -d file1.dvi file2.div.Z file3.ps file4.texinfo.z (BTW confguring lpr to handle texinfo files getting a bit silly - see previous question). This is now at: tsx-11.mit.edu:pub/linux/sources/usr.bin/magic-filter-0.3.tar.gz (Although the release number will possibly change in future). Other examples of magic filters (a simpler shell one and one in C) can be found in the periodic c.o.l.a posting "How to print under Linux" by Grant Taylor. Magic filters should never specified as `of' as the output filter only gets called once if a number of files are printed without a gap. IMHO magic filters as `if' can also cause problems as they may prevent you, say, _listing_ a PostScript or nroff file. (Other people disagree as, if you are making your printer available on a network, it can be a pain having people accidently listing ps files.) XV. UUCP/NEWS/MAIL for LINUX ============================ *** This section is an expert of the UUCP-NEWS-MAIL-FAQ, posted twice *** monthly in c.o.l.a. This section and the complete FAQ about UUCP *** and others is written by Vince Skahan (vince@victoria.sea.wa.us), *** mail him for any corrections and information. *** *** Last update 93/06/11 XV.A. General Information XV.B. UUCP XV.C. News XV.D. Mail XV.A. General Information ~~~~~~~~~~~~~~~~~~~~~~~~~ XV.01) What uucp, news, and mail software works under Linux ? ANSWER: Just about everything, most with no (or minimal) patching required... The following is a quick but not all-inclusive list of software known to work under Linux: UUCP - Taylor UUCP 1.04 News transport - Cnews 12/22/91 patchdate (no 'optional' speedups) Cnews 'performance release' (needs patching) INN 1.4 (needs patching) dynafeed nntp 1.5.11 'reference' release, slurp 1.05 News readers - tin-1.2-p0 trn-2.5 (probably also 3.0) nn-6.4.18 tass rn4.4 waffle 1.65 Mail transport - smail2.5 smail3.1.28 sendmail5.65c+IDA Mail program - elm2.4.21 (probably also 2.4.22) pine procmail deliver XV.02) So where are the sources ? ANSWER: At your friendly neighborhood archive site where you find sources normally. Consult archie for a list. Config files for the portions of UUCP/News/Mail currently in the SLS distribution of Linux can be found on sunsite.unc.edu in the file sunsite.unc.edu:/pub/Linux/system/Mail/newspak-1.4.tar XV.03) Do I really need the sources ? ANSWER: Yes, if you want to *really* understand how the pieces are configured and how they fit together. If you already know how...probably not unless you want to change the paths used or do custom patching for some reason. There is considerable documentation in the sources that doesn't get "installed" that helps fill in the blanks between what you need to know, and what you can figure out. XV.04) How do I get my system a news/mail/uucp feed ? ANSWER: Please see the "how to become a USENET site" periodic posting in news.answers XV.B. UUCP ~~~~~~~~~~ XV.05) Why do I get 'timeout' on connections when I upgraded to uucp-1.04 ? ANSWER: If you use a 'Direct' device in the Devices file, there's now a 10 second timeout compiled in. Make the name of the Device anything other than 'Direct'. XV.06) Why doesn't anonymous uucp seem to work ? ANSWER: The SLS anonymous uucp only works in Taylor mode because it's compiled with HAVE_TAYLOR_CONFIG. If you want to do anon uucp in HDB mode, you'll have to recompile the sources with just HDB defined. HDB mode also seems rather particular about things like blank spaces and blank lines in your Permissions file. If you get log file entries that indicate 'no permission' for anon uucp, a good place to start is to make sure that there are no blank lines (comment 'em out). XV.C News ~~~~~~~~~ XV.07) What newsreader is best ? ANSWER: No way I'll open that can of worms other than to say that you definitely want something with "kill files" and probably want something with 'threads'. For what little it's worth, I use 'nn'. XV.08) with trn - why do I get the message 'dbinit failed' ? ANSWER: Because you didn't run mthreads from cron to keep the threads database up-to-date. XV.09) why is my 'nn' database getting continuously corrupted ? ANSWER: If you built it from sources and you asked for the 'words' method of building the database, it will definitely get corrupted if your filesystem doesn't handle long filenames (ie...comp.os.linux.announce is more than 14-characters). Build it with the 'by-number' way of creating the database and you'll be fine. XV.10) why can't I post to moderated groups ? ANSWER: Probably because the newsreader is trying to call /bin/mail to send the mail and it doesn't like it. Replace the /bin/mail in SLS with the port of mailx-5.3a.tar.z from the pub/Linux/system/Mail dir on sunsite.unc.edu and make it mode 2755 and group mail (like 'elm') and you'll be all set. Another possibility is that you have a moderated newsgroup set up on your local system as not-moderated and somebody upstream is quietly deleting the article (some system's software, not a person). Make sure you run a 'checkgroups' every now and then when the checkgroups article rolls by in news.admin every few weeks. XV.11) Why do I have problems that appear to be permission-related ? ANSWER: All the stuff in /usr/local/lib/news should be news.news except /usr/local/lib/news/setnewsids which should be setuid root. Past versions of SLS had no 'news' group or user by default, which caused lots of problems for people if they installed the news software *before* they added the 'news' group and user. XV.12) Why doesn't SLS have the 'Performance Release' of C-news? INN ? NNTP ? ANSWER: Because SLS can't have *everything*. It has the pre-performance C-news because it's a very fast and stable implementation for non-nntp sites that fits the needs of a normal uucp-only site. If you're that into having the most current of everything, you should probably be building it from the sources. XV.13) Why does doexpire say "severe space shortage" when there's lots of room ? ANSWER: Because it can't read /etc/mtab. Make it mode 644. This happens when you unmount a mounted filesystem by root with a umask that doesn't permit world-read of files owned by root. XV.14) How do I set up NNTP? ANSWER: Please see the extended description from Matt Welsh in the UUCP-NEWS-MAIL-FAQ that appears routinely in c.o.l.a. XV.D. Mail ~~~~~~~~~~ XV.15) Why is my hostname.domainname not in my headers and something funky's there ? ANSWER: Because you didn't edit one or more of the following files like the README.linux files in the lib directories told you to: /usr/local/lib/smail/paths /usr/local/lib/smail/config /usr/local/lib/elm/elm.rc XV.16) Why can't elm write to my mailbox ? ANSWER: You need elm and filter to be mode 2755 and group mail and also have /usr/spool/mail mode 775 and group mail. XV.17) is sendmail+IDA available for Linux instead of smail ? ANSWER: Yes !!! I've recently switched from smail to sendmail+IDA from the binary distribution on sunsite.unc.edu and it works great...and I'm a uucp-only site. Look in pub/Linux/system/Mail for it... ===================8<==========>8================ -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ # LaBRI | # # 351 cours de la Liberation | e-mail: corsini@geocub.greco-prog.fr # # 33405 Talence Cedex | e-mail: corsini@labri.u-bordeaux.fr # # | # ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- There will be a sig when our local net is reliable. For now, I would rather stay anonymous.