10. Frequently Encountered Error Messages

10.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 <module-name> off

And use the name of the module that appears in the error message.

[J.H.M. Dassen]

10.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 type:

   $ 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 package, which is part of ncurses.

The same is true for X terminal displays. If your distribution sets the TERM to something strange like xterm-24-color, you can simply reset it to a generic value from the command line:

   $ TERM="xterm"; export TERM

10.3. 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/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 the old-style networking programs correctly. Even better, see the NET-3 HOWTO and upgrade your networking software.

10.4. ld: unrecognized option '-m486'

You have an old version of ld. Install a newer binutils package that contains an updated ld. Look on tsx-11.mit.edu in /pub/linux/packages/GCC/ for binutils-2.6.0.2.bin.tar.gz.

10.5. 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 F1-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. Refer to the answer: (``Make Says, ``Error 139.'''')

10.6. Make Says, ``Error 139.''

Your compiler (GCC) dumped core. You probably have a corrupted, buggy, or old version of GCC—get the latest release or EGCS. Alternatively, you may be running out of swap space. Refer to: (``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 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?'') 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/.

10.7. 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.

10.8. No Utmp Entry. You Must Exec ... when Logging 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.

10.9. 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.

10.10. 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?'')

10.11. 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. Almost all distributions do this. If your's doesn't, 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.

10.12. 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.

10.13. 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.'')

10.14. 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 old Linux distributions have an entry for the root partition in /etc/mtab made in /etc/rc* by using rdev. That is incorrect—the newer versions of mount do this automatically.

Some old distributions also have a line in /etc/fstab that looks like:

   /dev/sdb1   /root   ext2   defaults

The entry for /root should read simply /.

10.15. 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?'')

10.16. 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.

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.

10.17. 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.

10.18. A Mtools Utility Says It 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!

10.19. At the Start of Booting: Memory tight

This means that you have an extra-large kernel, which means that Linux has to do some special memory-management magic to be able to boot itself from the BIOS. It isn't related to the amount of physical memory in your machine. Ignore the message, or compile a kernel containing only the drivers and features you need. (``How Do I Upgrade/Recompile My Kernel?'')

10.20. My Syslog says, ``end_request: I/O error, ....''

This error message, and messages like it, almost always indicate a hardware error with a hard drive.

This commonly indicates a hard drive defect. The only way to avoid further data loss is to completely shut own the system. You must also make sure that whatever data is on the drive is backed up, and restore it to a non-defective hard drive.

This error message may also indicate a bad connection to the drive, especially with home brew systems. If you install an IDE drive, always use new ribbon cables. It's probably is a good idea with SCSI drives, too.

In one instance, this error also seemed to coincide with a bad ground between the system board and the chassis. Be sure that all electrical connections are clean and tight before placing the blame on the hard drive itself.

[Peter Moulder, Theodore Ts'o]

10.21. ``You don't exist. Go away.''

This is not a viral infection. It comes from programs like write, talk, and wall, if your invoking UID doesn't correspond to a valid user (probably due to /etc/passwd being corrupted), or if the session (pseudoterminal, specifically) you're using isn't properly registered in the utmp file (probably because you invoked it in a funny way).

10.22. ``Operation not permitted.''

One or more of the file's or directory's attribute bits are set incorrectly. If the ``I'' bit is set, for example, you won't be able to change file permissions with chmod.

The solution is to use lsattr to display file and directory attributes, and chattr to set and unset them. The programs' documentation is contained in their manual pages.

[Paul Campbell]

10.23. programname: error in loading shared libraries: lib xxx..so. x: cannot open shared object file: No such file or directory.

A message like this, when the program that you're trying to run uses shared libraries, usually means one of two things: the program was either compiled on a machine that had a different set of libraries or library paths than yours; or you've upgraded your libraries but not the program.

Executable programs that are linked with dynamic libraries, expect the full pathname of each of the library files it requires. So do the shared libraries, if they rely on other libraries. This is so the shared object dependencies remain as unambiguous as possible, and also as a security measure.

Short of recompiling the executable file for the libraries on the system—probably the most desirable alternative in the long run—you can try to determine which libraries the executable file needs with the command: ``lddprogramname.'' The output will be a list of the shared libraries on the system that the program needs to run, as well as the missing libraries. You can then add the library packages, or if the libraries already exist in a different directory, you can create a symbolic link so the program can find it. For example, if the program requires /usr/lib/libncurses.so.2, and your machine has /lib/libncurses.so.2, you can create a link where the program expects to find the library; e.g.:

# cd /usr/lib && ln -s /lib/libncurses.so.2 .

You should note, however, that creating library links like these should be considered a security risk, and the additional links you create will not be compatible with future upgrades. It's simply a quick fix for backward compatibility.

Also, it may take some guesswork to determine in exactly which of the system library directories the program expects to find a shared library file, because ldd will not list the paths of libraries it can't find. A program most likely will tell the run-time linker, /lib/ld.so, to look for shared libraries in /lib, /usr/lib, /usr/local/lib, or /usr/X11R6/lib, if it's an X client. But that doesn't mean that libraries can't be installed elsewhere. It helps to have some idea of the original library configuration before proceeding.

Also be sure to run ldconfig after creating the symbolic link, so that ld.so has an updated view of the system's libraries. You should also make certain that all of the library directories are listed in /etc/ld.so.conf, and perhaps in the LD_LIBRARY_PATH environment variable.

10.24. ``init: Id "x" respawning too fast: disabled for 5 minutes.''

This means, generally, that the system is booting by default into runlevel 5, which enables a graphical login via xdm/kdm/ gdm/whatever program, and can't locate it.

In other situations, ``Id'' might indicate the absence of another program.

The temporary solution in this case is to switch to runlevel 3, a standard text-mode login, by typing ``telinit 3.'' To make the change permanent, set the correct runlevel (1,2,3, or 5) in the initdefault line of /etc/inittab.

Some systems, however, rewrite /etc/inittab when booting. In that case, refer to the init man page, and/or the settings in /etc/sysconfig/init.