Best of Technical Support

by Various
PPP on a PCMCIA Modem

My Dell arrived with factory-installed Red Hat 6.2, Kernel 2.2.14-6.1.1, and a factory-installed PCMCIA modem. All worked fine until one day, I turned on the PC and at bootup I was told:

Bringing up interface ppp0 FAILED

Somewhat later during bootup, this message appeared:

Couldn't configure serial #1 (port=760, irq=3):
  device already open
serial_cs: register_serial() at 0x2f8 IRQ 3 failed
This modem card works fine in my Gateway Windows box. Dell refuses to help. —Steve Lohr,

It's possible you have a program running that is tying up your serial port. Two common culprits are GPM, the text mouse dæmon, and one of several UPS monitoring dæmons. Use the ps ax | less command to look for such culprits. If you are still having problems identifying the culprit, try booting into single-user mode to shut down all unnecessary programs. Then use minicom to access the port directly, and verify that it can see your modem. —Chad Robinson,

Perhaps a lock still exists from a previous session not ending normally. See if there are any old lock files in /var/lock, such as LCK..modem or LCK..ttyS1. If there are, just delete the files and reboot. —Keith Trollope,

I Have No Nameserver and I Must nslookup

I am setting up a Linux machine that will masquerade my workstations and provide port-forwarding to my web/mail server. My question is, do I need an internal DNS server on my Linux machine to serve up DNS requests in order to browse the Web on my internal workstations? I would rather use the hosts file to define name-to-IP translations of my internal network. —Brandon Zumwalt,

You do not need a DNS server on your Linux box, but you also cannot use the hosts file to perform this lookup. The hosts file is used by services running on your Linux box itself. Your first option is to configure your internal systems to use the DNS servers provided by your ISP. Once you have masquerading set up properly, your workstations will be able to access them and resolve web addresses without further work. Alternatively, you can set up a DNS server on the Linux box that will cache workstation requests. If you want to simplify this configuration, use the forward-only sample configuration for BIND. That puts the server into caching-only mode, with no local tables of its own. —Chad Robinson,

Check your distribution's site for BIND security updates. Old versions of BIND, like the one that's probably on your distribution CD-ROM, are subject to automated attacks. Or run—Don Marti

X and Sound over the Net

Is there a way I can have an X window appear on more than one X server (display)? I may want to do it (perhaps read-only) for, say, DVD output to displays throughout my home.

Separately, when I run an X application from a remote machine, how can I get the sound to follow and output on my local sound device? I only seem to be able to get sound out of a configured sound card for the host that owns the application. Similar to the above, can this be redirected to more than one address (back to my DVD playing in every room fantasy)? —Matthew Holmy,

Xmx will allow you to display a normal X application on several X displays, However, for display speed reasons, some applications (like DVD players) bypass most of the X server when they write to your video card. Unless they have a slow, normal display mode, you can't do a remote display. You cannot send full framerate uncompressed video over Ethernet; it's too much data. You should, however, be able to rip a DVD on one machine, send it over the network and play it from disk on a different one. The network audio system lets you play sound over the network, Another program you can look at is located at —Marc Merlin,

make Just One Module?

I recently acquired a USB scanner (Epson Perfection 1640SU) and was successful in getting it to work with my Linux system (kernel 2.2.16-22). However, I need to modify one of the timeout parameters in scanner.h in the kernel source. How do I recompile this module to get scanner.o without having to recompile the entire kernel? Do I make a backup of /lib/modules/2.2.16 before I do this, and can it be safely restored in case of error? —Jin,

After modifying the file, simply type make (target), e.g., make bzImage, from your /usr/src/linux or similar directory. This will recompile only the necessary files. The Makefile set for Linux has been altered to always compile certain files, such as main.c, but only a few files fit that category. All of the drivers should be skipped except the one you've changed. If you've changed only the .h file, the make program may not recompile your driver. Try touch scanner.c to simulate having made changes to the file. In addition, you can make your life a lot easier by simply using a module instead, in which case you would not need to recompile the kernel, only rerun—Chad Robinson,

fsck without Reboot

I'm building a series of servers for a friend of mine, and they must stay on 24 hours a day, 7 days a week, 52 weeks a year (well, if they don't burn, obviously).

Is there a way to automatically recheck a mounted filesystem? —Franco Favento dei Favento da Trieste,

Switch to reiserfs, a journaling filesystem for Linux. Even without it, I have had Linux servers running for years without filesystem glitches, but reiserfs is more reliable. But if you really want to do a filesystem check, boot using a very minimal (better still, ramdisk) root filesystem, and store on it only those executables needed to run a minimal system. That will allow you to unmount the filesystems you actually need to check. —Chad Robinson,

Only a read-only check can be done on a mounted filesystem. It cannot be repaired:

fsck.ext2 -fn some-device

If it detects errors, you can plan downtime to repair the filesystem. —Keith Trollope,

Files Larger than 2GB

I am happy to report that my employers are moving to Linux in a big way for seismic data crunching, and they've given me a nice symmetric multipenguin. However, I routinely use files greater than 2GB. I've got reiserfs and a 2.4.2 kernel on the RH 7.0 installation now, but still can't deal with files greater than 2 —Adam Cherrett,

You should look at In addition to kernel and glibc support, you need to do one of the following in your programs: 1) Compile your programs with gcc -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE. This forces all file access calls to use the 64-bit variants. Several types change also, e.g., off_t becomes off64_t. It's therefore important to always use the correct types and to not use, for example, int instead of off_t. 2) Define _LARGEFILE_SOURCE and _LARGEFILE64_SOURCE. With these defines you can use the LFS functions like open64 directly. 3) Use the O_LARGEFILE flag with open to operate on large files. —Marc Merlin,

Finding Memory Hogs

I have recently installed Linux on my PC with 256MB RAM. I wanted to use it as my experimental system with an Oracle server and for some Java development.

To my surprise, the system was striving for resources, especially memory. So I booted it fresh, and without an X session I checked for memory usage with free. It was showing that about 110MB was used. How do I decide what processes are using how much memory? —Dhimant Patel,

Be sure to note the “-/+ buffers” line when running the free command. Linux will automatically use available RAM to buffer I/O requests, and this memory will be freed for program use as necessary. Your primary concern should be the “used” indicator for your Swap space. It should be small—less than a few megabytes. You can use the ps aux | less command to examine the memory usage of each running process. Only the resident set size (RSS) value should be important here, but be aware that the memory indicated is not necessarily used as-is by each process. That discrepancy has to do with the fact that ps will show all memory used, even by shared libraries, although they are loaded only once for all processes that need them. —Chad Robinson,

make zdisk Makes SuSE Box zdead

I compiled kernel 2.2.16 from SuSE using make zdisk. When I boot my system, the progression dot goes to the end of the screen and bombs out with the error mesage “out of memory”. —Eskinder Mesfin,

You need to compile with make bzdisk to solve that problem; it shuffles memory around in different ways to make bigger kernels work. —Marc Merlin,

Matthew 9:17

I made some backup tapes using ftape (HP/Colorado Travan 1). I could read them fine on Red Hat 5.2, but on later releases (e.g., 6.2, 7.0) it acts as if nothing is on the tape. —Jim Haynes,

In the newer versions of ftape, a fixed block size on the tape is used rather than the variable size previously used. To change the block size to a variable size, type:

mt -d /dev/qft0 setblk 0

Information on the old and new versions can be found on the >tape home page, —Keith Trollope,

Load Disqus comments