Re: Bootable CDROM creation system
Chad David [EMAIL PROTECTED] writes: My company built a tool a few years back for creating a bootable cdrom based on a running host FreeBSD 3/4 system, which promptly got shelved and forgotten.I recently had to update it for FreeBSD 5 and thought that perhaps the community at large could make use it before it gets forgotten again. # cd /usr/src # make buildworld buildkernel # mkdir /tmp/cdrom # make installworld installkernel DESTDIR=/tmp/cdrom # cd /usr/src/etc # make distribution DESTDIR=/tmp/cdrom # mkisofs -o /tmp/cdrom.iso -r -no-emul-boot -b /tmp/cdrom/boot/cdboot /tmp/cdrom # burncd -s max data /tmp/cdrom.iso fixate eject did I leave anything out? DES -- Dag-Erling Smørgrav - [EMAIL PROTECTED] ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Bootable CDROM creation system
On Thu, Jun 09, 2005 at 08:35:59AM +0200, Dag-Erling Sm?rgrav wrote: Chad David [EMAIL PROTECTED] writes: My company built a tool a few years back for creating a bootable cdrom based on a running host FreeBSD 3/4 system, which promptly got shelved and forgotten.I recently had to update it for FreeBSD 5 and thought that perhaps the community at large could make use it before it gets forgotten again. # cd /usr/src # make buildworld buildkernel # mkdir /tmp/cdrom # make installworld installkernel DESTDIR=/tmp/cdrom # cd /usr/src/etc # make distribution DESTDIR=/tmp/cdrom # mkisofs -o /tmp/cdrom.iso -r -no-emul-boot -b /tmp/cdrom/boot/cdboot /tmp/cdrom # burncd -s max data /tmp/cdrom.iso fixate eject did I leave anything out? :-) -- Ruslan Ermilov [EMAIL PROTECTED] FreeBSD committer pgp7Tyj0rPmXj.pgp Description: PGP signature
Re: problems with new the contigmalloc routine
On May 20, 2005, at 3:49 PM, Peter Jeremy wrote: On Fri, 2005-May-20 21:51:34 +0200, Hans Petter Selasky wrote: Can anyone explain why uiomove() has to sleep, and why there is no non-blocking uiomove()? As far as I can see, uiomove() only sleeps if it is asked to do a kernel-userland move that takes more than twice a scheduler quantum. As long as you don't uiomove() ridiculous amounts of data, it should never sleep. It can also sleep if it is reading from or writing to user memory if any of that memory needs to be faulted in. -- John Baldwin [EMAIL PROTECTED]http://www.FreeBSD.org/~jhb/ Power Users Use the Power to Serve = http://www.FreeBSD.org ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
usbd.conf: detach ukbd
Hello, when running usbd (under FreeBSD 4.11) with -dv switches I can see that a usb keyboard correctly attaches as ukbd0, but detaches as fall-through USB device. Do I just have to live with that fact or can I change that anyhow? Is that a device/device-class specific problem? Thank you, Norbert ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: usbd.conf: detach ukbd
On Thursday 09 June 2005 15:41, Norbert Koch wrote: Hello, when running usbd (under FreeBSD 4.11) with -dv switches I can see that a usb keyboard correctly attaches as ukbd0, but detaches as fall-through USB device. usbd is going to be replaced by devd. devd will catch when the keyboard device detaches. --HPS ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
RE: usbd.conf: detach ukbd
-Original Message- From: Hans Petter Selasky [mailto:[EMAIL PROTECTED] Sent: Thursday, June 09, 2005 4:31 PM To: Norbert Koch; Freebsd-Hackers@Freebsd.Org Subject: Re: usbd.conf: detach ukbd On Thursday 09 June 2005 15:41, Norbert Koch wrote: Hello, when running usbd (under FreeBSD 4.11) with -dv switches I can see that a usb keyboard correctly attaches as ukbd0, but detaches as fall-through USB device. usbd is going to be replaced by devd. devd will catch when the keyboard device detaches. --HPS I know, but I need to solve that problem for FreeBSD 4.X. ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Bootable CDROM creation system
On Thu, Jun 09, 2005 at 08:35:59AM +0200, Dag-Erling Sm?rgrav wrote: Chad David [EMAIL PROTECTED] writes: My company built a tool a few years back for creating a bootable cdrom based on a running host FreeBSD 3/4 system, which promptly got shelved and forgotten.I recently had to update it for FreeBSD 5 and thought that perhaps the community at large could make use it before it gets forgotten again. # cd /usr/src # make buildworld buildkernel # mkdir /tmp/cdrom # make installworld installkernel DESTDIR=/tmp/cdrom # cd /usr/src/etc # make distribution DESTDIR=/tmp/cdrom # mkisofs -o /tmp/cdrom.iso -r -no-emul-boot -b /tmp/cdrom/boot/cdboot /tmp/cdrom # burncd -s max data /tmp/cdrom.iso fixate eject did I leave anything out? No, not if the intention is to build a FreeBSD distribution; however, the point of shimmer is to build something a little more custom. What I posted begins to break the various parts of the system down into packages, and only installs what is required to boot and be minimally useful. mktree allow us to package things into more complex groupings to build different custom 'distributions' from a single shimmer tree. I didn't clame it was going to change the world, only that I would like to see someone benefit from my work. Did you actually look at what was there? -- Chad David[EMAIL PROTECTED] ACNS Inc. Calgary, Alberta Canada ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: usbd.conf: detach ukbd
In message: [EMAIL PROTECTED] Hans Petter Selasky [EMAIL PROTECTED] writes: : On Thursday 09 June 2005 15:41, Norbert Koch wrote: : Hello, : : when running usbd (under FreeBSD 4.11) with : -dv switches I can see that a usb keyboard : correctly attaches as ukbd0, : but detaches as fall-through USB device. : : usbd is going to be replaced by devd. devd will catch when the keyboard : device detaches. devd doesn't exist on 4.x. Warner ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: usbd.conf: detach ukbd
Norbert, when running usbd (under FreeBSD 4.11) with -dv switches I can see that a usb keyboard correctly attaches as ukbd0, but detaches as fall-through USB device. can you please tell what is in your /etc/usbd.conf? Do I just have to live with that fact or can I change that anyhow? Is that a device/device-class specific problem? does something like device USB keyboard devname ukbd[0-9]+ attach foo detach bar work? note: please replace foo and bar with actual commands you want to be executed. thanks, max ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Bootable CDROM creation system
On 2005-06-09 08:35, Dag-Erling Sm?rgrav [EMAIL PROTECTED] wrote: Chad David [EMAIL PROTECTED] writes: My company built a tool a few years back for creating a bootable cdrom based on a running host FreeBSD 3/4 system, which promptly got shelved and forgotten.I recently had to update it for FreeBSD 5 and thought that perhaps the community at large could make use it before it gets forgotten again. # cd /usr/src # make buildworld buildkernel # mkdir /tmp/cdrom # make installworld installkernel DESTDIR=/tmp/cdrom # cd /usr/src/etc # make distribution DESTDIR=/tmp/cdrom # mkisofs -o /tmp/cdrom.iso -r -no-emul-boot -b /tmp/cdrom/boot/cdboot /tmp/cdrom # burncd -s max data /tmp/cdrom.iso fixate eject did I leave anything out? For completion's shake, before installkernel one may have to run: # cp /usr/src/sys/arch/conf/GENERIC.hints /tmp/cdrom/boot/device.hints and then a minor nit. The -b /tmp/cdrom/boot/cdboot option should be relative to the CD-ROM root directory. Otherwise mkisofs complains and aborts. But yeah, this is a great mini-guide for making a bootable CD :) ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Bootable CDROM creation system
On Thu, Jun 09, 2005 at 06:59:42PM +0300, Giorgos Keramidas wrote: On 2005-06-09 08:35, Dag-Erling Sm?rgrav [EMAIL PROTECTED] wrote: Chad David [EMAIL PROTECTED] writes: My company built a tool a few years back for creating a bootable cdrom based on a running host FreeBSD 3/4 system, which promptly got shelved and forgotten.I recently had to update it for FreeBSD 5 and thought that perhaps the community at large could make use it before it gets forgotten again. # cd /usr/src # make buildworld buildkernel # mkdir /tmp/cdrom # make installworld installkernel DESTDIR=/tmp/cdrom # cd /usr/src/etc # make distribution DESTDIR=/tmp/cdrom # mkisofs -o /tmp/cdrom.iso -r -no-emul-boot -b /tmp/cdrom/boot/cdboot /tmp/cdrom # burncd -s max data /tmp/cdrom.iso fixate eject did I leave anything out? For completion's shake, before installkernel one may have to run: # cp /usr/src/sys/arch/conf/GENERIC.hints /tmp/cdrom/boot/device.hints and then a minor nit. The -b /tmp/cdrom/boot/cdboot option should be relative to the CD-ROM root directory. Otherwise mkisofs complains and aborts. But yeah, this is a great mini-guide for making a bootable CD :) At least my post was a catalyst for something positive, however unintended ;). -- Chad David[EMAIL PROTECTED] ACNS Inc. Calgary, Alberta Canada ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: usbd.conf: detach ukbd
On Thursday 09 June 2005 17:50, Maksim Yevmenkin wrote: Norbert, when running usbd (under FreeBSD 4.11) with -dv switches I can see that a usb keyboard correctly attaches as ukbd0, but detaches as fall-through USB device. does something like device USB keyboard devname ukbd[0-9]+ attach foo detach bar I'm not sure if detach is supported like that, because the ukbd device name will not be passed to usbd during detach. Then one needs to match against the class/subclass of the USB-keyboard: device USB keyboard class 3 subclass 1 detach ukbd0 Else if devd is not available on 4.11 you will have to change some code and compile a new kernel, from what I can see. To the file /sys/dev/usb/ukbd.c add this: static void usbd_add_device_detach_event(device_t self) { struct usb_event ue; bzero(ue, sizeof(ue)); strlcpy(ue.u.ue_device.udi_devnames[0], device_get_nameunit(self), USB_MAX_DEVNAMELEN) ; usb_add_event(USB_EVENT_DEVICE_DETACH, ue); return; } ukbd_detach() { ... usbd_add_device_detach_event(self); return (0); } This will make the suggestion from Maksim work. A generic solution would be to call usbd_add_device_detach_event() from the bus_child_detached method of uhub, which must be added. Also one can change usb_disconnect_port() to generate the event before the sub-devices are detached, but that might not work in all cases. --HPS ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
How to do a routing lookup inside the kernel in FreeBSD ?
Hi all, I am trying to figure out from the kernel source code (FreeBSD 5.3) how can I perform a routing lookup in a KLD module. Since I am short in time, if anyone knows how do to do this I would appreciate. Any pointers to the right portion of the code are also apperciated. Thanks, -aziz ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Determining disk device and kicking GEOM when doing automatic mounting of umass devices
I want to have a devd entry that automatically mounts umass devices when they get attached. The problem is figuring out which device to mount and then getting the correct devices created. For example, the entry for my thumbdrive: attach 1000 { device-name umass[0-9]+; match vendor 0x08ec; match product 0x0015; match sernum 0C50935151F0EA20; action $scripts/mount_umass.sh $device-name msdosfs /stickdrive; }; The mount_umass.sh script is as follows: ---BEGIN FILE--- sleep 10 scsidev=`echo ${1} | sed s/umass/umass-sim/g` diskdev=`camcontrol devlist -v | grep -A 1 ${scsidev} | tail -n 1 | \ awk -F ( '{ print $2 }' | awk -F , '{ print $1 }'` fstype=${2} mountpoint=${3} mount -t ${fstype} /dev/${diskdev} ${mountpoint} 2/dev/null mount -t ${fstype} /dev/${diskdev}s1 ${mountpoint} 2/dev/null END FILE First, the script has to sleep because the device doesn't immediately show up in the CAM device list. After waiting long enough to be safe, the script takes the device name passed by devd and uses it to parse the device name from the output of `camcontrol devlist`. GEOM doesn't automatically read the partition table and create the slice device, so the script forces it to do so by trying to mount the base device before mounting the actual partition. These tricks are ridiculous, IMO. There has to be a more intelligent means of going about this. How do I get the scsi disk device name created for a umass device as soon as it's created? How do I inform GEOM that it needs to add a new MBR to it's configuration and create the appropriate /dev/da?s* devices? ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]
Re: Determining disk device and kicking GEOM when doing automatic mounting of umass devices
In message: [EMAIL PROTECTED] Darren Pilgrim [EMAIL PROTECTED] writes: : These tricks are ridiculous, IMO. There has to be a more intelligent means : of going about this. How do I get the scsi disk device name created for a : umass device as soon as it's created? How do I inform GEOM that it needs to : add a new MBR to it's configuration and create the appropriate /dev/da?s* : devices? One way is to make devd grok devices arriving and leaving from /dev. One could kludge it to send out geom events, but I think that's insufficiently general since it reports too many things that aren't of interest. Of course, you have no way of knowing what entries in /dev really are, apart from pattern matching. As to your second question, GEOM and/or da (it depends on who you ask) need to react to certain events and re-taste the device. This isn't done automatically, especially when da0 changes from a 32MB to a 64MB part, for reasons I've never known. Warner ___ freebsd-hackers@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-hackers To unsubscribe, send any mail to [EMAIL PROTECTED]