Best of Technical Support

Various

Issue #44, December 1997

Our experts answer your technical questions.

Setting Up Linux to use Two Processors

I just upgraded to a dual Pentium Pro machine. The BIOS sees the two processors but I can't tell if Linux (Kernel 2.0.27) uses both processors. How do I make Linux use its SMP features?

—Jon Bishop Red Hat 4.1

To take advantage of SMP you'll need to recompile your kernel to use both processors. First make sure the kernel-source RPM is installed. Then go to /usr/src/linux and edit the Makefile. You'll find a line that looks like:

# SMP = 1

Uncomment that line by removing the hash symbol. Then build a kernel as you normally would (see the Kernel HOWTO at http://sunsite.unc.edu/LDP/ for more information).

—Donnie Barnes, MIS Director Red Hat Software, info@redhat.com

Signal 11 Error

When I try to compile a new kernel with custom specifications, the compile fails at approximately the mid-point, giving me an error message that reads:

gcc: internal compiler error 11.

Please tell me what this could mean.

—Joe Ortiz Slackware 2.0.30

It very likely has something to do with your hardware configuration. There is a web server dedicated to the signal 11 problem. Check out http://www.bitwizard.nl/sig11/. Hopefully the information there will solve your problem.

—Pierre Ficheux Lectre Systèmès

I have seen this happen on several machines. Every time the problem is a bad memory chip installed on the computer's motherboard. Signal 11 is the Segment Violation error which generally occurs when a program's pointers go awry.

gcc is a stable enough program that this should not occur during a simple compile, but it does use memory heavily, and Linux (or any Unix) is quite sensitive to bad memory.

It is also possible that a library file on your system is corrupt or incompatible with other libraries. If, however, this was the case, you should see problems in other programs as well. Library corruption should only happen if you have recently installed new libraries or modified your existing system libraries.

—Chad Robinson, Senior Systems Analyst BRT Technologies, chadr@brt.com

Mixing Linux and NT

How can I get Linux to install on a system along with WinNT? I have plenty of unpartitioned space available.

—Casey Woodrum Red Hat 4.2

The only trick with mixing Linux and NT is configuring the boot process. Linux will install as usual, but you may need to fix up the boot setup by hand once the installation is finished. Assume NT is on partition /dev/sda1 and you install Linux on partition /dev/sda2. Try to be sure your Linux partition is a primary partition on a cylinder less than 1024. This isn't necessary, but it simplifies things.

You should use Microsoft's master boot record instead of LILO. Do not install LILO onto the master boot record of the hard disk. NT will crash dump in most cases with LILO as the master boot record. With all this in mind, take the following steps:

1. Edit the /etc/lilo.conf file so that:

boot=/dev/sda2

is the first line. Selecting /dev/sda2 as the target for LILO during installation should have done this for you.

2. Add an entry to boot NT at the end of lilo.conf:

other = /dev/sda1
label = nt

If the installation program is smart enough, you should be able to configure this during installation.

3. Run LILO to install the new lilo boot configuration.

4. Reboot into NT. Use FDISK under NT to mark partition 2 (/dev/sda2) as active. You should get LILO on reboot. From the LILO boot prompt, you can type nt to get the NT boot loader.

If the installation process doesn't configure LILO correctly, you may need to boot Linux from floppy and edit the files on the hard disk from floppy.

—Larry M. Augustin, VA Research lma@varesearch.com

An undocumented FDISK parameter can help you out of tight spots if you create trouble on your disk. Run:

fdisk /mbr

to restore the master boot record on your boot drive. This will remove LILO, allowing you to use Windows NT if you somehow cause trouble during the installation process.

—Chad Robinson, Senior Systems Analyst BRT Technologies, chadr@brt.com

Configuring Red Hat for a Second PPP Connection

I cannot get a second PPP connection to work correctly. I used the X Window tool netcfg to set up ppp0 to connect with the University of South Florida. This setting seems to work properly, connecting and disconnecting fine. Then, I set up ppp1 to connect to Compuserve. This appears to connect okay, but I cannot shut down the modem without shutting down my Linux PC. When I look at the system messages file, I see that the scripts start out using ppp1 settings for the connection but once PPP is started it says it is connected to ppp0. I also see that ppp0 registers with the kernel and not ppp1 as it should. I have tried to figure out the various scripts involved but can't make heads or tails of them. I am new to Linux and don't understand the BASH scripting language well. Help.

—Mike Richards Red Hat 4.2

Red Hat's PPP number assignment scheme is broken. Their scripts don't guarantee that ppp1, labeled in the setup utilities, will be activated in the kernel as ppp1. This happens because PPP connections are assigned dynamically. Although you may have defined ppp1 in the Red Hat configuration utility, that setup will be registered as ppp0 inside the kernel if it is the only PPP connection active.

I need a little more detail about your setup to suggest the best fix to your problem, but here's how the scripts work under Red Hat. This may give you enough information to work out a solution.

The file /etc/rc.d/init.d/network is run at boot time with the argument “start”. It looks for configuration files of the form ifcfg* in the /etc/sysconfig/network-scripts/ directory. As a result, if you edit (as is common when not running X) one of those files with an editor that creates a backup file (e.g., ifcfg-eth0~), the Red Hat scripts will run the backup file as well as the new file. For each connection type (Ethernet, PPP, PLIP, etc.), there are “up” and “down” files that start and stop the connection. The network script runs the “up” script with the appropriate ifcfg file as an argument, e.g., /etc/sysconfig/network-scripts/ifup-ppp /etc/sysconfig/network-scripts/ifcfg-ppp0.

There is a corresponding “down” script to shutdown the connection called /etc/sysconfig/network-scripts/ifdown-ppp /etc/sysconfig/network-scripts/ifcfg-ppp0.

You can run these scripts from the command line for testing purposes.

—Larry M. Augustin, VA Researchl mai@varesearch.com

My Mouse Won't Work

My new system came with a new Microsoft Mouse. This mouse doesn't work with Linux. After a couple of days of messing around, I've come to the conclusion that there is a problem with my model of the Microsoft Mouse—on the underside of the mouse is the designation Serial Mouse 2.1A. I have concluded that the problem lies with this mouse because the new system works perfectly well with my old Microsoft Mouse. Is something wrong with the new mouse?

—Ed Green Slackware 2.0.29 Walnut Creek

I don't have access to the newest mouse, so Francois Chastrette has helped a lot with this problem. We are working on a satisfactory solution to include in gpm 1.12 right now (end of August). By the time you read this Linux Journal, the new version of the mouse server should be available by FTP.

X support might take a bit longer as the X team has a huge package to manage. In the meantime, you can use the -R option of gpm to feed clean mouse packets to the X server.

—Alessandro Rubini rubini@linux.it