This is Info file linux-faq.info, produced by Makeinfo-1.55 from the input file faq.texi. Answers to Frequently asked questions about Linux (v1.19) Last Modified 93/06/11 v1.19  File: linux-faq.info, Node: VII-24, Next: VII-25, Prev: VII-23, Up: VII-00 (VII.24) What is the meaning of files ended by .T.z (or .tpz) ? ================================================================ ANSWER: The suffix z is for files compressed with the gzip utility, which is being used more frequently because it provides better compression. These can be uncompressed with the `gzip -d file.z` command.  File: linux-faq.info, Node: VII-25, Next: VII-26, Prev: VII-24, Up: VII-00 (VII.25) I have upgraded the kernel from XX to YY (XX > YY), however the login screen still says YY. ===================================================================================================== ANSWER: Just change the message in one of these files: /etc/issue and /etc/motd. The former contains the message before the login, the later is the one after you are logged in.  File: linux-faq.info, Node: VII-26, Next: VII-27, Prev: VII-25, Up: VII-00 (VII.26) What is doshell good for ? ==================================== ANSWER: It's an old program provided in the early Linux version (0.12) when the getty was not already there, it spawns a shell on any tty's. (Mattew Gream): I do this quite often ( getty on tty1, 2, 3 and my rc.local spawns a shell on tty4 as follows '/usr/bin/doshell /dev/tty4 /bin/tcsh &'  File: linux-faq.info, Node: VII-27, Next: VII-28, Prev: VII-26, Up: VII-00 (VII.27) I don't have the kernel sources, how can I change the keyboard language? ================================================================================== ANSWER: You can use the fixkbd program written by Laurent JULLIARD (Laurent_JULLIARD@grenoble.hp.com). Its purpose is to fix the keyboard map used in your kernel image. It works more or less a la "rootdev" (or rdev). It can be found on tsx-11.mit.edu in /pub/linux/binaries/sbin/fixkbd.tar.Z.  File: linux-faq.info, Node: VII-28, Next: VIII-00, Prev: VII-27, Up: VII-00 (VII.28) Does there exist a possibility to track down the source of kernel pannic messages ? ============================================================================================= ANSWER: Here's info from Linus on how to track down the source of kernel panic messages. The values for EIP, address, and so on are JUST EXAMPLES: the EIP, EFLAGS, etc. can be anything. The lines after ">" were written by me; the responses by Linus. > Unable to handle kernel paging request at address C000000A This means something in the kernel tried to access kernel memory at address 0x00A (the C0000000 offset is due to the kernel starting at virtual address 0xC0000000). The first page of kernel address space is unmapped to find these kinds of incorrect references (it's probably a NULL dereference to a structure member at offset 0xA). > Oops: 0002 Error code. This tells you if it's a read or write (forget which ritgh now, and don't have any books handy) > EIP: 0008:000290D2 This is where it happened: segment 0008 (kernel code segment) and offset 0x290D2 into the kernel. So to find this, you generally do something like nm /usr/src/linux/tools/system | sort | less and search for the function that contains the address 0x290D2. > EFLAGS: 00010087 > fs: 0017 Eflags and fs when the exception happened. You usually don't need this. > base: C0000000, limit: 000A0000 > Pid: 0, process nr: 0 In what process the exception happened. This is the swapper, which also means the thing is fatal (other processes you can just kill). That it's in the swapper process probably means that it's an interrupt that did it, as the swapper doesn't really do anything. > 89 50 04 c7 03 00 00 00 00 c7 This is the instruction that resulted in the error. I usually disassemble them by hand and see what it is, then I try to find out exactly where in the function this assembly sequence comes up (probably by compiling the .c file to a .s file and looking around). Alternatively you can just run 'gdb' on /usr/src/linux/tools/system, but gdb has some problems. > task[0] (swapper) killed: unable to recover > kernel panic: Trying to free up swapper memory space > In swapper task - not syncing This is just to tell you not to expect anything from the kernel any more: linux cannot go on without the swapper task. > How can I decode the numbers in the message? > Also, note that sometimes the "Unable to handle..." > message is followed by the "Oops: 0002" block, but > the last message is sometimes something else (i.e. not > always a "task[0] (swapper)...." message, but something > from the TCP driver in this case. It depends on where it happened. If it's an interrupt, it can essentially happen in any task (all interrupts are handled in the task that happens to be currently active), while "normal" code happens in the task that calls it.  File: linux-faq.info, Node: VIII-00, Next: VIII-01, Prev: VII-28, Up: Top (VIII.) FEATURES **************** * Menu: * VIII-01:: I've read that linux has virtual consoles, what must I do to get them? * VIII-02:: When Linux boots, I get the following message "8 virtual consoles"; how can I acess to the 5-8 vc's ? * VIII-03:: What kind of shell is /bin/sh ? * VIII-04:: Does there exist a man page for **** ? * VIII-05:: Is there a simple man package (groff is too big): * VIII-06:: What are the editors available in linux? * VIII-07:: Does there exist a printer package for Linux? * VIII-08:: Are uucp, mail, and/or USENET news available for Linux? * VIII-09:: How do I make swapping work? * VIII-10:: When I boot I get one of the following messages: "Unable to find swap signature" or "Bad swap-space bitmap" * VIII-11:: How do I know if it is swapping? * VIII-12:: How is it possible to remove a swap file? * VIII-13:: How is it possible to remove a swap device? * VIII-14:: How much swap space do I need ? * VIII-15:: Could someone explain the swap process on Linux?, is it swapping or paging ? * VIII-16:: Is demand paging different from paging and How ? * VIII-17:: Is there any way to tell how much swap space you are using or have left? * VIII-18:: I have a 2Megs box, but "free" reports only 1Meg why? * VIII-19:: What tape drives work with Linux ? * VIII-20:: Is there a driver for my Colorado Jumbo tape drive ? * VIII-21:: Is there only the %$# keyboard ? * VIII-22:: (special FINNISH/US) I booteed up with the new image and everything work except that some keyboard keys produce wrong characters. Does anyone know what is happening? * VIII-23:: Does there exist shared libs ? * VIII-24:: Why do I need dynamic linking. * VIII-25:: How does dynamic linking work under linux? * VIII-26:: Does Linux work for SCSI drives? * VIII-27:: Linux is supposed to work with ESDI drive. However I have trouble with my Magtron MT-4115E (Joincom controler), any clue? * VIII-28:: How does one go about applying a patch to Linux ? * VIII-29:: There are a lot of patches available (ps patch, NFS patches, CD-ROM patches ...) can I be fairly confident the subsequent patches will work? * VIII-30:: I got the patches on some ftp sites, and applied them to the kernel and tried to compile. It didn't !!. Are the patches buggy? * VIII-31:: What is VFS? * VIII-32:: What's about Bus Mice ? * VIII-33:: What's about TeX ? * VIII-34:: What's about LILO ? * VIII-35:: What's about MGR ? * VIII-36:: I have successfully compiled MGR, but when I try to run the program I get "can't find mouse" or "already in use", any clue? * VIII-37:: Any tips for MGR? * VIII-38:: What's about X11 ?  File: linux-faq.info, Node: VIII-01, Next: VIII-02, Prev: VIII-00, Up: VIII-00 (VIII.01) I've read that linux has virtual consoles, what must I do to get them? ================================================================================= ANSWER: Yes there are, you can access them with the left -key together with -key. With the Linux Images distribution, 4 consoles are available, getty runs on them. Notice that they are NOT accessible when running X (contrary to some commercial unices).  File: linux-faq.info, Node: VIII-02, Next: VIII-03, Prev: VIII-01, Up: VIII-00 (VIII.02) When Linux boots, I get the following message "8 virtual consoles"; how can I acess to the 5-8 vc's ? ================================================================================================================ ANSWER: If you want the getty to run on the 5-8, you should add the corresponding entries in /etc/inittab. You can also just run sh on them by using the doshell soft. And then in either case, the ALT-F[5-8] will access the corresponding vc.  File: linux-faq.info, Node: VIII-03, Next: VIII-04, Prev: VIII-02, Up: VIII-00 (VIII.03) What kind of shell is /bin/sh ? ========================================== ANSWER: It's the Bourne Again Shell, bash-1.12.3 and compilation was straightforward, just "make" that's all or nearly. BTW There does exist different shells for Linux, these are: bash, rc, zsh, tcsh and pdksh (a korn shell).  File: linux-faq.info, Node: VIII-04, Next: VIII-05, Prev: VIII-03, Up: VIII-00 (VIII.04) Does there exist a man page for **** ? ================================================= ANSWER: Download man.tar.Z from your favorite linux ftp site, there is most of the fileutils man page - either **** or g****, example there is nothing on ld, but there is for gld :) -, check the whatis database provided. The files in the cat1 dir are pre-formatted man pages that the man program can use. Quite recently the man pages for section 2 have been written (thanks Drew) and can be found, at least at tsx-11 in /pub/linux/docs/man/man2.tar.Z Also manpages are in the SLS on the b? disks. BTW there is nroff and groff for Linux. Cawf 2.0 works just fine for simple man pages, and a partial ms support too. Moreover Michael Johnson is the coordinator for man pages under Linux, he is looking for volunteers, so contact the DOC Channel.  File: linux-faq.info, Node: VIII-05, Next: VIII-06, Prev: VIII-04, Up: VIII-00 (VIII.05) Is there a simple man package (groff is too big): ============================================================ ANSWER: "Cawf -man" also "fm -m" (Al Clark) tsx-11 in /pub/linux/binaries/usr.bin/fm.tar.Z  File: linux-faq.info, Node: VIII-06, Next: VIII-07, Prev: VIII-05, Up: VIII-00 (VIII.06) What are the editors available in linux? =================================================== ANSWER: Right now there are uemacs-3.11, elvis-1.4 (1.5). Gnu Emacs is there, read the section devoted to it in the 5th part of this FAQ. Also the port of mg (micro gnu) has been done and can be found at least at athos.rutgers.edu (128.6.4.4) in pub/linux, mg is the binary and mg.tar.Z is the sources file. You can also find a PD ed, and elvis has an ex mode. Also available is Lucid Emacs (available on sunsite.unc.edu in pub/Linux/apps/editors/lemacs), including binary and info and lisp trees (it takes about 18MB of disk space). Finnally there are joe, vile-3.11, elle (Elle Looks Like Emacs), Xedit and aXe.  File: linux-faq.info, Node: VIII-07, Next: VIII-08, Prev: VIII-06, Up: VIII-00 (VIII.07) Does there exist a printer package for Linux? ======================================================== ANSWER: (R. Miller) Yes. The "plp" package is currently available under the directory [/pub/linux]/BETA/plp on tsx-11 and its mirrors. You may also print things manually like so: cat filename > /dev/lp1 (Note that though "/dev/lp0" exists, most people find that their printer is on /dev/lp1. Use whatever the kernel says that it detects in the boot-up messages.)  File: linux-faq.info, Node: VIII-08, Next: VIII-09, Prev: VIII-07, Up: VIII-00 (VIII.08) Are uucp, mail, and/or USENET news available for Linux? ================================================================== ANSWER: Yes !!! Read the section UUCP/NEWS/MAIL for LINUX in this FAQ. Moreover if you are interested in the last uucp features, join the UUCP channel (see part1 of this FAQ for more details about the multi channels list).  File: linux-faq.info, Node: VIII-09, Next: VIII-10, Prev: VIII-08, Up: VIII-00 VIII.09) How do I make swapping work? ANSWER: Quite simply, you need the swapon and the mkswap binaries. Then you can choose between a swap partition or a swap file. The mkswap is used to write the "swap signature", whilst the swapon binary is to activate the swapping. First of all you need a partition :), I assume it's the second of your first disk namely /dev/hda2, and it's 10MB big A) swap partition: you have to indicate it's a swap area, this is done via mkswap (instead of mkfs) which needs the name of the partition and the size in blocks (a block is 1Ko big); the optional -c flag is for bad block checking. So for our example you should perform: mkswap [-c] /dev/hda2 10000 Then you need to indicate that you want linux to use the swap area, this is done via swapon. In general it is set in the /etc/rc file, just put the following entry: /bin/swapon /dev/hda2 It can also be achieved via the /etc/fstab file B) swap file: The process is quite close; you need a partition, and a swap file. Assume that I prefer a swap area of 4MB (I want to keep some place in /dev/hda2). I need first to "dd" the file. dd if=/dev/hda2 of=/swap_file bs=1024 count=4096 bs stands for block size, and count is the number of blocks then I have to put the "swap signature" on that file: mkswap /swap_file 4096 At this point, you should 'sync', just to be sure the signature is effective. And finally add an entry in the rc file: /bin/swapon /swap_file  File: linux-faq.info, Node: VIII-10, Next: VIII-11, Prev: VIII-09, Up: VIII-00 (VIII.10) When I boot I get one of the following messages: "Unable to find swap signature" or "Bad swap-space bitmap" ====================================================================================================================== ANSWER: You probably forgot to make your swap-device, use the mkswap command.  File: linux-faq.info, Node: VIII-11, Next: VIII-12, Prev: VIII-10, Up: VIII-00 (VIII.11) How do I know if it is swapping? =========================================== ANSWER: You will notice it :)) First of all, Linux tells you at boot time, "Adding swap: XXX pages of swap space", and if you start running out of memory, you will notice that the disk will work overtime, and things slow down. Generally a 2Meg RAM will make the system swap constantly while running gcc, 4 Meg will swap occasionnaly when optimizing big files (and having other things active, such as make). Also, the command 'free' (from the ps package) reports total enabled swap space and current swap use.  File: linux-faq.info, Node: VIII-12, Next: VIII-13, Prev: VIII-11, Up: VIII-00 (VIII.12) How is it possible to remove a swap file? ==================================================== ANSWER: Simply perform a rm on that file, and remove the swapon of your /etc/rc file.  File: linux-faq.info, Node: VIII-13, Next: VIII-14, Prev: VIII-12, Up: VIII-00 (VIII.13) How is it possible to remove a swap device? ====================================================== ANSWER: mkfs the device, and remove the swapon of your /etc/rc file.  File: linux-faq.info, Node: VIII-14, Next: VIII-15, Prev: VIII-13, Up: VIII-00 (VIII.14) How much swap space do I need ? ========================================== ANSWER: Linux does not perform real swapping, it's rather paging (see below for a more complete explanation). The swap area is *added* to the memory and can be viewed as virtual memory, so choose the size you need, example: 8MB RAM + 6MB swap => 14MB virtual memory  File: linux-faq.info, Node: VIII-15, Next: VIII-16, Prev: VIII-14, Up: VIII-00 (VIII.15) Could someone explain the swap process on Linux?, is it swapping or paging ? ======================================================================================= ANSWER: (Linus) Linux uses swap as /additional/ memory, one page of the swap-space is used for the good-page bitmap and the swapspace signature. In fact Linux does only paging, no swaping in the meaning "write out one whole process to disk". The reason it's called swapping is that Linux used paging for memory management on a low level since the very beginning, but didn't page to disk at all until 0.12.  File: linux-faq.info, Node: VIII-16, Next: VIII-17, Prev: VIII-15, Up: VIII-00 (VIII.16) Is demand paging different from paging and How ? =========================================================== ANSWER: (Linus) Demand-paging is really "demand loading of executables" and is totally independent of the page-swapping algorithms, although they have similarities. When Linux strts up a process, no actual code space is loaded: I let the page exceptions load in the executable as needed. Thus Linux demand-loads the code and initialized data it needs. Demand-loading has very good points: (a) it simplifies the exec system call; (b) it means page sharing between that have excuted the same file is easy to implement; (c) it cuts down on the amount of memory required. When Linux runs out of real memory, it starts to lock for pages it can swap out, but if it notices that the page is clean, it just forgets about it, and demand-loads it when it's needed again. Thta means that swap-file isn't needed as much, especially when running big binaries such as gcc, where the code-pages can be demand-loaded as you wish. Point (c) means that even without any swap space, you can usually run slightly larger programs that your memory setup would actually permit. I've noticed this while running X and doing a kernel compilation + something else wshen I've forgotten to turn on swapping: free reports 0 page available but things still work, although performance is slightly down...  File: linux-faq.info, Node: VIII-17, Next: VIII-18, Prev: VIII-16, Up: VIII-00 (VIII.17) Is there any way to tell how much swap space you are using or have left? =================================================================================== ANSWER: The free program provided with the ps package handles this.  File: linux-faq.info, Node: VIII-18, Next: VIII-19, Prev: VIII-17, Up: VIII-00 (VIII.18) I have a 2Megs box, but "free" reports only 1Meg why? ================================================================ ANSWER: (Linus:) "free" doesn't concern with the memory the kernel has allocated for itself. In other words what you see is the *user* memory available. The kernel has taken the low 1Meg for it's use (~250Ko for it and the rest for buffer cache and kernel data structures); for big memory machine it could be even 2Megs.  File: linux-faq.info, Node: VIII-19, Next: VIII-20, Prev: VIII-18, Up: VIII-00 (VIII.19) What tape drives work with Linux ? ============================================= ANSWER: (24 sept. P. Riipinen) - There is a working QIC-02 device driver for Linux, supporting (at least) Everex/Wangtek cards. - There are additional patches for the QIC-02 to support Archive SC402/499R. You can find them in /pub/linux/alpha/qic-02 at tsx-11 There are some bugs in the driver but you can backup. - Newer drivers are all SCSI, so check the SCSI section in this FAQ.  File: linux-faq.info, Node: VIII-20, Next: VIII-21, Prev: VIII-19, Up: VIII-00 (VIII.20) Is there a driver for my Colorado Jumbo tape drive ? =============================================================== ANSWER: (Charlie Brady 93/06) Not at this stage, although some are trying. The Colorado Memory Systems tape drive connects to the standard floppy disk controller as a third device on the cable. Similar drives are sold by Irwin, Mountain, Wangtek and others and they are collectively known as QIC-40 and QIC-80 drives. The medium is a DC-2000 or DC-2120 minicartridge. There is a pre-pre-alpha version of a driver, and appropriately skilled volunteers are encouraged to try to finish it. Be warned, the timing constraints of the interface may be a significant problem.  File: linux-faq.info, Node: VIII-21, Next: VIII-22, Prev: VIII-20, Up: VIII-00 (VIII.21) Is there only the %$#@ keyboard ? ============================================ ANSWER: There are Dannish, Finnish, French, German, Uk, US and DVORAK keyboards. Set it in the main Makefile of the kernel sources, then (re)compile the kernel again. Make sure the files in kernel/chr_drv directory are recompiled.  File: linux-faq.info, Node: VIII-22, Next: VIII-23, Prev: VIII-21, Up: VIII-00 (VIII.22) (special FINNISH/US) I booteed up with the new image and everything work except that some keyboard keys produce wrong characters. Does anyone know what is happening? ================================================================================================================================================================================ ANSWER: Since 0.95a images are US product (and so are US-keyboard oriented), BUT linux sources are FINNISH product, and so the default keyboard is set to be FINNISH. The solution is in the previous Q/A.  File: linux-faq.info, Node: VIII-23, Next: VIII-24, Prev: VIII-22, Up: VIII-00 (VIII.23) Does there exist shared libs ? ========================================= ANSWER: (H.J. Lu, hlu@eecs.wsu.edu, 09/01/92) The shared library under Linux started at 0.12. Peter MacDonald collaborating with Linus made the first generation of shared library, which is the base of the classic shared library which is no longer widely used. The kernel support of shared library under Linux is system call extern int uselib (const char *__filename); which loads an executable image with fixed entry point into memory, just like the ordinary executables. In crt0.s, a function which can find out if and which shared images are needed and loads them is invoked before `main ()' is called if necessary. David Engel and I developed a way to tell the loader which shared images have to be loaded, utilizing the similar technique used in global constructor in g++ 2.x with the help from GNU binary utilities. In the classic Linux shared library, we build a big executable image for several libraries and make sure no external variables outside of the participating libraries are referenced. Then we can get the absolute addresses of all the global variables defined in the libraries used to build that executable image. After that, we make a stub library for each participating library which just has the absolute addresses of all the global variable in it. For each shared image, there must be one and only one .o file, which defines a global variable containing version, name and entry point of the shared image, and a dummy global data. Among those libraries used to build the shared image, there must be one library which will always be referenced whenever any other library is referenced. We put this .o file into the stub library for that library and add a special symbol to each of the components of the stub library in order to make sure that this .o file is always linked in if any of the participating libraries are linked. In gcc 2.2.2d, jump table, developed by David Engel, was introduced in the shared library. At the beginning of each shared image, there is a table in which every library function has a fixed entry address and the instruction at that address is a jump which will lead to the real library function. So we can change the library function without changing the corresponding entry address of the jump table. For the global data we put them at the beginning of data section of the shared image. We have to separate them from text code and link them in fixed order. It is very hard to maintain the same addresses for the global data when library is changed. After the global data are set up properly and some spaces are left for possible future changes (that is a very tough procedure.), it isn't too difficult to maintain. Starting with libc.4.3, a form of dynamic linking developed by Eric Youngdale was introduced into the shared libraries. As part of this, the tools that were used to generate the sharable libraries were completely redone which made the job of building the libraries much easier, and thus the libX*.so.3.0 libraries were made as DLL jumptable libraries.  File: linux-faq.info, Node: VIII-24, Next: VIII-25, Prev: VIII-23, Up: VIII-00 (VIII.24) Why do I need dynamic linking. ========================================= ANSWER: The best way to illustrate this is with a simple example of what happens without dynamic linking. #include int errno; FILE * foo; main(){ foo = fopen("/usr/bin/foo","w"); printf("foo: %x errno: %d\\n",foo, errno); } Assume this program is run by a non-root user. Normally you would expect that the open will fail because the user does not have permission to write to /usr/bin - this means that fopen() would return NULL, and errno would contain 13, which means EACCES - Permission denied. If you link this to a normal jump table library, it prints foo: 0 errno: 0 Now consider the following nearly identical program: #include extern int errno; FILE * foo; main(){ foo = fopen("/usr/bin/foo","w"); printf("foo: %x errno: %d\\n",foo, errno); } The results for this program are: foo: 0 errno: 13 Why does this happen???. First of all you must realize that in the first program errno is not declared external, and thus storage will be allocated in the data segment for the variable. Unfortunately there is no way to tell libc this, and libc has it's own storage for errno. Thus libc writes the result in one location and you are looking in the other. In the second program errno is declared extern, and thus no storage will be allocated. The linker will see the need for a definition of errno, and it will find one in libc. Thus in the second example the user program is reading the same memory location that the library stored the answer in. This is of course a simple example. There are more complicated examples involving programs that want to redefine a library function and these can lead to quite bizarre behavior which is difficult to debug. With dynamic linking, both of the above programs yield the same (correct) result.  File: linux-faq.info, Node: VIII-25, Next: VIII-26, Prev: VIII-24, Up: VIII-00 (VIII.25) How does dynamic linking work under linux? ===================================================== ANSWER: Basically, to implement dynamic linking we need to route all function calls to global functions through the jump table. We also need to make sure that all global data is accessed indirectly through a pointer. The actual libraries do not really look very much different from the actual jump table libraries that we are currently using, but there are additional pointers to the global data in the sharable image that are used internally by the library to access all global data. There are also additional symbols in the stub library that are defined as the address of the various pointers, and are used by the linker to help determine whether there is a pointer or a jmp instruction that needs to be fixed up. The linker has one new important task with dynamic linking. It watches for duplicate definitions of symbols, and if the second definition is in a sharable library, it makes a note of it as a conflict that needs to be resolved at run time. The linker puts a list of all of these conflicts into a table and makes it available to crt0 through the variable __SHARABLE_CONFLICTS_. At run time, crt0 (through the function __dynamic_resolve) will go through and fix up all of the pointers that need to be fixed. Let us say for example that you define your own malloc function in a program - in this case at run time the startup code will actually modify the jmp instruction in the jump table so that it points to the malloc function in your program, not the one in the library. The library will never refer to the malloc function directly, but it will always be referenced through the jump table - in this way we ensure that there will only be one function named malloc that is used by a given program. If you were to run the first example program in the "Why do I need dynamic linking" answer, then the pointer in the library that corresponds to the variable errno will be modified so that it points to the errno variable that is in your program. The library itself will never use errno directly - it will always use it via the special pointer variable. In this way we ensure that all references to the variable errno both in your program and in the sharable library will reference the same memory address.  File: linux-faq.info, Node: VIII-26, Next: VIII-27, Prev: VIII-25, Up: VIII-00 (VIII.26) Does Linux work for SCSI drives? =========================================== ANSWER: Yes since v0.96. Read the section devoted to SCSI in this FAQ (check the TOC file to find the section).  File: linux-faq.info, Node: VIII-27, Next: VIII-28, Prev: VIII-26, Up: VIII-00 (VIII.27) Linux is supposed to work with ESDI drive. However I have trouble with my Magtron MT-4115E (Joincom controler), any clue? ==================================================================================================================================== ANSWER: (Linus) Some harddisk don't like linux (even though they should). Maybe not a bug but a deficiency. (Mika) I had to remove the printk "unexpected hd interrupt" statement in hd.c because I was getting so many of those messages. Be warned that if there is any read error the system just hangs, even the ctrl-alt-del won't work. You should be able to use your ESDI drives if you could live with those nuisances.  File: linux-faq.info, Node: VIII-28, Next: VIII-29, Prev: VIII-27, Up: VIII-00 (VIII.28) How does one go about applying a patch to Linux ? ============================================================ ANSWER: (Drew Eckhardt) In the unix world most of distribution are in source form. This includes the operating system. To apply a patch, you apply it with the 'patch' program to the affected sources. The patch program takes as input the differences between the old and the new version. After patching you need to recompile the sources. Assume I want to apply a patch enclosed in the file XXX. First of all I will look at the top of XXX, where the file affected is identified. This may have aleading path attached to it. Either cd out to the "root" of the patch, ie if I see linux/kernel/blk_drv/blk.h I would cd into /usr/src (assuming it's the place where I can find linux/kernel...) and then patch as follows patch -p0 < whatever_place/XXX or, you can specify a number of path components to strip from the path. If I am in the blk_drv directory patching would be patch -p3 < whatever_place/XXX  File: linux-faq.info, Node: VIII-29, Next: VIII-30, Prev: VIII-28, Up: VIII-00 (VIII.29) There are a lot of patches available (ps patch, NFS patches, CD-ROM patches ...) can I be fairly confident the subsequent patches will work? ======================================================================================================================================================= ANSWER: This is not true yet for the current version; but it will be so I kept it :) No you can't, patching is a real beta tester art :)). People are not working on the same patched release, so you have to check if the patches you already applied works on the same kernel part, if not, /great/, just apply them. If yes, check if there is an order, patch creator knows that, and (should) try to warn patch user (in other words: beta tester) otherwise you should edit the patch files (and possibly make a brief note to others on this list/newsgroup or even a cdiff) before applying them, another solution is to keep cool and wait for the next version of Linux where, in general, the modifications have been done but this behavior is /not/ Linux helpful.  File: linux-faq.info, Node: VIII-30, Next: VIII-31, Prev: VIII-29, Up: VIII-00 (VIII.30) I got the patches on some ftp sites, and applied them to the kernel and tried to compile. It didn't !!. Are the patches buggy? ========================================================================================================================================= ANSWER: Before remake, just do a make clean in the directories involved by the patches. This will force a rebuild of the .o and .a files. If you have a RCS running on your source tree, did you checked a patched version of the files changed before /any/ CO either by you or make Finally, make sure the patches succeded. Normally, failed patches on a file FILE will leave a FILE# file. Moreover you will get a "chunk failed" message. It is possible to capture the output while patching, with the following: patch -p0 < patchfile | 2>&1 patch.result | more  File: linux-faq.info, Node: VIII-31, Next: VIII-32, Prev: VIII-30, Up: VIII-00 (VIII.31) What is VFS? ======================= ANSWER: (Ted) Linux 0.96 already has Virtual FileSystem, which means that it acts as a filesystem switch. It makes it easy for someone to design another filesystem format and include it in the Linux kernel along with the standard minix filesystem format. So it /enables/ someone to design a robust filesystem which would have some nice properties (no 14 chars file name limitation, nor 64Meg limit), and could be included in the kernel in such a way that both the Minix and the new one could be mounted at the same time. This solves the uncompability problem; since the root disk could still use the Minix filesystem, while the hardisk could be using the new one.  File: linux-faq.info, Node: VIII-32, Next: VIII-33, Prev: VIII-31, Up: VIII-00 (VIII.32) What's about Bus Mice ? ================================== ANSWER: (Nathan I. Laredo) Since the Linux v0.96c-pl2 the kernel does support LOGITECH and BUS MICE If you are unsure that you have a bus mouse or not, check to see if your mouse card has a selection for a sample rate switchable between 30Hz and 60Hz (or possibly 25/50Hz), if it does not, then it is NOT a true bus mouse (InPort mice for example will not work with this driver). To create a bus mouse device: mknod /dev/mouse c 10 0  File: linux-faq.info, Node: VIII-33, Next: VIII-34, Prev: VIII-32, Up: VIII-00 (VIII.33) What's about TeX ? ============================= ANSWER: The primary site for Linux TeX is 129.78.66.1, this is P. Williams' site in Australia. The stuff at tsx-11 was posted by T. Dunbar who does support/maintain the dvilj stuff.  File: linux-faq.info, Node: VIII-34, Next: VIII-35, Prev: VIII-33, Up: VIII-00 (VIII.34) What's about LILO ? ============================== ANSWER: (Werner Almesberger) LILO - Generic Boot Loader for Linux ("LInux LOader") This is an ALPHA test release of a new boot loader. Be sure to have some means to boot your system from a different media if you install LILO on your hard disk. Features -------- - does not depend on the file system. (Tested with Minix, EXT FS and MS-DOS FS.) - can be used to boot from floppies and from hard disks. - can replace the master boot record. - can boot non-Linux systems (MS-DOS, DR DOS, OS/2, ...) and unstripped kernels. - supports up to 16 different boot images that can be selected at boot time. Root and swap disk/partition can be set independently for each image. - boot sector, file map and boot images can be all on different disks or partitions. Restrictions and known problems ------------------------------- - SCSI disks are not fully supported yet. (Still waiting for some kernel changes.) (Should work in current release - EY). - booting other operating systems doesn't seem to work everywhere. If everything but booting a non-Linux OS from LILO works on your system, you should boot LILO by BOOTACTV and select the alternate OS with the latter as a temporary work-around. - booting non-Linux systems from the second hard disk ("D:") is not yet supported. Please send all bug reports to almesber@nessie.cs.id.ethz.ch  File: linux-faq.info, Node: VIII-35, Next: VIII-36, Prev: VIII-34, Up: VIII-00 (VIII.35) What's about MGR ? ============================= ANSWER: (General Information grabbed from various sources) There is a MGR channel available , contact the request adress with help in the body: linux-activists-request@niksula.hut.fi The stuff can be found at tsx-11 in pub/linux/packages/MGR In brief: MGR provides: - multiple overlapping windows - multiple fonts - text and graphics in each windows - a simple popup menu package - a client/server model 'a la' X - independance from any peculiar networking technology MGR consist of a server process and some clients. Each client has his own window, and can create subwindows. Clients communicate with the server via a bidirectionnal channel. A C library is provided. When a new window starts, it is as a terminal emulator running the shell; for more information you can grab the mgr-man.out from bellcore.com The information hereafter appeared on the MGR channel on 19th Jan. > From: u31b3hs@POOL.informatik.rwth-aachen.de > Subject: MGR 0.53 > > > MGR, version 0.53 for Linux and SunOS (Coherent unfinished yet). > > Unpack the src* stuff under in /src/lbin/mgr and the usr* stuff in > /usr/mgr. I splitted things that way for making it easier to ftp > them and carry them home. If you don't like these paths, then use > others, but remember to edit the Configfile after generating it. > YOU NEED TO INSTALL ALL FILES FOR COMPILING. > > This is a beta release for programmers, there are no binaries. It > makes my work available for people who either also work on MGR and > like to get new sources and for adventerous beta testers. WARNING: > I assume using Linux 0.99.2 and GCC 2.3.3. > > There is some new m4 code to generate menus. It is more powerful > than menu(1), but a little harder to use. > > MGR is currently being ported to Coherent 4.0, but this version > doesn't include everything yet. There is already a beta version > running on Coherent, although not too stable yet. > > For questions, write to the mailing list, channel MGR. Please be > sure to talk about the latest version of MGR plus having read the > README files in the directories containing the problem. > > You got this stuff from ftp.thp.uni-koeln.de:pub/linux/mgr or from > tsx-11.mit.edu:~ftp/pub/linux/packages/MGR, which is a mirror of the > Cologne directory.  File: linux-faq.info, Node: VIII-36, Next: VIII-37, Prev: VIII-35, Up: VIII-00 (VIII.36) I have successfully compiled MGR, but when I try to run the program I get "can't find mouse" or "already in use", any clue? ====================================================================================================================================== ANSWER: try the following "mgr -m /dev/ttys1" if the mouse is on the serial 1. Another possibility is to link /dev/mouse with /dev/ttys1 (assuming your mouse is on serial 1). Or if it's a bus mouse, "mknod /dev/mouse c 10 0" once.  File: linux-faq.info, Node: VIII-37, Next: VIII-38, Prev: VIII-36, Up: VIII-00 (VIII.37) Any tips for MGR? ============================ ANSWER: Well, I have tried it on my 386Sx Ega/Vga; the screen is Ok but the Logitech mouse I have is not well recognized. BTW check the major/minor number for pty's; they should be character device with 4 as major and 128 and bigger as minor: ptyp0 c 4 128 ptyp1 c 4 129 ... ttyp0 c 4 192 ttyp1 c 4 193  File: linux-faq.info, Node: VIII-38, Next: IX-00, Prev: VIII-37, Up: VIII-00 (VIII.38) What's about X11 ? ============================= ANSWER: See the section XII. devoted to X11 in this FAQ.  File: linux-faq.info, Node: IX-00, Next: IXA-00, Prev: VIII-38, Up: Top (IX.) GCC MISC INFORMATION ************************** **** Last update 93/03/26 * Menu: * IXA-00:: HLU Information * IXB-00:: OTHERS  File: linux-faq.info, Node: IXA-00, Next: IX-01, Prev: IX-00, Up: IX-00 (IX.A.) HLU Information ======================= The official release of GCC for Linux is 2.3.3. This section includes: README.gccdisk FAQ of gcc written by HLU * Menu: * IX-01:: I don't know how to install gcc stuff, is there special places? * IX-02:: What compiler should I use for Linux? * IX-03:: Where is the latest official gcc 2.xx for Linux? * IX-04:: Where is the latest official Linux C library? * IX-05:: What are the contents of them? * IX-06:: How do I install them? * IX-07:: What are the main differences with the old release? * IX-08:: Can I use the old version of gcc? * IX-09:: Can I delete the old shared image in /lib? * IX-10:: Is stdio ANSI compatible? * IX-11:: Is g++ in 2.xx? * IX-12:: Where can I get the gcc manual? * IX-13:: What options can I use for gcc? * IX-14:: How can I debug the C code? * IX-15:: Where is the source code of the new libc.a? * IX-16:: Why does g++ complain, even die? * IX-17:: How do I generate code for 486? * IX-18:: I heard malloc (0) wouldn't work with Linux, what should I do? * IX-19:: Why does gcc say "xxxxx..h not found"? * IX-20:: I really followed every step in the documentation, but when I do "make", why does it say "don't how to make xxxxxx"? * IX-20:: I really followed every step in the documentation, but when I do "make", why does it say "don't how to make xxxxxx"? * IX-21:: How do I compile programs under Linux? * IX-22:: How can I get bsd style signal? * IX-23:: Why does a program that should only poll for input become a CPU hog? * IX-24:: When a program is stopped using Ctrl-Z and then restarted, or in other situations that generate signals: Ctrl-C interruption, termination of a child process etc. why does it complain about "interrupted system call" or "write: unknown error" or things like that.  File: linux-faq.info, Node: IX-01, Next: IX-02, Prev: IXA-00, Up: IXA-00 (IX.01) I don't know how to install gcc stuff, is there special places? ======================================================================== ANSWER: This is the README.gccdisk Linux GNU C/C++ [HJ release] Introduction ------------ This is GNU C/C++ 2.3.3. It is linked with jump table 4.2. You should use it with the Linux C library disks since the C/C++ compiler has no shared images, which are required by all the binaries in it. It consists of 2 minix disks, which will fit on either 5.25" or 3.5" floppies. It is on tsx-11.mit.edu under pub/linux/GCC/gccdisk Distribution File Format ------------------------ There are two files, each of which goes on one disk A. Disk 1 (gcc233a.Z) This contains gcc, cpp, cc1 and crt0.o/gcrt0.o. There are also some header files in /usr/lib/gcc-lib/i386-linux/2.3.3/include. B. Disk 2 (gcc233b.Z) This disk contains cc1plus. Installing on the Hard Drive ---------------------------------------- 1. uncompress base[1|2].Z. 2. rawrite or dd each file to a formatted floppy disk. Now you have made a copy of gcc 2.3.3 on two floppies. To copy each floppy to your hd, you should mount the floppy and copy its contents to your hard drive. You can do this by: mount /dev/fd[0|1] /mnt cd /mnt for d in bin dev etc usr do if [ -d $d ]; then cp -av $d / fi done Note: This may overwrite some files on your hard disk. Thanks. H.J. hlu@eecs.wsu.edu 12/31/92  File: linux-faq.info, Node: IX-02, Next: IX-03, Prev: IX-01, Up: IXA-00 (IX.02) What compiler should I use for Linux? ============================================== ANSWER: You should only use the same version on tsx-11.mit.edu under /pub/linux/GCC. If you want to use the testing release, first join the GCC channel on the Linux mailing list, and then send a note to hlu@eecs.wsu.edu. Don't use gcc older than the one on tsx-11.mit.edu.  File: linux-faq.info, Node: IX-03, Next: IX-04, Prev: IX-02, Up: IXA-00 (IX.03) Where is the latest official gcc 2.xx for Linux? ========================================================= ANSWER: It's on tsx-11.mit.edu under /pub/Linux/GCC and under pub/linux/GCC. You may find it on the other sites. Since gcc 2.3.3, you can compile it yourself out of box from any gnu ftp sites. Just unpack the source code and do configure [i386-linux|i486-linux] You should follow the instructions in INSTALL.  File: linux-faq.info, Node: IX-04, Next: IX-05, Prev: IX-03, Up: IXA-00 (IX.04) Where is the latest official Linux C library? ====================================================== ANSWER: It's on tsx-11.mit.edu under /pub/Linux/GCC and under pub/linux/GCC. You may find it on the other sites.  File: linux-faq.info, Node: IX-05, Next: IX-06, Prev: IX-04, Up: IXA-00 (IX.05) What are the contents of them? ======================================= ANSWER: Please read the current release note and ChangeLog for details.  File: linux-faq.info, Node: IX-06, Next: IX-07, Prev: IX-05, Up: IXA-00 (IX.06) How do I install them? =============================== ANSWER: Read README and release notes.  File: linux-faq.info, Node: IX-07, Next: IX-08, Prev: IX-06, Up: IXA-00 (IX.07) What are the main differences with the old release? ============================================================ ANSWER: Read README and release notes.  File: linux-faq.info, Node: IX-08, Next: IX-09, Prev: IX-07, Up: IXA-00 (IX.08) Can I use the old version of gcc? ========================================== ANSWER: Please get rid of gcc older than gcc 2.2.2. Starting from gcc 2.2.2, you can do gcc -V xxxx where xxxx is the version number. Please read `release.xxxx' for detail. There is one catch in gcc 2.2.2d, setjmp/longjmp is changed, so the old header files is not compatible with gcc 2.2.2. Before you install gcc 2.2.2d, please do cp /usr/include/setjmp.h /usr/lib/gcc-lib/i386-linux/2.2.2/include where /usr/include/setjmp.h is come with gcc 2.2.2.  File: linux-faq.info, Node: IX-09, Next: IX-10, Prev: IX-08, Up: IXA-00 (IX.09) Can I delete the old shared image in /lib? =================================================== ANSWER: Since the Linux C library version 4.3, we have introduced the dynamically linked library. There is no need to keep old shared images in /lib if none of your binaries are linked with the classic shared library which has been obsolete. You can just keep one version of the shared image in /lib which has the highest major and minor release numbers for each shared library. The name of the shared image is "xxxxxxxxxxxxxxx.so.major.minor".  File: linux-faq.info, Node: IX-10, Next: IX-11, Prev: IX-09, Up: IXA-00 (IX.10) Is stdio ANSI compatible? ================================== ANSWER: Yes, please test it.  File: linux-faq.info, Node: IX-11, Next: IX-12, Prev: IX-10, Up: IXA-00 (IX.11) Is g++ in 2.xx? ======================== ANSWER: Yes.  File: linux-faq.info, Node: IX-12, Next: IX-13, Prev: IX-11, Up: IXA-00 (IX.12) Where can I get the gcc manual? ======================================== ANSWER: You can get man pages and manual come with the gcc source code on any gnu ftp sites. You should find gcc-man.tar.z on tsx-11 which has man pages for gcc.  File: linux-faq.info, Node: IX-13, Next: IX-14, Prev: IX-12, Up: IXA-00 (IX.13) What options can I use for gcc? ======================================== ANSWER: Read the manual. There is one special flag for Linux, -static tells gcc to use the static libraries. The default is the jump table version of shared libraries.  File: linux-faq.info, Node: IX-14, Next: IX-15, Prev: IX-13, Up: IXA-00 (IX.14) How can I debug the C code? ==================================== ANSWER: Read the gcc/gdb manuals. The simple way to do is gcc -g foo.c -o foo gdb foo  File: linux-faq.info, Node: IX-15, Next: IX-16, Prev: IX-14, Up: IXA-00 (IX.15) Where is the source code of the new libc.a? ==================================================== ANSWER: The same place you find this file. It is called libc-xx.yy.tar.z.  File: linux-faq.info, Node: IX-16, Next: IX-17, Prev: IX-15, Up: IXA-00 (IX.16) Why does g++ complain, even die? ========================================= ANSWER: You need "expr", which is in GNU shell utilities 1.6, echo (?) and sed.  File: linux-faq.info, Node: IX-17, Next: IX-18, Prev: IX-16, Up: IXA-00 (IX.17) How do I generate code for 486? ======================================== ANSWER: Add -m486 to CFLAGS.