PXE Questions
I'm starting to use PXE to install FreeBSD servers, something I've been doing with Linux for a while. I've got installs working, but I'm running into a few flexibility issues I hope have been addressed. While I use DHCP to install the server, the server should not attempt to boot DHCP when rebooted. I've used the packageAdd mechanism to install and run a script that customizes the rc.conf file, but upon first reboot the hostname and DHCP configuration items are inserted into rc.conf below the items I added with my script. Q. How can the install be customized to cofigure rc.conf with a static IP address rather than DHCP? Failing that, how can the "first boot" configuration be disabled as to not conflict with my custom changes? I have several different server configurations I need to run, and would like to setup a per host install.cfg. RedHat's "kickstart" allows these configurations to be defined on a per IP address basis by modifying a config file. FreeBSD requires that the mfsroot image be mounted and the install.cfg file within be modified. This process would need to be done every time a server is installed rather than having a few vanilla configurations that could be called independantly (ATA vs SCSI for example). Q. Can per host configurations be used? If not, can the install.cfg file be used to retrieve this data "on the fly" i.e. : variable=`fetch http://confighost/cgi-bin/config.pl` where config.pl would be a script that could return values based on the client IP address? Is there another way to address this issue? Chris ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
4.9 buildworld fails
Hello all, I have two (nearly) identical systems running REL_ENG_4_9, but one fails to complete a buildworld (error below). The randomly named file is gone when the error occurs, so I can't find out why the strip operation is not permitted. Securelevel is -1 and this fails in single user mode. I'm out of places to look, any ideas? Chris ===> bin/cat install -s -o root -g wheel -m 555 cat /bin /usr/obj/usr/src/i386/usr/libexec/elf/strip: /bin/stVzpCWB: Operation not permitted install: wait: Operation not permitted *** Error code 70 Stop in /usr/src/bin/cat. *** Error code 1 Stop in /usr/src/bin. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. *** Error code 1 Stop in /usr/src. ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
USB generic driver problems
Repost... As a followup, I modified the /usr/src/sys/dev/usb/ugen.c source to provide some additional debugging output in the ugen_set_config() function (relevant code at bottom). This is the code responsible for creating the device structure for the USB device endpoints after retrieving the endpoint addresses from the USB device (i.e. /dev/ugen0.EE). The make_dev(9) call fails (see log entries below) with a non zero status. Given the endpoints returned by the device were valid, I'm at a loss as to why. The device works correctly under Windows 2000 (fyi). Is this a problem with the my device, a bug, or ??? Chris Mar 12 14:09:46 cosmo /kernel: usbd_reset_port: port 2 reset done, error=NORMAL_COMPLETION Mar 12 14:09:46 cosmo /kernel: usbd_new_device bus=0xc0d2e800 port=2 depth=1 lowspeed=512 Mar 12 14:09:46 cosmo /kernel: usbd_setup_pipe: dev=0xc0ec3f80 iface=0 ep=0xc0ec3f9c pipe=0xc0ec3f84 Mar 12 14:09:46 cosmo /kernel: usbd_new_device: adding unit addr=2, rev=110, class=0, subclass=0, protocol=0, maxpacket=8, len=18, ls=1 Mar 12 14:09:46 cosmo /kernel: usbd_new_device: new dev (addr 2), dev=0xc0ec3f80, parent=0xc0d30c80 Mar 12 14:09:46 cosmo /kernel: usbd_probe_and_attach: trying device specific drivers Mar 12 14:09:46 cosmo /kernel: usbd_probe_and_attach: no device specific driver found Mar 12 14:09:46 cosmo /kernel: usbd_probe_and_attach: looping over 1 configurations Mar 12 14:09:46 cosmo /kernel: usbd_probe_and_attach: trying config idx=0 Mar 12 14:09:46 cosmo /kernel: usbd_set_config_index: (addr 2) attr=0x80, selfpowered=0, power=100 Mar 12 14:09:46 cosmo /kernel: usbd_set_config_index: set config 1 Mar 12 14:09:46 cosmo /kernel: usbd_probe_and_attach: no interface drivers found Mar 12 14:09:46 cosmo /kernel: ugen0: LabJack Labjack U12, rev 1.10/5.f6, addr 2 Mar 12 14:09:46 cosmo /kernel: usbd_set_config_index: free old config Mar 12 14:09:46 cosmo /kernel: usbd_set_config_index: (addr 2) attr=0x80, selfpowered=0, power=100 Mar 12 14:09:46 cosmo /kernel: usbd_set_config_index: set config 1 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: ugen0 to configno 1, sc=0xc0ebf000 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: ifaceno 0 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: endptno 0, endpt=0x01(1,1), sce=0xc0ebf264 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: endptno 1, endpt=0x02(2,0), sce=0xc0ebf328 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: Configuring Additional Endpoints Mar 12 14:09:46 cosmo /kernel: ugen_set_config: Calling make_dev for ugen0.1 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: make_dev returned -1058926464 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: Calling make_dev for ugen0.2 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: make_dev returned -1058926592 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: Endpoint -1058796112 is null, can't call make_dev #if defined(__FreeBSD__) /* the main device, ctrl endpoint */ make_dev(&ugen_cdevsw, UGENMINOR(USBDEVUNIT(sc->sc_dev), 0), UID_ROOT, GID_OPERATOR, 0644, "%s", USBDEVNAME(sc->sc_dev)); DPRINTFN(1,("ugen_set_config: Configuring Additional Endpoints\n")); for (endptno = 1; endptno < USB_MAX_ENDPOINTS; endptno++) { if (sc->sc_endpoints[endptno][IN].sc != NULL || sc->sc_endpoints[endptno][OUT].sc != NULL ) { /* endpt can be 0x81 and 0x01, representing * endpoint address 0x01 and IN/OUT directions. * We map both endpts to the same device, * IN is reading from it, OUT is writing to it. * * In the if clause above we check whether one * of the structs is populated. */ DPRINTFN(1,("ugen_set_config: Calling make_dev for %s.%d\n",USBDEVNAME(sc->sc_dev), endptno)); myerr = make_dev(&ugen_cdevsw, UGENMINOR(USBDEVUNIT(sc->sc_dev), endptno), UID_ROOT, GID_OPERATOR, 0644, "%s.%d", USBDEVNAME(sc->sc_dev), endptno); DPRINTFN(1,("ugen_set_config: make_dev returned %d\n", myerr) ); } else { DPRINTFN(1,("ugen_set_config: Endpoint %d is null, can't call make_dev\n", USBDEVNAME(sc->sc_dev), endptno)) ; } } #endif On Thu, 11 Mar 2004 [EMAIL PROTECTED] wrote: > > I'm attempting to interface with a usb based data acquisition device > called a Labjack (http://labjack.com) under FreeBSD 4.9. The Labjack is a > USB1.1 compliant HID device with a single configuration and two > "interrupt" endpoints (in/out) not including the control endpoint. > > Initially I tried to use the uhid driver, but due to lack of functionality > needed in this case I removed the uhid driver from the kernel in favor of > th
Re: USB ugen0 problems
As a followup, I modified the /usr/src/sys/dev/usb/ugen.c source to provide some additional debugging output in the ugen_set_config() function (relevant code at bottom). This is the code responsible for creating the device structure for the USB device endpoints after retrieving the endpoint addresses from the USB device (i.e. /dev/ugen0.EE). The make_dev(9) call fails (see log entries below) with a non zero status. Given the endpoints returned by the device were valid, I'm at a loss as to why. The device works correctly under Windows 2000 (fyi). Is this a problem with the my device, a bug, or ??? Chris Mar 12 14:09:46 cosmo /kernel: usbd_reset_port: port 2 reset done, error=NORMAL_COMPLETION Mar 12 14:09:46 cosmo /kernel: usbd_new_device bus=0xc0d2e800 port=2 depth=1 lowspeed=512 Mar 12 14:09:46 cosmo /kernel: usbd_setup_pipe: dev=0xc0ec3f80 iface=0 ep=0xc0ec3f9c pipe=0xc0ec3f84 Mar 12 14:09:46 cosmo /kernel: usbd_new_device: adding unit addr=2, rev=110, class=0, subclass=0, protocol=0, maxpacket=8, len=18, ls=1 Mar 12 14:09:46 cosmo /kernel: usbd_new_device: new dev (addr 2), dev=0xc0ec3f80, parent=0xc0d30c80 Mar 12 14:09:46 cosmo /kernel: usbd_probe_and_attach: trying device specific drivers Mar 12 14:09:46 cosmo /kernel: usbd_probe_and_attach: no device specific driver found Mar 12 14:09:46 cosmo /kernel: usbd_probe_and_attach: looping over 1 configurations Mar 12 14:09:46 cosmo /kernel: usbd_probe_and_attach: trying config idx=0 Mar 12 14:09:46 cosmo /kernel: usbd_set_config_index: (addr 2) attr=0x80, selfpowered=0, power=100 Mar 12 14:09:46 cosmo /kernel: usbd_set_config_index: set config 1 Mar 12 14:09:46 cosmo /kernel: usbd_probe_and_attach: no interface drivers found Mar 12 14:09:46 cosmo /kernel: ugen0: LabJack Labjack U12, rev 1.10/5.f6, addr 2 Mar 12 14:09:46 cosmo /kernel: usbd_set_config_index: free old config Mar 12 14:09:46 cosmo /kernel: usbd_set_config_index: (addr 2) attr=0x80, selfpowered=0, power=100 Mar 12 14:09:46 cosmo /kernel: usbd_set_config_index: set config 1 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: ugen0 to configno 1, sc=0xc0ebf000 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: ifaceno 0 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: endptno 0, endpt=0x01(1,1), sce=0xc0ebf264 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: endptno 1, endpt=0x02(2,0), sce=0xc0ebf328 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: Configuring Additional Endpoints Mar 12 14:09:46 cosmo /kernel: ugen_set_config: Calling make_dev for ugen0.1 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: make_dev returned -1058926464 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: Calling make_dev for ugen0.2 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: make_dev returned -1058926592 Mar 12 14:09:46 cosmo /kernel: ugen_set_config: Endpoint -1058796112 is null, can't call make_dev #if defined(__FreeBSD__) /* the main device, ctrl endpoint */ make_dev(&ugen_cdevsw, UGENMINOR(USBDEVUNIT(sc->sc_dev), 0), UID_ROOT, GID_OPERATOR, 0644, "%s", USBDEVNAME(sc->sc_dev)); DPRINTFN(1,("ugen_set_config: Configuring Additional Endpoints\n")); for (endptno = 1; endptno < USB_MAX_ENDPOINTS; endptno++) { if (sc->sc_endpoints[endptno][IN].sc != NULL || sc->sc_endpoints[endptno][OUT].sc != NULL ) { /* endpt can be 0x81 and 0x01, representing * endpoint address 0x01 and IN/OUT directions. * We map both endpts to the same device, * IN is reading from it, OUT is writing to it. * * In the if clause above we check whether one * of the structs is populated. */ DPRINTFN(1,("ugen_set_config: Calling make_dev for %s.%d\n",USBDEVNAME(sc->sc_dev), endptno)); myerr = make_dev(&ugen_cdevsw, UGENMINOR(USBDEVUNIT(sc->sc_dev), endptno), UID_ROOT, GID_OPERATOR, 0644, "%s.%d", USBDEVNAME(sc->sc_dev), endptno); DPRINTFN(1,("ugen_set_config: make_dev returned %d\n", myerr) ); } else { DPRINTFN(1,("ugen_set_config: Endpoint %d is null, can't call make_dev\n", USBDEVNAME(sc->sc_dev), endptno)) ; } } #endif On Thu, 11 Mar 2004 [EMAIL PROTECTED] wrote: > > I'm attempting to interface with a usb based data acquisition device > called a Labjack (http://labjack.com) under FreeBSD 4.9. The Labjack is a > USB1.1 compliant HID device with a single configuration and two > "interrupt" endpoints (in/out) not including the control endpoint. > > Initially I tried to use the uhid driver, but due to lack of functionality > needed in this case I removed the uhid driver from the kernel in favor of > the ugen driv
USB ugen0 problems
I'm attempting to interface with a usb based data acquisition device called a Labjack (http://labjack.com) under FreeBSD 4.9. The Labjack is a USB1.1 compliant HID device with a single configuration and two "interrupt" endpoints (in/out) not including the control endpoint. Initially I tried to use the uhid driver, but due to lack of functionality needed in this case I removed the uhid driver from the kernel in favor of the ugen driver. The ugen driver happily accepts the device and I can talk to it with a variety of utilities such as usbctl (from usbutil) and get a complete description of the device (bottom). After much research and fiddling around, I can up with a reasonable way to communicate with the device using libusb-0.1.8 (http://libusb.sourceforge.net/). Unfortunately the two endpoints are not being configured by the ugen driver on /dev/ugen0.1 and /dev/ugen0.2. From the debugging output of libusb, I get the following error when attempting to write to the endpoint : USB error: error writing to interrupt endpoint /dev/ugen0.2: Device not configured In theory these devices should get configured to the endpoints when the device is enumerated as they belong to interface 0 (the only interface) so it's not a matter of explicitly having to attach to an alternate interface. After turning on debugging in the usb and ugen modules, I confirmed the ugen driver knows about the endpoints (see below). To write to the endpoint, I'm using the usb_interrupt_write function provided by libusb-0.1.8 for writing to "interrupt" type endpoints. I believe everything would work just fine if the /dev/ugen0.EE devices were configured by the driver properly, but at this point I'm stumped. Any ideas? Thanks in advance. Chris USB_DEBUG info : Attaching the unit : Mar 11 01:21:36 cosmo /kernel: usbd_reset_port: port 1 reset done, error=NORMAL_COMPLETION Mar 11 01:21:36 cosmo /kernel: usbd_new_device bus=0xc0d31800 port=1 depth=1 lowspeed=512 Mar 11 01:21:36 cosmo /kernel: usbd_setup_pipe: dev=0xc0d33a80 iface=0 ep=0xc0d33a9c pipe=0xc0d33a84 Mar 11 01:21:36 cosmo /kernel: usbd_new_device: adding unit addr=2, rev=110, class=0, subclass=0, protocol=0, maxpacket=8, len=18, ls=1 Mar 11 01:21:36 cosmo /kernel: usbd_new_device: new dev (addr 2), dev=0xc0d33a80, parent=0xc0d33c80 Mar 11 01:21:36 cosmo /kernel: usbd_probe_and_attach: trying device specific drivers Mar 11 01:21:36 cosmo /kernel: usbd_probe_and_attach: no device specific driver found Mar 11 01:21:36 cosmo /kernel: usbd_probe_and_attach: looping over 1 configurations Mar 11 01:21:36 cosmo /kernel: usbd_probe_and_attach: trying config idx=0 Mar 11 01:21:36 cosmo /kernel: usbd_set_config_index: (addr 2) attr=0x80, selfpowered=0, power=100 Mar 11 01:21:36 cosmo /kernel: usbd_set_config_index: set config 1 Mar 11 01:21:36 cosmo /kernel: usbd_probe_and_attach: no interface drivers found Mar 11 01:21:36 cosmo /kernel: ugen0: LabJack Labjack U12, rev 1.10/5.f6, addr 2 Mar 11 01:21:36 cosmo /kernel: usbd_set_config_index: free old config Mar 11 01:21:36 cosmo /kernel: usbd_set_config_index: (addr 2) attr=0x80, selfpowered=0, power=100 Mar 11 01:21:36 cosmo /kernel: usbd_set_config_index: set config 1 Mar 11 01:21:36 cosmo /kernel: ugen_set_config: ugen0 to configno 1, sc=0xc0d34000 Mar 11 01:21:36 cosmo /kernel: ugen_set_config: ifaceno 0 Mar 11 01:21:36 cosmo /kernel: ugen_set_config: endptno 0, endpt=0x01(1,1), sce=0xc0d34264 Mar 11 01:21:36 cosmo /kernel: ugen_set_config: endptno 1, endpt=0x02(2,0), sce=0xc0d34328 When attempting to write to the endpoint : Mar 11 01:25:18 cosmo /kernel: usbd_setup_pipe: dev=0xc0d33a80 iface=0xc0d279a0 ep=0xc0d32b78 pipe=0xcc5e3cfc Mar 11 01:25:18 cosmo /kernel: usbd_setup_pipe: dev=0xc0d33a80 iface=0xc0d279a0 ep=0xc0d32b70 pipe=0xcc5e3cfc Killing program while hung on read : Mar 11 01:26:43 cosmo /kernel: usbd_ar_pipe: pipe=0xc0eb8d00 Mar 11 01:26:43 cosmo /kernel: usbd_ar_pipe: pipe=0xc0eb8d00 xfer=0xc0d33b00 (methods=0xc04aafe0) Mar 11 01:26:43 cosmo /kernel: usbd_ar_pipe: pipe=0xc0eb8280 Mar 11 01:26:43 cosmo /kernel: usbd_ar_pipe: pipe=0xc0eb8280 xfer=0xc0eb8200 (methods=0xc04aafe0) usbctl info : The Labjack is device 2 below. # usbctl USB device 1: 9 USB device 2: 0 2 USB devices found DEVICE addr 1 DEVICE descriptor: bLength=18 bDescriptorType=device(1) bcdUSB=1.00 bDeviceClass=9 bDeviceSubClass=0 bDeviceProtocol=0 bMaxPacketSize=64 idVendor=0x idProduct=0x bcdDevice=100 iManufacturer=1(SiS) iProduct=2(OHCI root hub) iSerialNumber=0() bNumConfigurations=1 CONFIGURATION descriptor 0: bLength=9 bDescriptorType=config(2) wTotalLength=25 bNumInterface=1 bConfigurationValue=1 iConfiguration=0() bmAttributes=40 bMaxPower=0 mA INTERFACE descriptor 0: bLength=9 bDescriptorType=interface(4) bInterfaceNumber=0 bAlternateSetting=0 bNumEndpoints=1 bInterfaceClass=9 bInterfaceSubClass=0 bInterfaceProtocol=0 iInterface=0() ENDPOINT descriptor: bLength=7 bDescriptorType=endpoint(5) bEndpointAddress=1-in bmAttributes=interrupt
Re: USB Driver Questions
I figured it out. To dynamically load/unload the driver it has to be excluded from the kernel config. Only then will the kld* tools allow to manipulate the module. Chris On Tue, 9 Mar 2004 [EMAIL PROTECTED] wrote: > > How does one force the use of a particular driver for a USB device without > removing the preferred driver from the kernel conf? For example, I have an > HID compliant device that is handled by the uhid driver, however I wish to > use the ugen driver temporarily for some testing. I created the > appropriate entry in /etc/usbd.conf with : > > devname "ugen[0-9]+" > > But uhid0 continues to be used after restarting usbd. I also tried to > unload the uhid kernel module with kldunload, but I received an error that > the module could not be found even though it showed up under kldstat. > Recompiling the kernel without uhid support caused the desired effect, but > I'd rather not have to reboot everytime I want to switch drivers. > > Thanks in advance, > > Chris > ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
USB Driver Questions
How does one force the use of a particular driver for a USB device without removing the preferred driver from the kernel conf? For example, I have an HID compliant device that is handled by the uhid driver, however I wish to use the ugen driver temporarily for some testing. I created the appropriate entry in /etc/usbd.conf with : devname "ugen[0-9]+" But uhid0 continues to be used after restarting usbd. I also tried to unload the uhid kernel module with kldunload, but I received an error that the module could not be found even though it showed up under kldstat. Recompiling the kernel without uhid support caused the desired effect, but I'd rather not have to reboot everytime I want to switch drivers. Thanks in advance, Chris ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
newbie: www directory access
Running FreeBSD4.7 Stable I am virtually hosting some www domains. I am using apache. What is the standard recommended convention for allow specific users update access to specific www directories? Should I just create a separate /etc/group for each virtual host? Is there a proggie that handles this gracefully? Thanks in advance. - Noah -- Net Enabled (http://www.enabled.com) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
possible bogus kernel error messages
Hi, These error messages just started appearing in my /var/log/messages file the other day. Running FreeBSD 4.7 Stable. Can somebody explain why this is happening - that appear bogus to me? Apr 4 03:14:35 typhoon /kernel: pid 48518 (rsync), uid 0 on /mnt/da1-root/var:file system full Apr 4 04:14:35 typhoon /kernel: pid 48783 (rsync), uid 0 on /mnt/da1-root/var:file system full but the df -k shows there is 41MB on the /mnt/da1-root/var partition. I even umounted and fsck'ed this partition with no errors. rsync version 2.5.5 protocol version 26 is being used. here is the df -k : typhoon# df -k Filesystem 1K-blocks UsedAvail Capacity Mounted on /dev/da0s1a128990609345773851%/ /dev/da0s1f257998 70 237290 0%/tmp /dev/da0s1g 68904938 13717912 4967463222%/usr /dev/da0s1e257998 1957744158682%/var procfs 440 100%/proc /dev/da1s1a128990616545701852%/mnt/da1-root /dev/da1s1g 68893152 13795968 4958573222%/mnt/da1-root/usr /dev/da1s1f257998 70 237290 0%/mnt/da1-root/tmp /dev/da1s1e257998 1894344792680%/mnt/da1-root/var -- Net Enabled (http://www.enabled.com) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
newbie: rotating logs
newbie admin: running FreeBSD 4.7 Stable I am having a bit of trouble finding this. Is there a FAQ or tutorial that discusses the "standard convention" of rotating log files? I am seeing my /var/log/messages and /var/log/maillog files cycling nicely, but I would like to know how to add other log files to this process. Thanks in advance. - Noah -- Net Enabled (http://www.enabled.com) ___ [EMAIL PROTECTED] mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"