Best of Technical Support

by Various
Trouble with Netscape

I am having trouble getting Netscape to run on Linux. I have Windows NT in the first 4G and installed Linux in the remaining 4G partition. Linux detects the Ethernet card when first installed, but when I log off to use NT and then go back to Linux, Linux no longer sees my Ethernet card. It gives me a “domain not bound” error. I would like to know what is happening. —Yong, yboone@novell.com

Netscape is known to have lots of bugs and problems and not only with Linux in my experience. I recently reinstalled the 4.75RPMs (from the Red Hat ftp site) and, as of now, there seem to be fewer problems, especially related to Java. It is still quite usual for the first process of Netscape to die, but new instances of the program will run fine. Regarding your Ethernet card, you do not mention the brand/model, but I solved a similar problem by turning off the PnP feature of a 3Com 3c590 Ethernet card and, under Windows, making it work as ISA or EISA. Linux worked fine after that. —Felipe E. Barousse Boué, fbarousse@piensa.com

Adjusting Ethernet Cards

I am setting up a cable modem. I have a 10/100 Ethernet card running at full duplex. How do I lock the card to 10MB and half duplex? Is this in the “hwconf” file? If so what does the syntax look like? Any additional help is appreciated. Also, I am running a RCA Cable Modem. —David A. Bower, davidbower@iwon.com

You do not specify the brand of Ethernet card you have. But, usually there is a diskette that comes with the card (or you can download it from the card manufacturer's site) that allows you to turn off the Plug-and-Play and duplexing features of the card. Bear in mind that for some cards this change doesn't really do anything to the behavior of the card, in respect to Linux at least. I would suggest looking at the Ethernet-HOWTO at www.linuxdoc.org/HOWTO/Ethernet-HOWTO.html where you can find additional information about your specific card's settings. —Felipe E. Barousse Boué, fbarousse@piensa.com

Cable modems can be frustrating because they often use a form of DHCP designed for Windows systems only. Setting your card to run half duplex may help and can be done by using the driver as a module rather than as a built-in driver. Then use insmod mydriver.o full_duplex=0. Note that there are a few cards that do not support this parameter. I have had problems even after doing that. To get my cable modem working under Linux, I had to specify ALL of the following switches on the command line of “dhcpcd”: -r -h myhostname.in.windows -I 1:xx:xx:xx:xx:xx:xx -l 3600 eth0. This tells the program to use the RFC1541 (obsolete) protocol, to specify the host name (which you can get by running WINIPCFG from your working Windows system), and to specify the Ethernet address and card (from the same machine; may not be required for you). —Chad Robinson, crobinson@rfgonline.com

Num Lock on Dual-Boot

My machine is set up to dual-boot Red Hat Linux 6.2 and Windows 98. When it boots to Windows 98, the Num Lock stays on, but when it boots to Linux, the it goes off. Is there a way to change this behavior so I don't have to press the Num Lock key each time I start Linux? —Michael Kaneshige, kaneshige@uswest.net

If you are working in text mode, look at the man page for the setleds command. In one of the initialization scripts, let's say /etc/rc.d/rc.local, add something like:

for i in 1 2 3 4 5 6 7 8 dosetleds -D +num < tty$i done

This will turn on Num Lock by default when booting up your system. If you are using a Graphic User Interface, there is usually an Options setting specifically for the Num Lock status at boot time. —Felipe E. Barousse Boué, fbarousse@piensa.com

You can add these commands to your /etc/rc.d/rc.local boot script:

INITTY=/dev/tty[1-8] for tty in $INITTY; setleds -D +num < $tty
done

--Pierre Ficheux, pficheux@com1.fr

PCMCIA Card on a Laptop

I'm installing Red Hat 6.1 on a laptop. How do I get it to read/load the pcmcia card and not the eth0? —Anthony G., anthonynvs@relaypoint.net

You should look at the /etc/rc.d/rc3.d/* startup scripts to see the order in which the pcmcia and eth0 boards are initialized. Renaming the files with higher or lower numbers (S10xxxxx, S20xxxx, etc.) will redetermine that order. Many startup services are stored there, so be careful when playing with these files. Also, check the chkconfig --help command, so you can turn one service on and the other off. Lastly, to manually initialize or stop the pcmcia or Ethernet boards, use the commands:

/etc/rc.d/init.d/pcmcia [stop|start|restart]ifdown eth0
ifup eth0

--Felipe E. Barousse Boué, fbarousse@piensa.com

Emulating VT100

When I telnet from a Linux PC to a Linux server and edit a file on the remote PC using vi, I get a screen full of ANSI X3 cursor control characters. My PC does not seem to emulate the VT100. I have set TERM=vt100 in my .bash_profile and used EXINIT='term=vt100' and even used command mode in vi (:term=vt100), all to no avail. What am I doing wrong? Thanks in advance. —Dominic Wild, wildd@optusnet.com.au

Seems you need to adjust the TERM variable to the correct values. You are doing the right thing except you may not be using a vt100 emulation. Try using “ansi”. Bear in mind that you may have to set the correct emulation mode on both the machine you are logging into and the machine you are logging from. That is, every emulation on your setup must be the same in order for it to work. To check which emulations are in use on the machine you telnet from, check the environment variables with the “env” command. —Felipe E. Barousse Boué, fbarousse@piensa.com

The terminal settings ($TERM, etc.) have no effect on the terminal itself. They only tell applications what the current terminal is, i.e., what escape sequences it generates and accepts. Therefore, if you force $TERM to vt100, applications will send vt100 commands to a TTY that is not a vt100. I suspect your terminal name should be “linux”, “xterm”, “rxvt” or whatever is appropriate for the terminal emulator you are using. Since $TERM is propagated across Telnet sessions, you cannot change only its value. —Alessandro Rubini, rubini@linux.it

Cannot Load Tulip Driver

I have a SMC 8432T Ethernet adapter. All the info I've gathered is that it's a DEC 21041 chip, and the driver is tulip.o. Problem is that KDE won't load the tulip driver, only 24x5. But my biggest frustration is that I can't find a tutorial for manual setup anywhere. —Al Smolkin, alik713@home.com

You have to load the tulip driver from the actual Linux boot process, not from KDE or any other GUI. My machine also has a tulip-based card, and I handle it like this in my Red Hat 6.1 system. In file /etc/conf.modules, there is a line:

alias eth0 tulip

I compiled the module tulip.c into tulip.o and placed it in /lib/modules/2.2.16-3/net/tulip.o, where it gets loaded at boot time. Once loaded, you can run level 5; that is, you may turn on any graphic environment you desire. To manually load the module (after it has been compiled), try the command:

insmod tulip
Then you can cat the file /proc/modules to check if the tulip module has been loaded into your system. —Felipe E. Barousse Boué, fbarousse@piensa.com

Make sure the 21041 is really what you have; it might actually be a 21040, in which case the IRQ and port won't always be found automatically. You can tell this by looking at the large black chip on the card, it will have this number stamped on it. To be quite honest, old SMC Ethernet cards can be a pain; I've used them for years, and I have to do something different for each one. You can get your card to work, but if you're frustrated, why not try the Etherpower II? It will be recognized instantly, and they're pretty cheap these days. —Chad Robinson, crobinson@rfgonline.com

Configuring Sendmail and POP3

Please help me out in setting up sendmail to handle POP mail for my internal network. The network has one Linux server, satish.enet.com, which has sendmail and DNS. DNS is configured and I am able to send and receive mail to users on the Linux machine, but I am not able to send and receive mail through Outlook Express in Windows 9x. —Dasi Satish, sdasi@manraonline.com

To enable POP3, you have to uncomment the pop3 entry on the file /etc/inetd.conf. After that, you have to reinitialize the inetd process using the command:

/etc/rc.d/init.d/inet restart

Then, configure the Outlook client to use satish.enet.com for the POP server (incoming mail server). You need to have usernames and passwords configured on the Linux server for POP to work correctly. Also, sendmail must be running on your Linux server to be able to provide SMTP service (outgoing mail) to your Outlook clients. Therefore, set up the SMTP server to use the same machine. You may need to set /etc/mail/access with lines such as:

aaa.bbb.ccc.ddd    RELAY
where aaa.bbb.ccc.ddd are the IP addresses of the PCs on your LAN. This allows them to use the mail facilities of the Linux box without getting “relaying denied” messages. Erase the /etc/mail/access.db file, restart sendmail with:
/etc/rc.d/init.d/sendmail restart
and you should be sending and receiving mail through your Linux box to the Outlook clients. —Felipe E. Barousse Boué, fbarousse@piensa.com

Sendmail is not a POP server. POP is a pull technology that clients who are not always connected use to get their mail. SMTP (Sendmail's bailiwick) is a push technology that expects the remote system to be connected at all times. You need a POP dæmon. There are several available on the Internet, and most likely, one was installed on your system by default. —Chad Robinson, crobinson@rfgonline.com

Setting Inodes for Small Files

I need to fine-tune the ext2 file system of a new server to handle a large amount of extremely small files (10K or less). How do I format the drive so that it can handle these small files without running out of inodes? —Ether Trogg, ethertrogg@mindspring.com

All you need to do is increase the number of inodes on the system. You can do so using the “-i” parameter of “mke2fs”. Most systems use 4096 as the default value, which means you will get one inode for every 4096 bytes on your system. This should be fine for your 10K requirement, since that will average two or three inodes per file. However, if you find yourself with many files <4K in size, try values of 2048 or 1024. Anything lower is probably counterproductive. —Chad Robinson, crobinson@rfgonline.com

Mapping Keys Independently

I need to map keys to mean different things depending on which console I am using. For example, I need to have a menu screen on one session and a POS order taker on the other. Each has to have keys set up to mean different things. So far, it appears that Linux only supports a global change. I need them to act independently, which worked well under SCO UNIX. We are using Debian Potato. —Dave A., anderson@webace.com.au

You can do this under Linux in much the same way as you do in SCO. The problem is that most default distributions don't except you to, so you have to do a bit of work yourself. The /etc/termcap file determines the keyboard mapping definitions (among other things). What you need to do is define two entries, for example, linuxtty1 and linuxtty2. Once you do this, modify your /etc/profile. You may optionally place these changes in the user account's .profile or .cshrc, depending on the shell used. You must write code to determine the user's login TTY and set the TERM environment variable based on that. I can't give you an example without knowing which shell you are using, but a less-than-trivial bash example can be found in /etc/profile on most systems. (It sets TERM based on local versus Telnet logins.)--Chad Robinson, crobinson@rfgonline.com

Running a Slave Name Server in a Chroot Environment

In the October 2000 Linux Journal, Michael D. Bauer's article on Securing DNS and BIND explained how to run your name server in a chroot environment. When my name server also works as a slave for some domains, it needs to be able to run /usr/sbin/named-xfer, to transfer zonefiles from the master. I spent quite some time solving why my slave domains didn't work, and I finally got it. But lots of less experienced users might waste too much time on this with a final result of “it doesn't work”, and run non-chrooted names again, which decreases their security.

The solution is as follows. $CHROOT is the directory in which you are running your chroot BIND.

  1. Check which shared libraries named-xfer uses, using the command:

ldd /usr/sbin/named-xfer
  1. Create a new directory, $CHROOT/lib, and copy the required libraries into the new directory.

  2. Make the other required directories inside the chroot environment, with

mkdir -p $CHROOT/etc $CHROOT/usr/bin $CHROOT/lib
  1. Make an empty ld.so.conf file and create the necessary symlinks to the libraries:

touch $CHROOT/etc/ld.so.confldconfig -v -r $CHROOT
  1. Copy named-xfer into the new usr/sbin directory under the chroot directory:

cp /usr/sbin/named-xfer $CHROOT/usr/sbin

And voilà--it works! Of course, your directory for slave-files needs to be writable for users who runs named. —Michal Ludvig, michal@logix.cz

Load Disqus comments