Best of Technical Support

Various

Issue #31, November 1996

Our experts answer your technical questions.

Bootable Kernels and Slackware Installation

I have a new scsi controller (aha2940) which my only hard drive is connected to. I can get the latest boot disk for my controller, but the kernel that gets installed by Slackware is unbootable. How do I use the kernel on my boot disk as a kernel for my hard drive? How can I boot from the floppy and compile a kernel for my hard drive?

Manni Wood

A Work-around

During the Slackware installation procedure, a kernel is installed from the distribution set instead of from the boot disk that you used to start your i system. Handling the installation this way has the unfortunate side effect of making certain hardware devices unrecognizable to your new system since only two kernels are included in the distribution set—one for IDE and another for SCSI-based systems. The installation is handled this way because the boot disk kernels are “all-in-one” packages that have device drivers for every imaginable piece of hardware. This is quite inefficient for normal use, since many of the drivers are unused and these extra options will waste memory. After you install Linux you should compile and install a new kernel image with only the options you really need.

While you are setting up your system, you can use a temporary work-around that will let you use the boot disk's kernel to boot your system. Slackware boot disks prompt you for a set of options to pass to the booted kernel. One of the options will allow you to boot a system that has no working kernel image installed. At the prompt, type mount root=/dev/X , where X specifies the drive and partition where you installed Linux, e.g. sda, hdb2. This boot disk can be quite handy to have in case you forget to re-run LILO after installing a new kernel, because your system will be unbootable without it. When it is used in conjunction with a root diskette that also contains some diagnosis and recovery tools, you will have a powerful pair of emergency utility disks.

Once Linux is running you need to copy a working boot kernel to wherever LILO (assuming you installed LILO) is looking for your current image. As a general practice you'll want to keep a backup copy installed as well. You can control LILO by editing /etc/lilo.conf. The default file should be fairly well commented and you can consult the LILO documentation for more details. If you don't have the original file you can copy the boot diskette onto your drive as a kernel image with the command:

dd if=/dev/fd0 of=/tmp/myimage bs=8192

replacing if and of with the appropriate input and output locations. After the new kernel file is in place, rerun LILO by typing lilo so it can rebuild its boot tables. If you forget to take this step you will not be able to boot your system! To recompile and install a new kernel, obtain a kernel and extract the archive into /usr/src/linux. Users with Slackware distributions set up for kernel version 1.2 need to beware. Many things have changed as Linux has grown to version 2.0, so many things can break. You may wish to make this step later. Slackware 3.0 comes with the complete set of the newest version 1.2 kernel package, in the K disk set. Either install that or unpack your desired package into /usr/src/linux.

The easiest and safest (though not the nicest looking) way to rebuild the kernel is to then cd into /usr/src/linux, type make config, and answer all the questions. Then type make dep; make clean; make zImage. If you are running on an Intel platform your new kernel image will be produced in /usr/src/linux/arch/i386/boot/zImage . Be prepared to wait, especially if you have a slow machine. If you are using a newer kernel package, you might type make menuconfig or one of the other combinations (see Makefile for details) for a better-looking configuration process.

—Chad RobinsonBRT Technical Services Corporation chadr@brttech.com

Drivers for 8 or 16 Port Serial Cards

Do you know where I could find a driver for a Jaws (extinct?) JCom-8 eight port serial card? What other 8 or 16 port cards would allow me to operate 8 Wyse 150 terms from Linux? —Gary Richardson

Here's One Source

That's not a card I've ever even heard of. To answer the second part of the question, there are several cards out there that can do what you need. The kernel has direct support for all of the Cyclades boards. We use a 16 port PCI Cyclades at Red Hat and it worked right out of the box (though it requires a kernel recompile or a module to be built).

—Donnie Barnes, Red Hat Software djb@redhat.com

Formatting Back-up Tapes

Is there any program/utility that will format, read the contents of and selectively back up or restore information on tapes?

—Dave Blondell

A Utility for Backing up and Restoring

There's a powerful utility called

Taper

that's able to selectively back up and restore information on tapes, with or without verifying. It's very easy to use as you can just tag the files or directories from menus. [See “Tar and Taper for Linux”, by Yusuf Nagree, in LJ #22—Ed] Unfortunately, it cannot format tapes, so they must be bought preformatted (or formatted under DOS). I'm not aware of any utility that lets you format tapes under Linux.

—Flavio Villanustre flavio@newage.com.ar

XF86Cig File under X-Windows

I am now trying to set up X-Windows, but I have no idea how the sections for “Device” and “Screen” of XF86Config file should be described. If you have any concrete example for my card, will you kindly let me know? My video card is: Canopus Power Window 968PCI-4M (S3)

—Hiroshi Shibata

Try This Instead

Rather than hacking the XF86Config by hand, have you tried using xf86config? (It should be in /usr/X11/bin.) The copy of xf86config that I have here (from 3.1.2D) lists an S3-968 (generic) option and that should work for you. The xf86config that comes with the latest XFree86 might even list your card specifically. If it doesn't work, you might want to try using some of the options at http://www.xfree86.org/3.1.2/S3-1.html for other cards using the same chipset.

—Steven Pritchard,President, Southern Illinois Linux Users Group

Setting up Usenet News

How do I set up Usenet news (with CNews or INN)? What documentation/books are available?

—Koen Rousseau kobalt@innet.be

First, Obtain a News Feed ...

First, if you want to carry the “real” Usenet, you must obtain a news feed from somewhere. Your ISP should be able to point you in the right direction, or sell you one themselves. Note that you don't necessarily need a news feed to use INN or CNews. If you only want to support some some local news groups, within a company intranet for example, then you don't need an outside feed. Looked at in that light, a Linux PC and INN can provide one of the most-touted features of a product like Lotus Notes (group conferencing and company-wide discussion forums) at a fraction of the cost. Once you've made arrangements for a feed, then you need to install the software. I recommend INN for new sites. You have a Red Hat distribution, and Red Hat has an RPM (Red Hat Packaging System) for INN on their ftp site under ftp://ftp.redhat.com/pub/contrib/RPMS/inn-1.4unoff4-2.i386.rpm. Download, then install with:

rpm -i inn-1.4unoff4-2.i386.rpm

It works right “out of the box”. You will, of course, have to configure it for your site—add your feed site to /etc/news/newsfeeds, nntpsend.ctl and hosts.nntp. Verify that the groups you want to carry are in /var/lib/news/active and newsgroups, and then configure nnrp.access to allow reading/posting from the proper IP addresses.

After that is all working add /usr/lib/news/bin/news.daily and nntpsend to /etc/crontab. News.daily and nntpsend should be run as user “news”, not as root. These programs expire old news and transmit your site's outgoing posts, respectively.

The RPM installs a FAQ under /usr/doc that should answer most of your questions.

—Bob Hauck, Wasatch Communications Group bobh@wasatch.com