LJ Archive

Best of Technical Support

Various

Issue #66, October 1999

Our experts answer your technical questions.

Modem Question

Can I get two nearby modems to talk over a short connecting line without going through the telco, i.e., going from the phone line connector of one modem to the other with a twisted pair (reversed)? It seems this should work and I think I know the correct AT commands, but I can't get it to work and nobody seems to know the answer. I am not talking about a null modem cable. I want to use this to test out PPP server setups. Thanks for any information. —William Strickfaden, xws99@hotmail.com

This depends on your modems. The phone company normally provides line voltage that modems modulate with their signals to talk to one another. Some modems have been known to work without this voltage, but before you go that route, you can look for a “phone-line simulator”. This device will provide the line voltage and will even ring one end when the other picks up. They're usually not too expensive, or if you're a hobbyist, you can try to build one. Many circuit encyclopedias have simple circuits which do that.

This is the only option. LAN signals have voltage supplied by the devices on each side. You cannot do the same thing with phone connections just by reversing the wires. —Chad Robinson, Chad.Robinson@brt.com

Secure Passwords and PPP Connection

Has anyone had success in establishing a reliable PPP connection from Linux to a Shiva LanRover modem bank(www.shiva.com/remote/d56)? I've been through DejaNews and talked to the Red Hat PPP guru, but so far no luck.

Also, my employer uses SecurID to form part of the password, so it is literally impossible for me to have a static password entry in /etc/ppp/pap-secrets or /etc/ppp/chap-secrets. Is there any way to accommodate passwords that are generated through SecurID? —Steve Masticola, masticol@scr.siemens.com

The dip program has scripting features that include explicit support for SecurID cards. It even understands about the static and variable parts of SecurID passwords, with support for both pieces independently. The script simply says:

securidf fixedpart

to store the fixed part. Later, the script says

securid

whenever the password prompt is recognized; this makes the script stop and prompt you for the variable part, and then dip sends the combined parts to the server. —Scott Maxwell, s-max@pacbell.net

Try using seyon or minicom to see if you can get a login and password prompt. Type ATDTnumbertocall then press enter once you get the CONNECT message. If you can, you should use those to connect, close the application without hanging up the modem, then run pppd by hand:

pppd /dev/modem 57600 crtscts modem noipdefault\
defaultroute

If you don't have a /dev/modem link, substitute it for your serial port. —Marc Merlin, merlin@varesearch.com

LILO Problems

I am a new user. I installed Red Hat version 5.01 for the first time on a partitioned disk (486 system). Immediately after I switch on the message, “Lil” comes up and the system stops. When I use a floppy boot, it is all right. Should I reinstall Linux again, or can I configure properly after it is booted through the floppy? The other partition is Windows 95. I want both options to be displayed while booting. Please help. —Manilal, chirakkal@yahoo.com

You must have had a problem with configuring LILO during the Red Hat install. One possible reason is that your root partition crosses the 1024 cylinder boundary on your disk, and this prevents LILO from booting. There are many other possible problems with IDE disks and the different kinds of translations that your BIOS may be able to do (CHS or LBA head translation). I suggest you try different settings in the BIOS and the linear option for LILO. Also refer to the following LILO HOWTOs:

metalab.unc.edu/LDP/HOWTO/mini/LILO.html
metalab.unc.edu/LDP/HOWTO/mini/Multiboot-with-LILO.html

—Marc Merlin, merlin@varesearch.com

Slow Transfers

I need to mount a 6GB HDD IDE drive formatted for NTFS on my Linux system that will allow me to transfer a 5GB file from the drive to Linux format, so that I can process the data in the UNIX world. I have found a read-only NTFS drive that is under development, but I could not get it to compile. I get an error on a time_t call. I've tried to use FTP to transfer the file, but it goes so slow I'm afraid it would take a week to do the transfer. I also tried to FTP the file to my RS/6000, but that consistently dies at 1.2GB. If I try to use the SAMBA interface, the transfer dies at about 500Mb.

I've also installed AWK on the NT box, but it goes so slow that I can't believe the NT box will stay up long enough to complete the transfer. Help! —Algis Posius, algis@pacbell.net

The 2.2.x kernels already have support for both read/write in NTFS partitions. Even though I've never tried to copy that amount of data, it seems stable enough for the task. Just one question: do you have 5GB of data or a 5GB file? If you have a 5GB file, you are out of luck. The 32-bit version of Linux (and AIX also) can address files only up to 2GB. —Mario Bittencourt, mneto@argo.com.br

Choosing the Right Commands

I'm trying to configure my Red Hat 6.0 system to allow clients to access CD-ROM images from my Linux server hard drives. After looking at various file systems such as Samba and NFS and commands such as MAKEDEV, vnconfig, mount, smbmount etc., I'm getting confused as to which combinations of commands to use. —Mark J. Foucht, mark.foucht@eds.com

Red Hat 6.0 uses knfsd, which works somewhat differently compared to the old userland NFS server. One big difference is that you have to export each file system mounted in order for clients to see them (with the old server, you could just export= /, and clients would have a view on all your file systems).

In your case, if your CD-ROM is mounted under /mnt/cdrom, put the following in your /etc/exports file:

/mnt/cdrom (ro)

Then, type the following to migrate the entry to /var/lib/nfs:

/xtab
moremagic:~# exportfs -av
exporting :/mnt/cdrom

To see if it worked, type:

moremagic:~# showmount -e localhost
Export list for localhost:
/mnt/cdrom (everyone)

To mount from another machine, type:

mkdir /mnt/remotecd
mount remotemachinename:/mnt/cdrom /mnt/remotecd

—Marc Merlin, merlin@varesearch.com

If your CD-ROM will be used by Windows computers, you should use Samba. Here is the entry you can add to your /etc/smb.conf file:

[CDROM]
comment = CDROM
path = /mnt/cdrom
read only = yes
guest ok = yes
case sensitive = no
mangle case = yes
preserve case = yes

You should restart Samba after modifying the file. Just type as root:

/etc/rc.d/init.d/smb restart

If you want to make it accessible to NFS users (UNIX computers), you should add the line /mnt/cdrom to your /etc/exports and restart your NFS daemon by using /etc/rc.d/init.d/nfs restart. —Pierre Ficheux, pficheux@com1.fr

Memory Error, Parallel Computing

I am currently running Caldera Openlinux 1.3 on a Compaq Presarion CDS 526 (486 66MHz). Believe it or not, I had no trouble getting it loaded on my machine. I do have a problem with my RAM memory. When I do the free command, it shows I have only 15MB of memory, when I actually have 36MB. Why is this? Is it a problem that has been corrected in a more current kernel, or is it more of a hardware problem?

My next question concerns the world of parallel computing. I have a new computer on order (P3 500MHz), and when I get it, I will be installing Linux on it as well as the one mentioned above. I am interested in hobbying in the world of parallel computing, and I wondered if it would do any good trying to run parallel with a 500MHz machine and a 66MHz machine, or will the whole thing run slower? Thanks for your help. —John, johnwtaylor2@hotmail.com

This 36MB you've mentioned is a rather “non-standard” amount of memory. Please use a dmesg command to see how much memory it finds during boot time. —Mario Bittencourt, mneto@argo.com.br

There is a kernel option for limiting the memory to 16MB; maybe it is activated in your current kernel. You should recompile a new kernel without this option, in “General Setup”: Limit memory to low 16MB (CONFIG_MAX_16M) [N/y/?] N —Pierre Ficheux, pficheux@com1.fr

On your second question, it will depend on how you do it. Think of a job jar, representing a problem decomposed into independent jobs. Each CPU grabs a job out of the jar when it's finished with the previous job. With good choices of job sizes, you win. If the jobs are too small, the extra communication and coordination overhead negates the gains from the slower CPU. If too large, the faster CPU will finish first and have to wait for the slower one to finish—and it may end up waiting longer than if it had done all the work itself. You may have to experiment to find good job sizes, though the obvious computation based on the two systems' relative speeds should get you in the right neighborhood.

I'd recommend you start by looking into PVM, the Parallel Virtual Machine system. Find PVM at www.epm.ornl.gov/pvm/pvm_home.html. —Scott Maxwell, s-max@pacbell.net

Correction

LJ Archive