Procmail Decoding Mime Messages
Is there a filter that one can run in procmail in which base64 encoded data go in and text comes out so one can allow procmailrc to do its work? I use bogofilter to filter spam and it does a very good job after one builds a core of spammishness, but legitimate messages are often-times filled with base64 sections that look like garbage to the regular expressions that one puts in .procmailrc for sorting mail. When searching for information, I found something called mimencode which both encodes and decodes these attachments, but there is no FreeBSD port called mimencode so it occurred to me that some other application might exist which is in the ports that does basically the same thing. Is there anything which will take a raw email message and spit out linear strings which can be processed like normal text? Thank you. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Revisiting Traceroute Through ipfw FreeBSD9.x
I immediately found several plausible examples of what to put in the firewall rules file and the following rules were set just after the local loopback address: ip=139.78.2.13 setup_loopback # Allow traceroute to function, but not to get in. ${fwcmd} add unreach port udp from any to ${ip} 33435-33524 # Allow some inbound icmps - echo reply, dest unreach, source quench, # echo, ttl exceeded. ${fwcmd} add allow icmp from any to any icmptypes 0,3,4,8,11 My thanks to previous posters for these rules. I still, however only get *traceroute: sendto: Permission denied traceroute: wrote 192.168.1.125 52 chars, ret=-1 I also did try: sysctl net.inet.udp.blackhole=0 then 1 and even 2 with no change. What else should I look at? The firewall rules are otherwise working as they should. Thank you. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Setuid binaries and File Ownerships in FreeBSD9.0
The executable in question is a C program whos file permissions are 4755 and the file belongs to root so all files it opens are also owned by root and that works properly, but what I need is for this application to first open a few files owned by the caller and then later, upgrade back to root and write to files the caller can not write to. I was hoping to avoid using chown and chgrp and simply let the privilege level of the application dictate ownership of any file it opens. When the application first runs, it gets the UID and GID of the user and uses setuid(heruid); and setgid(hergid); to temporarily downgrade and those files are owned by the right user but setuid(0); doesn't appear to upgrade back to root. Is there any other strategy that gets one back to root short of using chown and then a system call and never downgrading privilege? Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Setuid binaries and File Ownerships in FreeBSD9.0
jb writes: Get familiar with this document: http://www.cs.berkeley.edu/~daw/papers/setuid-usenix02.pdf Then verify its validity on your target and current OS. Thank you. I had read the man page several times and like most man pages, it is a summary and one can miss some of the finer points which I seem to be missing right now. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Safe Way to Tell if Process is Running
About 20 years ago, I saw some code in which you verified whether or not a process was running by giving it a kill -0 command. If the process was running, nothing happened to it but your kill -0 command exited with a 0 status. If there was no process with that PID, the kill command exited non-zero. I use this in a system(command); in a C program I wrote some years ago and I think this is now causing a segmentation fault when the process number being signalled doesn't exist. Is there a better way to determine if process number 12345 is running without bothering it? None of the documentation on kill (1) shows a signal 0 nor does kill -l. Something tells me this is a bad idea these days, but I still need an easy way to see if XYZ process is still alive. Thank you. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Safe Way to Tell if Process is Running
Robert Bonomi writes: 'man 2 kill' tells all. I believe that is the first or second time I have used Section 2. I appreciate the reminder. It looks like ps -p ### /dev/null appears to do what I need without producing output ps -p 54321 /dev/null date ran the date command if there was a process with that number and produced nothing if no process 54321 existed. Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Safe Way to Tell if Process is Running
Robert Bonomi writes: 'man 2 kill' tells all. I believe that is the first or second time I have used Section 2. I appreciate the reminder. It looks like ps -p ### /dev/null appears to do what I need without producing output ps -p 54321 /dev/null date ran the date command if there was a process with that number and produced nothing if no process 54321 existed. Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
mfs8.0 scripts have me baffled when adding Files.
as gasp gdb gdbreplay ld nm objcopy objdump \ ranlib readelf size strip gdbtui kgdb; do \ ${RM} -f ${WRKDIR}/mfs/usr/bin/$$x; \ done @${TOUCH} ${WRKDIR}/.prune_done @echo done packages: install prune ${WRKDIR}/.packages_done ${WRKDIR}/.packages_done: @if [ -d ${PACKAGESDIR} ]; then \ echo -n Copying user packages ...; \ ${CP} -rf ${PACKAGESDIR} ${WRKDIR}/mfs/packages; \ ${TOUCH} ${WRKDIR}/.packages_done; \ echo done; \ fi #added by Martin McCormick @if [ -d ${FILESDIR} ]; then \ echo -n Copying custom files ...; \ cd ${FILESDIR}; ${TAR} cf - . | (cd ${WRKDIR}/mfs; ${TAR} xfBp -); \ ${TOUCH} ${WRKDIR}/.files_done; \ echo done; \ fi #This does place usr/local/etc/eject.allow in mfsroot but it #disappears on boot. #end of added code config: install ${WRKDIR}/.config_done ${WRKDIR}/.config_done: @echo -n Installing configuration scripts and files ... @for FILE in loader.conf rc.conf resolv.conf interfaces.conf; do \ if [ ! -f ${CFGDIR}/$${FILE} ]; then \ if [ ! -f ${CFGDIR}/$${FILE}.sample ]; then \ echo Missing ${CFGDIR}/$${FILE}.sample; \ exit 1; \ fi \ fi \ done @${RM} -f ${WRKDIR}/mfs/etc/motd @${MKDIR} ${WRKDIR}/mfs/stand ${WRKDIR}/mfs/etc/rc.conf.d @if [ -f ${CFGDIR}/loader.conf ]; then \ ${CP} ${CFGDIR}/loader.conf ${WRKDIR}/mfs/boot/loader.conf; \ else \ ${CP} ${CFGDIR}/loader.conf.sample ${WRKDIR}/mfs/boot/loader.conf; \ fi @if [ -f ${CFGDIR}/rc.conf ]; then \ ${CP} ${CFGDIR}/rc.conf ${WRKDIR}/mfs/etc/rc.conf; \ else \ ${CP} ${CFGDIR}/rc.conf.sample ${WRKDIR}/mfs/etc/rc.conf; \ fi @if [ -f ${CFGDIR}/resolv.conf ]; then \ ${CP} ${CFGDIR}/resolv.conf ${WRKDIR}/mfs/etc/resolv.conf; \ fi @if [ -f ${CFGDIR}/interfaces.conf ]; then \ ${CP} ${CFGDIR}/interfaces.conf ${WRKDIR}/mfs/etc/rc.conf.d/interfaces; \ fi @if [ -f ${CFGDIR}/authorized_keys ]; then \ ${MKDIR} ${WRKDIR}/mfs/root/.ssh; \ ${CHMOD} 700 ${WRKDIR}/mfs/root/.ssh; \ ${CP} ${CFGDIR}/authorized_keys ${WRKDIR}/mfs/root/.ssh/authorized_keys; \ fi @for SCRIPT in ${SCRIPTS}; do \ ${CP} ${SCRIPTSDIR}/$${SCRIPT} ${WRKDIR}/mfs/etc/rc.d/; \ ${CHMOD} 555 ${WRKDIR}/mfs/etc/rc.d/$${SCRIPT}; \ done @${SED} -I -E 's/\(ttyv[2-7].*\)on /\1off/g' ${WRKDIR}/mfs/etc/ttys @echo /dev/md0 / ufs rw 0 0 ${WRKDIR}/mfs/etc/fstab @echo tmpfs /tmp tmpfs rw 0 0 ${WRKDIR}/mfs/etc/fstab @echo ${ROOTPW} | ${PW} -V ${WRKDIR}/mfs/etc usermod root -h 0 @echo PermitRootLogin yes ${WRKDIR}/mfs/etc/ssh/sshd_config @echo 127.0.0.1 localhost ${WRKDIR}/mfs/etc/hosts @${TOUCH} ${WRKDIR}/.config_done @echo done genkeys: config ${WRKDIR}/.genkeys_done ${WRKDIR}/.genkeys_done: @echo -n Generating SSH host keys ... @${SSHKEYGEN} -t rsa1 -b 1024 -f ${WRKDIR}/mfs/etc/ssh/ssh_host_key -N '' /dev/null @${SSHKEYGEN} -t dsa -f ${WRKDIR}/mfs/etc/ssh/ssh_host_dsa_key -N '' /dev/null @${SSHKEYGEN} -t rsa -f ${WRKDIR}/mfs/etc/ssh/ssh_host_rsa_key -N '' /dev/null @${TOUCH} ${WRKDIR}/.genkeys_done @echo done usr.uzip: install prune ${WRKDIR}/.usr.uzip_done ${WRKDIR}/.usr.uzip_done: @echo -n Creating usr.uzip ... @${MKDIR} ${WRKDIR}/mnt @${MAKEFS} -t ffs ${WRKDIR}/usr.img ${WRKDIR}/mfs/usr /dev/null @${MKUZIP} -o ${WRKDIR}/mfs/usr.uzip ${WRKDIR}/usr.img /dev/null @${RM} -rf ${WRKDIR}/mfs/usr ${WRKDIR}/usr.img ${MKDIR} ${WRKDIR}/mfs/usr @${TOUCH} ${WRKDIR}/.usr.uzip_done @echo done boot: install prune ${WRKDIR}/.boot_done ${WRKDIR}/.boot_done: @echo -n Configuring boot environment ... @${MKDIR} ${WRKDIR}/disk ${CHOWN} root:wheel ${WRKDIR}/disk @${RM} -f ${WRKDIR}/mfs/boot/kernel/kernel.debug @${CP} -rp ${WRKDIR}/mfs/boot ${WRKDIR}/disk @${RM} -rf ${WRKDIR}/disk/boot/kernel/*.ko @for FILE in ${BOOTMODULES}; do \ test -f ${WRKDIR}/mfs/boot/kernel/$${FILE}.ko ${CP} -f ${WRKDIR}/mfs/boot/kernel/$${FILE}.ko ${WRKDIR}/disk/boot/kernel/$${FILE}.ko /dev/null 2/dev/null; \ done @${MKDIR} -p ${WRKDIR}/disk/boot/modules @for FILE in ${MFSMODULES}; do \ test -f ${WRKDIR}/mfs/boot/kernel/$${FILE}.ko ${MV} -f ${WRKDIR}/mfs/boot/kernel/$${FILE}.ko ${WRKDIR}/mfs/boot/modules/ /dev/null 2/dev/null; \ done @${RM} -rf ${WRKDIR}/mfs/boot/kernel
Re: bash Shell Scripting Question
Many thanks! The for loop was what was needed. Polytropon writes: Just a sidenote: If you're not using bash-specific functionality and intend to make your script portable, use #!/bin/sh instead. I always start out that way for that very reason. I needed some random number functions and arithmetic for another part of the script so I ended up going to bash. while read dirname; do Attention: dirname (/usr/bin/dirname) is a binary! You are so correct! Thank you. Continuing; Correct. You could use different approaches which may or may not fail due to the directory names you will encounter (like directories with spaces or special characters). In this application, all the directories will be non-problematic, but point well taken. #!/bin/sh for DIR in `ls -LF | grep \/`; do cd ${DIR} # do stuff done That works perfectly. Again many thanks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
bash Shell Scripting Question
I just discovered a knowledge deficiency on my part that I can't seem to resolve. If one writes a loop of the following form: #!/usr/local/bin/bash ls -LF |grep \/ /tmp/files while read dirname; do cd $dirname #Do whatever commands to be repeated in each directory. done /tmp/files This works quite well but it is shall we say sloppy because it creates a file that then must be cleaned up and its name needs to be made unique, etc. The standard output of the `ls -LF |grep \/` command needs to look like a file and all should be well. I thought the redirection would pickup the standard output. Thanks for ideas. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
mhonarc 64-bit Package for mhonarc6.18 is stale.
mhonarc is a mime message archiver that is used with nmh and possibly other applications. I used pkg_add -r mhonarc to install it on a new system I was building and then discovered that attempts to reply to messages produced no quoted output and a spew of perl warnings about defined being deprecated. The messages tell you what line and in what application the offending directives live and one must then edit out the word defined from those lines. The current port of mhonarc, however, is fine so I first did make deinstall in the /usr/ports/www/mhonarc directory and then did make install from the port and things are now perking along nicely. If there is a better place to send this message, I will certainly be glad to send it. All somebody needs to do is create the mhonarc.tbz package from the most current port for both 32 and 64-bit systems. Who knows; I may be the only one in the world who is still using nmh, but it is useful when you want scripts to send mail, etc. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Is there anything like strace for 64-bit Systems?
Is there anything like strace for AMD64 FreeBSD? Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Is there anything like strace for 64-bit Systems?
Is there anything like strace for AMD64 FreeBSD? Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Is there anything like strace for 64-bit Systems?
Bruce Cran writes I should try truss. I would just quote the text, but I need to first find out what is broken in the reply sequence and truss may point out what is failing. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Virtual FreeBSD9.0 ISO Image Won't Mount Root FS
The ISO image is the FreeBSD9.0 bootonly CDROM for amd64 systems. I added loader.conf to /boot in order to activate a serial console and this along with socat appears to be working as it should. This is great because remote desktop is not an option. The VM boot starts normally with the spinning bars and normal startup messages until: cd0: cd present [85585 x 2048 byte records] Timecounter TSC frequency 3368628976 Hz quality 800 Trying to mount root from cd9660:/dev/iso9660/FREEBSD_INSTALL [ro]... mountroot: waiting for device /dev/iso9660/FREEBSD_INSTALL ... Mounting from cd9660:/dev/iso9660/FREEBSD_INSTALL failed with error 19. Loader variables: vfs.root.mountfrom=cd9660:/dev/iso9660/FREEBSD_INSTALL vfs.root.mountfrom.options=ro Manual root filesystem specification: fstype:device [options] Mount device using filesystem fstype and with the specified (optional) option list. eg. ufs:/dev/da0s1a zfs:tank cd9660:/dev/acd0 ro (which is equivalent to: mount -t cd9660 -o ro /dev/acd0 /) ? List valid disk boot devices . Yield 1 second (for background tasks) empty lineAbort manual input mountroot I enter a Question Mark. mountroot ? List of GEOM managed disk devices: iso9660/CDROM cd0 ada0 mountroot The host system is a fairly new 64-bit Macintosh which is using VirtualBox. Here is the script to define the new machine. VBoxManage createvm --name vsys --ostype FreeBSD_64 --register VBoxManage modifyvm vsys --memory 1000 --vram 128 --acpi on \ --boot2 dvd --boot1 disk --nic1 nat #setup ttyu0 so the VM can communicate. VBoxManage modifyvm vsys --uart1 0x3F8 4 VBoxManage -q modifyvm vsys --uartmode1 server '/tmp/vmx' VBoxManage createhd --filename FreeBSD.VMDK --size 1 VBoxManage storagectl x --name SATA Controller --add sata --controller \ IntelAHCI --hostiocache on VBoxManage storageattach x --storagectl SATA Controller \ --port 0 --device 0 --type hdd --medium FreeBSD.VMDK VBoxManage storagectl vsys --name IDE Controller \ --add ide --controller PIIX4 VBoxManage storageattach vsys --storagectl IDE Controller \ --port 0 --device 0 --type dvddrive --medium /users/sysbuild/headless.iso ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Building a Headless FreeBSD Virtual System
I am using Oracle's VirtualBox package for the Mac. It is free and I am not sure that Dollars would get past the issue I have, here. VirtualBox uses Microsoft's remote desktop as the one and only output channel to allow remote access to the virtual system one is creating and this is really bad design for computer users who are blind and use screen readers. Pictures of text just don't work. If you had some very complex system with OCR, it might sort of work, but such systems don't exist as a drop-in for a good old ASCII terminal so that's not an option. So far, I downloaded the bootonly ISO image of FreeBSD9.0, mounted it and added the following loader.conf: boot_multicons=YES boot_serial=YES comconsole_speed=115200 console=comconsole,vidconsole vesa_load=YES Next, I used VirtualBoxmanage to define the disk and create the machine with a virtual IDE controller that is pointed to the ISO image for FreeBSD9.0 with the serial console. Has anybody been able to use VirtualBox and a fake serial console to get around the remote desktop non solution? I will probably have to add a virtual serial port in the machine definition one puts in the original machine build, but I am not sure this doesn't just go to that remote desktop channel where it gets scrubbed of any usefulness except for eyeballs on screens. This whole thing looks very promising but there's got to be a way around that shoe which doesn't fit in the form of that GUI remote desk top. In my case, the machine build goes without error but I can't tell yet if it is even booting. Mac's, by the way, have a relatively good screen reader built in but VirtualBox doesn't work with it, something that is a problem with a number of third-party programs especially when they were originally developed for Windows. This, of course, does not pertain to the main topic of this list, but I say it here so that you know I am aware you are supposed to be able to use the GUI on the Mac to manage your new virtual system. Essentially, the local GUI and the remote desktop don't work for me for the same reasons. My hope is to get FreeBSD running as a guest system on a powerful Mac and retire an old Dell server with noisy fans and several BTU of heat output which is in the realm of 15 years old and will probably retire itself at some random date in the future. Thank you for any good suggestions. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Off-Topic: Computing for the Blind
Polytropon writes: That's correct. However, unlike a Braille readout which gives tactile information (through the reader's hands), synthetic voice cannot easily accomodate to the reader's habits and reading speed. Scanning text is not possible as the generated voiced text is played in linear time, which means you cannot easily skip forward and backward, re-read a certain passage, and you basically do not come down to the letter level, you only have a word level. You are absolutely right on all counts. I was speaking from the standpoint of the amount of work and or extra expense that one would need to go through to get the interface fully operational. Nobody has yet figured out how to build a Braille display that is affordable, let's say 100 US Dollars or less for even one line of Braille much less a whole page or better yet a graphical screen that could display shapes and possibly textures that are not Braille characters. Prices of 5000 Dollars are not uncommon and single-line displays sell for well over 1000 Dollars anywhere you go. What is needed is a way to accomplish a tactile matrix that doesn't require precision machining or hand assembly for each pixel. That's why today's displays are so incredibly expensive and delicate. There are lots of neat ideas such as stimulators you might ware on your fingers as you move your hand over a large area, but making a tightly-packed matrix at almost microscopic level is still a pains-taking task. By the way, math done by any method other than Braille is darn next to useless. Equations in Braille can be formatted very much like they are in print and there is a whole Braille system for reading and writing math. So, I am not disagreeing at all with what you wrote here, just clarifying why I made the statements I made. While this has benefits in unconcentrated reading (e. g. reading an article or literature, it can be problematic with scientific or technical text where a (healthy) reader would let his eyes jump within the text stream. The thing I hate the most these days is the lost art of the linear declarative sentence. If the output of a program is some full-screen form in which the information one wants is in check boxes, you have to listen to the whole !%#%00--- thing just to find out whether or not it worked. There are usually one or two things we really wanted to know and the rest is unchanged but must be endured to get the one or two grains of wheat in all that chaff. Since it's full-screen stuff, it is hard to pipe to a script so I guess the artists are happy and the rest of us are just tapping our feet impatiently waiting for the water torture to end. Fortunately, unix operations are still relatively free from the worst GUI parlor tricks, but I use safari on a Mac to access some Windows-centric web sites related to work and they make me want to straighten out a horse shoe without a forge I get so mad at listening to the minutes of audio with the results of what I did always at or near the last of the text and there seems to be no way to stanch the deluge without loosing the gold nuggets. In conclusion, FreeBSD has been another wonderful open-source platform as far as I can say. Many of the systems I run it on here do not have sound cards and are either on virtual boxes, in other buildings or towns and so a speech or Braille console directly on the system isn't possible so I have always used some other device to provide accessibility and never been disappointed. After all, it's unix which means one can expect certain behaviors regarding standard devices. Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Remote System Builds
Is there yet any way to remotely rebuild a FreeBSD system? I have two FreeBSD systems on two remote campuses that presently run FreeBSD6.3. They need to be running FreeBSD9.0 and I don't really care how I get there as long as it can be done over the network. If we were physically there, I would put a CDROM in and blow them away since it is such a large jump. I can have staff members there install CDROM's that were remastered to use the serial console, but I am hoping that maybe we are moving past this sort of logistics. I just tried to unpack the 9.0 image using tar which has worked in the past to let one modify loader.conf but I got a bunch of errors this time about files that couldn't be created so maybe this is not the recommended headless installation technique any longer. Any ideas? Thank you very much Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Off-Topic: Computing for the Blind
There may be several people on this list who are blind, meaning no usable vision to see a screen. I definitely fit that description so I will gladly try to answer questions which breaks my usual practice here of asking beginner-level questions even though I have been using FreeBSD for almost ten years. The easiest and most economical interface for computer users who are blind is spoken speach. I am not talking about speech recognition where you speak to the computer and it does things, but speech synthesis where the computer runs an application to read what is on the screen back to the person using the system. One can learn to type and touch-typing was tought in schools for the blind for scores of years before computers ever even came on the scene. We pounded on typewriters and our poor suffering typing teachers were the feedback mechanisms that told us how we were doing. So, a person who is blind needs to know how to type. Almost every operating system has a screen reading program or several that one can install that reads the screen back to you. There is a good screen reader for the Macintosh which is included on every single Mac that runs OSX10.X. I like it and the Mac's do run a customized version of BSD unix. The screen reader for the Mac is called voiceover and you can activate it by Command-F5 and then Command-F5 again to turn it off. The only drawback to voiceover is that for those of us who do a lot of tinkering and compiling of source code on unix systems, the screen reader makes listening to the stream of consciousness almost useless because it resets itself each time new output is detected. There is also a lot of really neat things going on in Linux. We have Orca which is the GUI environment and some very good software speech synthesizers for both the GUI and the command line worlds. They tend to handle bursty output from compilers and log tailings better than voiceover but you find that both Mac and Linux screen readers shine in some things and don't do so well in others so there is no clear winner. Finally, there is the Windows world. Microsoft may be actually trying to improve their narrator application to where it is a serious screen reader, but up to now, there is one free screen reader that some people like to use plus several commercial applications that cost an arm and a leg and are always one upgrade away from being snuffed out and causing their owners much grief. None of these screen readers are perfect, but most computer users who are blind end up being reasonably happy with one of them. I personally like Linux and the Mac because there is no additional charge to install the screen readers and they generally won't let you down. There are also Braille displays which some people use but they are extremely costly. I mentioned the speech recognition systems. Many of those actually present problems for those who are blind because you need to train them on your speech and the feedback is graphical so a good old keyboard is still the best input device. So as not to get totally off topic, I haven't heard of any of the Linux screen readers being ported to FreeBSD. That could be a problem for some people and not an issue at all for others. Right now, I am typing on a Linux computer running a software speech engine and I am editing this message on a FreeBSD9.0 system via ssh and using vi on the actual message file. It works great. If that Raspberry Pie Linux system turns out to be able to support one of the Linux screen readers, we're talking about a talking terminal for less than 100 US Dollars. We'll just have to see what happens. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Freebsd9.0 and the fgets directive in gcc
I've got some code which I wrote about 6 or 8 years ago that apparently doesn't get along right now with FreeBSD9.0. In the problem code, there is a loop that uses fgets to read a line from a file. It runs properly until the 2708TH iteration and then it dumps core with a segmentation fault. char string0[256]; more lines of code . . . while ( fgets(string0,sizeof(string0),fp_config)) { code to be run for each line } It runs fine until the 2,709TH iteration. Instead of reading the next line, it jumps to the line that closes fp_config even though it is far from read and exits with the segmentation fault. The man page on fgets says that if errors occur while running fgets, one must use perr to see whether the error terminated activity or it was the end of the file. In this case, it is definitely the error. Some observations: The crash occurs on the 2,709TH input no matter how long I declared string0 to be. string0 is over-written each new iteration so nothing should be accumulating that uses up resources. Maybe I am declaring string0 in the wrong data type. Originally, it had been 1024 characters long but 2709 seems to be the C equivalent to the apocalypse and I thought it was supposed to be next December:-) This same code, by the way, also fails at about the same number of iterations if one uses fgetc and builds the line one char at a time. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Freebsd9.0 and the fgets directive in gcc
Never mind. I may be back with another question, but I figured out that it is not the input loop. I simply removed all the code in the loop except for a variable that counts the number of iterations and just ran thatand it read the entire file so the problem is introduced when assigning values to variables based on the contents of the lines. It is something that worked okay up to FreeBSD8.X but now causes a segmentation fault. Martin McCormick writes: I've got some code which I wrote about 6 or 8 years ago that apparently doesn't get along right now with FreeBSD9.0. In the problem code, there is a loop that uses fgets to read a line from a file. It runs properly until the 2708TH iteration and then it dumps core with a segmentation fault. char string0[256]; more lines of code . . . while ( fgets(string0,sizeof(string0),fp_config)) { code to be run for each line } It runs fine until the 2,709TH iteration. Instead of reading the next line, it jumps to the line that closes fp_config even though it is far from read and exits with the segmentation fault. The man page on fgets says that if errors occur while running fgets, one must use perr to see whether the error terminated activity or it was the end of the file. In this case, it is definitely the error. Some observations: The crash occurs on the 2,709TH input no matter how long I declared string0 to be. string0 is over-written each new iteration so nothing should be accumulating that uses up resources. Maybe I am declaring string0 in the wrong data type. Originally, it had been 1024 characters long but 2709 seems to be the C equivalent to the apocalypse and I thought it was supposed to be next December:-) This same code, by the way, also fails at about the same number of iterations if one uses fgetc and builds the line one char at a time. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Reading an unknown DAT Tape
This is a case of idle curiosity and not an urgent need to recover a valuable backup. I found an old DAT tape and attempted to read it on the very drive that probably once wrote it and it appears to read the tape properly in that I can use dd to copy it to a file and mt fsf 5, for example, takes the tape to the fifth file marker so there is sanity. Tar, however, does not recognize the format of the archive so it is either something proprietary or I am not using the correct utility on it. I opened it with dd files=2 if=/dev/sa0 of=testfile and then did the strings utility on testfile and got: TAPE SSET VOLB DIRB NACL Setting security iles SPAD DIRB NACL Setting security on system files... SPAD DIRB NACL SPAD DIRB NACL SPAD FILE NACL STAN Jun 23 2003 12:00AM Jan 1 1900 8:45AM Jan 1 1900 9:00AM Note that we are obviously able to read data from the tape as the top few lines are readible as words. The time stamps at the bottom are possibly not time stamps as some of them are not plausible. The dd command never faltered with errors although I did finally stop it manually. Is there any FreeBSD utility that can tell more about what created the original archive? Thank you. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Removal Attempt of Directory under ZFS causes Kernel Panic
We have a ZFS file system under FreeBSD9.0 running on a virtual machine which had been running flawlessly for a bit over a month when I discovered that I had copied our home directory into /usr/home such that we had /usr/home/home. As root, I cd'd to /usr/home and then typed rm -r home at which point the kernel panicked after removing most of this bogus home directory. It got to one particular user's subdirectory, worked normally for a bit and then that's when the kernel panicked. What we found were normal symlinks and files that, if you make any attempt to delete them or touch them, provoke the kernel panic and crash. If you mount the file system on a rescue disk, it crashes that. We've tried mounting on a debian rescue disk that supported zfs and it didn't crash, but hung. A coworker ran the debug version of our kernel and it complained about values being out of bounds for the several files in question. Basically, in the roughly 20 years of working with unix systems, I have never once seen anything like this. We don't think it has to do with the virtual machine because you can trigger the disaster only by trying to remove the specific files. everything else appears to be working normally including creating and deleting other files and directories. My gut feeling is that it is related to zfs. The bogus home directory was an attempt by me to rsync from the actual hardware system to the virtual system back in November and every file came out owned by root. I got the rsync working properly and forgot about this home/home directory until yesterday when I realized the mistake and tried to delete it. Does this sound familiar to anybody? This is the first zfs installation I have used and I am not real wild about trying it again if we can't solve this mystery. We can't seem to duplicate the problem. Any ideas are appreciated. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Removal Attempt of Directory under ZFS causes Kernel Panic
You will see a message on this group from Ryan Frederick who is a coworker of mine and who also posted a question about this same issue. There was a little confusion about which FreeBSD support group had been asked so my question and his are about the same machine. He submitted the stack trace so hopefully somebody can give us an idea as to how this happened. Thank you again. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
freebsd-update; What did I do?
I started to run freebsd-update to upgrade a 8.x system to 9.0-RELEASE # freebsd-update -r 9.0-RELEASE upgrade Looking up update.FreeBSD.org mirrors... 4 mirrors found. Fetching metadata signature for 8.2-RELEASE from update5.FreeBSD.org... done. Fetching metadata index... done. Inspecting system... done. The following components of FreeBSD seem to be installed: kernel/generic src/base src/bin src/cddl src/contrib src/crypto src/etc src/games src/gnu src/include src/krb5 src/lib src/libexec src/release src/rescue src/sbin src/secure src/share src/sys src/tools src/ubin src/usbin world/base world/dict world/doc world/info world/manpages world/proflibs The following components of FreeBSD do not seem to be installed: world/catpages world/games world/lib32 Does this look reasonable (y/n)? yes Fetching metadata signature for 9.0-RELEASE from update5.FreeBSD.org... done. Fetching metadata index... done. The update metadata is correctly signed, but failed an integrity check. Cowardly refusing to proceed any further. # What is the next step, here? Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: freebsd-update; What did I do?
Matthew Seaman writes: That's a known problem and fixable by first updating your 8.2-RELEASE machine to the latest patch level before trying the update to 9.0 It appears to be working now. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Sample getaddrinfo Code Compiles in Linux but not FreeBSD.
Peter Andreev writes: #include netinet/in.h Many thanks. That made the FreeBSD version work just as well. As soon as I saw netinet.h, I realized it wasn't in the original code as the Linux libraries apparently accomplish the same thing without that header. Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Rsync and Preservation of Ownership and Permissions
Michael Sierchio writes: Does the same user exist on the remote system, with the same uid, etc.? Yes. If you're using rsync with ssh as the transport, and connecting to the remote machine as the backups user, that's who will own the files on its local filesystem... I thought rsync had some encoding it might slip in to the tree that another rsync run as root on the recovering system could use to figure out all those thousands of ownerships and get them all straight, but this makes perfect sense. You've written a lot of narrative, but show us precisely what commands you're running. Why would you run the command as root, and ssh as backups, when you want them to be owned by normal ? Because root is the only user who can see files from all other users so root starts the process. Here is what I tried. Remember, folks, this will not work! This tries to backup a system named z. ##!/bin/sh #rsync --delete -alHvq --exclude /proc // back...@backup-server.okstate.edu:z You can run the command as root, and use restricted ssh keys (use authorized_keys to restrict it to executing a specific rsync command) you can run rsync as a regular user to that user's account on the remote system... per...@pluto.rain.com writes: Perhaps you could have rsync log in to a jail on the backup server, where it could safely be granted root permission. Hmm. It's all rather clear, now. A jailed environment that looks like root is about the only thing that could work. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Rsync and Preservation of Ownership and Permissions
Rsync is a great utility, but is there a way to preserve ownership and permissions if rsync remotely logs in to a backup server as a normal user? The recovery process is run by root but copies all the files from the backup server as a normal user and uses its root capabilities to restore them. What happens now is that all the files end up owned by and in the group of the user ID that copied the information from the client to the server. That's obviously not too useful so I suspect there is a better way than trying to make a remote login to root from another system. Basically, cron starts a backup as root on system A. System A makes a remote ssh connection using the -e flag to backups@server. The system trying to recover the files starts a rsync process as root which remotely connects to backups@server to retrieve the files. In practice, the files come across but every last one of them is owned by and in the group of user backups. Any ideas are greatly appreciated. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Two Networks on one System
Here is what the issue is right now. The remote campus in question has been on number space that was part of our Class B network. They got a block of subnets for their DNS's and campus enterprises and work stations. We secured them their own number space and they are migrating from their portion of our network to their new network and both nets are presented routable from the rest of the world. If you do a whois query for their domain, you get the address on our network of their primary DNS. When one updates the whois data, there is a lag of some hours until new queries start going to the new address of their primary DNS. In the mean time, we don't really care but we would like for the new interface for the primary to be reachable so that the minute the information changes, we're answering lookups. After that point, we will permanently take down the old interface address on our network and probably reboot with the normal configuration now being the new IP address. The problem I have, probably due to a misunderstanding of what I need to do, is easy to describe. The defaultrouter statement in rc.conf or route add default x.x.x.x from the command line sets an interface to know that packets whose destinations or sources that are outside the subnet go to that default gateway. When I set up the secondary interface, I have not been able to come up with a statement or statements that tell fxp1 that it's default router is y.y.y.y so you can't ever reach it from outside the new subnet. Once traffic ever gets in to the system, it will probably stay together based on the interface where it came from, but it won't have to do it for hopefully more than a few hours. I have tried both a second physical connection and an alias and have ended up with the same behavior each time. Since we have the second NIC active, I prefer to use it if I can ever get it to use its router just like the primary interface does. Right now, I can get on to our secondary DNS which is in the same subnet as the new address for the primary and log right in to the primary through the new interface. From anywhere else on the Earth, that new address is as dead as a doornail. I certainly appreciate every posting so far as routing is one of the thorniest issues one can encounter in networking so the more one is aware of, the less head-scratching and frustration there is. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Two Networks on one System
Damien Fleuriot writes: SOLUTION: You need a way to reply using a specific route depending on which IP was requested by the internet user at 50.50.50.50 If they queried 100.100.100.53, you need to route through 100.100.100.1. If they queried 200.200.200.53, you need to route through 200.200.200.1. TECHNICAL IMPLEMENTATION: pf provides the tools for what you'd like to do, through the reply-to Thanks for that excellent explanation. Everybody has been very helpful so now, I at least know what I need to work on and many thanks for the example. I am not quoting the rest of the message, but will save it as I set up the rules. Again, thanks to all. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Two Networks on one System
Following up on a question I wrote Friday June 17, a person from this list kindly referred me to the FreeBSD Handbook and the sections on configuring Ethernet interfaces. It has an excellent example as to how to set the default gateway from the command line. I tried it and it worked. Can a second interface such as fxp1 also be informed about the router on its network while we still keep the default route for fxp0? I hope to remotely ping both fxp0 and fxp1's ip addresses from off site and get an answer from both. So far, fxp0 is visible off of its network and fxp1 is only present on its subnet. It appears that you can only have one default route per system and I need this system to appear on both networks for a day or so while we move from one subnet to another. I presently have FW rules for fxp1 that should totally open everything: 00090 allow ip from any to 192.168.1.250 via fxp1 00091 allow ip from 192.168.1.250 to any via fxp1 Obviously, I am still missing something. Thanks for any explanation as I think this sort of thing is fairly common. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Two Networks on one System
Matthew Seaman writes: Yes. It's common in the sense that a lot of people think its something that should work, and get confused when it doesn't prove simple to set up. Thank you. I think I may have stumbled on to what I need to do discussed in the Handbook under the multi-homed host section. We won't be doing any routing between the two networks but I think I have been using the wrong form of the route command as there is an example of something very similar which I will try to see if the second NIC will finally find its router. I appreciate your answer as it clears up a few more questions I had. My thanks also to Gary Gatten Probably only a single active default global ip route, but you can add network/host routes to prefer a specific interface for said routes. Again thanks to all. I will keep digging. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Two Networks on one System
I would like to say that I got it working, but after looking at the duel-homed host section of the Handbook, I am still stuck. A Google search turned up a thread from a couple of years ago that almost echoed my exact words. We've got a system with network interfaces on two disjointed networks. No routing is desired, but we very much want for both interfaces to be accessible from the world so each interface has to know about its nearest gateway just as the primary interface knows about the default route. What one seems to always be able to do is get the primary up and talking to the world with no real trouble. The secondary is on its network and you can log in from another host on the same subnet but you can never see it from the world, at large. Before the thread died out, the questioner was wondering if it was simply not possible to achieve this functionality. I am wondering the same. We are moving a primary name server from network A to network B on one of our branch campuses. If the secondary interface was reachable from the world, we can change the whois information and not worry about the exact second the change goes in to effect. The DNS should just answer whether the query came from network A or Network B. The routing is already handled so the system in question just has to be there and respond on both networks for a day or so. We don't have a spare box to run on the new network space or I would have done that days ago.;-( Again, thanks for any ideas. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Second Network Almost but Not Quite Works.
The system in question has its primary NIC on one particular network and a default route to the gateway on that network and all of that works fine. I needed the system to communicate fully on two different networks so we enabled the second interface card and it works on that second subnet. You can connect to hosts there and hosts on that network see the new interface. The problem is that it doesn't know anything about the router on that second network. I don't want it to loose the default router but it needs to be fully connected from the second interface as it is a name server and it is about to move from one network to the other. I enabled the second interface as follows: ifconfig fxp1 inet 192.168.1.13 netmask 255.255.255.0 Is the route add command what I need to cause that interface to speak to the router and to hear packets addressed to it from that router? The routing issue seems to be the only connectivity problem that the second interface has. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Second Network Almost but Not Quite Works.
The system in question has its primary NIC on one particular network and a default route to the gateway on that network and all of that works fine. I needed the system to communicate fully on two different networks so we enabled the second interface card and it works on that second subnet. You can connect to hosts there and hosts on that network see the new interface. The problem is that it doesn't know anything about the router on that second network. I don't want it to loose the default router but it needs to be fully connected from the second interface as it is a name server and it is about to move from one network to the other. I enabled the second interface as follows: ifconfig fxp1 inet 192.168.1.13 netmask 255.255.255.0 Is the route add command what I need to cause that interface to speak to the router and to hear packets addressed to it from that router? The routing issue seems to be the only connectivity problem that the second interface has. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How to be an imap Client?
per...@pluto.rain.com writes: Being a university, okstate.edu has students, most of whom are not in the CIS department or in any way under control of the CIS department's sysadmin. Need I say more? Spot on. About 25,000 students and some of them respond to phishing attempts and make other poor management decisions, many of which are done with the best of intentions. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
How to be an imap Client?
This FreeBSD system uses sendmail in normal smtp configuration. I use procmail and nmh to manage incoming messages and it all works great so I don't want to destroy all that. I do, however, need to use imap to send messages from this system through our Microsoft Exchange gateway because some systems use DNSBL and our entire network is on the blacklist so one must send from the gateway which, I guess, must be whitlisted. Is there any FreeBSD-compatible package that will act as a imap client so I can send messages, when needed, through the Exchange gateway and still preserve present smtp functionality? Many thanks. What a mess needing to send one message to one person is turning in to. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: How to be an imap Client? Solved, somewhat
Ruben de Groot writes: There is the Mail::IMAPClient perl module (or Net::IMAP::Simple, perl's about choice ;-) ) Many thanks as this may come up again. In actuality, I was able to end up using simple SMPT mail to use our Exchange gateway. I just set that gateway as a smarthost which I thought I was already doing. I then made nmh generate the from line that we need for such messages and it now is going through the gateway as a smart host. Again thanks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Modifying Sendmail's Configuration the Correct way.
The /etc/mail/sendmail.cf file very clearly tells one not to edit it directly so I edited the /etc/mail/my.name.domain.mc file as stated in documentation to cause this system to send all out-bound mail through a smart host. The .mc file part that adds the smart host looks like: dnl Dialup users should uncomment and define this appropriately dnl define(`SMART_HOST', `your.isp.mail.server') define(`SMART_HOST', `mailserver.okstate.edu') After that, I did a make in that directory and things seemed to go well. After restarting sendmail, it still wanted to resolve normally and not use the gateway. The only way we could get it to behave as desired was to do what one is not supposed to do and edit sendmail.cf and add the mailserver.okstate.edu name right against the line beginning with DS After another restart, everything worked. What am I failing to do as this is not the proper way to reconfigure sendmail? The DS line in the master file looks like DSmailserver.okstate.edu Many thanks and the handbook is very helpful but I haven't seemed to run across anything that directly addresses this situation. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Modifying Sendmail's Configuration the Correct way.
Thanks to all. Somehow, I missed the make install. I will give it another try and it will probably work as it should. This is a great list and everybody is very nice even to those of us who have been running FreeBSD for many years but are trying new things. Greg Larkin writes: Try these commands, and the sendmail.cf will be updated from the .mc file: ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Stopping Less from creating Log Files
Lowell Gilbert writes: The secure mode disables log files, but it also changes several other behaviours, so you may not find it to be an improvement. The code supports changing those secure features separately, but only by editing the source; if you go that way, it will probably be much easier to use the ports version of the program instead of the base system's. Very good.Thanks. I looked up what secure mode does and I see what you mean. I will just have to try it and see if I need the ports package or not. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Stopping Less from creating Log Files
This is a minor problem but I use more to read Email messages from nmh. If one forgets what screen one is in, it is possible to start typing and create a log file of the message in which ever mailbox directory one is reading out of. The man page for more is actually linked to less even though FreeBSD has /usr/bin/more and less. I even tried in the .mh_profile to call more with -Oo/dev/null but if you hit a key, the logfile prompt appears and any subsequent key strokes are part of the new file name. This really is only a minor nuisance because it creates junk files that then have to be removed from the directory. So, if there is a way to make more or less not write anything, it would be more or less appreciated. Many thanks in advance. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Using Multiple -prune directives in a find command
Mike Clarke writes: find . -type d -name dir1 -prune -o -name dir2 -prune -o -name \* ... should list all files except those in dir1 or dir2 It certainly does. Thank you. I was off on enough wrong syntax tracks that it probably would have taken a very long time to figure it out. I found tons of find examples but very little use of -prune in those examples. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Using Multiple -prune directives in a find command
Can one use the -prune directive multiple times in a find command to specify a list of directories not to descend? It would be like find . -name * -prune dir1 -prune dir2 -print or whatever you wanted find to do, but that does not work or I wouldn't be asking. Find appears to get confused and thinks dir1 is a command. Thanks for your help. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Can one Download Old Packages?
Is there a safe site to find the rsync package for FreeBSD6.3? We still have a few 6.3 systems around because the commercial backup client we have for an enterprise-wide solution will not install on FreeBSD8.1? This is one of those times when we are fighting the war with what we presently have rather than what we wish we had. I must restore the /dev directory on a 6.3 system and rsync would have done it hours ago but I didn't know that the few remaining 6.3 systems didn't have it installed. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Can one Download Old Packages?
Devin Teske writes: ftp://ftp-archive.freebsd.org/pub/FreeBSD-Archive/old-releases/i386/6.3-RELE ASE/packages/All Have fun. Thanks. I was on the right server but took a wrong turn. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
FreeBSD8.1 Can't get Syslog file to Log dhcpd Solved.
Ah, the havoc of one stray space at the beginning of a line. I had noticed that all the other examples of various logs one could create in syslog.conf worked right. What on Earth was so special about: *.info;auth.info;mail.warning;cron.warning /var/log/syslog It's that one stray space before the first asterisk. I removed it and everything started working. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
FreeBSD8.1 Can't get Syslog file to Log dhcpd
I have dhcpd running on a new 8.1 installation and I can't seem to get /var/log/syslog to work. I touched /var/log/syslog set to 644 and have restarted syslogd numerous times since then and it is still 0-length. I did add the following line to syslog.conf which has worked for probably 6 or 8 years: *.info;auth.info;mail.warning;cron.warning /var/log/syslog Logs such as /var/log/messages are working fine. Thanks for any suggestions. Our dhcp server is very busy so we really need these logs. I can see dhcpd trying to log if I run syslogd -d. Thanks for any suggestions. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
How FreeBSD Handles a DNS that is Down
This is an extremely novice question on my part, but after what I recently witnessed, I am not so sure I understand all I know. The normal procedure on internet-connected systems is to set the resolv.conf file to include at least 2 domain name servers. Example: nameserver 139.78.100.1 nameserver 139.78.200.1 Last night, I had to take down our primary DNS for maintenance and lots of systems began having trouble of various kinds. While I expected the FreeBSD system I was on to hang for a couple of seconds and then start using the second DNS, it basically froze while some Linux boxes also began exhibiting similar behavior. I finally manually changed the resolv.conf on the system I was using to force the slave DNS to be first in the list and that helped, but loosing the primary DNS was not the slight slowdown one might expect. It was a full-blown outage. Are we missing some other configuration directive for Unix systems that would make the systems use the redundancy a little more gracefully than what happened? Otherwise, why have it if somebody has to manually intervene? The only thing we should have lost was dynamic updates. The systems that I know that were basically hosed were FreeBSD and Linux. As soon as the mother ship came back on line, everything was sweetness and light. Thanks for any thoughts on this issue. I have only been running DNS for around 18 years and we fortunately do not get to see this condition often and when we do, it's hopefully for very short periods, but the disruption is total. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
64-bit PGP isn't Decrypting.
There are two new FreeBSD8.1 systems. Both got pgp added to them by use of pkg_add -r pgp. Both adds installed Pretty Good Privacy(tm) 2.6.3ia - Public-key encryption for the masses. (c) 1990-96 Philip Zimmermann, Phil's Pretty Good Software. 1996-03-04 International version - not for use in the USA. Does not use RSAREF. A test file that had been encrypted earlier was used on both systems. It works fine on the 32-bit system and always fails on the 64-bit system. Trust me. As many times as I tried it, I couldn't possibly be mistyping the pass phrase every time on the 64-bit system and then getting it right on the 32-bit system. On the 64-bit system, one can not seem to encrypt a file and then decrypt it with the pass phrase. If you take the encrypted file from the 64-bit system and try to decrypt on the 32-bit system, that fails so something appears wrong with the numerical encryption process that is peculiar to being 64 bits. I am thinking some of the cipher routines may be relying on the width of certain expressions that change if running in 64-bit mode. So far, files encrypted on the 64-bit system are ultrasecure in that they can'ts seem to be read anywhere.:-) Has anybody else had the same problem on a 64-bit version of pgp? I am glad I discovered this before anything crytical happened. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: 64-bit PGP isn't Decrypting.
Dan Nelson writes: Does gnupg (ports/security/gnupg) work? I think you'll have a hard time trying to get people to fix bugs in pgp; the source tree that the pgp port uses is 14 years old. Wow! I thought that was just the first copywrite date. gnugp installs gpg-2 which is almost the right thing but the files encrypted from pgp report as using the idea method. gpg-idea is a port that currently appears to try to decode the test file but immediately bombs out with a couple of cryptic errors about packets so not quite home yet. Thanks for pointing me in the right direction. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Not Sure Which Package has mssql_connect.
I just upgraded a system from FreeBSD6.3 to 8.1 and only have 2 loose ends so far. One is that I discovered some of my C code needs a little touching up to continue to work right and the other is that we have an application on our system that uses freetds and makes mysql queries and presently gives me the following error: Fatal error: Call to undefined function mssql_connect() in Line number of script is given and that line reads: $numero= mssql_connect(sql , natreg1 , PASSWD ); As soon as I find out what port or package contains mysql_connect, we should be back in business. I did install mysql50-client. It does not contain the mysql_connect routine so I deleted it. I installed the port called mysql-connector-odbc which looked like a good possibility but it also does not have the connect routine. I installed php5 to get the php interpreter so it is possible that I have the wrong php and another php has the mysql_connect routine so at this time, I am all ears. Thanks for any suggestions. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Not Sure Which Package has mssql_connect.
Glen Barber writes: Are you sure mssql_connect() isn't a typo? The rest of your email states mysql_connect(). Wow! I've been doing too much of this this week. It's actually the other way around. The problem is with mssql_connect and my references to mysql were based on a bit of confusion. We are connecting to a remote SQL server and pulling information off of it. Sorry for the confusion and thanks. Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Not Sure Which Package has mssql_connect.
Greg Larkin writes: You referred to C code at the top of your message, That was actually incidental. I was thinking about what had happened when I transplanted some home-grown C code in to 8.1 and had to clean up some of my lazy habits to make it work again. So far, nothing I haven't been able to handle. but are you actually looking for a PHP extension that contains the mssql_connection function so some PHP code runs correctly? Yes. I also have a question whether you're looking for a PHP extension that connections to a MS SQL server or one that connects to a MySQL server. I'm guessing you're trying to connect to MS SQL. In spite of my rather confused question, that is exactly what I am doing. We talk to a remote mssql server and pull off new data from a database. If so, please install http://www.freshports.org/databases/php5-mssql/, and you should be all set. You shouldn't need to install http://www.freshports.org/databases/php5-mysql/ unless you're trying to connect to a MySQL server, too. The first port is what I needed. Many thanks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
pkg_config Version Numbers
I built bind9.7.1 on a 64-bit FreeBSD system and then did make package-recursive in order to produce a package that can be installed on some other systems. After doing so, I get the following warning on numerous other packages when I install them. pkg_add: warning: package pkg_name' requires 'pkg-config-0.23_1', but 'pkg-config-0.25' is installed This looks like it could be harmless enough as pkg-config-0.25 is newer but I thought I would ask before creating any more possible monsters. Is this something to fix or can I forget it? Thank you. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
How to Best Prevent Unwanted named installation
After successfully installing bind97 from a package on to a new server, I do a cvs-sup of the system to get the latest patches in to the kernel. After discovering that bind97 had been replaced with bind9.6.1, I looked in /usr/src and there is a contrib/bind9 directory. What is the safest way to disable that build without adversly effecting the rest of the update? The reason for doing these things in this order is that I would like to get bind running as quickly as possible since it takes a couple of hours or more to get the world built when we could be doing DNS. Since I am not using that version of bind, not getting it built is no problem. I don't even care if it gets built so long as it does not end up in /usr/sbin to clobber the new bind9.7. This is not really a complaint. I just want to prevent the installation of the old bind over the new one as simply as possible. Thanks. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Boot Drive Nomenclature and How to Figure it out
I have been writing a script to build a system from a mfsboot startup and it is going well but I want to revisit part of the script that I don't think I did a very good job with. Is there an automatic way to tell which of the devices shown in /dev is a likely system drive? This is before anything is mounted. We can usually figure it out ourselves, but is there a way for a script to figure out automatically which character device could be the one we are going to put the OS on and use as our boot drive? I know this sounds really obvious and you can tell scripts not to use /dev/acdx as they are CDROM devices, but system drives can actually take many different names depending on whether they are RAIDs SCSI IDE, etc. Any good suggestions are appreciated. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Boot Drive Nomenclature and How to Figure it out
Adam Vande More writes: Would doing something like: gpart list help? Thank you. I have never heard of gpart before so I gave it a try and that helps very much if the drive is already formatted. Most of these drives I plan to encounter will be formatted so this basically solves the problem but it raises a new question. If one does gpart list as suggested and the disk is formatted, one gets exactly the information necessary. I believe it is even the first line of output. It doesn't get better than that. If the disk is not corrected formatted such as might happen with corruption or maybe a new drive, gpart list executes silently and prints nothing on the output. As I said, you answered my question so many thanks. The new question might best be put: Okay, if nothing is there, where did gpart look to see nothing? Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Need to run a Command Once on Boot. FreeBSD8.1
I seem to recall that there is some sort of stub that will let one execute a script which runs at the last stage of the boot process but I can't seem to remember enough to look it up. I need to run a small script to do pwd_mkdb just once to sync the passwd data base after booting a 8.1 system for the first time. The system is being built via script and /etc/master.passwd has a couple of accounts that the data base doesn't know about. After running pwd_mkdb against /etc/master.passwd, all is well but we are locked out of the system until this happens. I may even make the script destroy itself after launching since it never needs to run after that one time. Thanks. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Need to run a Command Once on Boot. FreeBSD8.1
Robert Bonomi writes: /etc/rc.local maybe? contrary to the 'rc.d' way of doing things, but 'simple'. :) Thanks so much to both people who answered. I thought there was more to it than that but I may be thinking of the rcx.d directories in Linux. If you don't watch out, you can be scratching your head all day trying to figure out why the job isn't getting done. I use and like both FreeBSD and Linux but some things are easier in one than the other. Again, many thanks. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Bind9.7.1 Package
Matthew Seaman writes: # pkg_create -b pkg-config-0.23_1 pkg-config is an indirect dependency for bind -- it's required by security/openssl and textproc/libxml2 either of which bind are optional dependencies for dns/bind97. Thank you. This put me on the right track. When I used the full name of the dependency, the command did not work with the complaint that it could not find the package so I did a pkg_info and looked for any reference to pkg-config. It turns out that if one chops off the _1 at the end, it did recover another package as in pkg-config-0.23.tbz which appeared in /uar/ports/dns/bind97. I copied it to the same directory as the other tar balls so pkg_add should find it also now. Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Bind9.7.1 Package
I wrote to the list about building a package out of a port of bind97 and am almost there. Matthew Seaman writes: # make package-recursive which I did after configuring and installing bind9.7.1P2. I then put all the tar balls the make created in to a directory that is put on to the new system along with the bind97 base tar ball and tried to install the package on to a brand new system with pkg_add. It acts as if I almost have it in that it does find all the tar archives but there is one last complaint which kills the whole install. I get a message about pkg-config-0.23_1 and can not seem to find anything to save from the port that contains that string or any part there of. There is obviously some other little file I need to save from somewhere, but I am not sure what to look for. Thanks. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Bind9.7.1 Package
In the /usr/ports/dns/bind9 ports there is a bind97 port that I had no trouble at all installing on a 8.0 system. If I do a pkg_add -r bind97, however, pkg_add reports that it is unavailable. I will be building several FreeBSD boxes with bind9.7.1 on them so a package would be faster. Am I missing the name of the package? If there is no package of bind97, this is not a huge setback but it will make each installation take longer before named starts to work. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Running an Old Kernel
b. f. writes: On 6/25/10, b. f. bf1...@googlemail.com wrote: Looking at Matthew Seaman's earlier response, I find that his suggestion to make changes to ${PREFIX}/etc/pam.d/sudo is more appropriate than my guess above. But you probably need to look into the details, because judging from the comments in the ${PREFIX}/etc/pam.d/sudo.default file, there seems to be some subtleties involving sudo and pam_lastlog. Look at the pertinent manpages, the sudo docs, and: http://www.freebsd.org/doc/en/articles/pam/index.html I do not believe any longer that this has anything to do with the FreeBSD version or patch level or the kernel. I have not solved the problem yet, but someone sent me a message off list with several good suggestions for comparing files on one system to those on another. I began to test to see which of our existing systems show the last login message and which do not. The fortunate thing is that there are several FreeBSD systems spread out over 3 campuses. All run FreeBSD6.3 at the same patch level. Three out of the 6 work normally. The other 3 also work normally except for that last login message. The FreeBSD8.0 system that also shows the message is patterned after one of the systems that is also displaying the unwanted message. The 3 systems that show the message are all essentially copies of each other so I am unwittingly copying the behavior even across FreeBSD versions. I expect to find the corruption in /usr/local as that is the one directory tree in which many files and scripts from the old system are copied to the new system. I may be accidentally getting some libraries or some of /usr/local/bin that should not come across. I will post a message when I find out because this behavior should not be happening. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Running an Old Kernel Solved.
There is a /etc/pam.d and a /usr/local/etc/pam.d. /etc/pam.d has no sudo file in it but /usr/local/etc/pam.d does. I had never edited that file before but it seems to change slightly in 2007. The sudo file on the system that did not display the last login message has a modification date of December 20, 2007 and sudo, itself also has that date. Here is that file. # # $Id$ # # PAM configuration for the sudo service # # auth authinclude system # account account include system # session # XXX: pam_lastlog (used in system) causes users to appear as though # they are no longer logged in in system logs. session requiredpam_permit.so # password passwordinclude system This line makes the difference. # XXX: pam_lastlog (used in system) causes users to appear as though # they are no longer logged in in system logs. This version effectively has no include system directive for that file. The system that did display the last login message had a pam.d/sudo file dated July of 2007. /usr/local/bin/sudo had a modification date of April 8 of 2008. I may have removed sudo and reinstalled it to try to get rid of the problem but I obviously did not also get a new /usr/local/etc/pam.d/sudo file which would probably have been the only change necessary. Here is the older file. # # $Id$ # # PAM configuration for the sudo service # # auth authinclude system # account account include system # session session include system # password passwordinclude system Here's the big difference. session include system As soon as I commented it out, the problem went away. One needs to be xtremely careful in not restoring the old /usr/local/pam.d directory when building a new system and restoring files from the old system. I have been chasing this monster since the Summer of 2007. The new 8.0 system is presently turned off but I bet when I look at it on Monday, it has the 2007 /usr/local/etc/pam.d directory since I completely forgot about making sure it didn't get in to the new system. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Running an Old Kernel
I have been attempting to shut off that last login message that occurs on some FreeBSD systems every time one runs a sudo command. I decided to bring back the last kernel which was the original Generic kernel from the FreeBSD distribution disk for FreeBSD8.0 to see if the problem went away. If it did, that would indicate that the problem starts after one applies the latest patches and rebuilds the kernel. The handbook covers building a new kernel very well, but I appear to be missing something. In /boot is loader and loader.old. Isn't loader.old the image of the previous kernel? I copied loader to loader.new since it should be the current image and then copied loader.old to loader and rebooted. The last login message was still there and dmesg still showed the production date of the new kernel. In other words, nothing changed. Shouldn't I have seen the production date of the original kernel? Thank you. I have actually built many kernels and most were simply a rebuild of the generic kernel after applying patches so I don't roll back a kernel very often. Fortunately, both the old and new kernels work. I think the last login nuisance started right after installing the patched kernel. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Running an Old Kernel
b. f. writes: Why on earth are you tinkering with your kernels in order to change sudo output? You should instead be editing configuration files associated with sudo and related base system utilities, or patching sudo. Absolutely. I couldn't remember if this happened with the original kernel so I wanted to put it back long enough to see if the problem went away. If it is gone under the original kernel and here with the patched kernel, this might tell me something useful. I have a 8.0 system here that has a patched kernel that is a little older and it does not exhibit that behavior. Sudo is configured exactly the same way on both systems. The environment looks the same. This really makes no sense so there is something different on the system with the problem and I just have not found it yet. Martin ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
sudo last login message and how to turn it off FreeBSD8.0
I have actually seen this on some FreeBSD6.3 systems and thought it was a querk. It may still be a querk but it has started again on an 8.0 system. I think I am doing something to cause it, but I am not sure. When one executes a sudo command, I get a last login message which reflects the last time I ran sudo. Example: [mar...@pilot ~]$ sudo whoami Password: Last login: Thu Jun 24 13:07:20 from pilot.it.okstate root There is another FreeBSD8.0 system here that has not yet behaved this way so I did something to the test system to make it start. Any ideas as to what to look at? Thank you. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Running Older Binaries under 8.0
I have a large number of home-grown applications that run under FreeBSD 6.3 and earlier. As we transition to FreeBSD8.0, is there a good single package to add which will provide the right libraries to allow these older binaries to run without surprises? Thank you. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Running Older Binaries under 8.0
Chuck Swiger writes: Yes, you want: /usr/ports/misc/compat6x It installs the libraries from FreeBSD-6.x under a compatibility location so that your older binaries should run without needing to be recompiled Perfect. Thanks. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Ownership of /var/named Changes on Reboot.
Matthew Seaman writes: Furthermore, the default setup *is* for named to run as an unprivileged process. The setup is very carefully designed so that named doesn't have write permission on the directory where its configuration files are stored, or on directories that contain static zone files, but it does have write permission on directories it uses for zone files AXFR'd from a master, or zone files maintained using dynamic DNS. This used to generate a warning from bind about not having a writable current working directory -- which was basically harmless and could be ignored. However recent changes mean bind needs a writable working directory, so the latest layouts include /var/named/etc/namedb/working That turned out to be the issue. I reset the permissions to match the way they are when one first installs bind. Root owns /var/named but bind owns directories that should be writable so the trick is to set one's named.conf file to reference writable directories for all the zones, logs and named.pid. It is now starting automatically on reboot just like it should. While bind owns all the writable subdirectories, they all still have wheel as their GID. That appears to be okay since they are all only writable by owner. Thanks for explaining this annoying little mystery that has dogged me at a minor level for years. I have been running bind for Oklahoma State University for close to 18 years and one tends to stick with configurations that work. It is just time to modernize and at least configure bind in the recommended way so as to take full advantage of the clever design. It does still give the message that the working directory is not writable. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Ownership of /var/named Changes on Reboot.
I run named chrooted to bind but not in a jail. When the system reboots, something changes ownership of /var/named back to root:wheel. I have thought several times I figured out how to prevent this from happening, but to no avail. The most promising lead was the following directives in /etc/rc.conf.local: named_uid=bind# User to run named as named_chrootdir= # Chroot directory (or not to auto-chroot it) named_chroot_autoupdate=YES # Automatically install/update chrooted Is there a way to keep /var/named owned by bind across reboots? Our production FreeBSD systems are up for years at a time so we don't see this problem often, but we have just been lucky that I am usually the one to reboot and know that named will come up broken and exit because named can not write in to /var/named when it is owned by root. It would be really nice to be able to count on /var/named staying put so named can just start automatically after a reboot. I prefer for named to run as a low-priority UID rather than as root so if I am doing something wrong, tell me that, also. We have been running named with a high-numbered UID for probably ten years and the force back to root ownership has always been a factor when the system is rebooted. Thank you. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
tar and --include
A few days ago, I asked about the --include directive in tar after things didn't quite work the way the man page seemed to indicate. One might get the impression that if --include or --include='*pattern*' was added to a tar command, tar would only archive what was in the pattern and not archive everything as its default operation. What I discovered was that --include doesn't appear to do anything at all. The example in the man page shows using it to filter an existing archive and make a tar file of what was in the existing archive that also matched the pattern. I never tried that since that is not what was needed here. What turned out to work very well was to use the feature in tar that lets one exclude a whole list of patterns in a designated file. You just put in what shouldn't be in the archive and it appeared to work fine. The --include directive only seems to exist in the FreeBSD form of tar. I tried a Linux system's tar man page and it is not there but both support the -X path/filename for a list of exclusion patterns. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
tar with --include Gets Much More.
The FreeBSD man page for tar shows --include pattern (-W include=pattern) Process only files or directories that match the specified pat- tern. Note that exclusions specified with --exclude take prece- dence over inclusions. If no inclusions are explicitly speci- fied, all entries are processed by default. This sounded useful in what one might do when rebuilding a name server, for example. One could tar only that part of /var containing the /var/named directory so I tried: tar cvf tst.tar /var --include named and tar cvf tst.tar /var --include='* named*' tar: Removing leading '/' from member names a var a var/account a var/at a var/audit a var/backups a var/crash a var/cron a var/db a var/empty a var/heimdal a var/log I was expecting only /var/named/[all those files] The goal is to tar only /var/named, /var/log, /var/cron and /var/at such that one could take the resulting tar file and unpack it over the new /var. I was under the impression from the man page that --include's caught only what was named in the pattern and --exclude's passed everything but the pattern. I think the --exclude directive has worked before but --include is either not doing anything or works completely differently that what I was expecting. Any ideas are appreciated. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
FreeBSD8.0 Firewall Script behaves much differently than 6.x
Is there a proper way to reset firewall rules in FreeBSD8.0 ? I just discovered that if one is remotely logged in and makes a change in the firewall rules, it is a disastor to do something like sh /etc/[firewall_rules_script] One could do that in FreeBSD6.x. When the rules flushed, you lost your connection, but the script continued to execute and the new rules were in effect immediately. Trying this same reload in FreeBSD8.0, I knew something was horribly wrong when everything just locked up. I logged on to a local console and ran ipfw list It had stopped right after the flush. Doing the same command from a local or even a serial console works fine and the new rules are installed. Thanks and maybe I have been using the wrong technique for reloading firewall rules all along. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: FreeBSD8.0 Firewall Script behaves much differently than 6.x
I have just answered part of my own question. If you background the process as in sh /etc/rules.fw it works. You still get knocked off the remote connection but the backgrounded process continues to run without a controlling terminal and completes. The only remaining part of the question is: If one modifies the firewall rules and wants to make sure they are good, is there a more correct way to safely reload them from the script? ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: FreeBSD8.0 Firewall Script behaves much differently than 6.x
Mark writes: You could use nohup That's is a very good idea. Thanks. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
popd to send Mail to a Mac; I Really Appreciate this list.
It looks like imap is more suitable for what I am trying to do than pop. There may be a slight issue in the fact that I use .forward to trigger procmail which has the effect of instantly snatching up every piece of incoming mail and putting it in to a nmh folder that resides in /home/%user/Mail/%folder which means /var/mail is always empty. I just created another user which won't have any .forward or procmail attention. Forwarding messages to this user will make them hang in /var/mail/%user and those should be available to imap. On the Mac, I will be reading that user's mail via imap to retrieve the messages. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
popd to send Mail to a Mac
I like to receive mail on a FreeBSD system and want to continue to do so but occasionally, I have a message that needs to be forwarded to a Macintosh in my office. It turns out that Mac's do not do normal smtp mail like sendmail but one of the options is pop. I installed popd on the FreeBSD server and want to be able to feed messages meant for the Mac to popd at which point, I should be able to retrieve them on that mac. The normal scenario is: Mail comes in and I read it. One message has a 20-mile-long url to a javascrypt-infested web site that lynx can't handle. I should forward this message to the Mac and there, I can use safari to handle that message. Those are the only messages that will need to go through popd so I need a simple way to feed them in so the Mac can get them out. Thanks. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Automatic Way to Tell if a FreeBSD system is 64 or 32-bit?
Chris Rees writes: sysctl hw.machine_arch It and uname -m work beautifully. Thanks to all. One thing I discovered while trying this command out on various systems is that if the system was originally built using i386 code, it reports as i386 even though there is a 64-bit platform struggling to get out. In my script, this is not a problem because the mfsboot CDROM for 32-bit boxes chokes on a 64-bit platform and will not boot. When on a 64-bit system, it boots like gang busters and since it installs its own OS, there is no question at all. Thank you all. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Automatic Way to Tell if a FreeBSD system is 64 or 32-bit?
Is there a FreeBSD command similar to the Linux arch command? I have built a fairly decent Bourne shell script to run just after installing mfsbsd on a target system. It figures out the likely boot drive, formats it and then begins to build a FreeBSD system on it. The script could intelligently ask for the 64-bit or 32-bit trees if it could determine whether it was running on the i86 or 64-bit system. Thank you. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Patching a Newly-Built System
Nerius Landys writes: By bringing the patch level up to date I assume you mean a tag such as this one: *default release=cvs tag=RELENG_8_0 That is what I meant. in your standard-supfile file, and then doing the make buildworld etc. prodedure outlined in the Handbook. The release branches (such as RELENG_8_0) get only very minor modifications from the time the release is made. The patches are only ones that address really serious issues, and the extent of the changes is usually very minimal. Whather you install ports before or after you update to the latest patch for your release should make absolutely no difference. That is what I suspected but I wanted to start on the right foot so I thought I would check. Thank you. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Patching a Newly-Built System
Does it make any difference if one adds packages to a new system before or after using cvsup to bring the patch level up to date? I ask this because it takes about half an hour to go from nothing to a bootable system via a script but it can take several hours for cvsub to update the kernel sources and then the rebuild of the world to take place. If it won't effect the operation of such things as bind and dhcpd, one could bring the services up while it is being patched and just let everyone know that there will be another short outage when the rebuild of the kernel is done and we reboot to take advantage of the new patches. Thank you. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Booting MFS from Secondary Partition
Fbsd1 writes: just dd the image to what ever drive you want That is the goal. The challenge is to launch a script that detects when the boot device has been unmounted as dd will not work on an active file system. Memory disk images apparently survive until reboot so there is a possibility that one can get in the write between the umount of everything and complete shutdown. I am truly impressed with how robust FreeBSD is as it probably should be very hard to log in to a working system and remotely rebuild it. I did read one of many introductory articles about mfsbsd that tells you to just use scp to get the image over to the target system and then, as root, use dd to apply it to the boot device. That is not possible unless one first boots from some other medium. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Booting MFS from Secondary Partition
Fbsd1 writes: There is hard coded logic that is stopping you from doing what you want. Looks like you are SOL. Me thinks you are absolutely correct. I was only hoping I was doing something wrong and a slight syntax change would make it work. Thank you and thanks to Maciej Milewski m...@dat.pl for his suggestion. I have one last trick up my sleve before giving up completely on this idea. Maybe I can hijack one of the rc.x scripts to cause it to spew a memory disk image of the mfsboot code on to the freshly-unmounted /dev/ad0 device during a reboot. Since the goal is to completely rebuild the system anyway, this would be the last gasp of the present system as it gets ready to reboot, hopefully with mfsbsd and all hard drives dismounted. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: RS232 / TCP converter and BSD.
Olivier GARNIER writes: I have a weather station (Lacross WS2350). (can be connect by USB / RS232). I want to get data from a FreeBSD server 70 meter from the weather station (with http://www.wviewweather.com/ software). I already have a RJ45 cable between the two objects. I wish i could get a RS232 to RJ45 connecter like this one : http://www.lextronic.fr/P6554-convertisseur-tcpip--rs232-cse-h53.html And use it to connect the weather station to the RJ45 network, and then get data from my BSD. The bad point is that the soft witch are given with the RS232 to RJ45 translater are for windows, and it make a virtual port on windows. I don't know if it will work on BSD. If it does not work, i'll be oblige to buy another RJ45 to RS232 translater... and it's not cheap. You did not say what version of FreeBSD you are using and it does make a difference. The usb port stack was rewritten for FreeBSD8.0 so that probably works best. I tried to attach a usb converter to a FreeBSD6.3 system and it never worked. Different models of RS-232 converters may work fine. I just could not get these to work at all under 6.3. RJ45 plugs and CAT3 or CAT5 Ethernet-style cables are frequently used to carry RS-232 signals so the only somewhat unusual device you will need to procure is a plug adaptor such as one made by Modtap which simply has a RJ45 female on one edge and a male or female RS-232 9 or 25-pin plug or socket on the other edge. These adaptors have no IC's or intelligence built in to them. They just route the conductors in the CATx cable to the right pins. You may have to actually build the adaptor to your needs but these things at least used to be fairly common. The actual RS-232 to usb port converters are relatively inexpensive these days and they do have processors built in to them as well as charge pumps to generate the +-12 volts for RS-232 devices. Some of them are built to work fine under systems other than Windows boxes and others may only work under Windows so you will need to be sure that the one you want to use works. So, in short, you need a plug adaptor to make the RJ45 cable useble with RS-232 devices and you also need any of the common RS-232 to usb converters to actually connect the cable to your FreeBSD computer. As long as the usb-RS-232 converter actually works and produces a new ttyUSBx device, the brand is not that critical. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: RS232 / TCP converter and BSD.
Chuck Swiger writes: Data centers use that for serial connections to stuff like Cisco routers and other terminal applications all the time. However, if the device is truly RS-232 rather than 422/423, it's nominally out of spec past 50 meters and possibly won't go past 9600 baud. I was wondering about that when I wrote my long-winded response. I was confused and thought the maximum length for RS-232 was longer than it is. 70 meters is almost 25% out of range which is kind of pushing things. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Booting MFS from Secondary Partition
I have hit one of these impenetrable walls in which nothing seems to work but I know it should. I have tried several versions of /boot.config to no avail. The idea is exactly the same principle as described in depenguinator which is software that lets one use grub in Linux to install FreeBSD on a working Linux system. The idea is to steal the swap partition, put mfsboot there, and then tell grub to boot from that partition rather than the normal active one. The manual for boot.config makes me think I should be able to just put in the information describing the secondary partition and it should cause a boot from that one but: /boot.config: 1:ad(0,b)/boot/loader -P FreeBSD/i386 boot Default: 1:ad(0,b)/boot/loader boot: error 1 lba 0 No /boot/loader The mfsboot image works when started from the primary partition so I am stuck as to why boot.config is not starting from that secondary partition. The present boot.config is: 1:ad(0,b)/boot/loader -P If mfsbsd was starting, shouldn't it see its boot loader? Is there a mfsbsd discussion list? Surely, somebody else has hit this brick wall, also. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Remote Building of FreeBSD
I am beginning to wonder if there is something different about the way mfsbsd boots since it actually extracts itself in to memory upon boot. I looked at bootloader.conf once again and created a new boot.config file. The system does definitely see the file because it echos the commands. The boot process breaks down immediately as if what is on /dev/ad0s1b is not seen as a boot sector. Here is a screen capture from the system so you can see both the boot.config file and the system's response. þÿ/boot.config: -P verbose_loading=YES # Set to YES for verbose loader output autoboot_delay=-1 # Delay in seconds before autobooting, # set to -1 if you don't want user to be # allowed to interrupt autoboot process and comconsole_speed=9600 # Set the current serial console speed console=vidconsole,comconsole # A comma separated list of console(s) currdev=disk1s1b # Set the current device root_disk_unit=0 # Force the root disk unit number rootdev=disk1s1b # Set the root filesystem System Response FreeBSD/i386 boot Default: 0:ad(0,a)to boot: 'And there we die. There is a valid boot sector at Default: 0:ad(0,a) but there is also now valid boot code at 0:ad(0,b) which is what I am trying to force with boot.config. If one does fdisk on a partition that has had mfsboot.img sprayed on it, fdisk shows the first 3 partitions as being unused while Partition 4 has a type of 165 or standard FreeBSD. I think I am calling the bootloader wrong since the very same mfsboot image works properly when applied to /dev/ad0. The only difference is that one now has the same partition configuration on /dev/ad0 instead of ad0s1b Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Remote Building of FreeBSD
The boot.config file I thought would boot mfsbsd on what was the swap partition is not working. On this particular drive, ad0s1a is the normal FreeBSD partition and ad0s1b is swap. The idea is to use dd to write the mfsboot.img file to /dev/ad0s1b and then boot from there. My boot.config file is as follows: -P rootdev=disk2s1b root_disk_unit=0 I get the following message from the serial console: /boot.config: -P rootdev=disk2s1b root_disk_unit=0 FreeBSD/i386 boot Default: 0:ad(0,a)root_disk_unit=0 boot: No root_disk_unit=0 FreeBSD/i386 boot Default: 0:ad(0,a)root_disk_unit=0 boot: The message Default: 0:ad(0,a)root_disk_unit=0 does seem to be what one would expect for the ad0s1a partition but I don't think I am telling the system to boot as the mfsboot.img file does work if one writes it to /dev/ad0. ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Remote Building of FreeBSD
One can almost but not quite remotely build a FreeBSD system using mfsbsd. The problem is that in order to install the mfsboot.img data on the main boot drive, it is necessary to use dd to write it there and a working system already has mounted all partitions in the main drive. The systems I will be upgrading have 1 or more gigabytes of RAM available so a memory disk could conceivably hold the roughly 40-meg image that must be written to the boot sector of the main drive. For this to work, one must unmount all main drive partitions and still be able to do something like: dd if=mfsboot.img of=/dev/ad0 After that, the reboot will launch mfsbsd and the rest appears to be manageable. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: Remote Building of FreeBSD
Adam Vande More writes: This seems to be similar to the depenguinator. Maybe there some approach in there to get you over the hump. It is exactly the right idea. Funny thing, I actually did turn swap off and the image is now sitting there because I thought this might be useful. Is there any way to tell the existing system to boot from /dev/ad0s1b next time? That would solve the problem completely. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Preparing to Install MFSBSD Loader on Disk
When one is logged in to a FreeBSD system, an attempt to write to the mounted file systems on /dev/ad0, for example, fails with Operation not permitted. This is a wonderful feature 99% of the time because this is disastrous to any future access after that point. The only exception to this is if one wants to remotely rebuild the system at which point one needs to do something like dd if=mfsboot.img of=/dev/ad0 This is, of course, the end of all access to that drive as we presently know it so a reboot is the only other option and one must hope and pray that the mfsboot install worked. My experience so far is that mfsbsd works well but I would like to be able to do the whole operation without mailing out labeled CDR's or USB sticks. Each of our remote sites has 2 FreeBSD boxes and I can just see a hurried individual accidentally switching the media so we not only loose contact with the system we are rebuilding, but the boot CD will bring up mfsbsd on the very IP address of the backup system, crashing everything. One could use a temporary third address on the network that isn't either system A or System B, but I think I can use the parametric values in mfsbsd to configure the new server so it would be best to use the same addresses as normal for each device because of multiple firewalls that one may discover too late are not set right to allow the upgrade. I have been messing with automation for about 35 years and one of the few things I learned was that Murphy is naive and overly optimistic. In this case, Plan B is to have 1 CDROM on hand at the remote site in case we loose the box. That CD could have mfsbsd set to a third address and then also contain the boot images of both systems. My question today is whether there is any way to remotely get the mfsbsd.img data written to the boot drive and execute the reboot command. A document I read on this topic tells you to scp the image to the target system and then, as root, use dd to write it to disk. I was root when I discovered I couldn't do that. Thanks for any answers and, Kids, be really careful here. The dd operation totally destroys all existing partitions. What you get is partitions 1-3 are unused and partition 4 contains the mfsbsd image that will create the virtual disk with a baby OS when the reboot happens. Since you start with no actual drives mounted, you can reformat the hard drive to however you need it, but you can't reboot again until there is a working system back on the hard drive or you just get a warm, humming paperweight. That's when you need the rescue CD. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: sysinstall and mfs Great News and another Question
J65nko writes: IMHO it is easier to to install FreeBSD without using sysinstall at all. See the FreeBSD Install Without Sysinstall guide at http://www.daemonforums.org/showthread.php?t=1538 This looks very possible with a couple of changes. Am I right in my reading of the man page of mdconfig that the memory disk image will gobble up at least as much RAM as the image, itself? In this case, that's about 600 times more than I have available. mfsbsd seems as solid as a rock as long as you don't do something that needs lots of buffer space as there is only about a megabyte or two left over. tar works fine and I can copy either an iso image or a tar ball made from the file system over to the newly-formatted drive where it can be unpacked. It may be necessary to run chroot /mnt so as not to munch mfs when running the install.sh scripts but I think this should install the system. I really have given up on sysinstall for this purpose. It is hard to script and it appears that if you use the custom installation, you almost get a system but the effort is hardly worth it. One still has to install the kernel and many of the configuration files like /etc/rc.conf. I don't know why but another artickel I read on remote installation of FreeBSD that uses sysinstall describes this so I know it isn't just me doing something stupid. I feel kind of stupid spending almost 3 weeks finding out what doesn't work. When using mfsbsd, one already has enough information in the interface configuration and resolv.conf to populate /etc/rc.conf, /etc/hosts and /etc/resolv.conf to match the present network configuration. The local time zone is a copy of one of the rule sets for computing time placed as /etc/localtime. In the middle of the United States, it is /usr/share/zoneinfo/America/Chicago copied, not linked, to /etc/localtime. The goal is to run the script I will build under mfsbsd and then boot the system in working order as if it had been installed via sysinstall by someone sitting at a console. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: sysinstall and mfs Great News and another Question
I really hate to give up on anything and I finally found out my problem with getting sysinstall to use the hard drive rather than garbaging up mfs every time. The problem is not something you can set in the partition editor or disklabel editor. It is found in the very first menu which oddly is numbered 2 and is the options editor. The option that makes it all work is one that lets you specify where you want the distribution to go on the drive. It is always set for you when using the CDROM unless you were formatting another disk so it is kind of easy to miss. I missed it for a week and a half. Now the question. There are a bunch of functions that can be set in sysinstall such as the bsdlabel editor, partition editor and dists to name a few. It would be nice to be able to set that mount point in install.cfg because I am trying to make a script that coworkers can run to configure a system quickly without having to waste a week of their own trying to figure it all out. It turns out that one can format the disk, mount /dev/ad0s1a on /mnt and then one must set the root option to /mnt and things work so much better! Occasionally, /var fills up and I haven't figured out why but it appears that ftp gets ahead of the ability to store the files. Whatever it happening, it is now more right than wrong. Again, thanks for all your help. Martin McCormick WB5AGZ Stillwater, OK Systems Engineer OSU Information Technology Department Telecommunications Services Group ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
sysinstall and mfs I'm out of Ideas.
After about a week of trying, I don't think sysinstall will install FreeBSD when used with mfsbsd. I launched mfsbsd from a CDROM and it works fine. I also used dd to feed the mfsboot.img file to the boot sector on the system's hard drive and that also worked fine. mfsbsd doesn't appear to be the problem. Everything but sysinstall works as one would expect. Sysinstall may either be confused because the host is in multi-user mode or it may be trying to protect what it thinks is the system's boot drive from damage. It absolutely will not write one byte to /dev/ad0 partitions even though it sees the drive. the rest of sysinstall appears to be normal except for its fear about writing to /dev/ad0sx. I will be very happy to be proven wrong, but I don't know what else to do to sysinstall to get it to use that drive. It does work from the local console in single-user mode from the CDROM. I greatly appreciate all the help and welcome any new ideas, but it appears to be back to the drawing board for remotely-done upgrades. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: More sysinstall questions 1 of 2
mj Entering y and waiting several minutes as all the data were extracted produced: l Message qk xCongratulations! You now have FreeBSD installed on your system. x x x xWe will now move on to the final configuration questions. x xFor any option you do not wish to configure, simply selectx xNo. x x x xIf you wish to re-enter this utility after the system is up, you x xmay do so by typing: /usr/sbin/sysinstall.x tqq(100%)qqu x [ OK ] x mq[ Press enter or space ]qj Whatever it is that differs between using mfs to run sysinstall and the CDROM to also run sysinstall is not obvious, at least to me. Sorry for the length of this message and I hope all the little boxes and box parts didn't wreck anybody's terminal. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
sysinstall and mfs
It appears that the same sysinstall executable that works fine when run from the installation CDROM malfunctions when run from a mfs platform even though it finds the disk it is supposed to install on. One can format the disk manually and mount the partitions under mfs, but sysinstall can't seem to do the installation. This does not make sense, but that is the score right now. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org
Re: sysinstall and mfs
Jerry McAllister writes: I don't understand why you are trying to do your own MFS for this. You need to be booted to the MFS for it to make any difference and that is what the install image (from the CD) normally does. If you just create an MFS and copy sysinstall to it, it will make no difference in its ability to modify the labels on the system disks. They are already busy and you would have to reboot to unbusy them What I actually did was to download the mfsbsd tool set which lets you create either an iso image you can burn to a CD or another image that you spray on to the MBR of the hard drive via dd. Either way, the system that comes up is not connected in any way to the hard drive. That is what I thought one had when booting from the CDROM. The only difference is that one is in multiuser mode under mfs and single user mode when booting the CDROM. That difference may be the problem. It just occurred to me that one of the messages you see as sysinstall starts up is that it is probing devices. Since many of those devices are part of mfs, this may be how things go wrong. Sysinstall may see a device that essentially breaks its idea of the hard drive and where it is. I have never been so confused about something that seemed so straight-forward. Thanks for your help. Martin McCormick ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to freebsd-questions-unsubscr...@freebsd.org