Best of Technical Support

Various

Issue #91, November 2001

Our experts answer your technical questions.

Mounting Mac OS Partitions

I have a 2001 iMacDV (400MHz, 128MB RAM) running Mac OS 9.1 and Yellow Dog 2.0. I cannot gain access to files on my Mac OS 9.1 partition. I assumed that my Mac OS partition was hda1, but this may be wrong.

—Bill MacKay, w.mackay1@ntlworld.com

It's not hda1. Macs use a rather complex partitioning scheme. Use the command cat /proc/partitions to see all your partitions. That should help you narrow it down.

—Ben Ford, ben@kalifornia.com

Firewall Takes Hours to Start

I upgraded the kernel of my Red Hat 6.0 system to 2.2.16-3 in order to use ipchains. I used the instructions from www.redhat.com support to upgrade the kernel. It now works great as a dedicated firewall. Whenever the power goes out, I reboot the machine and run the /etc/rc.d/rc.firewall script, which I obtained from www.linuxdoc.org, and this takes an hour to complete. Is there some way to speed up this process?

—Paul Lamping, palamping@yahoo.com

Are you using a large hard drive with ext2 as your filesystem? In that case, the process that is taking so long is the filesystem checking process due to an improper shutdown. There are a couple of things you can do about that. You can try a journaling filesystem, use a UPS battery backup to shut down gracefully, or get creative with your drive partitioning and make as much of it read-only as you can.

—Ben Ford, ben@kalifornia.com

Setting up your firewall rules should be a matter of seconds, not minutes or hours. One thing that may be causing problems is if you use names for hosts rather than IP addresses. If your boot scripts start your name server after your firewall script runs, this forces each line that does a DNS lookup to time out before continuing. This can also be the case if you refer to a name server on another machine and your firewall script locks the machine out before creating “allow” entries.

—Chad Robinson, crobinson@rfgonline.com

Printing Stopped Working

I have been printing to a Jetdirect-enabled HP LaserJet 4Plus on our LAN for several years using its IP address. It recently stopped working. Running any lp command (lpq, lpr, etc.) returns the following message:

Printer 'lp@localhost' - cannot open
connection
Connection refused
Make sure LPD server is running on the server

—Murray Zangen, murray@nj.com

Have you tried rebooting the printer? This problem is a symptom of the recently seen CodeRed IIS and indexing server worm. It stops many printers and Cisco devices cold.

—Ben Ford, ben@kalifornia.com

It appears that your problem is local to the box, not to the HP printer. LP is telling you that LPD is not running on the local server, which it must connect to in order to queue the request for the remote printer. Check the output of ps ax to ensure that LPD is running properly. If it is, you should also check connectivity to your printer manually by Telneting to the IP address given by /etc/printcap. Finally, make sure you are selecting the correct print queue, and print a test job using lp from the command line rather than printing from an application.

—Chad Robinson, crobinson@rfgonline.com

How to Change Samba Passwords

I have configured Samba and my server shows up in Network Neighborhood on my Win98 workstations. I can see the folders on my server, yet it asks for a password to access the folders. I have tried resetting the password in Samba for that shared folder, but I can't seem to figure out where the right place is to set it.

—Dan Schmeh, dschmeh@turningpnt.org

The standard installation uses /etc/passwd. If you use the standard installation you need to modify the registry on the browsing machine to allow for unencrypted passwords. Add the following key:

HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services \VxD\Vnetsup\EnablePlainTextPassword = 1

and reboot. There is a good discussion of encrypted vs. un-encrypted passwords in the Samba distribution. On Red Hat 7.0, the file is /usr/share/doc/samba-2.0.7/docs/textdocs/ENCRYPTION.txt.

—Christopher Wingert, cwingert@qualcomm.com

How to Start a Web Server Automatically

httpd doesn't automatically start during boot time. I have to start it manually from the /etc/rc.d/init.d/ directory. Which config file should I modify to make it start at boot time?

—W. Huang, whuang53@excite.com

Run chkconfig --level 5 httpd on. This assumes you run in runlevel 5 (GUI in Red Hat). If you want other runlevels, just change the 5 to the number of the runlevel you wish to change.

—Ben Ford, ben@kalifornia.com

I Have No Phone and I Must Connect

I live a few miles off the electric and phone lines with no line of sight to a repeater dish in one of the largest and poorest counties in the US.

For those of us with remote homes in the mountains near the Canadian border who have gotten computers during the last few years, internet access is many miles away.

While DirecPC works with a satellite connect down, one needs a telephone line out to the Net. Many of us do not have phone access, yet a radio system less expensive than the Ham radio would make a great change in our lives. Our download needs are greater than our upload needs. How do we make this work?

—Robert Thomas, homeschoolu@hotmail.com

You can run DirecPC from Linux with a router from www.helius.com. They are scheduled to come out with a two-way router for bidirectional DirecPC in the third quarter of 2001. My suggestion to you would to be set up a network with your neighbors with a caching server to speed access.

—Ben Ford, ben@kalifornia.com

Community net groups are using standard WiFi cards and modified satellite dishes to make high-speed connections that span miles. You might be interested in using this technology to share your satellite access with neighbors. See www.toaster.net/wireless/community.html.

—Don Marti, info@linuxjournal.com

Adding a Hard Drive

I installed and partitioned a second hard drive, but I can't make a filesystem on it.

—Kevin Williams, williams_kevin@btconnect.com

First, figure out what device you are talking about. Here is a simple chart to determine device names: /dev/hda1 master drive on primary channel, 1st partition /dev/hda2 master drive on primary channel, 2nd partition /dev/hdb1 slave drive on primary channel, 1st partition /dev/hdb2 slave drive on primary channel, 2nd partition /dev/hdc1 master drive on secondary channel, 1st partition /dev/hdc2 master drive on secondary channel, 2nd partition /dev/hdd1 slave drive on secondary channel, 1st partition /dev/hdd2 slave drive on secondary channel, 2nd partition Next, choose the filesystem you would like on it. SuSE includes reiserfs with their distro; I recommend that as it doesn't require tedious filesystem checks on a bad reboot. Then format the drive. The command used to make reiserfs partition is mkreiserfs <devicename>, where <devicename> is the device name of your partition. If you want to stick with ext2, use the same command but replace mkreiserfs with mke2fs. Now you have a useable drive partition; all that is left is to mount it. Choose or create a mountpoint in your filesystem. I will use /mnt/storage for this example. Create the mountpoint with mkdir /mnt/storage. As you see, the mountpoint is nothing more than a directory. Now mount the drive like this:

mount <devicename> /mnt/storage -t <filesystem
type>

where <devicename> is the device name of the partition and <filesystem type> is the type of filesystem. You now have another useable hard drive. One step remains. I assume you want this accessible next time you boot the system, so we need to add the partition to /etc/fstab. Add a line like this to that file:

<devicename>     <mountpoint>     <filesystem type> defaults     0 0
where <devicename> is the device name of your partition, <mountpoint> is the mountpoint you are using and <filesystem type> is the type of filesystem on that partition. If you choose to use reiserfs, leave the last two numbers as 0 0. If you use ext2, make those numbers 1 2.

—Ben Ford, ben@kalifornia.com

Can't ping

The installation of Red Hat 6.2 on my Dell OptiPlex GX150 went well. However, after the system came up, I couldn't ping any host, even on the same subnet. I typed arp -a and the system hung. The system has an integrated 3Com 920 10/100 BT card.

—Khoa Nguyen, knguyen@megisto.com

Use netconfig to set up your networking. You can also use lsmod to see if the module for that card is loaded. I would guess that the module for that card would be the 3c90x. You may have to load this module by hand if the card isn't automatically detected by using the command modprobe 3c90x. If this works, edit the file /etc/modules.conf and add the line alias eth0 3c90x.

—Ben Ford, ben@kalifornia.com