DæmonNews: News and views for the BSD community

March 2000 Get BSD New to BSD? Search BSD Submit News FAQ Contact Us Join Us
Search


Get BSD Stuff

Hey! Mister Answer Man

by Todd Whitesel

The lions may come, and the lambs may go, but your questions just keep marching on...

List of Topics

When I compile programs, I get random irreproducible SEGFAULTS in cc1. Help!
My server PC runs great for a while but then mysteriously freezes solid! Argh!
Please get me started accessing BSD files from WIN98 with samba...
Here's the scoop on the Logitech Marble Mouse.
How can I eject a floppy disk under program control?
What scripts are run when I type reboot, or shutdown -r now and similar commands?
How do I mount an ISO 9660 filesystem?
How do I give non-root users access so they can run X?
Can't PINE be set up to know the hostname explicitly?
How do I print to my NT server machine's printer?
And now the proverbial lamb-skin mailbag.


Q:
When I compile programs, I get random irreproducible signal 11's in cc1. Help!

A:
The most likely cause is that some of the memory in your system is starting to go bad, so you could try running a memory tester like Memtest86, or just start swapping out memory to see if the problem goes away.

Another possible cause is that you're overclocking your system and some of your memory can't keep up, so it behaves as if it were going bad. Read on...


Q:
My server PC runs great for a while but then mysteriously freezes solid! Argh!

A:
Something like this just took out my machine room for a month, so let me guess: with only a couple clients it never has any trouble, but with about four or more clients and a mixture of steady but light net/disk/cpu activity it will just hang solid every now and then. It resets and reboots fine and never has trouble fixing the filesystems. No single resource on the server is ever running low (or even close) around the time of the failures. Swapping out hardware sometimes makes it go away for a while, but it eventually comes back.

Based on what I've just been through, I'd say something in your server is being overclocked, even if you didn't do it deliberately. You'll need to figure out what it is and correct it. Then, to make the fix permanent, you may need to get your entire machine to "charge down" by disconnecting it from anything that has its own power source and letting the box sit for a while (read: ten minutes or so). This is especially important with ATX power supplies that have only the soft-on power switch and no real power switch.

In my case, it was a PPro server motherboard with only one set of jumpers for the CPU speed, and a BIOS that apparently is not fully compatible with the Pentium II Overdrive upgrade that I put in this beast. I've got ample evidence that the BIOS was incorrectly autosetting the CPU interface frequency at the higher speed settings because it was confused by the upgrade. (Maybe this is why modern motherboards have you set both the CPU interface frequency and core clock multiplier explicitly with jumpers.) In particular, when your BIOS says it is talking to the CPU at 66 mhz but then switches to 75 mhz on the next cold boot (even though you haven't changed any jumpers), be afraid. Be very, very afraid.

Until I can find a BIOS upgrade, it'll be running at the slower speed which has so far proven to work reliably (except when the machine needs to be charged down -- this is why it took so long to find a test case that proved what was wrong). My searches have turned up depressingly little on this hardware configuration, other than an Intel compatibility page and a Tom's Hardware Rant about the late availability and lack of strong motherboard support for this CPU upgrade.


Q:
Please get me started accessing BSD files from WIN98 with samba...

I have two windows machines at work (WIN98), and I've set up samba so that I can access their filesystem however they can't see me hence can't access my filesystem. They can however access and see my filesystem through the web server which is really no good since HTTP is read-only.

I know that BSD machines can use NFS to mount each other's filesystem. I'm hoping that this is also possible using samba.

A:
First off, SAMBA is primarily a server module, so while your BSD systems can use smbclient to access files with samba, they can not use it to get at each other's disks as easily as they can with NFS. This would require an smbfs kernel module, which apparently some folks have cobbled together for Linux and the samba team has now taken over maintenance of it.

However, your PC's should be able to get at the BSD systems' disks once samba is running correctly on them. The best place to start is the main (US mirror, anyway) samba documentation page. Check this post for a quick-start example configuration file. Good luck.


Q.
Here's the scoop on the Logitech Marble Mouse.

A:
A reader writes in:

The Logitech Marble Mouse is a PS/2 2-button trackball that comes without any drivers at all. It's just a plain old generic PS/2 mouse as far as any OS I run is concerned (OS/2, various DOS, windows crap, Linux, BeOS, Solaris, and FreeBSD).

The "gpm"-ish console mode mouse drivers work fine, and under XFree86 I just enable "emulate three-button" mode. Mouse button three (that is, buttons 1 & 2 simultaneously) worked even when I swapped some out for previous 3-button mice.

No additional drivers or configuration are needed for the Marble Mouse.


Q.
How can I eject a floppy disk under program control?

Details:
I have been wondering if there is a program, or some C function call, that would eject the floppy diskette on a typical Intel-based PC. I am running FreeBSD 2.2.8.

The problem:
We want to write some configuration files to the floppy while FreeBSD is running. But we also would like to be able to reboot remotely instead of standing in front of the actual physical box, in the computer center, to remove the floppy first.

A:
Sorry, but there's no way to do this with the standard PC floppy drive. Unlike older Macintosh floppies, it has no software controlled eject mechanism.

Your best bet is to explore the PC's BIOS and see if you can change the boot order to check the floppy last instead of first. Some (but not all) BIOS's will let you do that.


Q:
What scripts are run when I type reboot, or shutdown -r now and similar commands?

A:
Actually there aren't any; reboot and shutdown are C programs.

You can always modify their source, or simply rename them and put a small script in their place which does whatever you want before using exec to hand control to the C program.


Q.
How do I mount an ISO 9660 filesystem?

A:
With the NetBSD version of vnconfig it is quite easy (here's a HOWTO version). With the FreeBSD one however, it looks like you'll need to mess with disklabel which is unfortunately a daunting task. (If any FreeBSD users out there have tips on this, please send 'em in.)


Q.
How do I give non-root users access so they can run X?

A:
Have them try startx. That is supposed to supply default .xinitrc files and other stuff as needed to get X up and running.

If problems for non-root users persist, then perhaps you have a framebuffer or mouse device that is not readable/writable by normal users, or your kernel is compiled for tight security and will not let the X server do everything it needs to do unless it is run by root. In that case, you will probably need to build a new kernel with

	options INSECURE
added to the kernel's configuration file.


Q.
Can't PINE be set up to know the hostname explicitly?

A:
It turns out that it can; someone wrote in to mention that .pinerc has an option to let you set the hostname for PINE to use. I think he's talking about the user-domain= line in .pinerc, but I don't use PINE myself so I haven't tested it.

Editor's note: yes, I use it to set the domain name to daemonnews.org on the DaemonNews server.


Q.
How do I print to my NT server machine's printer?

A:
Try this page. I expect that the technique will adapt easily outside of NetBSD.


Q.
And now the proverbial lamb-skin mailbag.

A:

  1. We bought Real Server last February with the understanding that they were coming out with a BSDI version/port soon. They never did. In fact, they dropped all BSDI support. We want to run Real Server on our BSDI machine to maximize the use of existing hardware, ease the availability of the service for existing customers without doing tricks with NFS and such on a Linux machine, or (gasp!) resorting to sticking the product on an NT machine. Initial tests with the Linux Emulator on BSDI failed to bring any satisfactory results. Is it possible to run the Real Server (G2, version 7) under BSDI? Does anyone know?
  2. wdreset: error1: 0x7f
    wdreset: error1: 0x7f
    wdc1 not found at 0x170
    And my CD drive isn't recognised by the kernel... this is after so many compilations.. on FreeBSD 3.4
    On Linux kernel it looks something like this:
    hdd: no response (status = 0xd0), resetting drive
    hdd: , ATAPI CDROM drive
    hdd: ATAPI 20X CD-ROM drive, 1800kB Cache
    Can you help me to get this CD working on my FreeBSD?
  3. Debian has nice scripts to configure email programs like sendmail or exim. I prefer exim, but how do I get a FreeBSD system to start using it? I can install the program using the sysinstall program and deinstall sendmail which is nice. How does one get exim to start and begin managing email?
  4. While installing FreeBSD I could not get the BSD boot loader to load in the MBR of my system. I finally ended up installing System Commander Deluxe which boots BSD with no problems. I don't see how to switch drives in the BSD install scripts so that I could direct the boot loader to the first drive (which has 98 installed on it).
  5. What is the BSD equivalent to ypinit -c in Solaris? I tried to install amd but then found it was already in /usr/bin. So now, how do I activate it?


Do you have questions for the BSD Answer Man? Send them to bsd-answerman@toddpw.org.
Any email sent to this address is assumed intended for publication and will become the property of Dæmonnews.
That's all for this month, folks. Until next time, remember: there's no shame in asking RTFM questions any more, because these days, there is just too much FM to R.


About the Author

Todd Whitesel has been grokking computers for fun since his first grade school Apple II in 1980, and doing it for a living since 1992, when he escaped from Caltech with a B.S. degree. He helps promote Japanese Animation in America by running Registration for Anime Expo, and helps promote NetBSD by way of his NetBSD Architecture Farm.

[home| mail]




Author maintains all copyrights on this article.
Images and layout Copyright © 1998-2004 Dæmon News. All Rights Reserved.