Best of Technical Support

Our experts answer your technical questions.
Support Your Local CD-ROM

I am trying to install Linux 6.0 on my 486. I have run into serious problems. Red Hat Linux 6.0 does not seem to recognize my Sony CD-ROM. Several e-mails and phone calls to Technical Support at Red Hat have not solved my problem. The error message I keep getting is “I could not mount your CD on device hdk”. I was asked to download the new boot image and try installing it again, but was not successful. I was asked to give some parameters at the boot prompt, again in vain. The last suggestion I got from tech support is to buy a new CD-ROM. The CD I have is Sony Atapi CD76E. It is an IDE controller. Is there anyone who could let me know how I can work around this problem so that I don't have to buy another CD-ROM? —Srilakshmi, RSSri@aol.com

You say the installation is trying to mount the CD drive as /dev/hdk—that's the 11th drive on your system! I suspect this is not correct, and the kernel merely needs to be nudged toward the correct device. Consider first the naming conventions for IDE drives (including CD drives):

  • First IDE drive on 1st controller: /dev/hda

  • Second IDE drive on 1st controller: /dev/hdb

  • First IDE drive on 2nd controller: /dev/hdc

  • Second IDE drive on 2nd controller: /dev/hdd

You should see the pattern. What you probably need to do is determine which /dev device points correctly to your drive, and tell the Linux kernel what it is at the boot: prompt. For example, if you have two IDE controllers on your system (very common), the first controller has one IDE hard drive and the second controller has your CD drive. Thus, you should point your kernel to /dev/hdc. At the boot: prompt, type:

hdc=cdrom
There will be something before this on the boot: line that needs to be typed in; probably linux or install. Red Hat support should be able to tell you what needs to precede the line above. —Erik Ratcliffe, erik@calderasystems.com

Control Issues

I'm using Linux and I'm wondering how I can control a TELNET session from a shell script. In DOS, I would use a keyboard buffer, but it seems this is not available in Linux. I would like to send characters, wait for a special response, then send something again. How can I do that? —Thomas Lienhard, tl@tlienhard.com

You can open a pipe to telnet and send data to its STDIN and read responses from STDOUT. Using the keyboard buffer makes no sense in UNIX, as no process accesses the keyboard; they just read from standard input. If using the telnet command doesn't work, you can try netcat (available within Debian). Also, note that most languages support TCP connections; expect, for example, is a Tcl extension designed to perform exactly the task you need to accomplish: sending input and expecting responses. —Alessandro Rubini, rubini@prosa.it

What you are looking for is expect. This is exactly what it was designed for. man expect on any Linux box with it installed will give you the information you need, or you can download it from http://expect.nist.gov/ if you don't already have it. —Mark Bishop, mark@bish.net

Executions 'R' Us

I'm using the KDE window manager, KDM and tcsh. My distribution is Mandrake 6.0. In my home directory, I'm keeping .cshrc and .login for my own initializations, but the problem is that after logging to an X session and invoking any terminal (xterm or kvt), the .login is not executed at all (.cshrc executes fine). Both files (.cshrc and .login) have execute permission and properly execute in a normal (batch) session. Where and how do I need to tell X (and/or KDM) to execute my .login after start-up? —Valentine Kouznetsov, vkuznet@fnal.gov

When you log in to the computer using a display manager, no login shell is started, so no .login or .bashlogin is sourced. The display manager handles the authentication and runs your display configuration without passing through a shell. You need to perform all of your initialization from within .cshrc. That's one of the reasons I don't run a display manager at all. —Alessandro Rubini, rubini@prosa.it

Need Fire Protection

Is it possible to run a Linux firewall using IP mask connecting a small network to the Net using a cable modem? —Tom, tlross@home.com

Yes, it is the easiest firewall configuration. Just run

ipfwadm -a accept -m

or an equivalent ipchains command. —Alessandro Rubini, rubini@prosa.it

______________________

Webinar
One Click, Universal Protection: Implementing Centralized Security Policies on Linux Systems

As Linux continues to play an ever increasing role in corporate data centers and institutions, ensuring the integrity and protection of these systems must be a priority. With 60% of the world's websites and an increasing share of organization's mission-critical workloads running on Linux, failing to stop malware and other advanced threats on Linux can increasingly impact an organization's reputation and bottom line.

Learn More

Sponsored by Bit9

Webinar
Linux Backup and Recovery Webinar

Most companies incorporate backup procedures for critical data, which can be restored quickly if a loss occurs. However, fewer companies are prepared for catastrophic system failures, in which they lose all data, the entire operating system, applications, settings, patches and more, reducing their system(s) to “bare metal.” After all, before data can be restored to a system, there must be a system to restore it to.

In this one hour webinar, learn how to enhance your existing backup strategies for better disaster recovery preparedness using Storix System Backup Administrator (SBAdmin), a highly flexible bare-metal recovery solution for UNIX and Linux systems.

Learn More

Sponsored by Storix