home *** CD-ROM | disk | FTP | other *** search
/ CD Actual 8 / CDACTUAL8.iso / docs / linux.faq / linux-fa.sou / linux-fa / linux-faq.bfnn < prev    next >
Encoding:
Text File  |  1996-03-06  |  100.4 KB  |  2,599 lines

  1. \comment This is the source for the new Linux FAQ list, in
  2. \comment the Bizarre Format With No Name.  It is turned into Lout
  3. \comment input, plain ASCII and an Info document by a Perl script
  4. \comment
  5. \set brieftitle Linux FAQ
  6. \set author     <A href="http://www.cl.cam.ac.uk/users/iwj10/">Ian Jackson</A> / <A href="http://www.cl.cam.ac.uk/users/iwj10/contact.html">ijackson@gnu.ai.mit.edu</A>
  7. \set authormail iwj10@cus.cam.ac.uk
  8. \set title      Linux Frequently Asked Questions with Answers
  9. \set copyholder Ian Jackson
  10. \set copyrightref faqcopyright
  11. \call-lout startup
  12. \call-html startup html.refs
  13. \copyto ASCII
  14.             LINUX FREQUENTLY ASKED QUESTIONS WITH ANSWERS
  15.                             `date '+%d %b %Y'`
  16.                 Ian Jackson <ijackson@gnu.ai.mit.edu>
  17.  
  18. \endcopy
  19. \copyto POST
  20. #!/bin/sh
  21. set -e
  22. test ian@chiark = `whoami`@`hostname`
  23. cat <<'END-OF-HEADER' >linux-faq.post-part1
  24. From: ijackson@gnu.ai.mit.edu (Ian Jackson)
  25. Newsgroups: comp.os.linux.answers,comp.os.linux.setup,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.announce,comp.os.linux.help,comp.answers,news.answers
  26. Subject: Linux Frequently Asked Questions with Answers (FAQ: 1/2)
  27. Keywords: FAQ, Linux, part1
  28. Summary: Please read the whole FAQ before posting to comp.os.linux.help.
  29. Followup-To: poster
  30. Approved: *.answers moderation team <news-answers-request@mit.edu>,
  31.           Matt Welsh <linux-answers-request@news.ornl.gov>
  32. `./expirydate`
  33.  
  34. Archive-Name: linux/faq/part1
  35. Last-Modified: `date '+%d %b %Y'`
  36.  
  37. END-OF-HEADER
  38. pgp-auto +batchmode +force -fast <<'END-OF-PORTION' >>linux-faq.post-part1
  39. \endcopy
  40. \copyto LOUT
  41. @Doc @Text @Begin
  42. @CenteredDisplay clines @Break {
  43. +5p @Font Bold @Font { Linux Frequently Asked Questions with Answers }
  44. -2p @Font {Ian Jackson {0.7 1.0} @Scale {Courier Bold} @Font "<ijackson@gnu.ai.mit.edu>"}
  45. `date '+%d %B %Y'`
  46. }
  47. \endcopy
  48. \copyto INFO
  49. START-INFO-DIR-ENTRY
  50. * Linux FAQ: (linux-faq). Linux Frequently Asked Questions with Answers.
  51. END-INFO-DIR-ENTRY
  52.  
  53. 
  54. File: $prefix.info, Node: Top, Next: Question 1.1, Up: (dir)
  55.  
  56.             LINUX FREQUENTLY ASKED QUESTIONS WITH ANSWERS
  57.                             `date '+%d %b %Y'`
  58.                 Ian Jackson <ijackson@gnu.ai.mit.edu>
  59.  
  60. \endcopy
  61.  
  62. This is the list of Frequently Asked Questions about Linux, the free
  63. Unix for 386/486/586 [see \qref whatislinux for more details].  It
  64. should be read in conjunction with the HOWTO documents, which are
  65. available in
  66. \call startlist
  67. \call item
  68. \ftpon ftp.funet.fi (128.214.6.100) : \ftpin /pub/OS/Linux/doc/HOWTO
  69. \call item
  70. \ftpon tsx-11.mit.edu (18.172.1.2) : \ftpin /pub/linux/docs/HOWTO
  71. \call item
  72. \ftpon sunsite.unc.edu (152.2.22.81) : \ftpin /pub/Linux/docs/HOWTO
  73. \call endlist
  74. and mirror sites thereof -- see \qref ftpsites.  See \qref howtos for
  75. a list of the HOWTOs and more information.  The \docref INFO-SHEET and
  76. \docref META-FAQ, found in the same place, also list other sources
  77. of Linux information.
  78.  
  79. The \docref{Linux Documentation Project\} documentation is available
  80. on \ftpon sunsite.unc.edu in \ftpin /pub/Linux/docs/LDP.  These
  81. documents (more are in preparation) are invaluable to the newcomer or
  82. for use as a reference work.
  83.  
  84. Please check out these documents and this FAQ, especially \qref
  85. notanswered, before posting your question to a newsgroup.
  86.  
  87. See \qref formats for details of where to get the PostScript, Emacs
  88. Info, HTML (WWW) and plain ASCII versions of this document.
  89.  
  90. \only post
  91. You can skip to a particular question by searching for `Question n.n'.
  92.  
  93. Note that this posting has been split into two parts because of its
  94. size.
  95. \endonly
  96.  
  97. A new version of this document appears approximately monthly.
  98. If this copy is more than a month old it may be out of date.
  99.  
  100. \section  Index
  101.  
  102. \index
  103.  
  104. \comment ######################################################################
  105.  
  106. \section  Introduction and General Information
  107.  
  108. \question 18sep:whatislinux  What is Linux ?
  109.  
  110. Linux is a Unix clone written from scratch by Linus Torvalds with
  111. assistance from a loosely-knit team of hackers across the Net.  It
  112. aims towards POSIX compliance.
  113.  
  114. It has all the features you would expect in a modern fully-fledged
  115. Unix, including true multitasking, virtual memory, shared libraries,
  116. demand loading, shared copy-on-write executables, proper memory
  117. management and TCP/IP networking.
  118.  
  119. It runs mainly on 386/486/586-based PCs, using the hardware facilities
  120. of the 386 processor family (TSS segments et al) to implement these
  121. features.  Ports to other architectures are underway [\qref cpu].
  122.  
  123. See the Linux \docref INFO-SHEET [\qref howtos] for more details.
  124.  
  125. The Linux kernel is distributed under the GNU General Public License -
  126. see \qref copyright for more details.
  127.  
  128.  
  129. \question 09sep:supportedsoftware  What software does it support ?
  130.  
  131. Linux has GCC, Emacs, X-Windows, all the standard Unix utilities,
  132. TCP/IP (including SLIP and PPP) and all the hundreds of programs that
  133. people have compiled or ported for it.
  134.  
  135. There is a DOS emulator (look on \ftpon tsx-11.mit.edu in \ftpin
  136. /pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not
  137. all) DOS applications.  I'm told that it can now run Windows 3.1 in
  138. Enhanced Mode.
  139.  
  140. An iBCS2 (Intel Binary Compatibility Standard) emulator for SVR4 ELF
  141. and SVR3.2 COFF binaries is at a fairly advanced stage of development.
  142. See the file \ftpsilent{tsx-11.mit.edu\}\ftpin
  143. /pub/linux/BETA/ibcs2/README on \ftpon tsx-11.mit.edu.
  144.  
  145. Work is progressing on an emulator for Microsoft Windows binaries
  146. [\qref wine]; alternatively, I'm told that the DOS emulator team have
  147. been having some success getting MS Windows to run inside dosemu -
  148. there will be an announcement if and when they get it working.
  149.  
  150. For more information see the \docref INFO-SHEET, which is one of the
  151. the HOWTOs [\qref howtos].  See also \qref compiling.
  152.  
  153. Some companies have commercial software available, including Motif.
  154. They announce their availability in \newsgroup comp.os.linux.announce
  155. --- try searching the archives [\qref newsarchives].
  156.  
  157.  
  158. \question 09sep  Does it run on my computer ?  What hardware is supported ?
  159.  
  160. You need a 386, 486 or 586, with at least 2Mb of RAM and a single
  161. floppy, to try it out.  To do anything useful more RAM (4Mb to install
  162. most distributions, and 8Mb is highly recommended for running X) and a
  163. hard disk are required.
  164.  
  165. VESA local bus and PCI are both supported.
  166.  
  167. There are problems with machines using MCA (IBM's proprietary bus),
  168. mainly to do with the hard disk controller.  There is a developers'
  169. release for PS/2 ESDI drives on \ftpon invaders.dcrl.nd.edu in \ftpin
  170. /pub/misc/linux.  Certain kinds of SCSI controllers also work, I
  171. understand.  Work is in progress to create a suitable version of the
  172. Slackware distribution.  I'm afraid I don't have any further details;
  173. you could try asking Arindam Banerji \email axb@defender.dcrl.nd.edu.
  174.  
  175. Linux runs on 386 family based laptops, with X on most of them.  There
  176. is a relevant Web page at
  177. \docref{\fn http://www.cs.utexas.edu/users/kharker/linux-laptop/\}.
  178.  
  179. For details of exactly which PC's, video cards, disk controllers, etc.
  180. work see the \docref INFO-SHEET and the \docref{Hardware HOWTO\}
  181. [\qref howtos].
  182.  
  183. There is a port of Linux to the 8086, known as the Embeddable Linux
  184. Kernel Subset (ELKS).  This is a 16-bit subset of the Linux kernel
  185. which will mainly be used for embedded systems.  See \docref{\fn
  186. http://www.linux.org.uk/Linux8086.html\} for more information.  Linux
  187. will never run fully on an 8086 or '286, because it requires
  188. task-switching and memory management facilities not found on these
  189. processors.
  190.  
  191. Recent versions of Linux (1.3.35 and later) do support multiprocessor
  192. machines, though this is still rather less stable than one would hope.
  193.  
  194.  
  195. \question 07sep:cpu  What ports to other processors are there ?
  196.  
  197. A project has been underway for a while to port Linux to suitable
  198. 68000-series based systems such as Amigas and Ataris.  This has now
  199. reached beta test quality and there is an X server.  There is a
  200. \fn linux-680x0 mailing list [\qref multilist], and a
  201. \docref{Linux/68K FAQ\} at
  202. \courier{http://pfah.informatik.uni-kl.de:8000/pers/jmayer/linux68k-faq\}
  203. and on \fn tsx-11.mit.edu in \fn /pub/linux/680x0/FAQ; further
  204. information is at
  205. \docref{\fn http://www-users.informatik.rwth-aachen.de/~hn/linux68k.html\}.
  206. There is a mailing list for the Atari port - mail \email
  207. majordomo@phil.uni-sb.de with a body containing only
  208. \courier{subscribe atarix\} - and an ftp area on \ftpon
  209. ftp.phil.uni-sb.de in \ftpin /pub/atari/linux.
  210.  
  211. There used to be a project to port Linux too 68K-based Macintoshes,
  212. but its FTP site disappeared recently and the project appears to be
  213. dead.
  214.  
  215. There is a port to the PowerPC.  As of the 7th of July it is rather
  216. fragmentary and cannot recompile itself, and only supports Motorola
  217. 1603 boards.  Work on Motorola Ultra, PowerStack, RS/6000 and NuBus
  218. machines continues.  If you wish to contribute to the project join the
  219. \fn linux-ppc mailing list [\qref multilist].  There is a FAQ on
  220. \ftpon liber.stanford.edu in \ftpin /pub/linuxppc/linux-ppc-FAQ or on
  221. the WWW at
  222. \docref{\fn http://liber.stanford.edu/linuxppc/linux-ppc-FAQ.html\}.
  223.  
  224. Apple and the OSF are working on a PowerPC port of Linux based on the
  225. OSF Mach microkernel. See \docref{\fn http://mklinux.apple.com/\}.
  226.  
  227. There is a port to the 64-bit DEC Alpha/AXP.  See \docref{\fn
  228. http://www.azstarnet.com/~axplinux/\}.  Again, there is a mailing list
  229. at \fn vger.rutgers.edu.
  230.  
  231. Ralf Baechle is working on a port to the MIPS, initially for the R4600
  232. on Deskstation Tyne machines.  The \docref{Linux/MIPS FAQ\} is
  233. available on the WWW and in the MIPS port area on \ftpon
  234. ftp.waldorf-gmbh.de in \ftpin /pub/linux/mips.  There is also a \fn
  235. MIPS channel on the Linux Activists mailserver and a \fn linux-mips
  236. mailing list [\qref multilist].  Interested people may mail their
  237. questions and offers of assistance to \email linux@waldorf-gmbh.de.
  238.  
  239. There are currently two ports of Linux to the ARM family of processors
  240. ongoing; one of these is to the ARM3 as fitted to the Acorn A5000, and
  241. includes I/O drivers for the 82710/11 as appropriate, and the other is
  242. to the ARM610 as fitted to the Acorn Risc PC.  The Risc PC port is
  243. currently in its early to middle stages, owing to the need to rewrite
  244. much of the memory handling.  The A5000 port is in restricted beta
  245. testing; a release is likely fairly soon.  For more up to date
  246. information watch the newsgroup \newsgroup comp.sys.acorn.misc, or
  247. look on the WWW at
  248. \docref{\fn http://whirligig.ecs.soton.ac.uk/~rmk92/armlinux.html\};
  249. if you want to volunteer you should contact Martin Ebourne \email
  250. mje@soton.ac.uk.
  251.  
  252. David Miller is working on a port to the Sparc.  It is at a very early
  253. stage; people who are willing to dedicate lots of time and have access
  254. to Sparc boxes for testing should get in touch with \email
  255. davem@caip.rutgers.edu.
  256.  
  257. None of the above ports will be capable of running Linux/386 binaries.
  258.  
  259. Linux port to the Aleph One 486 card (\italic{not\} the second
  260. processor card for the Risc PC yet, but the original PC-on-a-podule
  261. card) has been completed and appears stable.  Full details on this
  262. version, and updates on general ports in progress, can be found on the
  263. WWW at \docref{\fn http://www.ph.kcl.ac.uk/~amb/linux.html\}.
  264.  
  265.  
  266. \question 18sep  How much hard disk space does Linux need ?
  267.  
  268. 10Mb for a very minimal installation, suitable for trying it out and
  269. not much else.
  270.  
  271. You can squeeze a more complete installation including X Windows into
  272. 80Mb.  Installating almost all of Debian 0.93R6 takes around 500Mb,
  273. including some space for user files and spool areas.
  274.  
  275.  
  276. \question 09sep:copyright  Is Linux PD ?  Copyrighted ?
  277.  
  278. The Linux kernel copyright belongs to Linus Torvalds.  He has placed
  279. it under the GNU General Public Licence, which basically means that
  280. you may freely copy, change and distribute it, but that you may not
  281. impose any restrictions on further distribution, and that you must
  282. make the source code available.  This is not the same as Public Domain
  283. (see the \docref{Copyright FAQ\}, available on \fn rtfm.mit.edu in \fn
  284. /pub/usenet/news.answers/law/Copyright-FAQ, for details).
  285.  
  286. Full details are in the file \fn COPYING in the Linux kernel sources
  287. (probably in \fn /usr/src/linux on your system).
  288.  
  289. The licences of the utilities and programs which come with the
  290. installations vary; much of the code is from the GNU Project at the
  291. Free Software Foundation, and is also under the GPL.
  292.  
  293. Note that discussion about the merits or otherwise of the GPL should
  294. be posted to \newsgroup gnu.misc.discuss and not to the \fn
  295. comp.os.linux groups.
  296.  
  297.  
  298. \comment #######################################################################
  299.  
  300. \section  Network sources and resources
  301.  
  302. \question 18sep:howtos  Where can I get the HOWTOs and other documentation ?
  303.  
  304. Look in the following places, and on sites that mirror them.
  305. \call startlist
  306. \call item
  307. \ftpon ftp.funet.fi (128.214.6.100) : \ftpin /pub/OS/Linux/doc/HOWTO
  308. \call item
  309. \ftpon tsx-11.mit.edu (18.172.1.2) : \ftpin /pub/linux/docs/HOWTO
  310. \call item
  311. \ftpon sunsite.unc.edu (152.2.22.81) : \ftpin /pub/Linux/docs/HOWTO
  312. \call endlist
  313. For a complete list of Linux FTP sites see \qref ftpsites.
  314.  
  315. If you don't have access to FTP try using the FTP-by-mail servers at
  316. \fn ftpmail@decwrl.dec.com, \fn ftpmail@doc.ic.ac.uk or \fn
  317. ftp-mailer@informatik.tu-muenchen.de.
  318.  
  319. A complete list of HOWTO's is available in the file \fn HOWTO.INDEX in
  320. the \fn docs/HOWTO directory at the FTP sites, or on the Web at
  321. \docref{\fn http://sunsite.unc.edu/mdw/HOWTO/HOWTO-INDEX.html\}
  322. but here is a (possibly incomplete) list:
  323.  
  324. \call startpackedlist
  325. \call packeditem
  326. Linux \docref INFO-SHEET
  327. \call packeditem
  328. Linux \docref META-FAQ
  329. \call packeditem
  330. \docref{Bootdisk HOWTO\}
  331. \call packeditem
  332. \docref{Busmouse HOWTO\}
  333. \call packeditem
  334. \docref{CDROM HOWTO\}
  335. \call packeditem
  336. \docref{Commercial HOWTO\}
  337. \call packeditem
  338. \docref{Cyrillic HOWTO\}
  339. \call packeditem
  340. \docref{DOSEMU HOWTO\}
  341. \call packeditem
  342. \docref{Danish HOWTO\}
  343. \call packeditem
  344. \docref{Distribution HOWTO\}
  345. \call packeditem
  346. \docref{ELF HOWTO\}
  347. \call packeditem
  348. \docref{Ethernet HOWTO\}
  349. \call packeditem
  350. \docref{Firewall HOWTO\}
  351. \call packeditem
  352. \docref{Ftape HOWTO\}
  353. \call packeditem
  354. \docref{German HOWTO\}
  355. \call packeditem
  356. \docref{HAM HOWTO\}
  357. \call packeditem
  358. \docref{Hardware HOWTO\}
  359. \call packeditem
  360. \docref{Installation HOWTO\}
  361. \call packeditem
  362. \docref{JE HOWTO\}
  363. \call packeditem
  364. \docref{Kernel HOWTO\}
  365. \call packeditem
  366. \docref{MGR HOWTO\}
  367. \call packeditem
  368. \docref{Electronic Mail HOWTO\}
  369. \call packeditem
  370. \docref{NET-2 HOWTO\}
  371. \call packeditem
  372. \docref{NIS HOWTO\}
  373. \call packeditem
  374. \docref{News HOWTO\}
  375. \call packeditem
  376. \docref{PCI-HOWTO\}
  377. \call packeditem
  378. \docref{PCMCIA HOWTO\}
  379. \call packeditem
  380. \docref{PPP HOWTO\}
  381. \call packeditem
  382. \docref{Printing HOWTO\}
  383. \call packeditem
  384. \docref{SCSI HOWTO\}
  385. \call packeditem
  386. \docref{SCSI Programming HOWTO\}
  387. \call packeditem
  388. \docref{Serial HOWTO\}
  389. \call packeditem
  390. \docref{Sound HOWTO\}
  391. \call packeditem
  392. \docref{Term HOWTO\}
  393. \call packeditem
  394. \docref{Tips HOWTO\}
  395. \call packeditem
  396. \docref{UPS HOWTO\}
  397. \call packeditem
  398. \docref{UUCP HOWTO\}
  399. \call packeditem
  400. \docref{XFree86 HOWTO\}
  401. \call endpackedlist
  402.  
  403. More of these documents are always in preparation.  You should check
  404. in nearby directories on the FTP sites if you can't find the answer in
  405. one of the HOWTOs.  There are also several \docref{mini-HOWTOs\} on \fn
  406. sunsite.unc.edu in the \fn /pub/Linux/docs/HOWTO/mini directory.
  407.  
  408. The file \fn WRITING contains
  409. \docref{information on how to write a new HOWTO\}.
  410.  
  411. The HOWTOs are coordinated by Greg Hankins, \email
  412. gregh@cc.gatech.edu.
  413.  
  414. The `books' produced by the Linux Documentation Project are available
  415. in \ftpsilent{sunsite.unc.edu\}\ftpin /pub/Linux/docs/LDP on \fn
  416. sunsite.unc.edu.  Please read them if you are new to Unix and Linux.
  417. Here is a list of those released so far:
  418. \call startlist
  419. \call item
  420. \docref{The Linux Documentation Project manifesto\}
  421. \call item
  422. \docref{Installation and Getting Started Guide\}
  423. \call item
  424. \docref{The Kernel Hacker's Guide\}
  425. \call item
  426. \docref{Network Administration Guide\}
  427. \call item
  428. \docref{Linux System Administrator's Guide\}
  429.  
  430. \call endlist
  431.  
  432. \question 09sep  Where should I look on the World Wide Web for Linux stuff ?
  433.  
  434. Matt Welsh maintains the Linux Documentation Project Home Page, at
  435. \docref{\fn http://sunsite.unc.edu/mdw/linux.html\}.
  436.  
  437. This page refers to all the FAQs and HOWTOs, both those which are
  438. available in HTML (WWW) format, like this FAQ, and those which aren't.
  439.  
  440.  
  441. \question 18sep:newsgroups  What newsgroups are there for Linux ?
  442.  
  443. There are ten international Usenet newsgroups devoted to Linux.
  444.  
  445. \newsgroup comp.os.linux.announce is the moderated announcements
  446. group; you should read this if you intend to use Linux.  Submissions
  447. for that group should be emailed to \fn linux-announce@news.ornl.gov.
  448.  
  449. \newsgroup comp.os.linux.answers contains all the FAQs, HOWTOs and
  450. other important documentation.  You should subscribe to this too.
  451.  
  452. Also worth reading are the other groups in the
  453. \courier{comp.os.linux.*\} hierarchy -- you may find that many common
  454. problems are too recent to find in this FAQ but are answered in the
  455. newsgroups.  These groups are \newsgroup comp.os.linux.setup,
  456. \newsgroup comp.os.linux.hardware, \newsgroup
  457. comp.os.linux.networking, \newsgroup comp.os.linux.x, \newsgroup
  458. comp.os.linux.development.apps, \newsgroup
  459. comp.os.linux.development.system, \newsgroup comp.os.linux.advocacy
  460. and \newsgroup comp.os.linux.misc.
  461.  
  462. Remember that since Linux is a Unix clone, most all of the material in
  463. \courier{comp.unix.*\} and \courier{comp.windows.x.*\} groups will be
  464. relevant.  Apart from hardware considerations, and some obscure or
  465. very technical low-level issues, you'll find that these groups are the
  466. right place to start.
  467.  
  468. Please read \qref notanswered before posting, and make sure you post
  469. to the right newsgroup -- see `Welcome to the
  470. \courier{comp.os.linux.*\} hierarchy' which is posted every two weeks
  471. to \newsgroup comp.os.linux.announce, \newsgroup comp.os.linux.answers
  472. and other groups.
  473.  
  474. Crossposting between different \courier{comp.os.linux.*\} groups is
  475. rarely a good idea.
  476.  
  477. There may well be Linux groups local to your institution or area -
  478. check there first.
  479.  
  480. The groups \newsgroup comp.os.linux.development, \newsgroup
  481. comp.os.linux.admin and \newsgroup comp.os.linux.help were superseded
  482. in a recent newsgroup reorganisation.  You should no longer use them.
  483.  
  484. See also \qref nousenet.
  485.  
  486. Other regional and local newsgroups also exist - you may find the
  487. traffic more manageable there.  The French Linux newsgroup is
  488. \newsgroup fr.comp.os.linux; The German one is \newsgroup
  489. de.comp.os.linux.  In Australia, try \newsgroup aus.computers.linux.
  490. In Croatia there is the moderated group \newsgroup hr.comp.linux.m.
  491. In Italy, \newsgroup it.comp.linux.
  492.  
  493.  
  494. \question 10feb:howinstall  How do I install Linux ?
  495.  
  496. There are several pre-packaged releases of Linux available, including
  497. Debian, Red Hat and Slackware.  Each contains the software you need to
  498. run Linux, ready to install and use.  The exact details of which
  499. software is included and how to install them vary from release to
  500. release.
  501.  
  502. You should read the Installation HOWTO for more details on how to go
  503. about installing Slackware.  Red Hat and Debian are both more recent
  504. and less buggy, and have more sophisticated installation schemes, but
  505. they are less widely used and don't contain quite as wide a range of
  506. software.
  507.  
  508. All of those releases are available via anonymous FTP from various
  509. Linux archive sites [\qref ftpsites].  There are also a large number
  510. of other releases which are distributed less globally, which suit
  511. special local and national requirements (for example, better
  512. internationalisation support).
  513.  
  514.  
  515. \question 09sep:ftpsites  Where can I get Linux material by FTP ?
  516.  
  517. There are three main archive sites for Linux:
  518. \call startlist
  519. \call item
  520. \ftpon ftp.funet.fi (Finland, 128.214.6.100) : \ftpin /pub/OS/Linux
  521. \call item
  522. \ftpon sunsite.unc.edu (US, 152.2.22.81) : \ftpin /pub/Linux
  523. \call item
  524. \ftpon tsx-11.mit.edu (US, 18.172.1.2) : \ftpin /pub/linux
  525. \call endlist
  526.  
  527. The best place to get the Linux kernel is on \ftpon ftp.cs.helsinki.fi
  528. in /pub/Software/Linux/Kernel; Linus Torvalds uploads the most recent
  529. kernel versions to this site.
  530.  
  531. The Debian distribution is available at \docref{\fn ftp.debian.org\}
  532. and the Red Hat distribution at \docref{\fn ftp.redhat.com\}.
  533.  
  534. The contents of these sites is mirrored (copied, usually approximately
  535. daily) by a number of other sites.  Please use one close to you --
  536. that will be faster for you and easier on the network.
  537. \call startlist
  538. \call item
  539. \ftpon{src.doc.ic.ac.uk\} : \ftpin{/packages/Linux\} (UK)
  540. \call item
  541. \ftpon{sunacm.swan.ac.uk\} : \ftpin{/pub/Linux\} (UK)
  542. \call item
  543. \ftpon{ftp.ibp.fr\} : \ftpin{/pub/linux\} (France)
  544. \call item
  545. \ftpon{ftp.cc.gatech.edu\} : \ftpin{/pub/linux\} (US - southeast: Suranet)
  546. \call item
  547. \ftpon{wuarchive.wustl.edu\} : \ftpin{/systems/linux\} (US)
  548. \call item
  549. \ftpon{uiarchive.cso.uiuc.edu\} : \ftpin{/pub/systems/linux\} (US)
  550. \call item
  551. \ftpon{ftp.cdrom.com\} : \ftpin{/pub/linux\} (US)
  552. \call item
  553. \ftpon{ftp.informatik.tu-muenchen.de\} : \ftpin{/pub/comp/os/linux\} (Germany)
  554. \call item
  555. \ftpon{ftp.ibr.cs.tu-bs.de\} : \ftpin{/pub/os/linux\} (Germany)
  556. \call item
  557. \ftpon{ftp.dfv.rwth-aachen.de\} : \ftpin{/pub/linux\} (Germany)
  558. \call item
  559. \ftpon{ftp.informatik.rwth-aachen.de\} : \ftpin{/pub/Linux\} (Germany)
  560. \call item
  561. \ftpon{bond.edu.au\} : \ftpin{/pub/OS/Linux\} (Australia)
  562. \call item
  563. \ftpon{ftp.cc.monash.edu.au\} : \ftpin{/pub/linux\} (Australia)
  564. \call item
  565. \ftpon{ftp.dstc.edu.au\} : \ftpin{/pub/Linux\} (Australia: Queensland)
  566. \call item
  567. \ftpon{ftp.sun.ac.za\} : \ftpin{/pub/linux\} (South Africa)
  568. \call item
  569. \ftpon{ftp.inf.utfsm.cl\} : \ftpin{/pub/Linux\} (Chile)
  570. \call item
  571. \ftpon{ftp.zel.fer.hr\} : \ftpin{/pub/Linux\} (Croatia)
  572. \call endlist
  573. Not all of these mirror all of the other `source' sites, and some have
  574. material not available on the `source' sites.
  575.  
  576.  
  577. \question 18sep  I don't have FTP access.  Where do I get Linux ?
  578.  
  579. The easiest thing is probably to find a friend with FTP access.  If
  580. there is a Linux users group near you they may be able to help.
  581.  
  582. If you have a reasonably good email connection you could try the
  583. FTP-by-mail servers at \fn ftpmail@decwrl.dec.com, \fn
  584. ftpmail@doc.ic.ac.uk or \fn ftp-mailer@informatik.tu-muenchen.de.
  585.  
  586. Linux is also available via traditional mail on diskette, CD-ROM and
  587. tape.  The \docref{Installation HOWTO\}, and the file
  588. \ftpsilent{sunsite.unc.edu\}\ftpin /pub/Linux/docs/distributions on
  589. \fn sunsite.unc.edu, contain information on these distributions.
  590.  
  591. You could also try Zane Healy \email healyzh@holonet.net's list of
  592. Linux BBS's, which is posted regularly (1st and 15th of each month) to
  593. \newsgroup comp.os.linux.announce and occasionally to the Fidonet and
  594. RIME UNIX echoes.
  595.  
  596.  
  597. \question 18sep:nousenet  I don't have Usenet access.  Where do I get information ?
  598.  
  599. A digest of \fn comp.os.linux.announce is available by mailing the
  600. word \fn subscribe as the body of a message to
  601. \email linux-announce-REQUEST@news-digests.mit.edu.
  602. You are strongly advised to subscribe to this list, as it carries
  603. important information and documentation about Linux.
  604.  
  605. Please remember to use the \fn -request addresses for your
  606. subscription and unsubscription messages; mail to the other address is
  607. posted to the newsgroup !
  608.  
  609.  
  610. \question 18sep:multilist  What mailing lists are there ?
  611.  
  612. The Linux developers now mainly use the Majordomo server at \email
  613. majordomo@vger.rutgers.edu.  Send a message with \fn lists in the body
  614. to get a list of the lists there; add a line with \fn help to get the
  615. standard Majordomo help file which has instructions for subscribing
  616. and unsubscribing.
  617.  
  618. Note that most of these lists are used by the developers of Linux to
  619. talk about technical issues and future developments.  These are not
  620. intended for new users' questions.
  621.  
  622. There is a \fn linux-newbie list where `no question is too stupid';
  623. unfortunately it seems that few of the experienced users read that
  624. channel.  It does have very low volume.
  625.  
  626. There used to be a multi-channel Linux mailing list server on \fn
  627. niksula.hut.fi.  This shut down during the summer of 1995.
  628.  
  629.  
  630. \question 09sep:newsarchives  Are the newsgroups archived anywhere ?
  631.  
  632. \ftpon sunsite.unc.edu contains archives of \newsgroup
  633. comp.os.linux.announce, in \ftpin
  634. /pub/Linux/docs/linux-announce.archive.  These are mirrored from
  635. \ftpsilent{src.doc.ic.ac.uk\}\ftpin /usenet on \fn src.doc.ic.ac.uk.
  636.  
  637. There is an `easy to access' archive of \fn comp.os.linux.announce on
  638. the World Wide Web at
  639. \docref{\fn http://www.leo.org/archiv/linux/archiv/ann_index.html\}.  It
  640. supports searching and browsing.
  641.  
  642. I do not know of any (current) archives of the other groups in the \fn
  643. comp.os.linux hierarchy.
  644.  
  645.  
  646. \comment #######################################################################
  647.  
  648. \section  Compatibility with other operating systems
  649.  
  650. \question 27jun:coexist  Can Linux share my disk with DOS ?  OS/2 ?  386BSD ?  Win95 ?
  651.  
  652. Yes.  Linux uses the standard PC partitioning scheme, so it can share
  653. your disk with other operating systems.  Note, however, that many of
  654. these other operating systems are rather cranky: DOS FDISK and FORMAT
  655. can sometimes overwrite data in a Linux partition because they
  656. sometimes incorrectly use partition data from the partition's boot
  657. sector rather than the partition table.  In order to prevent them from
  658. doing this it is a good idea to zero out under Linux the start of a
  659. partition you've just created, before you use MSDOS or whatever to
  660. format it.  Type:
  661. \verbatim
  662.    dd if=/dev/zero of=/dev/hdXY bs=512 count=1
  663. \endverbatim
  664. where \fn hdXY is the relevant partition, eg, \fn hda1 for the first
  665. partition of the first (IDE) disk.
  666.  
  667. Linux can read and write the files on your DOS and OS/2 FAT partitions
  668. and floppies using either the DOS filesystem type built into the
  669. kernel or mtools.  There is an alpha version of kernel support for the
  670. VFAT filesystem used by Windows 95 and Windows NT; it is available
  671. from \ftpon mm-ftp.cs.berkeley.edu in \ftpin
  672. /pub/multimedia/linux/vfat/vfat-0.3.0.tgz.  This was integrated
  673. into the standard kernel in version 1.3.60.
  674.  
  675. See \qref supportedsoftware for details and status of the emulators
  676. for DOS, MS Windows and System V programs.
  677.  
  678. See also \qref otherfsys.
  679.  
  680.  
  681. \question 18sep:msdosfs  How do I access files on my DOS partition or floppy ?
  682.  
  683. Use the DOS filesystem, i.e. type, for example:
  684. \verbatim
  685.         mkdir /dos
  686.         mount -t msdos -o conv=text,umask=022,uid=100,gid=100 /dev/hda3 /dos
  687. \endverbatim
  688. If it's a floppy, don't forget to \fn umount it before ejecting it !
  689.  
  690. You can use the \fn conv=text/binary/auto, \fn umask=nnn, \fn uid=nnn
  691. and \fn gid=nnn options to control the automatic line-ending
  692. conversion, permissions and ownerships of the files in the DOS
  693. filesystem as they appear under Linux.  If you mount your DOS
  694. filesystem by putting it in your \fn /etc/fstab you can record the
  695. options (comma-separated) there, instead of \fn defaults.
  696.  
  697. Alternatively you can use `mtools', available in both binary and
  698. source form on the FTP sites -- see \qref ftpsites.
  699.  
  700. A kernel patch (known as the fd-patches) is available which allows
  701. floppies with nonstandard numbers of tracks and/or sectors to be used;
  702. this patch is included in the 1.1 alpha testing kernel series.
  703.  
  704.  
  705. \question 18sep  Can I use my Stacked/DBLSPC/etc. DOS drive ?
  706.  
  707. Not very easily.  You can access them from within the DOS emulator
  708. [\qref supportedsoftware], but it's harder to do as a normal
  709. filesystem under Linux or using mtools.  There is a module available
  710. for the Linux kernel which can do read-only access of the compressed
  711. volume.  Look on \ftpon sunsite.unc.edu in \ftpin
  712. /pub/Linux/system/Filesystems, for the \fn ths package.
  713.  
  714.  
  715. \question 09sep  Can I access OS/2 HPFS partitions from Linux ?
  716.  
  717. Yes, but it's only read-only at the moment.  To use it you must
  718. compile a kernel with support for it enabled [\qref kernelcompile].
  719. Then you can mount it using the \fn mount command, for example:
  720. \verbatim
  721.         mkdir /hpfs
  722.         mount -t hpfs /dev/hda5 /hpfs
  723. \endverbatim
  724.  
  725.  
  726. \question 09sep:otherfsys  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
  727.  
  728. I'm told that there is a primitive, alpha test read-only Amiga
  729. filesystem on \ftpon sunsite.unc.edu in \ftpin
  730. /pub/Linux/patches/amigaffs.tar.Z.  More information is in \fn
  731. affs-readme in the tarfile.
  732.  
  733. Recent kernels contain support for the UFS filesystem used by System
  734. V, Coherent and Xenix.
  735.  
  736. There is alpha kernel support, readonly for the moment, for the 4.2BSD
  737. UFS, on \ftpon sunsite.unc.edu in \ftpin /pub/Linux/ALPHA/ufs.
  738.  
  739. There is a set of user-level programs that provides read-only access
  740. to the Macintosh hierarchical filing system (HFS). It is available on
  741. \ftpon sunsite.unc.edu in \ftpin
  742. /pub/Linux/utils/disk-management/hfs0_36.tgz.  This is being turned
  743. into a kernel module, which is available on \fn sunsite.
  744.  
  745. A suite of programs called Samba provide support for Windows for
  746. Workgroups networked filesystems (provided it's configured to use
  747. TCP/IP).  Information is available at \docref{\fn
  748. http://lake.canberra.edu.au/samba/samba.html\}.  There is alpha kernel
  749. support for mounting such filesystems, on \ftpon sunsite.unc.edu in
  750. \ftpin{/pub/Linux/ALPHA/smbfs\}.
  751.  
  752. There is no support for the rest of those yet; I have not heard of any
  753. recent work on providing some.
  754.  
  755.  
  756. \question 09sep:wine  Can I run Microsoft Windows programs under Linux ?
  757.  
  758. Not yet.  There is a project, known as WINE, to build an MS Windows
  759. emulator for Linux, but it is not ready for users yet.  Don't ask
  760. about it unless you think you can contribute; look out for the status
  761. reports in \newsgroup comp.emulators.ms-windows.wine.
  762.  
  763. In the meantime if you need to run MS Windows programs your best bet
  764. is probably to reboot when you want to switch environments.  LILO (the
  765. Linux bootloader) has the facility for a boot menu --- see its
  766. documentation for more details.
  767.  
  768.  
  769. \question 18sep:os2boot  How can I boot Linux from OS/2's Boot Manager ?
  770.  
  771. 1. Create a partition using OS/2's \fn FDISK (Not Linux's \fn fdisk).
  772.  
  773. 2. Format the partition under OS/2, either with FAT or HPFS.  This is
  774. so that OS/2 knows about the partition being formatted.  (This step is
  775. not necessary with OS/2 "warp" 3.0.)
  776.  
  777. 3. Add the partition to the Boot Manager.
  778.  
  779. 4. Boot Linux, and create a filesystem on the partition using
  780. \courier{mkfs -t ext2\} or \fn mke2fs.  At this point you may, if you
  781. like, use Linux's \fn fdisk to change the partition type code of the
  782. new partition to type 83 (Linux Native) -- this may help some
  783. automated installation scripts find the right partition to use.
  784.  
  785. 5. Install Linux on the partition.
  786.  
  787. 6. Install LILO on the Linux partition -- NOT on the master boot
  788. record of the hard drive.  This installs LILO as a second-stage boot
  789. loader on the Linux partition itself, to start up the kernel specified
  790. in the LILO config file.  To do this you should put
  791. \verbatim
  792.    boot = /dev/hda2
  793. \endverbatim
  794. (where \fn /dev/hda2 is the \italic{partition\} you want to boot off)
  795. in your \fn /etc/lilo/config or \fn /etc/lilo.config file.
  796.  
  797. 7. Make sure that it is the Boot Manager partition that is marked
  798. active, so that you can use Boot Manager to choose what to boot.
  799.  
  800.  
  801. \question 09sep  How can I share a swap partition between Linux and MS Windows ?
  802.  
  803. See the Mini-HOWTO on the subject by H. Peter Anvin, \email
  804. hpa@yggdrasil.com.  It is available on \ftpon sunsite.unc.edu in
  805. \ftpin /pub/Linux/docs/HOWTO/mini/Swap-Space.
  806.  
  807.  
  808. \comment ######################################################################
  809.  
  810. \section  Linux's handling of filesystems, disks and drives
  811.  
  812.  
  813. \question 08may:largedisk  How can I get Linux to work with my large disk ?
  814.  
  815. If your disk is an IDE or EIDE drive you should read the file
  816. \docref{/usr/src/linux/drivers/block/README.ide\} (part of the Linux
  817. kernel source code).  This README contains many helpful hints about
  818. IDE drives.  Many modern IDE controllers do translation between
  819. `physical' cylinders/heads/sectors and `logical' ones.
  820.  
  821. SCSI disks are accessed by linear block numbers; the BIOS invents some
  822. `logical' cylinders/heads/sectors fiction to support DOS.
  823.  
  824. DOS will usually not be able to access partitions which extend beyond
  825. 1024 logical cylinders, and will make booting a Linux kernel from such
  826. partitions using LILO problematic at best.
  827.  
  828. You can still use such partitions for Linux or other operating systems
  829. that access the controller directly.
  830.  
  831. I'd recommend creating at least one Linux partition entirely under the
  832. 1024-logical-cylinder limit and booting off that; the other
  833. partitions will then be OK.
  834.  
  835.  
  836. \question 09sep  How can I undelete files ?
  837.  
  838. In general, this is very hard to do on Unices because of their
  839. multitasking nature.  Undelete functionality for the ext2fs is being
  840. worked on, but don't hold your breath.
  841.  
  842. There are a number of packages available that work by providing new
  843. commands for deletion and sometimes copying that move deleted files
  844. into a `wastebasket' directory instead; they can then be recovered
  845. until cleaned out automatically by background processing.
  846.  
  847. Alternatively you can search the raw disk device which holds the
  848. filesystem in question.  This is hard work, and you will need to be
  849. root to do this.
  850.  
  851.  
  852. \question 17jun  Is there a defragmenter for ext2fs etc. ?
  853.  
  854. Yes.  There is a Linux filesystem defragmenter for ext2, minix and
  855. old-style ext filesystems available on \fn sunsite.unc.edu in
  856. \ftpsilent{sunsite.unc.edu:/pub/Linux\}\ftpin
  857. system/Filesystems/defrag-0.6.tar.gz.
  858.  
  859. Users of the ext2 filesystem can probably do without defrag since ext2
  860. contains extra code to keep fragmentation reduced even in very full
  861. filesystems.
  862.  
  863.  
  864. \question 18sep  How do I format and create a filesystem on a floppy ?
  865.  
  866. For a 3.5 inch high density floppy:
  867. \verbatim
  868.    fdformat /dev/fd0H1440
  869.    mkfs -t ext2 -m 0 /dev/fd0H1440 1440
  870. \endverbatim
  871. For a 5.25 inch floppy use \fn fd0h1200 and \fn 1200 as appropriate.
  872. For the `B' drive use \fn fd1 instead of \fn fd0.  Full details of
  873. which floppy devices do what can be found in the Linux Device List
  874. [\qref howtos].  You may have to run \fn mke2fs directly instead of
  875. \courier{mkfs -t ext2\}.  The \courier{-m 0\} option tells \fn
  876. mkfs.ext2 not to reserve any space on the disk for the superuser ---
  877. usually the last 10% is reserved for root.
  878.  
  879. The first command low-level formats the floppy; the second creates an
  880. empty filesystem on it.  After doing this you can mount the floppy
  881. like a hard disk partition and simply \fn cp and \fn mv files, etc.
  882.  
  883.  
  884. \question 18sep  I get nasty messages about inodes, blocks, and the suchlike
  885.  
  886. You probably have a corrupted filesystem, probably caused by not
  887. shutting Linux down properly before turning off the power or
  888. resetting.  You need to use a recent \fn shutdown program to do this
  889. --- for example, the one included in the util-linux package, available
  890. on \fn sunsite and \fn tsx-11.
  891.  
  892. If you're lucky the program \fn fsck (or \fn e2fsck or \fn xfsck as
  893. appropriate if you don't have the automatic \fn fsck front-end) will
  894. be able to repair your filesystem; if you're unlucky the filesystem is
  895. trashed and you'll have to reinitialise it with \fn mkfs (or \fn
  896. mke2fs, \fn mkxfs etc.) it and restore from a backup.
  897.  
  898. NB: don't try to check a filesystem that's mounted read-write - this
  899. includes the root partition if you don't see
  900. \verbatim
  901.    VFS: mounted root ... read-only
  902. \endverbatim
  903. at boot time.
  904.  
  905.  
  906. \question 20aug:swapnotworking  My swap area isn't working.
  907.  
  908. When you boot (or enable swapping manually) you should see
  909. \verbatim
  910.         Adding Swap: NNNNk swap-space
  911. \endverbatim
  912.  
  913. If you don't see any messages at all you are probably missing
  914. \courier{swapon -av\} (the command to enable swapping) in your \fn
  915. /etc/rc.local or \courier{/etc/rc.d/*\} (the system startup scripts),
  916. or have forgotten to make the right entry in \fn /etc/fstab:
  917. \verbatim
  918.         /dev/hda2       none       swap       sw
  919. \endverbatim
  920. for example.
  921.  
  922. If you see
  923. \verbatim
  924.         Unable to find swap-space signature
  925. \endverbatim
  926. you have forgotten to run \fn mkswap.  See the manpage for details; it
  927. works much like \fn mkfs.
  928.  
  929. Check the \docref{Installation HOWTO\} for detailed instructions of
  930. how to set up a swap area.
  931.  
  932.  
  933. \question 18sep  How do I remove LILO so my system boots DOS again ?
  934.  
  935. Using DOS (MS-DOS 5.0 or later, or OS/2), type \courier{FDISK /MBR\}
  936. (which is not documented).  This will restore a standard MS-DOS Master
  937. Boot Record.  If you have DR-DOS 6.0, go into \fn FDISK in the normal
  938. way and then select the `Re-write Master Boot Record' option.
  939.  
  940. If you don't have DOS 5 or DR-DOS you need to have the boot sector
  941. that LILO saved when you first installed it.  You did keep that file,
  942. didn't you ?  It's probably called \fn boot.0301 or some such.  Type
  943. \verbatim
  944.    dd if=boot.0301 of=/dev/hda bs=445 count=1
  945. \endverbatim
  946. (or \fn sda if you're using a SCSI disk).  This may also wipe out
  947. your partition table, so beware !  If you're desperate, you could use
  948. \verbatim
  949.    dd if=/dev/zero of=/dev/hda bs=512 count=1
  950. \endverbatim
  951. which will erase your partition table and boot sector completely: you
  952. can then reformat the disk using your favourite software; however this
  953. will render the contents of your disk inaccessible --- you'll lose it
  954. all unless you're an expert.
  955.  
  956. Note that the DOS MBR boots whichever (single!) partition is flagged
  957. as `active'; you may need to use fdisk to set and clear the active
  958. flags on partitions appropriately.
  959.  
  960.  
  961. \question 26jun  Why can't I use \fn fdformat except as root ?
  962.  
  963. The system call to format a floppy may only be done as root,
  964. regardless of the permissions of \courier{/dev/fd0*\}.  If you want
  965. any user to be able to format a floppy try getting the \fn fdformat2
  966. program; this works around the problems by being setuid to root.
  967.  
  968.  
  969. \question 09sep  Is there something like Stacker or Doublespace for Linux ?
  970.  
  971. Currently none of the Linux filesystems can do compression in the
  972. filesystem.
  973.  
  974. There is a program called Zlibc which allows existing applications to
  975. read compressed (GNU zipped) files as if they were not compressed.
  976. After installing it you can compress files using \fn gzip and programs
  977. will still find them, without having to change the programs.  Look on
  978. \ftpon sunsite.unc.edu in \ftpin /pub/Linux/libs.  The author is
  979. \email Alain.Knaff@imag.fr.
  980.  
  981. There is a compressing block device driver that can provide
  982. filesystem-independant on the fly disk compression in the kernel.  It
  983. is called `DouBle'.  There is a source only distribution on \ftpon
  984. sunsite.unc.edu in \ftpin /pub/Linux/kernel/patches/diskdrives; the
  985. author is Jean-Marc Verbavatz \email jmv@receptor.mgh.harvard.edu.
  986. Note that since this compresses inodes (administrative information)
  987. and directories as well as file contents any corruption is quite
  988. likely to be serious.
  989.  
  990. There is also a package available called \fn tcx (Transparently
  991. Compressed Executables) which allows you to keep infrequently used
  992. executables compressed and only uncompress them temporarily while you
  993. use them.  You'll find it on the Linux FTP sites [\qref ftpsites]; it
  994. was also announced in \newsgroup comp.os.linux.announce.  Note - this
  995. is not the same as \fn gzexe, which is an inferior implementation of
  996. the same concept.
  997.  
  998.  
  999. \question 09sep  My ext2fs partitions are checked each time I reboot.
  1000.  
  1001. See \qref uncheckedfs.
  1002.  
  1003.  
  1004. \question 21dec  My root filesystem is read-only !
  1005.  
  1006. Remount it.  If \fn /etc/fstab is correct you can simply
  1007. \courier{mount -n -o remount /\}. If \fn /etc/fstab is wrong you must
  1008. give the device name and posibly the type too: e.g. \courier{mount -n
  1009. -o remount -t ext2 /dev/hda2 /\}.  To understand why you got into this
  1010. state see \qref uncheckedfs.
  1011.  
  1012.  
  1013. \question 09sep  I have a huge \fn /proc/kcore !  Can I delete it ?
  1014.  
  1015. None of the files in \fn /proc are really there - they're all
  1016. "pretend" files made up by the kernel, to give you information about
  1017. the system, and don't take up any hard disk space.
  1018.  
  1019. \fn /proc/kcore is like an "alias" for the memory in your computer;
  1020. its size is the same as the amount of RAM you have, and if you ask to
  1021. read it as a file the kernel does memory reads.
  1022.  
  1023.  
  1024. \question 09sep  My AHA1542C doesn't work with Linux.
  1025.  
  1026. The option to allow disks with more than 1024 cylinders is only
  1027. required as a workaround for a DOS misfeature and should be turned
  1028. \italic{off\} under Linux.  For older Linux kernels you need to turn
  1029. off most of the "advanced BIOS" options - all but the one about
  1030. scanning the bus for bootable devices.
  1031.  
  1032.  
  1033. \comment ######################################################################
  1034.  
  1035. \section  Porting, compiling and obtaining programs
  1036.  
  1037. Please see also the Linux GCC-FAQ, available in HTML format by FTP
  1038. from \ftpon www.mrc-apu.cam.ac.uk in \ftpin /pub/linux/GCC-FAQ.html.
  1039.  
  1040. \question 26jun:compiling  How do I port XXX to Linux ?
  1041.  
  1042. In general Unix programs need very little porting.  Simply follow the
  1043. installation instructions.  If you don't know and don't know how to
  1044. find out the answers to some of the questions asked during or by the
  1045. installation procedure you can guess, but this tends to produce buggy
  1046. programs.  In this case you're probably better off asking someone else
  1047. to do the port.
  1048.  
  1049. If you have a BSD-ish program you should try using \fn
  1050. -I/usr/include/bsd and \fn -lbsd on the appropriate parts of the
  1051. compilation lines.
  1052.  
  1053.  
  1054. \question 26jun  What is \fn ld.so and where do I get it ?
  1055.  
  1056. \fn ld.so is the dynamic library loader.  Each binary using shared
  1057. libraries used to have about 3K of start-up code to find and load the
  1058. shared libraries.  Now that code has been put in a special shared
  1059. library, \fn /lib/ld.so, where all binaries can look for it, so that
  1060. it wastes less disk space, and can be upgraded more easily.
  1061.  
  1062. It can be obtained from \ftpon tsx-11.mit.edu in \ftpin
  1063. /pub/linux/packages/GCC and mirror sites thereof.  The latest version
  1064. at the time of writing is \fn ld.so.1.7.11.tar.gz.
  1065.  
  1066. \fn /lib/ld-linux.so.1 is the same thing for ELF [\qref elf], and
  1067. comes in the same package as the a.out loader.
  1068.  
  1069.  
  1070. \question 09sep  Has anyone ported / compiled / written XXX for Linux ?
  1071.  
  1072. First, look in the Linux Software Map (LSM) --- it's in the
  1073. \ftpsilent{sunsite.unc.edu:/pub/Linux\}\ftpin docs directory on \fn
  1074. sunsite.unc.edu, and on the other FTP sites.  A search engine is
  1075. available on the WWW at \docref{\fn http://www.boutell.com/lsm/\}.
  1076.  
  1077. Check the FTP sites (see \qref ftpsites) first --- search the \fn
  1078. find-ls or \fn INDEX files for appropriate strings.  Check the Linux
  1079. Projects Map (LPM), on \ftpon ftp.ix.de in \ftpin
  1080. /pub/Linux/docs/Projects-Map.gz.
  1081.  
  1082. If you don't find anything, you could either download the sources to
  1083. the program yourself and compile them -- see \qref compiling -- or, if
  1084. it's a large package which may require some porting, post a message to
  1085. the newsgroup \newsgroup comp.os.linux.development.apps.
  1086.  
  1087. If you compile a largeish program please upload it to one or more of
  1088. the FTP sites and post a message to \newsgroup comp.os.linux.announce
  1089. (submit your posting to \email linux-announce@news.ornl.gov).
  1090.  
  1091. If you're looking for an application-type program the chances are
  1092. someone has already written a free verson.  Try reading the FAQ in
  1093. \newsgroup comp.sources.wanted for instructions on how to find
  1094. sources.
  1095.  
  1096. You should also check the Projects-FAQ, available in
  1097. \ftpsilent{sunsite.unc.edu\}\ftpin /pub/Linux/docs/faqs/Projects-FAQ
  1098. on \fn sunsite.unc.edu.
  1099.  
  1100.  
  1101. \question 26jun  Can I use code or a compiler compiled for a 486 on my 386 ?
  1102.  
  1103. Yes, unless it's the kernel.
  1104.  
  1105. The \fn -m486 option to GCC, which is used to compile binaries for 486
  1106. machines, merely changes certain optimisations.  This makes for
  1107. slightly larger binaries which run somewhat faster on a 486.  They
  1108. still work fine on a 386, though, with little performance hit.
  1109.  
  1110. However, from version 1.3.35 the kernel will use 486- or
  1111. Pentium-specific instructions if configured for a 486 or Pentium, thus
  1112. making it unusable on a 386.
  1113.  
  1114. GCC can be configured for a 386 or 486; the only difference is that
  1115. configuring it for a 386 makes \fn -m386 the default and configuring
  1116. for a 486 makes \fn -m486 the default; in either case these can be
  1117. overriden on a per-compilation basis or by editing \fn
  1118. /usr/lib/gcc-lib/i*-linux/n.n.n/specs.
  1119.  
  1120. There is an alpha version of GCC that knows how to do optimisation
  1121. well for the 586, but it is quite unreliable, especially at high
  1122. optimisation settings.  The Pentium GCC can be found on \ftpon
  1123. tsx-11.mit.edu in \ftpin /pub/linux/ALPHA/pentium-gcc.  I'd recommend
  1124. using the ordinary 486 GCC instead; word has it that using \fn -m386
  1125. produces code that's better for the Pentium, or at least slightly
  1126. smaller.
  1127.  
  1128.  
  1129. \question 09sep  What does \courier{gcc -O6\} do ?
  1130.  
  1131. Currently the same as \fn -O2 (GCC 2.5) or \fn -O3 (GCC 2.6, 2.7); any
  1132. number greater than that currently does the same thing.  The Makefiles
  1133. of newer kernels use \fn -O2, you should probably do the same.
  1134.  
  1135.  
  1136. \question 26jun:linuxinclude  Where are \courier{<linux/*.h>\} and \courier{<asm/*.h>\} ?
  1137.  
  1138. These are in the directories \fn /usr/include/linux and
  1139. \fn /usr/include/asm.
  1140.  
  1141. However they should be symbolic links to your kernel sources in \fn
  1142. /usr/src/linux and not real directories.
  1143.  
  1144. If you don't have the kernel sources download them --- see
  1145. \qref kernelcompile.
  1146.  
  1147. Then use \fn rm to remove any garbage, and \fn ln to create the links:
  1148. \verbatim
  1149.    rm -rf /usr/include/linux /usr/include/asm
  1150.    ln -sf /usr/src/linux/include/linux /usr/include/linux
  1151.    ln -sf /usr/src/linux/include/asm /usr/include/asm
  1152. \endverbatim
  1153.  
  1154. Nowadays \fn /usr/src/linux/include/asm is a symbolic link to an
  1155. architecture-specific \courier{asm-<arch>\} directory - if you have a
  1156. freshly unpacked kernel source tree you must use \courier{make
  1157. symlinks\}.  You'll also find that you may need to do \courier{make
  1158. config\} in a newly-unpacked kernel source tree, to create
  1159. \courier{<linux/autoconf.h>\}.
  1160.  
  1161.  
  1162. \question 26jun  I get errors when I try to compile the kernel.
  1163.  
  1164. Make sure that \fn /usr/include/linux and \fn /usr/include/asm aren't actual
  1165. directories but instead symbolic links to \fn /usr/src/linux/include/linux
  1166. and \fn /usr/src/linux/include/asm respectively.
  1167.  
  1168. If necessary, delete them using \fn rm and then use \courier{ln -s\} to make
  1169. the links as in \qref linuxinclude.
  1170.  
  1171. Remember that when you apply a patch to the kernel you must use the
  1172. \fn -p0 or \fn -p1 option: otherwise the patch may be misapplied.  See
  1173. the manpage for \fn patch for details.
  1174.  
  1175. If you're patching to a kernel more recent than 1.1.44 you should find
  1176. that there are new directories \fn /usr/src/linux/include/asm-i386.
  1177. The directory \fn asm there should be removed.  The \fn symlinks \fn
  1178. Makefile target will make these be symbolic links to \fn asm-i36 and
  1179. \fn arch/i386/boot respectively.  The easiest way to make sure all
  1180. this gets done is not to try to patch 1.1.44 to make 1.1.45, but to
  1181. download \fn linux-1.1.45.tar.gz instead.
  1182.  
  1183. \courier{ld: unrecognised option `-qmagic'\} means you should get a
  1184. newer linker, from \ftpon tsx-11.mit.edu in \ftpin
  1185. /pub/linux/packages/GCC, in the file
  1186. \fn binutils-2.6.0.2.bin.tar.gz.
  1187.  
  1188. \question 18sep  How do I make a shared library ?
  1189.  
  1190. For ELF,
  1191. \verbatim
  1192.    gcc -fPIC -c *.c
  1193.    gcc -shared -Wl,-soname,libfoo.so.1 -o libfoo.so.1.0 *.o
  1194. \endverbatim
  1195.  
  1196. For a.out, get \fn tools-n.nn.tar.gz from \ftpon tsx-11.mit.edu, in
  1197. \ftpin /pub/linux/packages/GCC/src.  It comes with documentation that
  1198. will tell you what to do.  Note that a.out shared libraries are a very
  1199. tricky business.
  1200.  
  1201.  
  1202. \question 09sep  My executables are (very) large.
  1203.  
  1204. With an ELF compiler (see \qref elf) the most common cause of large
  1205. executables is the lack of an appropriate \fn .so library link for one
  1206. of the libraries you're using.  There should be a link like \fn
  1207. libc.so for every library like \fn libc.so.5.2.18.
  1208.  
  1209. With an a.out compiler (see \qref elf) the most common cause of large
  1210. executables is the \fn -g linker (compiler) flag.  This produces (as
  1211. well as debugging information in the output file) a program which is
  1212. statically linked, i.e. one which includes a copy of the C library
  1213. instead of using a dynamically linked copy.
  1214.  
  1215. Other things that are worth investigating are \fn -O and \fn -O2 which
  1216. enable optimisation (check the GCC documentation) and -s (or the \fn
  1217. strip command) which strip the symbol information from the resulting
  1218. binary (making debugging totally impossible).
  1219.  
  1220. You may wish to use \fn -N on very small executables (less than 8K
  1221. with the \fn -N), but you shouldn't do this unless you understand its
  1222. performance implications, and definitely never with daemons.
  1223.  
  1224.  
  1225. \question 30oct  Does Linux support threads or lightweight processes ?
  1226.  
  1227. As well as the Unix multiprocessing model involving heavyweight
  1228. processes, which is of course part of the standard Linux kernel, there
  1229. are several implementations of lightweight processes or threads, most
  1230. of which are generic packages for any Unix:
  1231.  
  1232. \call startlist
  1233. \call item
  1234. In \ftpon{sipb.mit.edu\}:\ftpin /pub/pthread or
  1235. \ftpon{ftp.ibp.fr\}:\ftpin /pub/unix/threads/pthreads.  Documentation
  1236. isn't in the package, but is available on the World Wide Web at
  1237. \docref{\fn http://www.mit.edu:8001/people/proven/home_page.html\}.
  1238. Newer Linux libcs contain the pthreads source; the GNU Ada compiler on
  1239. \ftpon sunsite.unc.edu in \ftpin
  1240. /pub/Linux/devel/lang/ada/gnat-3.01-linux+elf.tar.gz contains binaries
  1241. made from that source code.
  1242. \call item
  1243. In \ftpon{ftp.cs.washington.edu\}:\ftpin /pub/qt-001.tar.Z is
  1244. QuickThreads.  More information can be found in the technical report,
  1245. available on the same site as \ftpin /tr/1993/05/UW-CSE-93-05-06.PS.Z.
  1246. \call item
  1247. In \ftpon{gummo.doc.ic.ac.uk\}:\ftpin /rex is lwp, a very minimal
  1248. implementation.
  1249. \call item
  1250. In \ftpon{ftp.cs.fsu.edu\}:\ftpin /pub/PART, an Ada implementation.
  1251. This is useful mainly because it has a lot of PostScript papers that
  1252. you'll find useful in learning more about threads.  This is not
  1253. directly usable under Linux.
  1254. \call endlist
  1255.  
  1256. Please contact the authors of the packages in question for details.
  1257.  
  1258. Kernel version 1.3.35 contains some support for kernel threads, but
  1259. this code has not been well-tested.
  1260.  
  1261.  
  1262. \question 31jan  Where can I get `lint' for Linux ?
  1263.  
  1264. Roughly equivalent functionality is built into the GNU C compiler (\fn
  1265. gcc) which is used by Linux systems.  Use the \fn -Wall option to turn
  1266. on most of the useful extra warnings.  Check the GCC manual for more
  1267. details (type control-\fn h followed by \fn i in Emacs and select the
  1268. entry for GCC).
  1269.  
  1270. There is a freely available program called `lclint' that does much the
  1271. same thing as traditional lint.  The announcement and source code are
  1272. available at on \ftpon larch.lcs.mit.edu in \ftpin /pub/Larch/lclint;
  1273. on the World Wide Web look at
  1274. \docref{\fn http://larch-www.lcs.mit.edu:8001/larch/lclint.html\}.
  1275.  
  1276.  
  1277. \question 27mar  Where can I find `kermit' for Linux ?
  1278.  
  1279. Kermit has a restrictive copyright which has forced most distribution
  1280. maintainers to remove it, or to move the package containing it into an
  1281. obscure directory.
  1282.  
  1283. The source code is available on \ftpon kermit.columbia.edu in \ftpin
  1284. /kermit/archives/cku190.tar.gz; Linux binaries are available in \ftpin
  1285. /kermit/bin/ckuker.linux and \ftpin /kermit/bin/ckuker.linuxtcp.
  1286.  
  1287.  
  1288. \copyto POST
  1289. ===============================================================================
  1290.  
  1291. The remainder of the FAQ is in the next part ...
  1292.  
  1293. END-OF-PORTION
  1294. cat <<'END-OF-HEADER' >linux-faq.post-part2
  1295. From: ijackson@gnu.ai.mit.edu (Ian Jackson)
  1296. Newsgroups: comp.os.linux.answers,comp.os.linux.setup,comp.os.linux.development.apps,comp.os.linux.misc,comp.os.linux.announce,comp.os.linux.help,comp.answers,news.answers
  1297. Subject: Linux Frequently Asked Questions with Answers (FAQ: 2/2)
  1298. Keywords: FAQ, Linux, part2
  1299. Summary: Please read the whole FAQ before posting to comp.os.linux.help.
  1300. Followup-To: poster
  1301. Approved: *.answers moderation team <news-answers-request@mit.edu>,
  1302.           Matt Welsh <linux-answers-request@news.ornl.gov>
  1303. `./expirydate2`
  1304.  
  1305. Archive-Name: linux/faq/part2
  1306. Last-Modified: `date '+%d %b %Y'`
  1307.  
  1308. END-OF-HEADER
  1309. pgp-auto +batchmode +force -fast <<'END-OF-PORTION' >>linux-faq.post-part2
  1310. (Continued from part 1, where you'll find the introduction and
  1311.  table of contents.)
  1312. \endcopy
  1313.  
  1314. \comment ######################################################################
  1315.  
  1316. \section  Solutions to common miscellaneous problems
  1317.  
  1318.  
  1319. \question 10feb  \fn free dumps core.
  1320.  
  1321. In Linux 1.3.57 and later the format of \fn /proc/meminfo was changed
  1322. in a way that the implementation of \fn free doesn't understand.
  1323.  
  1324. Get the latest version, from \ftpon sunsite.unc.edu in \ftpin
  1325. /pub/Linux/system/Status/ps/procps-0.99.tgz.
  1326.  
  1327.  
  1328. \question 04feb  My clock is very wrong.
  1329.  
  1330. There are two clocks in your computer.  The hardware (CMOS) clock runs
  1331. even when the computer is off and is used to when the system starts up
  1332. and by DOS (if you use it).  The ordinary system time, shown and set
  1333. by \fn date, is maintained by the kernel while Linux is running.
  1334.  
  1335. You can display the CMOS clock time, or set either clock from the
  1336. other, with \fn /sbin/clock program - see \courier{man 8 clock\}.
  1337.  
  1338. There are various other programs that can correct either or both
  1339. clocks for systematic drift or transfer time across the network.  Some
  1340. of them may already be installed on your system.  Try looking at or
  1341. for \fn adjtimex (corrects for drift), \fn netdate and \fn getdate
  1342. (simply get the time from the network) or \fn xntp (accurate
  1343. fully-featured network time daemon).
  1344.  
  1345.  
  1346. \question 26jun  Setuid scripts don't seem to work.
  1347.  
  1348. That's right.  This feature has been deliberately disabled in the
  1349. Linux kernel because setuid scripts are almost always a security hole.
  1350. If you want to know why read the FAQ for \newsgroup
  1351. comp.unix.questions.
  1352.  
  1353.  
  1354. \question 10feb  Free memory as reported by \fn free keeps shrinking.
  1355.  
  1356. The `free' figure printed by \fn free doesn't include memory used as a
  1357. disk buffer cache - shown in the `buffers' column.  If you want to
  1358. know how much memory is really free add the `buffers' amount to `free'
  1359. - newer versions of \fn free print an extra line with this info.
  1360.  
  1361. The disk buffer cache tends to grow soon after starting Linux up, as
  1362. you load more programs and use more files and the contents get cached.
  1363. It will stabilise after a while.
  1364.  
  1365.  
  1366. \question 26jun:nocache  When I add more memory it slows to a crawl.
  1367.  
  1368. This is quite a common symptom of a failure to cache the additional
  1369. memory.  The exact problem depends on your motherboard.
  1370.  
  1371. Sometimes you have to enable caching of certain regions in your BIOS
  1372. setup.  Look in the CMOS setup and see if there is an option to cache
  1373. the new memory area which is currently switched off.  This is
  1374. apparently most common on a 486.
  1375.  
  1376. Sometimes the RAMs have to be in certain sockets to be cached.
  1377.  
  1378. Sometimes you have to set jumpers to enable the caching.
  1379.  
  1380. Some motherboards don't cache all the RAM if you have more RAM per
  1381. amount of cache than they expect.  Usually a full 256K cache will
  1382. solve this problem.
  1383.  
  1384. If in doubt, check your motherboard manual.  If you still can't fix it
  1385. because the documentation is inadequate you might like to post a
  1386. message to \newsgroup comp.os.linux.hardware giving \italic{all\} the
  1387. details - make, model number, date code, etc. so that other Linux
  1388. users can avoid it.
  1389.  
  1390.  
  1391. \question 26jun:shadowpassword  Some programs (e.g. \fn xdm) won't let me log in.
  1392.  
  1393. You are probably using non-shadow-password programs but are using
  1394. shadow passwords.
  1395.  
  1396. If so, you have to get or compile a shadow password version of the
  1397. program(s) in question.  The shadow password suite can be found in
  1398. (amongst other places):
  1399. \verbatim
  1400.    tsx-11.mit.edu:/pub/linux/sources/usr.bin/shadow-*
  1401. \endverbatim
  1402. This is the source code; you will probably find the binaries in \fn
  1403. .../linux/binaries/usr.bin.
  1404.  
  1405.  
  1406. \question 10feb  Some programs let me log in with no password.
  1407.  
  1408. You probably have the same problem as in \qref shadowpassword, with an
  1409. added wrinkle:
  1410.  
  1411. If you are using shadow passords you should put a letter \fn x or an
  1412. asterisk in the password field of \fn /etc/passwd for each account, so
  1413. that if a program doesn't know about the shadow passwords it won't
  1414. think it's a passwordless account and let anyone in.
  1415.  
  1416.  
  1417. \question 26jun:lackofmemory  My machine runs very slowly when I run GCC / X / ...
  1418.  
  1419. You may not have any swap enabled.  You need to enable swapping to
  1420. allow Linux to page out bits of data programs aren't using at the
  1421. moment to disk to make more room for other programs and data.  If you
  1422. don't Linux has to keep data in memory and throw away in-memory copies
  1423. of programs (which are paged straight from the filesystem) and so less
  1424. and less program is in memory and everything runs very slowly.
  1425.  
  1426. See the \docref{Installation HOWTO\} and the
  1427. \docref{Installation and Getting Started Guide\}
  1428. [\qref howtos] for details of how to set up a
  1429. swap partition or swapfile; see also \qref swapnotworking.
  1430.  
  1431. Alternatively you may have too little real memory.  If you have less
  1432. RAM than all the programs you're running at once use Linux will use
  1433. your hard disk instead and thrash horribly.  The solution in this case
  1434. is to not run so many things at once or to buy more memory.  You can
  1435. also reclaim some memory by compiling and using a kernel with less
  1436. options configured.  See \qref kernelcompile.
  1437.  
  1438. You can tell how much memory and/or swap you're using by using the \fn
  1439. free command, or by typing
  1440. \verbatim
  1441.     cat /proc/meminfo
  1442. \endverbatim
  1443.  
  1444. If your kernel is configured with a ramdisk this is probably wasted
  1445. space and will cause things to go slowly.  Use LILO or \fn rdev to
  1446. tell the kernel not to allocate a ramdisk (see the LILO documentation
  1447. or type \courier{man rdev\}).
  1448.  
  1449.  
  1450. \question 26jun  I can only log in as root.
  1451.  
  1452. You probably have some permission problems, or you have a file \fn
  1453. /etc/nologin.
  1454.  
  1455. If the latter put \courier{rm -f /etc/nologin\} in your \fn
  1456. /etc/rc.local or \courier{/etc/rc.d/*\} scripts.
  1457.  
  1458. Otherwise check the permissions on your shell, and any filenames which
  1459. appear in error messages, and also the directories containing these
  1460. files all the way up the tree, up to and including the root directory.
  1461.  
  1462.  
  1463. \question 09sep  My screen is all full of weird characters instead of letters.
  1464.  
  1465. You probably sent some binary data to your screen by mistake.  Type
  1466. \courier{echo '\\033c'\} to fix it.  Many Linux distributions have a
  1467. command \fn reset that does this.
  1468.  
  1469.  
  1470. \question 17jun:screwedup  I have screwed up my system and can't log in to fix it.
  1471.  
  1472. Reboot from an emergency floppy or floppy pair, for example the
  1473. Slackware boot- and root-disk pair (in the \fn install subdirectory of
  1474. the Slackware mirrors) or the MCC installation boot floppy.  There are
  1475. also two diy rescue disk creation packages on \ftpon sunsite.unc.edu
  1476. in \ftpin /pub/Linux/system/Recovery.  These are better as they'll
  1477. have your own kernel on them, so that you don't run the risk of
  1478. missing devices, filesystems, etc.
  1479.  
  1480. Get to a shell prompt and mount your hard
  1481. disk with something like
  1482. \verbatim
  1483.    mount -t ext2 /dev/hda1 /mnt
  1484. \endverbatim
  1485.  
  1486. Then your filesystem is available under the directory \fn /mnt and you
  1487. can fix the problem.  Remember to unmount your hard disk before
  1488. rebooting (\fn cd back down to \courier{/\} first or it will say it's
  1489. busy).
  1490.  
  1491.  
  1492. \question 09sep  I've discovered a huge security hole in \fn rm !
  1493.  
  1494. No you haven't.  You are obviously new to Unix and need to read a good
  1495. book on it to find out how things work.  Clue: ability to delete files
  1496. under Unix depends on permission to write the directory they are in.
  1497.  
  1498.  
  1499. \question 17jun  \fn lpr and/or \fn lpd aren't working.
  1500.  
  1501. Check the \docref{Printing HOWTO\} [\qref howtos].
  1502.  
  1503.  
  1504. \question 31jan  Timestamps on files on msdos partitions are set incorrectly.
  1505.  
  1506. There is a bug in the program \fn clock (often found in \fn /sbin) -
  1507. it miscounts a timezone offset, confusing seconds with minutes or some
  1508. such.  Get a new version of it.
  1509.  
  1510.  
  1511. \question 27mar  How do I get LILO to boot the \fn vmlinux file ?
  1512.  
  1513. In kernel versions 1.1.80 and later the compressed kernel image, which
  1514. is what you have to give to LILO, has been moved to \fn
  1515. arch/i386/boot/zImage.  The \fn vmlinux file in the root directory is
  1516. the uncompressed kernel, and you shouldn't try to boot it.
  1517.  
  1518. This change has been made to make it easier to build the versions for
  1519. several different processors from the same source tree.
  1520.  
  1521.  
  1522. \comment ######################################################################
  1523.  
  1524. \section  How do I do this or find out that ... ?
  1525.  
  1526.  
  1527. \question 09sep  How can I get scrollback in text mode ?
  1528.  
  1529. With the default US keymap you can use Shift with the PageUp and
  1530. PageDown keys (NB: these must be the grey ones, not the ones on the
  1531. numeric keypad !).  With other keymaps check the maps in \fn
  1532. /usr/lib/keytables; you can remap the scroll up and down keys to be
  1533. whatever you like --- for example, in order to remap them to keys that
  1534. exist on an 84-key AT keyboard.
  1535.  
  1536. You can't increase the amount of scrollback, because of the way it is
  1537. implemented using the video memory to store the scrollback text,
  1538. though you may be able to get more scrollback in each virtual console
  1539. by reducing the total number of VC's --- see \courier{<linux/tty.h>\}.
  1540.  
  1541.  
  1542. \question 13jul  How do I switch virtual consoles ?  How do I enable them ?
  1543.  
  1544. In text mode, press Left Alt-F1 to Alt-F12 to select the consoles \fn
  1545. tty1 to \fn tty12; Right Alt-F1 gives \fn tty13 and so on.  To switch
  1546. out of X windows you must press Ctrl-Alt-F1 etc; Alt-F5 or whatever
  1547. will switch back.
  1548.  
  1549. If you want to use a VC for ordinary login you need to list it in \fn
  1550. /etc/inittab, which controls which terminals and virtual consoles have
  1551. login prompts.  NB: X needs at least one free VC in order to start.
  1552.  
  1553. Kernels earlier than around 1.1.59 have a compiled-in limit on the
  1554. number of consoles, for which the default is 8.  See \fn NR_CONSOLES
  1555. in \fn linux/include/linux/tty.h.  Newer kernels allocate them
  1556. dynamically, up to a maximum of 63.
  1557.  
  1558.  
  1559. \question 26jun:timezone  How do I set the timezone ?
  1560.  
  1561. Change directory to \fn /usr/lib/zoneinfo; get the timezone package if
  1562. you don't have this directory.  The source can be found on \ftpon
  1563. sunsite.unc.edu in \ftpin /pub/Linux/system/Admin/timesrc-1.2.tar.gz.
  1564.  
  1565. Then make a symbolic link named \fn localtime pointing to one of the
  1566. files in this directory (or a subdirectory), and one called \fn
  1567. posixrules pointing to \fn localtime.  For example:
  1568. \verbatim
  1569.    ln -sf US/Mountain localtime
  1570.    ln -sf localtime posixrules
  1571. \endverbatim
  1572. This change will take effect immediately - try \fn date.
  1573.  
  1574. Don't try to use the \fn TZ variable - leave it unset.
  1575.  
  1576. You should also make sure that your Linux kernel clock is set to the
  1577. correct GMT time - type \courier{date -u\} and check that the correct
  1578. universal time is displayed.
  1579.  
  1580.  
  1581. \question 26jun  What version of Linux and what machine name am I using ?
  1582.  
  1583. Type:
  1584. \verbatim
  1585.    uname -a
  1586. \endverbatim
  1587.  
  1588.  
  1589. \question 09sep  How can I enable or disable \fn core dumps ?
  1590.  
  1591. Linux now has corefiles turned off by default for all processes.
  1592.  
  1593. You can turn them on or off by using the \fn ulimit command in \fn
  1594. bash, the \fn limit command in \fn tcsh, or the \fn rlimit command in
  1595. \fn ksh.  See the manpage for the shell for more details.
  1596.  
  1597. That command affects all programs run from that shell (directly or
  1598. indirectly), not the whole system.
  1599.  
  1600. If you wish to enable or disable coredumping for all processes by
  1601. default you can change the default setting in
  1602. \courier{<linux/sched.h>\} - see the definition of \fn INIT_TASK, and
  1603. look also in \courier{<linux/resource.h>\}.
  1604.  
  1605. 1.2.13 will produce a.out core dumps [\qref elf].
  1606.  
  1607.  
  1608. \question 09sep:kernelcompile  How do I upgrade/recompile my kernel ?
  1609.  
  1610. See the \docref{Kernel HOWTO\} or the \fn README which comes with the
  1611. kernel release on \ftpon ftp.cs.helsinki.fi, in \ftpin
  1612. /pub/Software/Linux/Kernel and mirrors thereof [\qref ftpsites].  You
  1613. may already have a version of the kernel source code installed on your
  1614. system, but if you got it as part of a standard distribution it is
  1615. likely to be somewhat out of date (this is not a problem if you only
  1616. want a custom-configured kernel, but it probably is if you need to
  1617. upgrade.)
  1618.  
  1619. Remember that to make the new kernel boot you must run LILO after
  1620. copying the kernel into your root partition -- the \fn Makefile in
  1621. recent kernels has a special \fn zlilo target for this; try
  1622. \courier{make zlilo\}.
  1623.  
  1624. Kernel version numbers with an odd minor version (ie, 1.1.x, 1.3.x)
  1625. are the testing releases; stable production kernels have even minor
  1626. versions (1.0.x, 1.2.x).  If you want to try the testing kernels you
  1627. should probably subscribe to the \fn linux-kernel mailing list [\qref
  1628. multilist].
  1629.  
  1630. Russel Nelson posts summaries of what changes in recent kernel patches
  1631. to \newsgroup comp.os.linux.development, and these are archived on
  1632. \ftpon ftp.emlist.com in \ftpin /pub/kchanges.
  1633.  
  1634.  
  1635. \question 26jun  Can I have more than 3 serial ports by sharing interrupts ?
  1636.  
  1637. Yes, but you won't be able to use simultaneously two ordinary ports
  1638. which share an interrupt (without some trickery).  This is a
  1639. limitation of the ISA bus architecture.
  1640.  
  1641. See the \docref{Serial HOWTO\} for information about possible
  1642. solutions to and workarounds for this problem.
  1643.  
  1644.  
  1645. \question 26jun  How do I make a bootable floppy ?
  1646.  
  1647. Make a filesystem on it with \fn bin, \fn etc, \fn lib and \fn dev
  1648. directories -- everything you need.  Install a kernel on it and
  1649. arrange to have LILO boot it from the floppy (see the LILO
  1650. documentation, in \fn lilo.u.*.ps).
  1651.  
  1652. If you build the kernel (or tell LILO to tell the kernel) to have a
  1653. ramdisk the same size as the floppy the ramdisk will be loaded at
  1654. boot-time and mounted as root in place of the floppy.
  1655.  
  1656. See the \docref{Bootdisk HOWTO\}.
  1657.  
  1658.  
  1659. \question 26jun:kbd  How do I remap my keyboard to UK, French, etc. ?
  1660.  
  1661. For recent kernels, get
  1662. \ftpsilent{sunsite.unc.edu\}\ftpin /pub/Linux/system/Keyboards/kbd-0.90.tar.gz
  1663. from \fn sunsite.unc.edu.  Make sure you get the appropriate version; you
  1664. have to use the right keyboard-mapping package to go with your kernel
  1665. version.  \fn 0.90 should work with kernel versions from 1.0.
  1666.  
  1667. For older kernels you have to edit the top-level kernel \fn Makefile,
  1668. in \fn /usr/src/linux.
  1669.  
  1670. You may find more helpful information in the \docref{Keystroke
  1671. HOWTO\}, on \fn sunsite.unc.edu in \fn
  1672. /pub/Linux/docs/HOWTO/Keystroke-HOWTO.
  1673.  
  1674.  
  1675. \question 26jun  How do I get NUM LOCK to default to on ?
  1676.  
  1677. Use the \fn setleds program, for example (in \fn /etc/rc.local or one
  1678. of the \courier{/etc/rc.d/*\} files):
  1679. \verbatim
  1680.    for t in 1 2 3 4 5 6 7 8
  1681.    do
  1682.         setleds +num < /dev/tty$t > /dev/null
  1683.    done
  1684. \endverbatim
  1685.  
  1686. \fn setleds is part of the kbd package (see \qref kbd).
  1687.  
  1688. Alternatively, patch your kernel.  You need to arrange for \fn
  1689. KBD_DEFLEDS to be defined to \courier{(1 << VC_NUMLOCK)\} when
  1690. compiling \fn drivers/char/keyboard.c.
  1691.  
  1692.  
  1693. \question 21dec  How can I have more than 128Mb of swap ?
  1694.  
  1695. Use several swap partitions or swapfiles - Linux supports up to 16
  1696. swap areas, each of up to 128Mb.
  1697.  
  1698. Very old kernels only supported swap area sizes up to 16Mb.
  1699.  
  1700.  
  1701. \comment ######################################################################
  1702.  
  1703. \section  Miscellaneous information and questions answered
  1704.  
  1705.  
  1706. \question 07feb  How do I program XYZ under Linux ?
  1707.  
  1708. Read the manuals, or a good book on Unix.  manpages (type \courier{man
  1709. man\}) are usually a good source of reference information on exactly
  1710. how to use a particular command or function.
  1711.  
  1712. There is also a lot of GNU Info documentation, which is often more
  1713. useful as a tutorial.  Run Emacs and type \courier{C-h i\}, or type
  1714. \courier{info info\} if you don't have or don't like Emacs.  Note that
  1715. the Emacs \courier{libc\} node doesn't exactly describe the Linux libc
  1716. (which is more like a traditional Unix libc, not having some of the
  1717. GNU oddities), but it's close enough to make a fair tutorial in Unix C
  1718. programming.
  1719.  
  1720. The latest release of the Linux manpages and a collection of useful
  1721. GNU Info documentation various other information related to
  1722. programming Linux can be found on \ftpon sunsite.unc.edu in \ftpin
  1723. /pub/Linux/docs/man-pages.
  1724.  
  1725.  
  1726. \question 10feb:elf  What's all this about ELF ?
  1727.  
  1728. See the \docref{ELF HOWTO\} by Daniel Barlow - note, this is not the
  1729. file \fn move-to-elf, which is a blow-by-blow account of how to
  1730. upgrade to ELF manually.
  1731.  
  1732. Linux is switching to a different format for executables, object files
  1733. and object code libraries, known as `ELF' (the old format is called
  1734. `a.out').  This will have many advantages, including better support
  1735. for shared libraries and dynamic linking.
  1736.  
  1737. Both a.out and ELF binaries can coexist on a system.  However, they
  1738. use different shared C libraries, both of which will have to be
  1739. installed to do this.
  1740.  
  1741. If you want to find out whether your system can run ELF binaries, look
  1742. in \fn /lib for a filename \fn libc.so.5.  If this exists it
  1743. probably can.  If you want to know whether your installation actually
  1744. \italic{is\} ELF you can pick a representative program, like \fn ls,
  1745. and run \fn file on it:
  1746. \verbatim
  1747.    -chiark:~> file /bin/ls
  1748.    /bin/ls: Linux/i386 impure executable (OMAGIC) - stripped
  1749.  
  1750.    valour:~> file /bin/ls
  1751.    /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1, stripped
  1752. \endverbatim
  1753.  
  1754. There is a patch to get 1.2.x to compile using the ELF compilers, and
  1755. produce ELF coredumps, on \ftpon tsx-11.mit.edu in /pub/packages/GCC.
  1756. You do not need the patch merely to run ELF binaries.  1.3.x and later
  1757. do not need a patch at all.
  1758.  
  1759.  
  1760. \question 26jun  What is a \fn .gz file ? And a \fn .tgz ? And ... ?
  1761.  
  1762. \fn .gz (and \fn .z) files have been compressed using GNU \fn gzip.
  1763. You need to use \fn gunzip (which is as a symlink to the \fn gzip
  1764. command which comes with most Linux installations) to unpack the file.
  1765.  
  1766. \fn .taz and \fn .tz are tarfiles (made with Unix \fn tar) compressed
  1767. using standard Unix \fn compress.
  1768.  
  1769. \fn .tgz (or \fn .tpz) is a tarfile compressed with \fn gzip.
  1770.  
  1771. \fn .lsm is a Linux Software Map entry, in the form of a short text
  1772. file.  Details about the LSM and the LSM itself are available in the
  1773. \ftpsilent{sunsite.unc.edu:/pub/Linux\}\ftpin docs subdirectory on \fn
  1774. sunsite.unc.edu.
  1775.  
  1776. \fn .deb is a Debian Binary Package - the binary package format used
  1777. by the Debian GNU/Linux distribution.  It is manipulated using \fn
  1778. dpkg and \fn dpkg-deb (available on Debian systems and from \fn
  1779. ftp.debian.org).
  1780.  
  1781. \fn .rpm is a Red Hat RPM package, which is used in the Red Hat
  1782. distribution.  These can be found on \docref{\fn ftp.redhat.com\}.
  1783.  
  1784. The \fn file command can often tell you what a file is.
  1785.  
  1786. If you find that \fn gzip complains when you try to uncompress a
  1787. gzipped file you probably downloaded it in ASCII mode by mistake.  You
  1788. must download most things in binary mode - remember to type \fn binary
  1789. as a command in FTP before using \fn get to get the file.
  1790.  
  1791.  
  1792. \question 26jun  What does \fn VFS stand for ?
  1793.  
  1794. Virtual File System.  It's the abstraction layer between the user and
  1795. real filesystems like ext2, minix and msdos.  Amongst other things,
  1796. its job is to flush the read buffer when it detects a disk change on
  1797. the floppy disk drive:
  1798. \verbatim
  1799.    VFS: Disk change detected on device 2/0
  1800. \endverbatim
  1801.  
  1802.  
  1803. \question 09sep  What is a BogoMip ?
  1804.  
  1805. `BogoMips' is a contraction of `Bogus MIPS'.  MIPS stands for
  1806. (depending who you listen to) Millions of Instructions per Second, or
  1807. Meaningless Indication of Processor Speed.
  1808.  
  1809. The number printed at boot-time is the result of a kernel timing
  1810. calibration, used for very short delay loops by some device drivers.
  1811.  
  1812. As a very rough guide the BogoMips will be approximately:
  1813. \verbatim
  1814.      386SX              clock * 0.14
  1815.      386DX              clock * 0.18
  1816.      486Cyrix/IBM       clock * 0.33
  1817.      486SX/DX/DX2       clock * 0.50
  1818.      586                clock * 0.39
  1819. \endverbatim
  1820.  
  1821. If the number you're seeing is wildly lower than this you may have the
  1822. Turbo button or CPU speed set incorrectly, or have some kind of
  1823. caching problem [as described in \qref nocache.]
  1824.  
  1825. For values people have seen with other, rarer, chips, see the BogoMips
  1826. Mini-HOWTO, on \ftpon sunsite.unc.edu in \ftpin
  1827. /pub/Linux/docs/howto/mini/BogoMips.
  1828.  
  1829.  
  1830. \question 18may  What is the Linux Journal and where can I get it ?
  1831.  
  1832. Linux Journal is a monthly magazine (printed on paper) that is
  1833. available on newsstands and via subscription worldwide. Email \email
  1834. linux@ssc.com for details.  They are on the Web at
  1835. \docref{\fn http://www.ssc.com/\}.
  1836.  
  1837.  
  1838. \question 22jun  How many people use Linux ?
  1839.  
  1840. Linux is freely available, and no one is required to register their
  1841. copies with any central authority, so it is difficult to know.
  1842. Several businesses are now surviving solely on selling and supporting
  1843. Linux, and very few Linux users use those businesses, relatively
  1844. speaking.  The Linux newsgroups are some of the most heavily read on
  1845. the Net, so the number is likely in the hundreds of thousands, but
  1846. firm numbers are hard to come by.
  1847.  
  1848. However, one brave soul, Harald T. Alvestrand \email
  1849. Harald.T.Alvestrand@uninett.no, has decided to try, and asks that if
  1850. you use Linux, you send a message to \email linux-counter@uninett.no
  1851. with one of the following subjects: `I use Linux at home', `I use
  1852. Linux at work', or `I use Linux at home and at work'.  He will also
  1853. accept `third-party' registrations - ask him for details.
  1854.  
  1855. Alternatively, you can register using the WWW forms found at 
  1856. \docref{http://domen.uninett.no/~hta/linux/counter.html\}.
  1857.  
  1858. He posts his counts to comp.os.linux.misc each month; alternatively
  1859. look on \ftpon aun.uninett.no in \ftpin /pub/misc/linux-counter or at
  1860. the web page above.
  1861.  
  1862.  
  1863. \question 18sep  How should I pronounce Linux ?
  1864.  
  1865. This is a matter of religious debate, of course !
  1866.  
  1867. If you want to hear Linus himself say how he pronounces it
  1868. download \ftpsilent
  1869. ftp.funet.fi:/pub/OS/Linux/PEOPLE/Linus/SillySounds \ftpin english.au
  1870. or \ftpin swedish.au from \fn ftp.funet.fi (in \fn
  1871. /pub/OS/Linux/PEOPLE/Linus/SillySounds).  If you have a soundcard or
  1872. the PC-speaker audio driver you can hear them by typing
  1873. \verbatim
  1874.    cat english.au >/dev/audio
  1875. \endverbatim
  1876. The difference isn't in the pronunciation of Linux but in the language
  1877. Linus uses to say hello.  The English version was parodied very well
  1878. by Jin Choi as "Hi, my name is Leenoos Torvahlds and I pronounce
  1879. Leenooks as Leenooks."
  1880.  
  1881. For the benefit of those of you who don't have the equipment or
  1882. inclination: Linus pronounces Linux approximately as Leenus, where the
  1883. ee is as in feet but rather shorter and the u is like a much shorter
  1884. version of the French eu sound in peur (pronouncing it as the u in put
  1885. is probably passable).
  1886.  
  1887. When speaking English I pronounce it Lie-nucks (u as in bucket) ---
  1888. this is an anglicised pronunciation based on the analogy with Linus'
  1889. name, which in English is usually pronounced Lie-nus (u as in put).
  1890. It is of course quite acceptable and common to modify the
  1891. pronunciation of a proper noun when it changes languages.
  1892.  
  1893. I think I can safely say that the pronunciation Linnucks (short i as
  1894. in pit, short u as in bucket) is wrong in English, as it is not the
  1895. original Swedish pronunciation, not a sensible direct anglicisation of
  1896. it, and not based on the anglicised version of Linus' name.
  1897.  
  1898.  
  1899. \comment ######################################################################
  1900.  
  1901. \section  Frequently encountered error messages
  1902.  
  1903.  
  1904. \question 31aug  Unknown terminal type \courier{linux\} and similar
  1905.  
  1906. In an early 1.3.x kernel the default console terminal type has changed
  1907. from \courier{console\} to \courier{linux\}.  You must edit \fn /etc/termcap
  1908. to change the line reading:
  1909. \verbatim
  1910.    console|con80x25:\
  1911. \endverbatim
  1912. to
  1913. \verbatim
  1914.    linux|console|con80x25:\
  1915. \endverbatim
  1916. (there may be an additional \courier{dumb\} in there - if so it should be removed.)
  1917.  
  1918. In order to get the editor to work you may need say
  1919. \courier{TERM=console\} (for \fn bash and \fn ksh) or \courier{setenv
  1920. TERM console\} (\fn csh, \fn tcsh) first.
  1921.  
  1922. Some programs use \fn /usr/lib/terminfo instead of \fn /etc/termcap.
  1923. For these programs you should upgrade your terminfo, which is part of
  1924. ncurses.
  1925.  
  1926.  
  1927. \question 18sep  During linking I get \courier{Undefined symbol _mcount\}
  1928.  
  1929. This is usually due to a bad interaction between a brokenness in SLS
  1930. and the C library release notes.  Your \fn libc.a has been replaced by
  1931. the profiling library.  You should remove \fn libc.a, \fn libg.a and
  1932. \fn libc_p.a and once again install the new libraries (following the
  1933. release notes, of course).
  1934.  
  1935.  
  1936. \question 09sep  \courier{lp1 on fire\}
  1937.  
  1938. This is a joke/traditional error message indicating that some sort of
  1939. error is being reported by your printer, but that the error status
  1940. isn't a valid one.  It may be that you have some kind of I/O or IRQ
  1941. conflict - check your cards' settings.  Some people report that they
  1942. get this message when their printer is switched off.  Hopefully it
  1943. isn't really on fire ...
  1944.  
  1945. In newer kernels this message reads \courier{lp1 reported invalid
  1946. error status (on fire, eh?)\}.
  1947.  
  1948.  
  1949. \question 26jun  \courier{INET: Warning: old style ioctl(IP_SET_DEV) called!\}
  1950.  
  1951. You are trying to use the old network configuration utilities; the new
  1952. ones can be found on \ftpon ftp.linux.org.uk in \ftpin
  1953. /pub/linux/Networking/PROGRAMS/NetTools (source only, I'm afraid).
  1954.  
  1955. Note that they cannot be used just like the old-style programs; see
  1956. the \docref{NET-2 HOWTO\} for instructions on how to set up networking
  1957. correctly.
  1958.  
  1959.  
  1960. \question 10feb  \courier{ld: unrecognized option '-m486'\}
  1961.  
  1962. You have an old version of \fn ld.  Install a newer binutils package
  1963. -- this will contain an updated \fn ld.  Look on \ftpon tsx-11.mit.edu
  1964. in \ftpin /pub/linux/packages/GCC for \fn binutils-2.6.0.2.bin.tar.gz.
  1965.  
  1966.  
  1967. \question 26jun  GCC says \courier{Internal compiler error\}
  1968.  
  1969. If the fault is repeatable (ie, it always happens at the same place in
  1970. the same file --- even after rebooting and trying again, using a
  1971. stable kernel) you have discovered a bug in GCC.  See the GCC Info
  1972. documentation (type Control-\fn h \fn i in Emacs, and select GCC from
  1973. the menu) for details on how to report this -- make sure you have the
  1974. latest version though.
  1975.  
  1976. Note that this is probably not a Linux-specific problem; unless you
  1977. were compiling a program many other Linux users also compile you
  1978. should not post your bug report to any of the \fn comp.os.linux
  1979. groups.
  1980.  
  1981. If the problem is not repeatable you are very probably experiencing
  1982. memory corruption --- see \qref memorycorrupt.
  1983.  
  1984.  
  1985. \question 09sep:memorycorrupt  \fn make says \courier{Error 139\}
  1986.  
  1987. Your compiler driver (\fn gcc) dumped core.  You probably have a
  1988. corrupted, buggy or old version of GCC --- get the latest release.
  1989. Alternatively you may be running out of swap space --- see \qref
  1990. lackofmemory for more info.
  1991.  
  1992. If this doesn't fix the problem you are probably having problems with
  1993. memory or disk corruption.  Check that the clock rate, wait states and
  1994. refresh timing for your SIMMs and cache are correct (hardware manuals
  1995. are sometimes wrong, too).  If so you may have some dodgy SIMMs or a
  1996. faulty motherboard or hard disk or controller.
  1997.  
  1998. Linux, like any Unix, is a very good memory tester --- much better
  1999. than DOS-based memory test programs.
  2000.  
  2001. Reportedly some clone x87 maths coprocessors can cause problems; try
  2002. compiling a kernel with maths emulation [\qref kernelcompile]; you may
  2003. need to use the \fn no387 kernel command line flag on the LILO prompt
  2004. to force the kernel to use it, or it may be able to work and still use
  2005. the 387, with the maths emulation compiled in but mainly unused.
  2006.  
  2007. Much more information about this problem is available on the WWW at
  2008. \docref{\fn http://einstein.et.tudelft.nl/~wolff/sig11/\}.
  2009.  
  2010.  
  2011. \question 26jun  \courier{shell-init: permission denied\} when I log in.
  2012.  
  2013. Your root directory and all the directories up to your home directory
  2014. must be readable and executable by everybody.  See the manpage for
  2015. \fn chmod or a book on Unix for how to fix the problem.
  2016.  
  2017.  
  2018. \question 26jun  \courier{No utmp entry.  You must exec ...\} when I log in.
  2019.  
  2020. Your \fn /var/run/utmp is screwed up.  You should have
  2021. \verbatim
  2022.    > /var/run/utmp
  2023. \endverbatim
  2024. in your \fn /etc/rc.local or \courier{/etc/rc.d/*\}.  See \qref
  2025. screwedup for how to be able to do this.  Note that \fn utmp may also
  2026. be found in \fn /var/adm/utmp or \fn /etc/utmp on some older systems.
  2027.  
  2028.  
  2029. \question 17jun  \courier{Warning - bdflush not running\}
  2030.  
  2031. Modern kernels use a better strategy for writing cached disk blocks.
  2032. In addition to the kernel changes, this involves replacing the old \fn
  2033. update program which used to write everything every 30 seconds with a
  2034. more subtle daemon (actually a pair), known as \fn bdflush.
  2035.  
  2036. Get \fn bdflush-n.n.tar.gz from the same place as the kernel source
  2037. code [\qref kernelcompile] and compile and install it; it should be
  2038. started before the usual boot-time filesystem checks.  It will work
  2039. fine with older kernels as well, so there's no need to keep the old
  2040. \fn update around.
  2041.  
  2042.  
  2043. \question 18sep  \courier{Warning: obsolete routing request made.\}
  2044.  
  2045. This is nothing to worry about; it just means that the version of \fn
  2046. route you have is a little out of date compared to the kernel.  You
  2047. can make the message go away by getting a new version of \fn route
  2048. from the same place as the kernel source code [\qref kernelcompile].
  2049.  
  2050.  
  2051. \question 09sep:uncheckedfs  \courier{EXT2-fs: warning: mounting unchecked filesystem\}
  2052.  
  2053. You need to run \fn e2fsck (or \courier{fsck -t ext2\} if you have the
  2054. \fn fsck front-end program) with the \fn -a option to get it to clear
  2055. the `dirty' flag, and then cleanly unmount the partition during each
  2056. shutdown.
  2057.  
  2058. The easiest way to do this is to get the latest \fn fsck, \fn umount
  2059. and \fn shutdown commands, available in Rik Faith's util-linux package
  2060. [\qref ftpsites].  You have to make sure that your /etc/rc* scripts
  2061. use them correctly.
  2062.  
  2063. NB: don't try to check a filesystem that's mounted read-write - this
  2064. includes the root partition if you don't see
  2065. \verbatim
  2066.    VFS: mounted root ... read-only
  2067. \endverbatim
  2068. at boot time.  You must arrange to mount the root filesystem readonly
  2069. to start with, check it if necessary, and then remount it read-write.
  2070. Read the documentation that comes with util-linux to find out how to
  2071. do this.
  2072.  
  2073. Note that you need to specify the \fn -n option to \fn mount to get it
  2074. not to try to update \fn /etc/mtab, since the root filesystem is still
  2075. read-only and this will otherwise cause it to fail !
  2076.  
  2077.  
  2078. \question 09sep:maxcounts  \courier{EXT2-fs warning: maximal count reached\}
  2079.  
  2080. This message is issued by the kernel when it mounts a filesystem
  2081. that's marked as clean, but whose `number of mounts since check'
  2082. counter has reached the predefined value.  The solution is to get the
  2083. latest version of the ext2fs utilities (\fn e2fsprogs-0.5b.tar.gz at
  2084. the time of writing) from the usual sites [\qref ftpsites].
  2085.  
  2086. The maximal number of mounts value can be examined and changed using
  2087. the \fn tune2fs program from this package.
  2088.  
  2089.  
  2090. \question 09sep  \courier{EXT2-fs warning: checktime reached\}
  2091.  
  2092. Kernels from 1.0 onwards support checking a filesystem based on the
  2093. elapsed time since the last check as well as by the number of mounts.
  2094. Get the latest version of the ext2fs utilities [see \qref maxcounts].
  2095.  
  2096.  
  2097. \question 26jun  \fn df says \courier{Cannot read table of mounted filesystems\}
  2098.  
  2099. There is probably something wrong with your \fn /etc/mtab or \fn
  2100. /etc/fstab files.  If you have a reasonably new version of \fn mount,
  2101. \fn /etc/mtab should be emptied or deleted at boot time (in \fn
  2102. /etc/rc.local or \courier{/etc/rc.d/*\}), using something like
  2103. \verbatim
  2104.    rm -f /etc/mtab*
  2105. \endverbatim
  2106.  
  2107. Some versions of SLS have an entry for the root partition in \fn
  2108. /etc/mtab made in \courier{/etc/rc*\} by using \fn rdev.  This is
  2109. incorrect -- the newer versions of \fn mount do this automatically.
  2110.  
  2111. Other versions of SLS have a line in \fn /etc/fstab that looks like:
  2112. \verbatim
  2113.     /dev/sdb1   /root   ext2   defaults
  2114. \endverbatim
  2115. This is wrong.  \fn /root should read simply \courier{/\}.
  2116.  
  2117.  
  2118. \question 17jun  \fn fdisk says \courier{Partition X has different physical/logical ...\}
  2119.  
  2120. If the partition number (\fn X, above) is 1 this is the same problem
  2121. as \qref badpart1.
  2122.  
  2123. If the partition begins or ends on a cylinder numbered beyond 1024
  2124. this is because standard DOS disk geometry information format in the
  2125. partition table can't cope with cylinder numbers with more than 10
  2126. bits.  You should see \qref largedisk.
  2127.  
  2128.  
  2129. \question 20sep:badpart1  \courier{fdisk: Partition 1 does not start on cylinder boundary\}
  2130.  
  2131. The version of \fn fdisk that comes with many Linux systems creates
  2132. partitions that fail its own validity checking.  Unfortunately if
  2133. you've already installed your system there's not much you can do about
  2134. this, apart from copying the data off the partition, deleting and
  2135. remaking it, and copying the data back.
  2136.  
  2137. You can avoid the problem by getting the latest version of \fn fdisk,
  2138. from Rik Faith's util-linux package (available on all good FTP sites).
  2139. Alternatively, if you are creating a new partition 1 that starts in
  2140. the first cylinder, you can do the following to get a partition that
  2141. fdisk likes.
  2142.  
  2143. 1. Create partition 1 in the normal way.  A \fn p listing will produce
  2144. the mismatch complaint.
  2145.  
  2146. 2. Type \fn u to set sector mode and do \fn p again.  Copy down the
  2147. number from the "End" column.
  2148.  
  2149. 3. Delete partition 1.
  2150.  
  2151. 4. While still in sector mode recreate partition 1.  Set the first
  2152. sector to match the number of sectors per track.  This is the sector
  2153. number in the first line of the \fn p output.  Set the last sector to
  2154. the value noted in 2. above.
  2155.  
  2156. 5. Type \fn u to reset cylinder mode and continue with other
  2157. partitions.
  2158.  
  2159. Ignore the message about unallocated sectors - they refer to the
  2160. sectors on the first track apart from the Master Boot Record, which
  2161. are not used if you start the first partition in track 2.
  2162.  
  2163.  
  2164. \question 26jun  \fn fdisk says \courier{partition n has an odd number of sectors\}
  2165.  
  2166. The PC disk partitioning scheme works in 512-byte sectors, but Linux
  2167. uses 1K blocks.  If you have a partition with an odd number of sectors
  2168. the last sector is wasted.  Ignore the message.
  2169.  
  2170.  
  2171. \question 09sep  mtools says \courier{cannot initialise drive XYZ\}
  2172.  
  2173. This means that mtools is having trouble accessing the drive.  This
  2174. can be due to several things.
  2175.  
  2176. Often this is due to the permissions on floppy drive devices
  2177. (\courier{/dev/fd0*\} and \courier{/dev/fd1*\}) being incorrect ---
  2178. the user running mtools must have the appropriate access.  See the
  2179. manpage for \fn chmod for details.
  2180.  
  2181. Most versions of mtools distributed with Linux systems (not the
  2182. standard GNU version) use the contents of a file \fn /etc/mtools to
  2183. discover which devices and densities to use, in place of having this
  2184. information compiled into the binary.  Mistakes in this file often
  2185. cause problems.  There is often no documentation about this ---
  2186. distribution packagers please note that this is \italic{evil\}.
  2187.  
  2188. For the easiest way to access your DOS files (especially those on a
  2189. hard disk partition) see \qref msdosfs.  Note - you should never use
  2190. mtools to access files on an msdosfs mounted partition or disk !
  2191.  
  2192.  
  2193. \question 31jan  At the start of booting: \courier{Memory tight\}
  2194.  
  2195. This means that you have an extra large kernel that means that Linux
  2196. has to do some special memory-management magic to be able to boot
  2197. itself from the BIOS.  It isn't related to the amount of physical
  2198. memory in your machine.  Ignore the message, or compile a kernel
  2199. containing only the drivers and features you need [\qref
  2200. kernelcompile].
  2201.  
  2202.  
  2203. \question 12sep  \courier{You don't exist. Go away.\}
  2204.  
  2205. This is not a viral infection \courier{:-)\}.  It comes from various
  2206. programs such as \fn write, \fn talk and \fn wall, if your invoking
  2207. uid doesn't correspond to a valid user (probably due to \fn
  2208. /etc/passwd being corrupted), or if the session (pseudoterminal,
  2209. specifically) you're using isn't properly registered in the \fn utmp
  2210. file (probably because you invoked it in a funny way).
  2211.  
  2212.  
  2213. \comment ######################################################################
  2214.  
  2215. \section  The X Window System
  2216.  
  2217. \question 10feb:x  Does Linux support X Windows ?
  2218.  
  2219. Yes.  Linux uses XFree86 (the current version is 3.1.2, which is based
  2220. on X11R6).  You need to have a video card which is supported by
  2221. XFree86.  See the Linux XFree86 HOWTO for more details.
  2222.  
  2223. Most Linux distributions nowadays come with an X installation.
  2224.  
  2225. However, you can install or upgrade your own, from
  2226. \ftpsilent{sunsite.unc.edu\}\ftpin /pub/Linux/X11/Xfree86-* on \fn
  2227. sunsite.unc.edu and its mirror sites.  Read the \docref{XFree86
  2228. HOWTO\} for installation instructions.
  2229.  
  2230.  
  2231. \question 09sep  Where can I get an \fn XF86Config for my system ?
  2232.  
  2233. See the Linux XFree86 HOWTO.
  2234.  
  2235. You'll need to put together your own \fn XF86Config file, because it
  2236. depends on the exact combination of video card and monitor you have.
  2237. It's not that hard to do -- read the instructions that came with
  2238. XFree86, in \fn /usr/X11R6/lib/X11/etc.  The file you probably most
  2239. need to look at is \fn README.Config.
  2240.  
  2241. For a quick start you may run the program \fn xf86config.  Note that
  2242. \fn ConfigXF86 is now obsolete and you shouldn't use it.
  2243.  
  2244. Please don't post to \fn comp.os.linux.x asking for an \fn XF86Config,
  2245. and please don't answer such requests - especially not in the group.
  2246.  
  2247.  
  2248. \question 26jun  \fn xterm logins show up strangely in \fn who, \fn finger
  2249.  
  2250. The \fn xterm that comes with XFree86 2.1 and earlier doesn't
  2251. correctly understand the format that Linux uses for the \fn
  2252. /var/adm/utmp file, where the system records who is logged in.  It
  2253. therefore doesn't set all the information correctly.
  2254.  
  2255. XFree86 3.1 fixes this problem.
  2256.  
  2257.  
  2258. \question 26jun  I can't get X Windows to work right.
  2259.  
  2260. Read the XFree86 HOWTO - note the question and answer section.
  2261.  
  2262. Try reading \newsgroup comp.windows.x.i386unix -- specifically read
  2263. the the FAQ for that group.
  2264.  
  2265. Please don't post X Windows or XFree86 related questions to \newsgroup
  2266. comp.os.linux.x unless they are Linux-specific.
  2267.  
  2268.  
  2269. \comment ######################################################################
  2270.  
  2271. \section  Questions applicable to very out-of-date software
  2272.  
  2273. The questions in this section are only relevant to users of software
  2274. that is at least 3 months old.
  2275.  
  2276. Please let me know if you find the answer to a problem you had here,
  2277. as unused questions in this section will eventually disappear [\qref
  2278. feedback].
  2279.  
  2280.  
  2281. \question 11feb  Emacs just dumps core.
  2282.  
  2283. You probably have a version of Emacs that was compiled to work with
  2284. X11; this requires the X11 libraries to work.  If you're using
  2285. Slackware you can change the \fn /usr/bin/emacs symbolic link to point
  2286. to \fn emacs-19.29-no-x11 instead (see \courier{man ln\}).  This is in
  2287. the file \fn emac_nox.tgz on Slackware 3.0's E6 disk.
  2288.  
  2289.  
  2290. \question 26jun  \fn fdisk says \courier{cannot use nnn sectors of this partition\}
  2291.  
  2292. Originally Linux only supported the Minix filesystem, which cannot use
  2293. more than 64Mb per parition.  This limitation is not present in the
  2294. more advanced filesystems now available, such as ext2fs (the 2nd
  2295. version of the Extended Filesystem, the `standard' Linux filesystem).
  2296.  
  2297. If you intend to use ext2fs you can ignore the message.
  2298.  
  2299.  
  2300. \question 09sep  GCC sometimes uses huge amounts of virtual memory and thrashes
  2301.  
  2302. Older versions of GCC had a bug which made them use lots of memory if
  2303. you tried to compile a program which had a large static data table in
  2304. it.
  2305.  
  2306. You can either upgrade your version of GCC to at least version 2.5, or
  2307. add more swap if necessary and just grin and bear it; it'll work in
  2308. the end.
  2309.  
  2310.  
  2311. \question 09sep  My keyboard goes all funny after I switch VC's.
  2312.  
  2313. This is a bug in kernel versions before 0.99pl14-alpha-n.  Sometimes
  2314. Linux loses track of what modifier keys (Shift, Alt, Control etc.) are
  2315. pressed or not, and believes that one or more are pressed when they
  2316. are not.  The solution is to press and release each of the modifier
  2317. keys (without pressing any other keys) --- this will ensure that Linux
  2318. knows what state the keyboard is actually in.
  2319.  
  2320. This problem often occurs when switching out of X windows; it can
  2321. sometimes be avoided by releasing Ctrl and Alt very quickly after
  2322. pressing the F-key of the VC you are switching to.
  2323.  
  2324.  
  2325. \comment ######################################################################
  2326.  
  2327. \section  How to get further assistance
  2328.  
  2329. \question 26jun:notanswered  You still haven't answered my question !
  2330.  
  2331. Please read all of this answer before posting.  I know it's a bit
  2332. long, but you may be about to make a fool of yourself in front of
  2333. 50000 people and waste hundreds of hours of their time.  Don't you
  2334. think it's worth it to spend some of your time reading and following
  2335. these instructions ?
  2336.  
  2337. If you think an answer is incomplete or inaccurate, please mail Ian
  2338. Jackson at \email ijackson@gnu.ai.mit.edu.
  2339.  
  2340. Read the appropriate Linux Documentation Project books - see \qref
  2341. howtos.
  2342.  
  2343. If you're a Unix newbie read the FAQ for \newsgroup
  2344. comp.unix.questions, and those for any of the other
  2345. \courier{comp.unix.*\} groups that may be relevant.
  2346.  
  2347. Linux is a Unix clone, so almost everything you read there will apply
  2348. to Linux.  Those FAQs can, like all FAQs, be found on \ftpon
  2349. rtfm.mit.edu in \ftpin /pub/usenet/news.answers (the \fn
  2350. mail-server@rtfm.mit.edu can send you these files, for those who don't
  2351. have FTP access).  There are mirrors of \courier{rtfm\}'s FAQ
  2352. archives on various sites - check the Introduction to \fn *.answers
  2353. posting, posted, or look in \fn news-answers/introduction in the
  2354. directory above.
  2355.  
  2356. Check the relevant HOWTO for the subject in question, if there is one,
  2357. or an appropriate old-style sub-FAQ document.  Check the FTP sites.
  2358.  
  2359. Try experimenting --- that's the best way to get to know Unix and Linux.
  2360.  
  2361. Read the documentation.  Check the manpages (type \courier{man man\}
  2362. if you don't know about manpages.  Try \courier{man -k <subject>\} ---
  2363. it often lists useful and relevant manpages.
  2364.  
  2365. Check the Info documentation (type \courier{C-h i\}, i.e. Control H
  2366. followed by I in Emacs) --- NB: this isn't just for Emacs; for example
  2367. the GCC documentation lives here as well.
  2368.  
  2369. There will also often be a \fn README file with a package giving
  2370. installation and/or usage instructions.
  2371.  
  2372. Make sure that you don't have a corrupted or out-of-date copy of the
  2373. program in question.  If possible, download it again and reinstall it
  2374. --- perhaps you made a mistake the first time.
  2375.  
  2376. Read \newsgroup comp.os.linux.announce --- this often contains very
  2377. important information for all Linux users.
  2378.  
  2379. General X-Windows questions belong in \newsgroup
  2380. comp.windows.x.i386unix, not in \fn comp.os.linux.x.  But read the
  2381. group first (including the FAQ), before you post !
  2382.  
  2383. Only if you have done all of these things and are still stuck should
  2384. you post to the appropriate \courier{comp.os.linux.*\} newsgroup.  Make
  2385. sure you read the next question, \qref whatinposting, first.
  2386.  
  2387.  
  2388. \question 09sep:whatinposting  What to put in a request for help
  2389.  
  2390. Please read carefully the following advice about how to write your
  2391. posting or email.  Taking heed of it will greatly increase the chances
  2392. that an expert and/or fellow user reading it will have enough
  2393. information and motivation to reply.
  2394.  
  2395. This advice applies both to postings asking for advice and to personal
  2396. email sent to experts and fellow users.
  2397.  
  2398. Make sure you give full details of the problem, including:
  2399. \call startlist
  2400. \call item
  2401. What program, exactly, you are having problems with.
  2402. Include the version number if known and say where you got it.
  2403. Many standard commands tell you their version number if you
  2404. give them a \fn --version option.
  2405.  
  2406. \call item
  2407. Which Linux release you're using (MCC, Slackware, Debian or whatever)
  2408. and what version of that release.
  2409.  
  2410. \call item
  2411. The \italic{exact\} and \italic{complete\} text of any error messages
  2412. printed.
  2413.  
  2414. \call item
  2415. Exactly what behaviour you were expecting, and exactly what
  2416. behaviour you observed.  A transcript of an example session is a good
  2417. way of showing this.
  2418.  
  2419. \call item
  2420. The contents of any configuration files used by the program in
  2421. question and any related programs.
  2422.  
  2423. \call item
  2424. What version of the kernel and of the shared libraries you are using.
  2425. The kernel version can be found by typing \courier{uname -a\}, and the
  2426. shared library version by typing \courier{ls -l /lib/libc.so.4\}.
  2427.  
  2428. \call item
  2429. Details of what hardware you're running on, if it seems appropriate.
  2430.  
  2431. \call endlist
  2432. You are in little danger of making your posting too long unless you
  2433. include large chunks of source code or uuencoded files, so err on the
  2434. side of giving too much information.
  2435.  
  2436. Use a clear, detailed Subject line.  Don't put things like `doesn't
  2437. work', `Linux', `help' or `question' in it --- we already knew that !
  2438. Save the space for the name of the program, a fragment of the error
  2439. message, summary of the unusual behaviour, etc.
  2440.  
  2441. If you are reporting an `unable to handle kernel paging request'
  2442. message, follow the instructions in the Linux kernel sources \fn
  2443. README for turning the numbers into something more meaningful.  If you
  2444. don't do this noone who reads your post will be able to do it for you,
  2445. as the mapping from numbers to function names varies from one kernel
  2446. to another.
  2447.  
  2448. Put a summary paragraph at the top of your posting.
  2449.  
  2450. At the bottom of your posting, ask for responses by email and say
  2451. you'll post a summary.  Back this up by using \courier{Followup-To:
  2452. poster\}.  Then, do actually post a summary in a few days or a week or
  2453. so.  Don't just concatenate the replies you got --- summarise.
  2454. Putting the word \fn SUMMARY in your summary's Subject line is also a
  2455. good idea.  Consider submitting the summary to comp.os.linux.announce.
  2456.  
  2457. Make sure your posting doesn't have an inappropriate \fn References
  2458. header line.  This marks your article as part of the thread of the
  2459. article referred to, which will often cause it to be junked by the
  2460. readers with the rest of a boring thread.
  2461.  
  2462. You might like to say in your posting that you've read this FAQ and
  2463. the appropriate HOWTOs - this may make people less likely to skip your
  2464. posting.
  2465.  
  2466. Remember that you should not post email sent to you personally without
  2467. the sender's permission.
  2468.  
  2469.  
  2470. \question 21dec  I want to mail someone about my problem.
  2471.  
  2472. Try to find the author or developer of whatever program or component
  2473. is causing you difficulty.  If you have a contact point for the Linux
  2474. distribution you are using you should use it.
  2475.  
  2476. Please put everything in your email that you would put in a posting
  2477. asking for help.
  2478.  
  2479. Finally, remember that despite the fact that most of the Linux
  2480. community are very helpful and responsive to emailed questions you'll
  2481. be asking for help from an unpaid volunteer, so you have no right to
  2482. expect an answer.
  2483.  
  2484.  
  2485. \comment ######################################################################
  2486.  
  2487. \section  Administrative information and acknowledgements
  2488.  
  2489. \question 26jun:feedback  Feedback is invited
  2490.  
  2491. Please send me your comments on this FAQ.
  2492.  
  2493. I accept submissions for the FAQ in any format;  All contributions
  2494. comments and corrections are gratefully received.
  2495.  
  2496. Please send them to \email ijackson@gnu.ai.mit.edu.
  2497.  
  2498. If you wish to refer to a question(s) in the FAQ it's most useful for
  2499. me if you do so by the question heading, rather than the number, as
  2500. the question numbers are generated automatically and I don't see them
  2501. in the source file I edit.
  2502.  
  2503. I prefer comments in English to patchfiles - I write the FAQ in a
  2504. different internal format anyway, so I can't use a patchfile.
  2505.  
  2506.  
  2507. \question 26jun:formats  Formats in which this FAQ is available
  2508.  
  2509. This document is available as an ASCII text file, an Emacs Info
  2510. document, an HTML World Wide Web page, PostScript and as a USENET news
  2511. posting.
  2512.  
  2513. The ASCII, Emacs Info, HTML and posted versions and a Lout typesetter
  2514. file (from which the PostScript is produced) are generated
  2515. automatically by a Perl script which takes as input a file in the
  2516. Bizarre Format with No Name.
  2517.  
  2518. The output files \fn linux-faq.ascii, \fn .info and \fn .ps and a
  2519. tarfile \fn linux-faq.source.tar.gz, containing the BFNN source and
  2520. Perl script converter, are available in the \fn docs directories of
  2521. the major Linux FTP sites.
  2522.  
  2523. The HTML version of this FAQ is available as
  2524. \courier{http://www.cl.cam.ac.uk/users/iwj10/linux-faq/index.html\}
  2525. and is mirrored at \fn www.li.org and other sites.
  2526.  
  2527. The USENET version is posted regularly to \newsgroup
  2528. comp.os.linux.announce, \newsgroup comp.os.linux.answers, \newsgroup
  2529. comp.answers and \newsgroup news.answers.
  2530.  
  2531.  
  2532. \question 11feb  Authorship and acknowledgements
  2533.  
  2534. This FAQ was compiled by Ian Jackson \email ijackson@gnu.ai.mit.edu,
  2535. with assistance and comments from others too numerous to mention.
  2536.  
  2537. Special thanks are due to Matt Welsh, who moderated \newsgroup
  2538. comp.os.linux.announce and \newsgroup comp.os.linux.answers, used to
  2539. coordinate the HOWTOs and has written substantial portions of many of
  2540. them, to Greg Hankins, who currently coordinates the HOWTOS, to Lars
  2541. Wirzenius, who currently moderates \fn comp.os.linux.announce, and to
  2542. Marc-Michel Corsini, who wrote the original Linux FAQ.
  2543.  
  2544. Thanks also to the many people who have sent comments and suggestions;
  2545. they are too numerous to list here, but their input has been
  2546. invaluable.
  2547.  
  2548. Last but not least, thanks to Linus Torvalds and the other
  2549. contributors to Linux for giving us something to write about !
  2550.  
  2551.  
  2552. \question 30oct:faqcopyright  Disclaimer and Copyright
  2553.  
  2554. Note that this document is provided as is.  The information in it is
  2555. \italic{not\} warranted to be correct; you use it at your own risk.
  2556.  
  2557. Linux Frequently Asked Questions with Answers is Copyright 1994, 1995,
  2558. 1996 by Ian Jackson \email ijackson@gnu.ai.mit.edu.
  2559.  
  2560. It may be reproduced and distributed in its entirety (including this
  2561. authorship, copyright and permission notice) provided that either:
  2562. \call startlist
  2563. \call item
  2564. the distribution is not commercial (commercial means any
  2565. situation in which you benefit financially - directly or indirectly
  2566. such as by inclusion in a publication which carries commercial
  2567. advertising), or
  2568. \call item
  2569. the distribution is in machine-readable form (ie, a form intended to
  2570. be easily processed by a computer).
  2571. \call endlist
  2572. Note that this restriction is not intended to prohibit charging for
  2573. the service of printing or copying a document supplied by your
  2574. customer.
  2575.  
  2576. Any distribution of a partial copy or extract, a translation or a
  2577. derivative work must be approved by me before distribution.  Email me
  2578. - I'll probably be happy to oblige !
  2579.  
  2580. Exceptions to these rules may be granted, and I shall be happy to
  2581. answer any questions about this copyright --- write to Ian Jackson,
  2582. Churchill College, Cambridge, CB3 0DS, United Kingdom or email \email
  2583. ijackson@gnu.ai.mit.edu.  These restrictions are here to protect the
  2584. contributors, not to restrict you as educators and learners.
  2585.  
  2586. Ian Jackson asserts the right to be identified as the author of this
  2587. work, and claims the moral rights of paternity and integrity, in
  2588. accordance with the Copyright, Designs and Patents Act, 1988.
  2589.  
  2590. \copyto POST
  2591. END-OF-PORTION
  2592. echo posting part 1 ...
  2593. inews -h <linux-faq.post-part1
  2594. sleep 20
  2595. echo posting part 2 ...
  2596. inews -h <linux-faq.post-part2
  2597. \endcopy
  2598. \comment Here it ends!
  2599.