home *** CD-ROM | disk | FTP | other *** search
/ Danny Amor's Online Library / Danny Amor's Online Library - Volume 1.iso / html / faqs / faq / linux / faq.part1 < prev    next >
Encoding:
Text File  |  1995-07-25  |  47.7 KB  |  1,099 lines

  1. Subject: Linux Frequently Asked Questions with Answers (FAQ: 1/2)
  2. Newsgroups: comp.os.linux.announce,comp.os.linux.help,comp.answers,news.answers
  3. From: ijackson@nyx.cs.du.edu (Ian Jackson)
  4. Date: Sun, 30 Oct 1994 16:24:24 GMT
  5.  
  6. Archive-Name: linux/faq/part1
  7. Last-Modified: 30 Oct 1994
  8.  
  9. -----BEGIN PGP SIGNED MESSAGE-----
  10.  
  11. This is the list of Frequently Asked Questions about Linux, the free Unix
  12. for 386/486/586 [see Q1.1 `What is Linux ?' for more details].  It should
  13. be read in conjunction with the HOWTO documents, which are available in
  14.  
  15. * ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
  16. * tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
  17. * sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO
  18.  
  19. and mirror sites thereof -- see Q2.5 `Where can I get Linux material by
  20. FTP ?'.  See Q2.1 `Where can I get the HOWTOs and other documentation ?'
  21. for a list of the HOWTOs and more information.  The INFO-SHEET and
  22. META-FAQ, found in the same place, also list other sources of Linux
  23. information.
  24.  
  25. The Linux Documentation Project documentation is available on
  26. sunsite.unc.edu in /pub/Linux/docs/LDP.  These documents (more are in
  27. preparation) are invaluable to the newcomer or for use as a reference
  28. work.
  29.  
  30. Please check out these documents and this FAQ, especially Q12.1 `You still
  31. haven't answered my question !', before posting your question to the
  32. newsgroup comp.os.linux.help.
  33.  
  34. See Q13.2 `Formats in which this FAQ is available' for details of where to
  35. get the PostScript, Emacs Info, HTML (WWW) and plain ASCII versions of
  36. this document.
  37.  
  38. You can skip to a particular question by searching for `Question n.n'.
  39.  
  40. Note that this posting has been split into two parts because of its size.
  41.  
  42. A new version of this document appears approximately monthly.  If this
  43. copy is more than a month old it may be out of date.
  44.  
  45. ===============================================================================
  46.  
  47. Index
  48.  
  49.  Section 1.  Introduction and General Information
  50.  Q1.1        What is Linux ?
  51.  Q1.2        What software does it support ?
  52.  Q1.3        Does it run on my computer ?  What hardware is supported ?
  53.  Q1.4        What ports to other processors are there ?
  54.  Q1.5        How much hard disk space does Linux need ?
  55.  Q1.6        Is Linux PD ?  Copyrighted ?
  56.  
  57.  Section 2.  Network sources and resources
  58.  Q2.1        Where can I get the HOWTOs and other documentation ?
  59.  Q2.2        Where should I look on the World Wide Web for Linux stuff ?
  60.  Q2.3        What newsgroups are there for Linux ?
  61.  Q2.4        How do I install Linux ?
  62.  Q2.5        Where can I get Linux material by FTP ?
  63.  Q2.6        I don't have FTP access.  Where do I get Linux ?
  64.  Q2.7        I don't have Usenet access.  Where do I get information ?
  65.  Q2.8        What's this mailing list thing at niksula.hut.fi ?
  66.  Q2.9        Are the newsgroups archived anywhere ?
  67.  
  68.  Section 3.  Compatibility with other operating systems
  69.  Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
  70.  Q3.2        How do I access files on my DOS partition or floppy ?
  71.  Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
  72.  Q3.4        Can I access OS/2 HPFS partitions from Linux ?
  73.  Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
  74.  Q3.6        Can I run Microsoft Windows programs under Linux ?
  75.  Q3.7        How can I boot Linux from OS/2's Boot Manager ?
  76.  Q3.8        How can I share a swap partition between Linux and MS Windows ?
  77.  
  78.  Section 4.  Linux's handling of filesystems, disks and drives
  79.  Q4.1        How can I undelete files ?
  80.  Q4.2        Is there a defragmenter for ext2fs etc. ?
  81.  Q4.3        How do I format and create a filesystem on a floppy ?
  82.  Q4.4        I get nasty messages about inodes, blocks, and the suchlike
  83.  Q4.5        My swap area isn't working.
  84.  Q4.6        How do I remove LILO so my system boots DOS again ?
  85.  Q4.7        Why can't I use fdformat except as root ?
  86.  Q4.8        Is there something like Stacker or Doublespace for Linux ?
  87.  Q4.9        My ext2fs partitions are checked each time I reboot.
  88.  Q4.10       I have a huge /proc/kcore !  Can I delete it ?
  89.  Q4.11       My AHA1542C doesn't work with Linux.
  90.  
  91.  Section 5.  Porting, compiling and obtaining programs
  92.  Q5.1        What is ld.so and where do I get it ?
  93.  Q5.2        Has anyone ported / compiled / written XXX for Linux ?
  94.  Q5.3        How do I port XXX to Linux ?
  95.  Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
  96.  Q5.5        What does gcc -O6 do ?
  97.  Q5.6        Where are <linux/*.h> and <asm/*.h> ?
  98.  Q5.7        I get errors when I try to compile the kernel.
  99.  Q5.8        How do I make a shared library ?
  100.  Q5.9        How do I make my executables smaller ?
  101.  
  102.  Section 6.  Solutions to common miscellaneous problems
  103.  Q6.1        Setuid scripts don't seem to work.
  104.  Q6.2        Free memory as reported by free keeps shrinking.
  105.  Q6.3        When I add more memory it slows to a crawl.
  106.  Q6.4        Some programs (e.g. xdm) won't let me log in.
  107.  Q6.5        Some programs let me log in with no password.
  108.  Q6.6        My machine runs very slowly when I run GCC / X / ...
  109.  Q6.7        I can only log in as root.
  110.  Q6.8        My screen is all full of weird characters instead of letters.
  111.  Q6.9        I have screwed up my system and can't log in to fix it.
  112.  Q6.10       Emacs just dumps core.
  113.  Q6.11       I've discovered a huge security hole in rm !
  114.  Q6.12       lpr and/or lpd aren't working.
  115.  
  116.  Section 7.  How do I do this or find out that ... ?
  117.  Q7.1        How can I get scrollback in text mode ?
  118.  Q7.2        How do I switch virtual consoles ?  How do I enable them ?
  119.  Q7.3        How do I set the timezone ?
  120.  Q7.4        What version of Linux and what machine name am I using ?
  121.  Q7.5        How can I enable or disable core dumps ?
  122.  Q7.6        How do I upgrade/recompile my kernel ?
  123.  Q7.7        Can I have more than 3 serial ports by sharing interrupts ?
  124.  Q7.8        How do I make a bootable floppy ?
  125.  Q7.9        How do I remap my keyboard to UK, French, etc. ?
  126.  Q7.10       How do I get NUM LOCK to default to on ?
  127.  
  128.  Section 8.  Miscellaneous information and questions answered
  129.  Q8.1        What is a .gz file ? And a .tgz ? And ... ?
  130.  Q8.2        What does VFS stand for ?
  131.  Q8.3        What is a BogoMip ?
  132.  Q8.4        What is the Linux Journal and where can I get it ?
  133.  Q8.5        How many people use Linux ?
  134.  Q8.6        How should I pronounce Linux ?
  135.  
  136.  Section 9.  Frequently encountered error messages
  137.  Q9.1        During linking I get Undefined symbol _mcount
  138.  Q9.2        lp1 on fire
  139.  Q9.3        INET: Warning: old style ioctl(IP_SET_DEV) called!
  140.  Q9.4        ld: unrecognized option '-m486'
  141.  Q9.5        GCC says Internal compiler error
  142.  Q9.6        make says Error 139
  143.  Q9.7        shell-init: permission denied when I log in.
  144.  Q9.8        No utmp entry.  You must exec ... when I log in.
  145.  Q9.9        Warning - bdflush not running
  146.  Q9.10       Warning: obsolete routing request made.
  147.  Q9.11       EXT2-fs: warning: mounting unchecked filesystem
  148.  Q9.12       EXT2-fs warning: maximal count reached
  149.  Q9.13       EXT2-fs warning: checktime reached
  150.  Q9.14       df says Cannot read table of mounted filesystems
  151.  Q9.15       fdisk says Partition X has different physical/logical ...
  152.  Q9.16       fdisk: Partition 1 does not start on cylinder boundary
  153.  Q9.17       fdisk says cannot use nnn sectors of this partition
  154.  Q9.18       fdisk says partition n has an odd number of sectors
  155.  Q9.19       mtools says cannot initialise drive XYZ
  156.  
  157.  Section 10. The X Window System
  158.  Q10.1       Does Linux support X Windows ?
  159.  Q10.2       Where can I get an Xconfig for my video card and monitor ?
  160.  Q10.3       xterm logins show up strangely in who, finger
  161.  Q10.4       I can't get X Windows to work right.
  162.  
  163.  Section 11. Questions applicable to very out-of-date software
  164.  Q11.1       How can I have more than 16Mb of swap ?
  165.  Q11.2       GCC sometimes uses huge amounts of virtual memory and thrashes
  166.  Q11.3       My keyboard goes all funny after I switch VC's.
  167.  
  168.  Section 12. How to get further assistance
  169.  Q12.1       You still haven't answered my question !
  170.  Q12.2       What to put in a posting to comp.os.linux.help
  171.  
  172.  Section 13. Administrative information and acknowledgements
  173.  Q13.1       Feedback is invited
  174.  Q13.2       Formats in which this FAQ is available
  175.  Q13.3       Authorship and acknowledgements
  176.  Q13.4       Disclaimer and Copyright
  177.  
  178. ===============================================================================
  179.  
  180. Section 1.  Introduction and General Information
  181.  
  182.  Q1.1        What is Linux ?
  183.  Q1.2        What software does it support ?
  184.  Q1.3        Does it run on my computer ?  What hardware is supported ?
  185.  Q1.4        What ports to other processors are there ?
  186.  Q1.5        How much hard disk space does Linux need ?
  187.  Q1.6        Is Linux PD ?  Copyrighted ?
  188.  
  189. - -----------------------------------------------------------------------------
  190.  
  191. Question 1.1.  What is Linux ?
  192.  
  193. Linux is a Unix clone written from scratch by Linus Torvalds with
  194. assistance from a loosely-knit team of hackers across the Net.  It aims
  195. towards POSIX compliance.
  196.  
  197. It has all the features you would expect in a modern fully-fledged Unix,
  198. including true multitasking, virtual memory, shared libraries, demand
  199. loading, shared copy-on-write executables, proper memory management and
  200. TCP/IP networking.
  201.  
  202. It runs mainly on 386/486/586-based PCs, using the hardware facilities of
  203. the 386 processor family (TSS segments et al) to implement these features.
  204. Ports to other architectures are underway [Q1.4 `What ports to other
  205. processors are there ?'].
  206.  
  207. See the Linux INFO-SHEET [Q2.1 `Where can I get the HOWTOs and other
  208. documentation ?'] for more details.
  209.  
  210. The Linux kernel is distributed under the GNU General Public License - see
  211. Q1.6 `Is Linux PD ?  Copyrighted ?' for more details.
  212.  
  213. - -----------------------------------------------------------------------------
  214.  
  215. Question 1.2.  What software does it support ?
  216.  
  217. Linux has GCC, Emacs, X-Windows, all the standard Unix utilities, TCP/IP
  218. (including SLIP and PPP) and all the hundreds of programs that people have
  219. compiled or ported for it.
  220.  
  221. There is a DOS emulator [Q3.1 `Can Linux coexist with DOS ?  OS/2 ?
  222. 386BSD ?  Minix ?'].  Work is progressing on an iBCS2 (Intel Binary
  223. Compatibility Standard) emulator for SVR4 ELF and SVR3.2 COFF binaries and
  224. an emulator for Microsoft Windows binaries [Q3.6 `Can I run Microsoft
  225. Windows programs under Linux ?'].
  226.  
  227. For more information see the INFO-SHEET, which is one of the the HOWTOs
  228. [Q2.1 `Where can I get the HOWTOs and other documentation ?'].  See also
  229. Q5.3 `How do I port XXX to Linux ?'.
  230.  
  231. Some companies have commercial software available, including Motif.  They
  232. announce their availability in comp.os.linux.announce --- try searching
  233. the archives [Q2.9 `Are the newsgroups archived anywhere ?'].
  234.  
  235. - -----------------------------------------------------------------------------
  236.  
  237. Question 1.3.  Does it run on my computer ?  What hardware is supported ?
  238.  
  239. You need a 386, 486 or 586, with at least 2Mb of RAM and a single floppy,
  240. to try it out.  To do anything useful more RAM and a hard disk are
  241. required.
  242.  
  243. VESA local bus and PCI are both supported.  A driver for the NCR SCSI chip
  244. in many PCI machines is included in current alpha test release kernels.
  245.  
  246. There are problems with machines using MCA (IBM's proprietary bus), mainly
  247. to do with the hard disk controller.  There is a developers' release for
  248. PS/2 ESDI drives on invaders.dcrl.nd.edu in /pub/misc/linux.  Certain
  249. kinds of SCSI controllers also work, I understand.  Work is in progress to
  250. create a suitable version of the Slackware distribution.  I'm afraid I
  251. don't have any further details; you could try asking Arindam Banerji
  252. <axb@defender.dcrl.nd.edu>.
  253.  
  254. Linux is reported to run on 386 family based laptops, with X on most of
  255. them.
  256.  
  257. For details of exactly which PC's, video cards, disk controllers, etc.
  258. work see the INFO-SHEET and the Hardware HOWTO [Q2.1 `Where can I get the
  259. HOWTOs and other documentation ?'].
  260.  
  261. Linux will never run on a 286, because it uses task-switching and memory
  262. management facilities only found on 386 family processors.
  263.  
  264. - -----------------------------------------------------------------------------
  265.  
  266. Question 1.4.  What ports to other processors are there ?
  267.  
  268. A project has been underway for around two years to port Linux to suitable
  269. 68000-series based systems such as Amigas and Ataris.  This has now
  270. reached beta test quality, but still lacks networking support and an X
  271. server.  There is a 680X0 channel on the Linux Activists mailserver [Q2.8
  272. `What's this mailing list thing at niksula.hut.fi ?'].
  273.  
  274. Work has just been started on a port to the PowerPC.  Currently this will
  275. be based on the PowerMAC architecture.  Again, don't post asking about it
  276. unless you have experience to offer, and don't hold your breath.
  277.  
  278. Jim Paradis <paradis@sousa.amt.ako.dec.com> or <jrp@world.std.com> is
  279. working on a port to the 64-bit DEC AXP (the Alpha).  This can currently
  280. boot from a floppy disk or disk image loaded into a ramdisk at boot time.
  281. Disk drivers are not yet available.  Please email him of you have access
  282. to an ISA or EISA-based Alpha AXP and wish to contribute to the project,
  283. or have access to another class of Alpha and are willing to write drivers.
  284.  
  285. Ralf Baechle is working on a port to the MIPS, initially for the R4600 on
  286. Deskstation Tyne machines.  The Linux/MIPS FAQ is available on the WWW and
  287. in the MIPS port area on ftp.waldorf-gmbh.de in /pub/linux/mips.  There is
  288. also a MIPS channel on the Linux Activists mailserver.  Interested people
  289. may mail their questions and offers of assistance to
  290. <linux@waldorf-gmbh.de>.
  291.  
  292. None of these ports will be capable of running Linux/386 binaries.
  293.  
  294. - -----------------------------------------------------------------------------
  295.  
  296. Question 1.5.  How much hard disk space does Linux need ?
  297.  
  298. 10Mb for a very minimal installation, suitable for trying it out and not
  299. much else.
  300.  
  301. You can squeeze a more complete installation including X Windows into
  302. 80Mb.  Installating the whole of Slackware 1.2 takes around 200Mb,
  303. including some space for user files and spool areas.
  304.  
  305. - -----------------------------------------------------------------------------
  306.  
  307. Question 1.6.  Is Linux PD ?  Copyrighted ?
  308.  
  309. The Linux kernel copyright belongs to Linus Torvalds.  He has placed it
  310. under the GNU General Public Licence, which basically means that you may
  311. freely copy, change and distribute it, but that you may not impose any
  312. restrictions on further distribution, and that you must make the source
  313. code available.
  314.  
  315. Full details are in the file COPYING in the Linux kernel sources (probably
  316. in /usr/src/linux on your system).
  317.  
  318. The licences of the utilities and programs which come with the
  319. installations vary; much of the code is from the GNU Project at the Free
  320. Software Foundation, and is also under the GPL.
  321.  
  322. Note that discussion about the merits or otherwise of the GPL should be
  323. posted to gnu.misc.discuss and not to the comp.os.linux groups.
  324.  
  325. ===============================================================================
  326.  
  327. Section 2.  Network sources and resources
  328.  
  329.  Q2.1        Where can I get the HOWTOs and other documentation ?
  330.  Q2.2        Where should I look on the World Wide Web for Linux stuff ?
  331.  Q2.3        What newsgroups are there for Linux ?
  332.  Q2.4        How do I install Linux ?
  333.  Q2.5        Where can I get Linux material by FTP ?
  334.  Q2.6        I don't have FTP access.  Where do I get Linux ?
  335.  Q2.7        I don't have Usenet access.  Where do I get information ?
  336.  Q2.8        What's this mailing list thing at niksula.hut.fi ?
  337.  Q2.9        Are the newsgroups archived anywhere ?
  338.  
  339. - -----------------------------------------------------------------------------
  340.  
  341. Question 2.1.  Where can I get the HOWTOs and other documentation ?
  342.  
  343. Look in the following places, and on sites that mirror them.
  344.  
  345. * ftp.funet.fi (128.214.6.100) : /pub/OS/Linux/doc/HOWTO
  346. * tsx-11.mit.edu (18.172.1.2) : /pub/linux/docs/HOWTO
  347. * sunsite.unc.edu (152.2.22.81) : /pub/Linux/docs/HOWTO
  348.  
  349. For a complete list of Linux FTP sites see Q2.5 `Where can I get Linux
  350. material by FTP ?'.
  351.  
  352. If you don't have access to FTP try using the FTP-by-mail servers at
  353. ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
  354. ftp-mailer@informatik.tu-muenchen.de.
  355.  
  356. A complete list of HOWTO's is available in the file HOWTO.INDEX in the
  357. docs/HOWTO directory at the FTP sites, but here is a (possibly incomplete)
  358. list:
  359.  
  360.      Linux INFO-SHEET                        Linux META-FAQ
  361.      BUPS HOWTO (regarding the Back UPS).    Busmouse HOWTO
  362.      CDROM HOWTO                             Distribution HOWTO
  363.      DOSEMU HOWTO                            Ethernet HOWTO
  364.      Ftape HOWTO                             Hardware HOWTO
  365.      Installation HOWTO                      Japanese Extensions HOWTO
  366.      Keystroke HOWTO                         Mail HOWTO
  367.      MGR HOWTO                               NET-2 HOWTO
  368.      News HOWTO                              Printing HOWTO
  369.      SCSI HOWTO                              Sound HOWTO
  370.      Term HOWTO                              Tips HOWTO
  371.      UUCP HOWTO                              XFree86 HOWTO
  372. More of these documents are always in preparation.  You should check in
  373. nearby directories on the FTP sites if you can't find the answer in one of
  374. the HOWTOs.  There are also a few mini-HOWTOs on sunsite.unc.edu in the
  375. /pub/Linux/docs/HOWTO/mini directory.
  376.  
  377. The HOWTO.INDEX also contains information on how to write a new HOWTO.
  378.  
  379. The HOWTOs are coordinated by Matt Welsh, <mdw@sunsite.unc.edu>.
  380.  
  381. The `books' produced by the Linux Documentation Project are available in
  382. /pub/Linux/docs/LDP on sunsite.unc.edu.  Please read them if you are new
  383. to Unix and Linux.  Here is a list of those released so far:
  384.  
  385. * The Linux Documentation Project manifesto
  386. * Installation and Getting Started Guide
  387. * The Kernel Hacker's Guide
  388. * Network Administration Guide
  389. * Linux System Administrator's Guide
  390.  
  391. - -----------------------------------------------------------------------------
  392.  
  393. Question 2.2.  Where should I look on the World Wide Web for Linux stuff ?
  394.  
  395. Matt Welsh maintains the Linux Documentation Project Home Page, at
  396. http://sunsite.unc.edu/mdw/linux.html.
  397.  
  398. This page refers to all the FAQs and HOWTOs, both those which are
  399. available in HTML (WWW) format, like this FAQ, and those which aren't.
  400.  
  401. - -----------------------------------------------------------------------------
  402.  
  403. Question 2.3.  What newsgroups are there for Linux ?
  404.  
  405. There are five international Usenet newsgroups devoted to Linux.
  406.  
  407. comp.os.linux.announce is the moderated announcements group; you should
  408. read this if you intend to use Linux.  Submissions for that group should
  409. be emailed to linux-announce@tc.cornell.edu.
  410.  
  411. comp.os.linux.help, comp.os.linux.development, comp.os.linux.admin and
  412. comp.os.linux.misc are also worth reading -- you may find that many common
  413. problems are too recent to find in this FAQ but are answered in the
  414. newsgroups.
  415.  
  416. Remember that since Linux is a Unix clone, most all of the material in
  417. comp.unix.* and comp.windows.x.* groups will be relevant.  Apart from
  418. hardware considerations, and some obscure or very technical low-level
  419. issues, you'll find that these groups are the right place to start.
  420.  
  421. Please read Q12.1 `You still haven't answered my question !' before
  422. posting, and make sure you post to the right newsgroup.  Crossposting is
  423. rarely a good idea.
  424.  
  425. See also Q2.7 `I don't have Usenet access.  Where do I get information ?'.
  426.  
  427. Other regional and local newsgroups also exist - you may find the traffic
  428. more manageable there.  The French Linux newsgroup is fr.comp.os.linux;
  429. The German one is de.comp.os.linux.  In Australia, try
  430. aus.computers.linux.
  431.  
  432. There may well be Linux groups local to your institution or area - check
  433. there first.
  434.  
  435. - -----------------------------------------------------------------------------
  436.  
  437. Question 2.4.  How do I install Linux ?
  438.  
  439. There are several pre-packaged releases of Linux available, including the
  440. MCC-Interim release, the TAMU release and the Slackware release.  Each
  441. contains the software you need to run Linux, ready to install and use.
  442. The exact details of which software is included and how to install them
  443. vary from release to release.
  444.  
  445. You should read the Installation HOWTO for more details on how to go about
  446. installing Slackware.  If you prefer a small, clean distribution to one
  447. with everything but the kitchen sink you might like to try the MCC-Interim
  448. release.
  449.  
  450. All of those releases are available via anonymous FTP from the Linux
  451. archive sites [Q2.5 `Where can I get Linux material by FTP ?'].  There are
  452. also a large number of other releases which are distributed less globally,
  453. which suit special local and national requirements (for example, better
  454. internationalisation support).
  455.  
  456. - -----------------------------------------------------------------------------
  457.  
  458. Question 2.5.  Where can I get Linux material by FTP ?
  459.  
  460. There are three main archive sites for Linux:
  461.  
  462. * ftp.funet.fi (Finland, 128.214.6.100) : /pub/OS/Linux
  463. * sunsite.unc.edu (US, 152.2.22.81) : /pub/Linux
  464. * tsx-11.mit.edu (US, 18.172.1.2) : /pub/linux
  465.  
  466. The MCC-Interim release is available from ftp.mcc.ac.uk (US, 130.88.200.7)
  467. in /pub/linux; the TAMU release is available from net.tamu.edu (US,
  468. 128.194.177.1) in /pub/linux.
  469.  
  470. The contents of these sites is mirrored (copied, usually approximately
  471. daily) by a number of other sites.  Please use one close to you -- that
  472. will be faster for you and easier on the network.
  473.  
  474. * src.doc.ic.ac.uk : /packages/Linux (UK)
  475. * sunacm.swan.ac.uk : /pub/Linux (UK)
  476. * ftp.ibp.fr : /pub/linux (France)
  477. * wuarchive.wustl.edu : /systems/linux (US)
  478. * mrcnext.cso.uiuc.edu : /pub/linux (US)
  479. * ftp.informatik.tu-muenchen.de : /pub/comp/os/linux (Germany)
  480. * ftp.ibr.cs.tu-bs.de : /pub/os/linux (Germany)
  481. * ftp.dfv.rwth-aachen.de : /pub/linux (Germany)
  482. * ftp.informatik.rwth-aachen.de : /pub/Linux (Germany)
  483. * bond.edu.au : /pub/OS/Linux (Australia)
  484. * monu1.cc.monash.edu.au : /pub/linux (Australia)
  485. * ftp.sun.ac.za : /pub/linux (South Africa)
  486.  
  487. Not all of these mirror all of the other `source' sites, and some have
  488. material not available on the `source' sites.
  489.  
  490. - -----------------------------------------------------------------------------
  491.  
  492. Question 2.6.  I don't have FTP access.  Where do I get Linux ?
  493.  
  494. The easiest thing is probably to find a friend with FTP access.  If there
  495. is a Linux users group near you they may be able to help.
  496.  
  497. If you have a reasonably good email connection you could try the
  498. FTP-by-mail servers at ftpmail@decwrl.dec.com, ftpmail@doc.ic.ac.uk or
  499. ftp-mailer@informatik.tu-muenchen.de.
  500.  
  501. Linux is also available via traditional mail on diskette, CD-ROM and tape.
  502. The Installation HOWTO, and the file /pub/Linux/docs/distributions on
  503. sunsite.unc.edu, contain information on these distributions.
  504.  
  505. You could also try Zane Healy <healyzh@holonet.net>'s list of Linux BBS's,
  506. which is posted regularly (1st and 15th of each month) to
  507. comp.os.linux.announce and occasionally to the Fidonet and RIME UNIX
  508. echoes.
  509.  
  510. - -----------------------------------------------------------------------------
  511.  
  512. Question 2.7.  I don't have Usenet access.  Where do I get information ?
  513.  
  514. Digests of postings to the comp.os.linux.* groups are available by
  515. subscribing to the bidirectional gateway at
  516. linux-*-request@news-digests.mit.edu, where * is one of announce,
  517. development, help, misc or admin.
  518.  
  519. You are strongly advised to subscribe to at least
  520. linux-announce-request@news-digests.mit.edu, as this carries important
  521. information and documentation about Linux.
  522.  
  523. Please remember to use the -request addresses for your subscription and
  524. unsubscription messages; mail to the other address is posted to the
  525. newsgroup !
  526.  
  527. - -----------------------------------------------------------------------------
  528.  
  529. Question 2.8.  What's this mailing list thing at niksula.hut.fi ?
  530.  
  531. It's a multi-channel mailing list, mainly used by the developers of Linux
  532. to talk about technical issues and future developments.  Most of the
  533. channels are not intended for new users to ask their questions on.
  534.  
  535. The ANNOUNCE channel is a digest of postings to comp.os.linux.announce,
  536. for the benefit of those without Usenet access.  However since
  537. niksula.hut.fi is slow and overloaded I'd recommend subscribing to the MIT
  538. digestifier instead [Q2.7 `I don't have Usenet access.  Where do I get
  539. information ?'].
  540.  
  541. There is also a NEWBIE channel where `no question is too stupid';
  542. unfortunately it seems that few of the experienced users read that
  543. channel, probably because of all the `stupid' questions !
  544.  
  545. If you want to subscribe to one or more of the channels at the
  546. multi-channel list, send an empty mail message to
  547. linux-activists-request@niksula.hut.fi and you'll receive the instructions
  548. for operating the list subscription software.
  549.  
  550. If you want to unsubscribe send a mail message like this
  551.   From: you@domain.org
  552.   To: linux-activists-request@niksula.hut.fi
  553.   Subject: irrelevant
  554.  
  555.   X-Mn-Admin: leave CHANNEL
  556. to leave a channel called CHANNEL.  Do *not* put an X-Mn-Key line in your
  557. message - that will cause it to be posted to the list.
  558.  
  559. Note that you *must* remember to unsubscribe *before* you change your
  560. email address, as due to a design flaw in the list server it is virtually
  561. impossible to get yourself unsubscribed after such a change.
  562.  
  563. - -----------------------------------------------------------------------------
  564.  
  565. Question 2.9.  Are the newsgroups archived anywhere ?
  566.  
  567. Yes.  ftp.funet.fi and tsx-11.mit.edu contain archives of both
  568. comp.os.linux.announce and the old group comp.os.linux, in their Linux
  569. areas.  The comp.os.linux.announce archives are mirrored from /usenet on
  570. src.doc.ic.ac.uk (which also contains another archive of comp.os.linux).
  571.  
  572. ===============================================================================
  573.  
  574. Section 3.  Compatibility with other operating systems
  575.  
  576.  Q3.1        Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
  577.  Q3.2        How do I access files on my DOS partition or floppy ?
  578.  Q3.3        Can I use my Stacked/DBLSPC/etc. DOS drive ?
  579.  Q3.4        Can I access OS/2 HPFS partitions from Linux ?
  580.  Q3.5        Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
  581.  Q3.6        Can I run Microsoft Windows programs under Linux ?
  582.  Q3.7        How can I boot Linux from OS/2's Boot Manager ?
  583.  Q3.8        How can I share a swap partition between Linux and MS Windows ?
  584.  
  585. - -----------------------------------------------------------------------------
  586.  
  587. Question 3.1.  Can Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?
  588.  
  589. Yes.  Linux uses the standard PC partitioning scheme, so it can share your
  590. disk with other operating systems.
  591.  
  592. Linux can read and write the files on your DOS and OS/2 FAT partitions and
  593. floppies using either the DOS filesystem type built into the kernel or
  594. mtools.  There is a DOS emulator (look on tsx-11.mit.edu in
  595. /pub/linux/ALPHA/dosemu) which can run DOS itself and some (but not all)
  596. DOS applications.
  597.  
  598. Linux can also access Minix and System V UFS filesystems, and can read
  599. (but not yet write) OS/2 HPFS and Amiga filesystems.
  600.  
  601. - -----------------------------------------------------------------------------
  602.  
  603. Question 3.2.  How do I access files on my DOS partition or floppy ?
  604.  
  605. Use the DOS filesystem, i.e. type, for example:
  606.         mkdir /dos
  607.         mount -t msdos -o conv=text,umask=022,uid=100,gid=100 /dev/hda3 /dos
  608. If it's a floppy, don't forget to umount it before ejecting it !
  609.  
  610. You can use the conv=text/binary/auto, umask=nnn, uid=nnn and gid=nnn
  611. options to control the automatic line-ending conversion, permissions and
  612. ownerships of the files in the DOS filesystem as they appear under Linux.
  613. If you mount your DOS filesystem by putting it in your /etc/fstab you can
  614. record the options (comma-separated) there, instead of defaults.
  615.  
  616. Alternatively you can use `mtools', available in both binary and source
  617. form on the FTP sites -- see Q2.5 `Where can I get Linux material by FTP
  618. ?'.
  619.  
  620. A kernel patch (known as the fd-patches) is available which allows
  621. floppies with nonstandard numbers of tracks and/or sectors to be used;
  622. this patch is included in the 1.1 alpha testing kernel series.
  623.  
  624. - -----------------------------------------------------------------------------
  625.  
  626. Question 3.3.  Can I use my Stacked/DBLSPC/etc. DOS drive ?
  627.  
  628. Not easily.  You can access them from within the DOS emulator [Q3.1 `Can
  629. Linux coexist with DOS ?  OS/2 ?  386BSD ?  Minix ?'], but not as a normal
  630. filesystem under Linux or using mtools.
  631.  
  632. - -----------------------------------------------------------------------------
  633.  
  634. Question 3.4.  Can I access OS/2 HPFS partitions from Linux ?
  635.  
  636. Yes, but it's only read-only at the moment.  To use it you must compile a
  637. kernel with support for it enabled [Q7.6 `How do I upgrade/recompile my
  638. kernel ?'].  Then you can mount it using the mount command, for example:
  639.         mkdir /hpfs
  640.         mount -t hpfs /dev/hda5 /hpfs
  641.  
  642. - -----------------------------------------------------------------------------
  643.  
  644. Question 3.5.  Can I access BSD FFS, SysV UFS, Mac, Amiga, etc filesystems ?
  645.  
  646. I'm told that there is an alpha test read-only Amiga filesystem on
  647. sunsite.unc.edu, probably in /pub/Linux/kernel/misc-patches/ffs-patch.
  648. Work may well be progressing on upgrading this to read-write for the 680x0
  649. Linux project.
  650.  
  651. The 1.1.x alpha test kernel series contains support for the UFS filesystem
  652. used by System V and Coherent.
  653.  
  654. There is no support for the rest of those yet; I have not heard of any
  655. recent work on providing some.
  656.  
  657. - -----------------------------------------------------------------------------
  658.  
  659. Question 3.6.  Can I run Microsoft Windows programs under Linux ?
  660.  
  661. Not yet.  There is a project, known as WINE, to build an MS Windows
  662. emulator for Linux, but it is not ready for users yet.  Don't ask about it
  663. unless you think you can contribute; look out for the status reports in
  664. comp.emulators.ms-windows.wine.
  665.  
  666. In the meantime if you need to run MS Windows programs your best bet is
  667. probably to reboot when you want to switch environments.  LILO (the Linux
  668. bootloader) has the facility for a boot menu --- see its documentation for
  669. more details.
  670.  
  671. - -----------------------------------------------------------------------------
  672.  
  673. Question 3.7.  How can I boot Linux from OS/2's Boot Manager ?
  674.  
  675. 1. Create a partition using OS/2's FDISK (Not Linux's fdisk).
  676.  
  677. 2. Format the partition under OS/2, either with FAT or HPFS.  This is so
  678. that OS/2 knows about the partition being formatted.
  679.  
  680. 3. Add the partition to the Boot Manager.
  681.  
  682. 4. Boot Linux, and create a filesystem on the partition using mkfs -t ext2
  683. or mke2fs.  At this point you may, if you like, use Linux's fdisk to
  684. change the partition type code of the new partition to type 83 (Linux
  685. Native) -- this may help some automated installation scripts find the
  686. right partition to use.
  687.  
  688. 5. Install Linux on the partition.
  689.  
  690. 6. Install LILO on the Linux partition -- NOT on the master boot record of
  691. the hard drive.  This installs LILO as a second-stage boot loader on the
  692. Linux partition itself, to start up the kernel specified in the LILO
  693. config file.  To do this you should put
  694.    boot = /dev/hda2
  695. (where /dev/hda2 is the *partition* you want to boot off) in your
  696. /etc/lilo/config or /etc/lilo.config file.
  697.  
  698. 7. Make sure that it is the Boot Manager partition that is marked active,
  699. so that you can use Boot Manager to choose what to boot.
  700.  
  701. - -----------------------------------------------------------------------------
  702.  
  703. Question 3.8.  How can I share a swap partition between Linux and MS Windows ?
  704.  
  705. See the Mini-HOWTO on the subject by H. Peter Anvin, <hpa@eecs.nwu.edu>.
  706. It is available on sunsite.unc.edu in /pub/Linux/docs.
  707.  
  708. ===============================================================================
  709.  
  710. Section 4.  Linux's handling of filesystems, disks and drives
  711.  
  712.  Q4.1        How can I undelete files ?
  713.  Q4.2        Is there a defragmenter for ext2fs etc. ?
  714.  Q4.3        How do I format and create a filesystem on a floppy ?
  715.  Q4.4        I get nasty messages about inodes, blocks, and the suchlike
  716.  Q4.5        My swap area isn't working.
  717.  Q4.6        How do I remove LILO so my system boots DOS again ?
  718.  Q4.7        Why can't I use fdformat except as root ?
  719.  Q4.8        Is there something like Stacker or Doublespace for Linux ?
  720.  Q4.9        My ext2fs partitions are checked each time I reboot.
  721.  Q4.10       I have a huge /proc/kcore !  Can I delete it ?
  722.  Q4.11       My AHA1542C doesn't work with Linux.
  723.  
  724. - -----------------------------------------------------------------------------
  725.  
  726. Question 4.1.  How can I undelete files ?
  727.  
  728. In general, this is very hard to do on Unices because of their
  729. multitasking nature.  Undelete functionality for the ext2fs is being
  730. worked on, but don't hold your breath.
  731.  
  732. There are a number of packages available that work by providing new
  733. commands for deletion and sometimes copying that move deleted files into a
  734. `wastebasket' directory instead; they can then be recovered until cleaned
  735. out automatically by background processing.
  736.  
  737. Alternatively you can search the raw disk device which holds the
  738. filesystem in question.  This is hard work, and you will need to be root
  739. to do this.
  740.  
  741. - -----------------------------------------------------------------------------
  742.  
  743. Question 4.2.  Is there a defragmenter for ext2fs etc. ?
  744.  
  745. Yes.  There is a Linux filesystem defragmenter for minix, old-style, ext2,
  746. and xia filesystems available on sunsite.unc.edu in
  747. system/Filesystems/defrag-0.6.tar.gz.
  748.  
  749. Users of the ext2 filesystem can probably do without defrag since ext2
  750. contains extra code to keep fragmentation reduced even in very full
  751. filesystems.
  752.  
  753. - -----------------------------------------------------------------------------
  754.  
  755. Question 4.3.  How do I format and create a filesystem on a floppy ?
  756.  
  757. For a 3.5 inch high density floppy:
  758.    fdformat /dev/fd0H1440
  759.    mkfs -t ext2 -m 0 /dev/fd0H1440 1440
  760. For a 5.25 inch floppy use fd0h1200 and 1200 as appropriate.  For the `B'
  761. drive use fd1 instead of fd0.  Full details of which floppy devices do
  762. what can be found in the Linux Device List [Q2.1 `Where can I get the
  763. HOWTOs and other documentation ?'].  If you don't have the fsutils package
  764. you'll have to run mke2fs instead of mkfs -t ext2.  The -m 0 option tells
  765. mkfs.ext2 not to reserve any space on the disk for the superuser ---
  766. usually the last 10% is reserved for root.
  767.  
  768. The first command low-level formats the floppy; the second creates an
  769. empty filesystem on it.  After doing this you can mount the floppy like a
  770. hard disk partition and simply cp and mv files, etc.
  771.  
  772. - -----------------------------------------------------------------------------
  773.  
  774. Question 4.4.  I get nasty messages about inodes, blocks, and the suchlike
  775.  
  776. You probably have a corrupted filesystem, probably caused by not shutting
  777. Linux down properly before turning off the power or resetting.  You need
  778. to use a recent shutdown program to do this --- for example, the one
  779. included in the util-linux package, available on sunsite and tsx-11.
  780.  
  781. If you're lucky the program fsck (or e2fsck or xfsck as appropriate if you
  782. don't have the fsutils package) will be able to repair your filesystem; if
  783. you're unlucky the filesystem is trashed and you'll have to reinitialise
  784. it with mkfs (or mke2fs, mkxfs etc.) it and restore from a backup.
  785.  
  786. NB don't try to check a filesystem that's mounted read-write - this
  787. includes the root partition if you don't see
  788.    VFS: mounted root ... read-only
  789. at boot time.
  790.  
  791. - -----------------------------------------------------------------------------
  792.  
  793. Question 4.5.  My swap area isn't working.
  794.  
  795. When you boot (or enable swapping manually) you should see
  796.         Adding Swap: NNNNk swap-space
  797.  
  798. If you don't see any messages at all you are probably missing swapon -av
  799. (the command to enable swapping) in your /etc/rc or /etc/rc.local (the
  800. system startup scripts), or have forgotten to make the right entry in
  801. /etc/fstab:
  802.         /dev/hda2       none       swap       sw
  803. for example.
  804.  
  805. If you see
  806.         Unable to find swap-space signature
  807. you have forgotten to run mkswap.  See the manpage for details; it works
  808. much like mkfs.
  809.  
  810. Check the Installation HOWTO for detailed instructions of how to set up a
  811. swap area.
  812.  
  813. - -----------------------------------------------------------------------------
  814.  
  815. Question 4.6.  How do I remove LILO so my system boots DOS again ?
  816.  
  817. Using DOS (MS-DOS 5.0 or later, or OS/2), type FDISK /MBR.  This will
  818. restore a standard MS-DOS Master Boot Record.  If you have DR-DOS 6.0, go
  819. into FDISK in the normal way and then select the `Re-write Master Boot
  820. Record' option.
  821.  
  822. If you don't have DOS 5 or DR-DOS you need to have the boot sector that
  823. LILO saved when you first installed it.  You did keep that file, didn't
  824. you ?  It's probably called boot.0301 or some such.  Type
  825.    dd if=boot.0301 of=/dev/hda bs=445 count=1
  826. (or sda if you're using a SCSI disk).  This may also wipe out your
  827. partition table, so beware !  If you're desperate, you could use
  828.    dd if=/dev/zero of=/dev/hda bs=512 count=1
  829. which will erase your partition table and boot sector completely: you can
  830. then reformat the disk using your favourite software; however this will
  831. render the contents of your disk inaccessible --- you'll lose it all
  832. unless you're an expert.
  833.  
  834. Note that the DOS MBR boots whichever (single!) partition is flagged as
  835. `active'; you may need to use fdisk to set and clear the active flags on
  836. partitions appropriately.
  837.  
  838. - -----------------------------------------------------------------------------
  839.  
  840. Question 4.7.  Why can't I use fdformat except as root ?
  841.  
  842. The system call to format a floppy may only be done as root, regardless of
  843. the permissions of /dev/fd0*.  If you want any user to be able to format a
  844. floppy try getting the fdformat2 program; this works around the problems
  845. by being setuid to root.
  846.  
  847. - -----------------------------------------------------------------------------
  848.  
  849. Question 4.8.  Is there something like Stacker or Doublespace for Linux ?
  850.  
  851. Currently none of the Linux filesystems can do compression in the
  852. filesystem.
  853.  
  854. There is a transparently uncompressing C library, which is a drop-in
  855. replacement for the standard C library.  It allows programs to read
  856. compressed (ie, GNU zipped) files as if they were not compressed.  You
  857. install it, and then you can compress files using gzip and have programs
  858. still find them.  Look on sunsite.unc.edu in /pub/Linux/libs.  The author
  859. is Alain Knaff <Alain.Knaff@imag.fr>.
  860.  
  861. There is a compressing block device driver that can provide
  862. filesystem-independant on the fly disk compression in the kernel.  It is
  863. called `DouBle'.  There is a source only distribution on sunsite.unc.edu
  864. in /pub/Linux/utils/compress; the auther is Jean-Marc Verbavatz
  865. <jmv@receptor.mgh.harvard.edu>.  Note that since this compresses inodes
  866. (administrative information) and directories as well as file contents any
  867. corruption is quite likely to be serious.
  868.  
  869. There is also a package available called tcx (Transparently Compressed
  870. Executables) which allows you to keep infrequently used executables
  871. compressed and only uncompress them temporarily while you use them.
  872. You'll find it on the Linux FTP sites [Q2.5 `Where can I get Linux
  873. material by FTP ?']; it was also announced in comp.os.linux.announce.
  874. Note - this is not the same as gzexe, which is an inferior implementation
  875. of the same concept.
  876.  
  877. - -----------------------------------------------------------------------------
  878.  
  879. Question 4.9.  My ext2fs partitions are checked each time I reboot.
  880.  
  881. See Q9.11 `EXT2-fs: warning: mounting unchecked filesystem'.
  882.  
  883. - -----------------------------------------------------------------------------
  884.  
  885. Question 4.10.  I have a huge /proc/kcore !  Can I delete it ?
  886.  
  887. None of the files in /proc are really there - they're all "pretend" files
  888. made up by the kernel, to give you information about the system, and don't
  889. take up any hard disk space.
  890.  
  891. /proc/kcore is like an "alias" for the memory in your computer; its size
  892. is the same as the amount of RAM you have, and if you ask to read it as a
  893. file the kernel does memory reads.
  894.  
  895. - -----------------------------------------------------------------------------
  896.  
  897. Question 4.11.  My AHA1542C doesn't work with Linux.
  898.  
  899. The option to allow disks with more than 1024 cylinders is only required
  900. as a workaround for a DOS misfeature and should be turned *off* under
  901. Linux.  For older Linux kernels you need to turn off most of the "advanced
  902. BIOS" options - all but the one about scanning the bus for bootable
  903. devices.
  904.  
  905. ===============================================================================
  906.  
  907. Section 5.  Porting, compiling and obtaining programs
  908.  
  909.  Q5.1        What is ld.so and where do I get it ?
  910.  Q5.2        Has anyone ported / compiled / written XXX for Linux ?
  911.  Q5.3        How do I port XXX to Linux ?
  912.  Q5.4        Can I use code or a compiler compiled for a 486 on my 386 ?
  913.  Q5.5        What does gcc -O6 do ?
  914.  Q5.6        Where are <linux/*.h> and <asm/*.h> ?
  915.  Q5.7        I get errors when I try to compile the kernel.
  916.  Q5.8        How do I make a shared library ?
  917.  Q5.9        How do I make my executables smaller ?
  918.  
  919. - -----------------------------------------------------------------------------
  920.  
  921. Question 5.1.  What is ld.so and where do I get it ?
  922.  
  923. ld.so is the new dynamic library loader.  Each binary using shared
  924. libraries used to have about 3K of start-up code to find and load the
  925. shared libraries.  Now that code has been put in a special shared library,
  926. /lib/ld.so, where all binaries can look for it, so that it wastes less
  927. disk space, and can be upgraded more easily.
  928.  
  929. It can be obtained from tsx-11.mit.edu in /pub/linux/packages/GCC and
  930. mirror sites thereof.  The latest version at the time of writing is
  931. ld.so.1.4.4.tar.gz.
  932.  
  933. - -----------------------------------------------------------------------------
  934.  
  935. Question 5.2.  Has anyone ported / compiled / written XXX for Linux ?
  936.  
  937. First, look in the Linux Software Map (LSM) --- it's in the docs directory
  938. on sunsite.unc.edu, and on the other FTP sties.
  939.  
  940. Check the FTP sites (see Q2.5 `Where can I get Linux material by FTP ?')
  941. first --- search the find-ls or INDEX files for appropriate strings.
  942. Check the Linux Projects Map (LPM), on ftp.ix.de in
  943. /pub/Linux/docs/Projects-Map.gz.
  944.  
  945. If you don't find anything, you could either download the sources to the
  946. program yourself and compile them -- see Q5.3 `How do I port XXX to Linux
  947. ?' -- or, if it's a large package which may require some porting, post a
  948. message to the newsgroup.
  949.  
  950. If you compile a largeish program please upload it to one or more of the
  951. FTP sites and post a message to comp.os.linux.announce (submit your
  952. posting to <linux-announce@tc.cornell.edu>).
  953.  
  954. If you're looking for an application-type program the chances are someone
  955. has already written a free verson.  Try reading the FAQ in
  956. comp.sources.wanted for instructions on how to find sources.
  957.  
  958. You should also check the Projects-FAQ, available in
  959. /pub/Linux/docs/faqs/Projects-FAQ on sunsite.unc.edu.
  960.  
  961. - -----------------------------------------------------------------------------
  962.  
  963. Question 5.3.  How do I port XXX to Linux ?
  964.  
  965. In general Unix programs need very little porting.  Simply follow the
  966. installation instructions.  If you don't know and don't know how to find
  967. out the answers to some of the questions asked during or by the
  968. installation procedure you can guess, but this tends to produce buggy
  969. programs.  In this case you're probably better off asking someone else to
  970. do the port.
  971.  
  972. If you have a BSD-ish program you should try using -I/usr/include/bsd and
  973. - -lbsd on the appropriate parts of the compilation lines.
  974.  
  975. - -----------------------------------------------------------------------------
  976.  
  977. Question 5.4.  Can I use code or a compiler compiled for a 486 on my 386 ?
  978.  
  979. Yes.
  980.  
  981. The -m486 option to GCC, which is used to compile binaries for 486
  982. machines, merely changes certain optimisations.  This makes for slightly
  983. larger binaries which run somewhat faster on a 486.  They still work fine
  984. on a 386, though, with little performance hit.
  985.  
  986. GCC can be configured for a 386 or 486; the only difference is that
  987. configuring it for a 386 makes -m386 the default and configuring for a 486
  988. makes -m486 the default; in either case these can be overriden on a
  989. per-compilation basis or by editing /usr/lib/gcc-lib/i*-linux/n.n.n/specs.
  990.  
  991. GCC does not currently know how to do optimisation well for the 586,
  992. because Intel won't release the necessary information except under
  993. nondisclosure.  Don't buy a Pentium or wait for people to reverse-engineer
  994. the required optimisations.
  995.  
  996. - -----------------------------------------------------------------------------
  997.  
  998. Question 5.5.  What does gcc -O6 do ?
  999.  
  1000. Currently the same as -O2; any number greater than 2 currently works just
  1001. like 2.  The Makefiles of newer kernels use -O2, and so should you.
  1002.  
  1003. GCC 2.6 adds optimisation level -O3.  However, GCC 2.6.0 and several of
  1004. the following versions are known to have some problems with Linux, though
  1005. these will hopefully be solved soon.  In any case you should not use -O3
  1006. on a program until you're sure it doesn't create any problems.
  1007.  
  1008. - -----------------------------------------------------------------------------
  1009.  
  1010. Question 5.6.  Where are <linux/*.h> and <asm/*.h> ?
  1011.  
  1012. These are in the directories /usr/include/linux and /usr/include/asm.
  1013.  
  1014. However they should be symbolic links to your kernel sources in
  1015. /usr/src/linux and not real directories.
  1016.  
  1017. If you don't have the kernel sources download them --- see Q7.6 `How do I
  1018. upgrade/recompile my kernel ?'.
  1019.  
  1020. Then use rm to remove any garbage, and ln to create the links:
  1021.    rm -rf /usr/include/linux /usr/include/asm
  1022.    ln -sf /usr/src/linux/include/linux /usr/include/linux
  1023.    ln -sf /usr/src/linux/include/asm /usr/include/asm
  1024.  
  1025. - -----------------------------------------------------------------------------
  1026.  
  1027. Question 5.7.  I get errors when I try to compile the kernel.
  1028.  
  1029. Make sure that /usr/include/linux and /usr/include/asm aren't actual
  1030. directories but instead symbolic links to /usr/src/linux/include/linux and
  1031. /usr/src/linux/include/asm respectively.
  1032.  
  1033. If necessary, delete them using rm and then use ln -s to make the links as
  1034. in Q5.6 `Where are <linux/*.h> and <asm/*.h> ?'.
  1035.  
  1036. Remember that when you apply a patch to the kernel you must use the -p0 or
  1037. - -p1 option: otherwise the patch may be misapplied.  See the manpage for
  1038. patch for details.
  1039.  
  1040. If you're using a kernel more recent than 1.1.44 you should find that
  1041. there are new directories /usr/src/linux/include/asm-i386.  The directory
  1042. asm there should be removed, as should the directory asm.  The symlinks
  1043. Makefile target will make these be symbolic links to asm-i36 and
  1044. arch/i386/boot respectively.  The easiest way to make sure all this gets
  1045. done is not to try to patch 1.1.44 to make 1.1.45, but to download
  1046. linux-1.1.45.tar.gz instead.
  1047.  
  1048. ld: unrecognised option `-qmagic' means you should get a newer linker,
  1049. from tsx-11.mit.edu in /pub/linux/packages/GCC.
  1050.  
  1051. - -----------------------------------------------------------------------------
  1052.  
  1053. Question 5.8.  How do I make a shared library ?
  1054.  
  1055. Get tools-n.nn.tar.gz from tsx-11.mit.edu, in /pub/linux/packages/GCC/src.
  1056. It comes with documentation that will tell you what to do.
  1057.  
  1058. - -----------------------------------------------------------------------------
  1059.  
  1060. Question 5.9.  How do I make my executables smaller ?
  1061.  
  1062. The most common cause of large executables is the -g compiler flag.  This
  1063. produces (as well as debugging information in the output file) a program
  1064. which is statically linked, i.e. one which includes a copy of the C
  1065. library instead of using a dynamically linked copy.
  1066.  
  1067. Other things that are worth investigating are -O and -O2 which enable
  1068. optimisation (check the GCC documentation) and -s which strips the symbol
  1069. information from the resulting binary (making debugging totally
  1070. impossible).
  1071.  
  1072. You may wish to use -N on very small executables (less than 8K with the
  1073. - -N), but you shouldn't do this unless you understand its performance
  1074. implications, and definitely never with daemons.
  1075.  
  1076. Using QMAGIC binaries also can reduce the size of binaries, especially
  1077. small ones.  Don't worry about this unless you know what QMAGIC is; Linux
  1078. is moving to QMAGIC as a default.
  1079.  
  1080. ===============================================================================
  1081.  
  1082. The remainder of the FAQ is in the next part ...
  1083.  
  1084.  
  1085. -----BEGIN PGP SIGNATURE-----
  1086. Version: 2.6
  1087.  
  1088. iQCVAgUBLrPJhMMWjroj9a3bAQHWjQP/TH4lgiCnzdpl/guA/aExxwyZk/yuYRBi
  1089. 6tZU8CNSnduoBucAR4MBhtsuXP6BuqxchkrQnvEJ+a+KTtK8dH6DV38Jlkln0Tk+
  1090. aOaFFOYPmdyu2TxU3TVPov5hDR/uTIfMwqyworscTrsIwVzSmaofDdcMP21gI7hZ
  1091. 2u+8mjjdT5I=
  1092. =Gtgy
  1093. -----END PGP SIGNATURE-----
  1094. -- 
  1095. Ian Jackson, at home.         ijackson@nyx.cs.du.edu or iwj10@cus.cam.ac.uk
  1096. +44 1223 575512    Escoerea on IRC.   http://www.cl.cam.ac.uk/users/iwj10/
  1097. 2 Lexington Close, Cambridge, CB4 3LS, England.   Urgent: iwj@cam-orl.co.uk
  1098.  
  1099.