From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 1103af,593d8dfdfbd5e57,start X-Google-Attributes: gid1103af,public X-Google-Thread: 100062,593d8dfdfbd5e57,start X-Google-Attributes: gid100062,public X-Google-Thread: 10d4db,593d8dfdfbd5e57,start X-Google-Attributes: gid10d4db,public X-Google-Thread: f7ded,593d8dfdfbd5e57,start X-Google-Attributes: gidf7ded,public From: kiesling@terracom.net Subject: Linux Frequently Asked Questions with Answers (Part 5 of 6) Date: 1998/09/27 Message-ID: X-Deja-AN: 395405582 Followup-To: poster X-Trace: news3.ispnews.com 906928909 209.69.148.254 (Sun, 27 Sep 1998 16:41:49 EDT) Organization: ISPNews http://ispnews.com NNTP-Posting-Date: Sun, 27 Sep 1998 16:41:49 EDT Newsgroups: comp.os.linux.announce,comp.os.linux.misc,news.answers,comp.answers Originator: kiesling@terracom.net Archive-Name: linux/faq/part5 Posting-Frequency: weekly 7.13 Miscellaneous information and questions answered. 7.14 How do I program XYZ under Linux? Read the manuals, or a good book on Unix. Manual pages (type "man man") are usually a good source of reference information on exactly how to use a particular command or function. There is also a lot of GNU Info documentation, which is often more useful as a tutorial. Run Emacs and type C-h i, or type info info if you don't have or don't like Emacs. Note that the Emacs libc node doesn't exactly describe the Linux libc (which is more like a traditional Unix libc, not having some of the GNU oddities), but it's close enough to make a fair tutorial in Unix C programming. The latest release of the Linux manual pages, a collection of useful GNU Info documentation, and various other information related to programming Linux, can be found on sunsite.unc.edu in /pub/Linux/docs/man-pages. 7.15 What's all this about ELF? See the ELF HOWTO by Daniel Barlow--note, this is not the file move-to-elf, which is a blow-by-blow account of how to upgrade to ELF manually. Linux has two different formats for executables, object files, and object code libraries, known as, "ELF." (The old format is called `a.out'.) They have advantages, including better support for shared libraries and dynamic linking. Both a.out and ELF binaries can coexist on a system. However, they use different shared C libraries, both of which have to be installed. If you want to find out whether your system can run ELF binaries, look in /lib for a file named, "libc.so.5." If it's there, you probably have ELF libraries. If you want to know whether your installation actually is ELF you can pick a representative program, like ls, and run file on it: -chiark:~> file /bin/ls /bin/ls: Linux/i386 impure executable (OMAGIC) - stripped valour:~> file /bin/ls /bin/ls: ELF 32-bit LSB executable, Intel 80386, version 1, stripped There is a patch to get 1.2.x to compile using the ELF compilers, and produce ELF core dumps, at tsx-11.mit.edu in /pub/packages/GCC/. You do not need the patch merely to run ELF binaries. 1.3.x and later do not need the patch at all. 7.16 What is a .gz file ? And a .tgz ? And ... ? .gz (and .z) files are compressed using GNU gzip. You need to use gunzip (which is a symlink to the gzip command which comes with most Linux installations) to unpack the file. .taz and .tz are tar files (made with Unix tar) compressed using standard Unix compress. .tgz (or .tpz) is a tar file compressed with gzip. .lsm is a Linux Software Map entry, in the form of a short text file. Details about the LSM and the LSM itself are available in the docs subdirectory on sunsite.unc.edu. .deb is a Debian Binary Package - the binary package format used by the Debian GNU/Linux distribution. It is manipulated using dpkg and dpkg-deb (available on Debian systems and from ftp.debian.org). .rpm is a Red Hat RPM package, which is used in the Red Hat distribution. They can be found on ftp.redhat.com. .bz2 is a file compressed by the more recent bzip program. The "file" command can often tell you what a file is. If you find that gzip complains when you try to uncompress a gzip'ed file you probably downloaded it in ASCII mode by mistake. You must download most things in binary mode--remember to type binary as a command in FTP before using, "get," to get the file. 7.17 What does VFS stand for? Virtual File System. It's the abstraction layer between the user and real file systems like ext2, Minix and MS-DOS. Among other things, its job is to flush the read buffer when it detects a disk change on the floppy disk drive. VFS: Disk change detected on device 2/0 7.18 What is a BogoMip? "BogoMips" is a contraction of "Bogus MIPS." MIPS stands for (depending who you listen to) Millions of Instructions per Second, or Meaningless Indication of Processor Speed. The number printed at boot time is the result of a kernel timing calibration, used for very short delay loops by some device drivers. As a very rough guide, the BogoMips rating for your machine will be approximately: 386SX clock * 0.14 386DX clock * 0.18 486Cyrix/IBM clock * 0.33 486SX/DX/DX2 clock * 0.50 586 clock * 0.39 If the number is wildly lower, you may have the Turbo button or CPU speed set incorrectly, or have some kind of caching problem (as described in "When I add more memory, the system slows to a crawl..") For values people have seen with other, rarer, chips, see the BogoMips Mini-HOWTO, on sunsite.unc.edu in /pub/Linux/docs/howto/mini/BogoMips/. 7.19 What is the Linux Journal and where can I get it? The Linux Journal is a monthly magazine (printed on paper) that is available on news stands and via subscription worldwide. Email linux@ssc.com for details. Their URL is http://www.ssc.com/. 7.20 What online/free periodicals exist for Linux? There are a number of recent additions to the list of periodicals devoted to Linux. * Linux Gazette. http://www.linuxgazette.com. * Linux Weekly News. http://www.lwn.net. * Slashdot. http://www.slashdot.org. * Freshmeat. http://www.freshmeat.org. [Jim Dennis, Robert Kiesling] 7.21 How many people use Linux? Linux is freely available, and no one is required to register their copy with any central authority, so it is difficult to know. Several businesses survive solely on selling and supporting Linux. The Linux newsgroups are some of the most heavily read on Usenet, so the number is likely in the hundreds of thousands. Accurate numbers probably don't exist. However, one brave soul, Harald T. Alvestrand, Harald.T.Alvestrand@uninett.no, has decided to try, and asks that if you use Linux, send a message to linux-counter@uninett.no with one of the following subjects: "I use Linux at home," "I use Linux at work," or, "I use Linux at home and at work." He will also accept `third party' registrations--ask him for details. Alternatively, you can register using the WWW forms found at http://domen.uninett.no/~hta/linux/counter.html. He posts his counts to aun.uninett.no in /pub/misc/linux-counter/ or at the web page above. 7.22 How should I pronounce Linux? This is a matter of religious debate, of course! If you want to hear Linus himself say how he pronounces it, download english.au or swedish.au from ftp.funet.fi (in /pub/Linux/PEOPLE/Linus/SillySounds/). If you have a sound card or the PC-speaker audio driver you can hear them by typing cat english.au >/dev/audio The difference isn't in the pronunciation of Linux but in the language Linus uses to say, "hello." For the benefit of those who don't have the equipment or inclination: Linus pronounces Linux approximately as Leenus, where the "ee" is pronounced as in "feet," but rather shorter, and the "u" is like a much shorter version of the French "eu" sound in "peur" (pronouncing it as the "u" in "put" is probably passable). 8. Frequently encountered error messages. 8.1 Modprobe can't locate module, "XXX," and similar messages. These types of messages mostly occur at boot time or shutdown. If modprobe, insmod, or rmmod complain about not being able to find a module, add the following to the /etc/modules.conf or /etc/modutils/aliases file, whichever is present on your system. alias off And use the name of the module that appears in the error message. [J.H.M. Dassen] 8.2 Unknown terminal type linux and similar. In early kernels the default console terminal type has changed from "console" to "linux." You must edit /etc/termcap to change the line reading: console|con80x25:\ to linux|console|con80x25:\ (there may be an additional dumb in there--if so it should be removed.) To get the editor to work you may need say TERM=console (for bash and ksh), or setenv TERM console for csh or tcsh. Some programs use /usr/lib/terminfo instead of /etc/termcap. For these programs you should upgrade your terminfo, which is part of ncurses. 8.3 lp1 on fire This is a joke/traditional error message indicating that some sort of error is being reported by your printer, but that the error status isn't a valid one. It may be that you have some kind of I/O or IRQ conflict-- check your cards' settings. Some people report that they get this message when their printer is switched off. Hopefully it isn't really on fire ... In newer kernels, this message reads, "lp1 reported invalid error status (on fire, eh?)" 8.4 INET: Warning: old style ioctl... called! You are trying to use the old network configuration utilities. The new ones can be found on ftp.linux.org.uk in /pub/linux/Networking/PROGRAMS/NetTools/ (source only, I'm afraid). Note that they cannot be used just like the old-style programs. See the NET-2 HOWTO for instructions on how to set up networking correctly. 8.5 ld: unrecognized option '-m486' You have an old version of ld. Install a newer binutils package--this will contain an updated ld. Look on tsx-11.mit.edu in /pub/linux/packages/GCC/ for binutils-2.6.0.2.bin.tar.gz. 8.6 GCC says Internal compiler error. If the fault is repeatable (i.e., it always happens at the same place in the same file--even after rebooting and trying again, using a stable kernel) you have discovered a bug in GCC. See the GCC Info documentation (type Control-h i in Emacs, and select GCC from the menu) for details on how to report the error--make sure you have the latest version, though. Note that this is probably not a Linux-specific problem. Unless you are compiling a program many other Linux users also compile, you should not post your bug report to any of the comp.os.linux groups. If the problem is not repeatable, you may be experiencing memory corruption--see make says Error 139. 8.7 make says Error 139 Your compiler driver (gcc) dumped core. You probably have a corrupted, buggy, or old version of GCC--get the latest release. Alternatively, you may be running out of swap space--see My machine runs very slowly when I run GCC / X / .... If this doesn't fix the problem, you are probably having problems with memory or disk corruption. Check that the clock rate, wait states, and refresh timing for your SIMMS and cache are correct (hardware manuals are sometimes wrong, too). If so, you may have some marginal SIMMS, or a faulty motherboard or hard disk or controller. Linux, like any Unix, is a very good memory tester--much better than MS-DOS based memory test programs. Reportedly, some clone x87 math coprocessors can cause problems. Try compiling a kernel with math emulation ( How do I upgrade/recompile my kernel?.) You may need to use the "no387" kernel command line flag on the LILO prompt to force the kernel to use math emulation, or it may be able to work and still use the '387, with the math emulation compiled in but mainly unused. More information about this problem is available on the Web at http://www.bitwizard.nl/sig11/. 8.8 shell-init: permission denied when I log in. Your root directory and all the directories up to your home directory must be readable and executable by everybody. See the manual page for chmod or a book on Unix for how to fix the problem. 8.9 No utmp entry. You must exec ... when I log in. Your /var/run/utmp is screwed up. You should have > /var/run/utmp in your /etc/rc.local or /etc/rc.d/*. See ("I have screwed up my system and can't log in to fix it.") Note that the utmp may also be found in /var/adm/ or /etc/ on some older systems. 8.10 Warning--bdflush not running. Modern kernels use a better strategy for writing cached disk blocks. In addition to the kernel changes, this involves replacing the old update program which used to write everything every 30 seconds with a more subtle daemon (actually a pair), known as bdflush. Get bdflush-n.n.tar.gz from the same place as the kernel source code ( How do I upgrade/recompile my kernel?) and compile and install it. Bdflush should be started before the usual boot-time file system checks. It will work fine with older kernels as well, so there's no need to keep the old update around. 8.11 Warning: obsolete routing request made. This is nothing to worry about. The message means that your version route is a little out of date, compared to the kernel. You can make the message go away by getting a new version of route from the same place as the kernel source code. ( How do I upgrade/recompile my kernel?) 8.12 EXT2-fs: warning: mounting unchecked file system. You need to run e2fsck (or fsck -t ext2 if you have the fsck front end program) with the -a option to get it to clear the `dirty' flag, and then cleanly unmount the partition during each shutdown. The easiest way to do this is to get the latest fsck, umount, and shutdown commands, available in Rik Faith's util-linux package (` Where can I get Linux material by FTP?") You have to make sure that your /etc/rc*/ scripts use them correctly. NB: don't try to check a file system that's mounted read/write--this includes the root partition if you don't see VFS: mounted root ... read-only at boot time. You must arrange to mount the root file system read/only to start with, check it if necessary, and then remount it read/write. Read the documentation that comes with util-linux to find out how to do this. Note that you need to specify the -n option to mount so it won't try to update /etc/mtab, since the root file system is still read-only, and this will otherwise cause it to fail. 8.13 EXT2-fs warning: maximal count reached. This message is issued by the kernel when it mounts a file system that's marked as clean, but whose "number of mounts since check" counter has reached the predefined value. The solution is to get the latest version of the ext2fs utilities (e2fsprogs-0.5b.tar.gz at the time of writing) from the usual sites. (` Where can I get Linux material by FTP?") The maximal number of mounts value can be examined and changed using the tune2fs program from this package. 8.14 EXT2-fs warning: checktime reached. Kernels from 1.0 onwards support checking a file system based on the elapsed time since the last check as well as by the number of mounts. Get the latest version of the ext2fs utilities. "( EXT2-fs warning: maximal count reached.") 8.15 df says Cannot read table of mounted file systems. There is probably something wrong with your /etc/mtab or /etc/fstab files. If you have a reasonably new version of mount, /etc/mtab should be emptied or deleted at boot time (in /etc/rc.local or /etc/rc.d/*), using something like rm -f /etc/mtab* Some versions of SLS have an entry for the root partition in /etc/mtab made in /etc/rc* by using rdev. This is incorrect--the newer versions of mount do this automatically. Other versions of SLS have a line in /etc/fstab that looks like: /dev/sdb1 /root ext2 defaults This is wrong. /root should read simply /. 8.16 fdisk says Partition X has different physical/logical ... If the partition number (X, above) is 1, this is the same problem as in "fdisk: Partition 1 does not start on cylinder boundary." If the partition begins or ends on a cylinder numbered greater than 1024, this is because the standard DOS disk geometry information format in the partition table can't cope with cylinder numbers with more than 10 bits. You should see "How can I get Linux to work with my disk?" 8.17 fdisk: Partition 1 does not start on cylinder boundary. The version of fdisk that comes with many Linux systems creates partitions that fail its own validity checking. Unfortunately, if you've already installed your system, there's not much you can do about this, apart from copying the data off the partition, deleting and remaking it, and copying the data back. You can avoid the problem by getting the latest version of fdisk, from Rik Faith's util-linux package (available on all the usual FTP sites). Alternatively, if you are creating a new partition 1 that starts in the first cylinder, you can do the following to get a partition that fdisk likes. * Create partition 1 in the normal way. A `p' listing will produce the mismatch complaint. * Type `u' to set sector mode and do `p' again. Copy down the number from the "End" column. * Delete partition 1. * While still in sector mode, re-create partition 1. Set the first sector to match the number of sectors per track. This is the sector number in the first line of the `p' output. Set the last sector to the value you wrote down in the step above. * Type `u' to reset cylinder mode and continue with other partitions. Ignore the message about unallocated sectors--they refer to the sectors on the first track apart from the Master Boot Record, and they are not used if you start the first partition in track 2. 8.18 fdisk says partition n has an odd number of sectors. The PC disk partitioning scheme works in 512-byte sectors, but Linux uses 1K blocks. If you have a partition with an odd number of sectors, the last sector is wasted. Ignore the message. 8.19 mtools says cannot initialize drive XYZ This means that mtools is having trouble accessing the drive. This can be due to several things. Often this is due to the permissions on floppy drive devices (/dev/fd0* and /dev/fd1*) being incorrect--the user running mtools must have the appropriate access. See the manual page for chmod for details. Most versions of mtools distributed with Linux systems (not the standard GNU version) use the contents of a file /etc/mtools to determine which devices and densities to use, in place of having this information compiled into the binary. Mistakes in this file often cause problems. There is often no documentation about this. For the easiest way to access your MS-DOS files (especially those on a hard disk partition) see How do I access files on my DOS partition or floppy? Note--you should never use mtools to access files on an msdosfs mounted partition or disk! 8.20 At the start of booting: Memory tight -- Robert Kiesling kiesling@ix.netcom.com