Best of Technical Support

Our experts answer your questions.
Adding Services from Kickstart

In writing the post installation part of my Red Hat 7.1 Kickstart file, I would like to add services such as ypserv and autofs automatically. How can I do it?

—Sowmya, sowms@yahoo.com

chkconfig would be the way to do it. Do a chkconfig --help and see all the options you can. For instance, add nfs to start automatically at run level 3 with

chkconfig --level 3 nfs on

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

Slow Mail Server

We are experiencing a long delay in resolving the request at the server when checking for mail. At times it is instant (seldom) and at others it times out (taking more than four minutes). We have tried with different setups of “hosts, DNS” and “DNS, hosts”, assuming it was trying to resolve the querying address. When a dial-up connection is made they are assigned an IP address and DNS server.

The Internet (Squid) has no problems and works perfectly. It also seems that once a connection is made checking for mail, the next request is instant.

—Kevin, kevin@atom.co.za

You could use host mailserver and check the delay to see if it is DNS. You could use tcpdump and watch traffic to and from your mail server to see where the delay is (assuming it is not DNS).

—Christopher Wingert, cwingert@qualcomm.com

You should run tcpdump, or if you have it, ethereal, and snoop your connection. This will give you an idea if the DNS delay is from your side or possibly on the mail server's side.

—Marc Merlin, marc_bts@valinux.com

Need to Write to Windows Partitions

Although I have my three Windows partitions mounted in Linux, I only have write-access when logged on as root. I need to have write-access as myself so that I can run VMware. I have tried to change the permissions for these partitions using chmod while logged on as root, but the permissions don't change.

—Bill Freeto, wfreeto@earthlink.net

Use the uid and gid mount options (you also want “quiet” typically). A sample fstab entry for a vfat partition would look like this:

/dev/sda3      /drv/c          vfat
user,umask=002,uid=500,gid=500,quiet,low

More info can be found in the mount man page.

—Marc Merlin, marc_bts@valinux.com

That's Enough Disk Space for You

Is there any way that I could limit the size of a directory? I want to start a web-hosting server and limit some users to 100MB. How do I go about doing this?

—Jason Sidabras, sidabraj@msoe.edu

Take a look into the quota package for Linux. Part of this application resides in the kernel and must be compiled in or installed as a module. The other part is a user-space program that handles the actual control and notification aspects.

—Chad Robinson, crobinson@rfgonline.com

Look at the Quota mini-HOWTO: www.linuxdoc.org/HOWTO/mini/Quota.html.

—Marc Merlin, marc_bts@valinux.com

2.4.2 Panics!

I tried to upgrade my kernel to 2.4.2. When I rebooted I got a kernel panic. It said:

root fs not mounted
cannot open root device "301" of 03:01
Please append a correct root = "boot option"
kernel panic vfs:
unable to mount root file system on 03:01.

I used the same device as my other kernel, /dev/hda1, and I did a rdev to make sure that is right. I also went back into make xconfig and made sure that ext2 was compiled in and not a module.

—Michael Diaczyk, mdiaczyk@tampabay.rr.com

If you didn't somehow mess up the partition table or the actual disk data, you should be able to boot by passing a parameter to LILO at boot time. At the LILO: prompt, try typing

linux root=/dev/hda1

Once this works, edit your /etc/fstab to ensure that the entry for your root (i.e., /) partition is correct. Also ensure that the root= line in your /etc/lilo.conf points to the right partition.

—Scott Maxwell, maxwell@ScottMaxwell.org

Bad Module, Bad, Bad!

Is it possible for an errant module to mess up /proc files so that nobody can look at them without causing an oops? If the module forgets to free an interrupt when it is unloaded, then /proc/interrupts is gone. If it forgets to release I/O space, then /proc/ioports is defunct. If it calls unregister_chrdev with the module name misspelled (nobody would do that, right?), that destroys /proc/devices. When this sort of thing has happened, can the system be rescued or is rebooting the only option?

—Bill McConnaughey, mcconnau@biochem.wustl.edu

It's possible for an errant module to do anything—it's running as part of your kernel, after all. If I saw a problem like the one you're reporting, I'd reboot immediately. It's theoretically possible to fix the problem without rebooting by writing and installing another module that undoes the damage caused by the first one, but this is impossible in practice unless you happen to know exactly what went wrong—and it's not necessarily easy even then.

—Scott Maxwell, maxwell@ScottMaxwell.org

______________________

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