From owner-freebsd-emulation@FreeBSD.ORG Tue Dec 22 23:26:46 2009 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E4D21065694 for ; Tue, 22 Dec 2009 23:26:46 +0000 (UTC) (envelope-from lobo@bsd.com.br) Received: from mail-yw0-f172.google.com (mail-yw0-f172.google.com [209.85.211.172]) by mx1.freebsd.org (Postfix) with ESMTP id 0C48E8FC0A for ; Tue, 22 Dec 2009 23:26:45 +0000 (UTC) Received: by ywh2 with SMTP id 2so6953798ywh.27 for ; Tue, 22 Dec 2009 15:26:45 -0800 (PST) Received: by 10.90.43.4 with SMTP id q4mr5320351agq.31.1261524403756; Tue, 22 Dec 2009 15:26:43 -0800 (PST) Received: from papi.localnet ([187.78.196.172]) by mx.google.com with ESMTPS id 4sm2569544ywd.59.2009.12.22.15.26.42 (version=TLSv1/SSLv3 cipher=RC4-MD5); Tue, 22 Dec 2009 15:26:43 -0800 (PST) From: Mario Lobo To: Leslie Jensen Date: Tue, 22 Dec 2009 20:25:19 -0300 User-Agent: KMail/1.12.3 (FreeBSD/8.0-STABLE; KDE/4.3.3; amd64; ; ) References: <4B314586.1030301@fletchermoorland.co.uk> <200912222001.08532.lobo@bsd.com.br> <4B315448.909@eskk.nu> In-Reply-To: <4B315448.909@eskk.nu> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <200912222025.19597.lobo@bsd.com.br> Cc: freebsd-emulation@freebsd.org Subject: Re: VirtualBox error if kernel module loader in /boot/loader.conf (WAS Re: Loading kernel modules for virtualbox via script) X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2009 23:26:46 -0000 On Tuesday 22 December 2009 20:20:40 Leslie Jensen wrote: > > This is a known problem for a while but I think it's almost microscopic. > > > > > > Just place the following script in /usr/local/etc/rc.d/vboxkos > > > > ----------------------------------- > > #!/bin/sh > > echo ' VirtualBox' > > /sbin/kldload vboxnetflt > > /sbin/kldload vboxnetadp<- optional > > ------------------------------------ > > > > and take vboxnetflt_load="YES" out of loader.conf. > > Load only vboxdrv.ko there ! > > > > The modules will be loaded late enough and everything will work. > > I placed the vboxkos script as you described, set the same owner and > group and rights as the files already present. Unfortunately the > vboxnetflt module did not get loaded. > > /Les > Sorry for my rush on the previous post. Here is a better script: ---------------------------------------------------------- #!/bin/sh # # $FreeBSD: src/etc/rc.d/vbox,v 1.0 2009/12/22 20:20:06 mlobo Exp $ # # PROVIDE: vbox # REQUIRE: LOGIN # KEYWORD: nojail . /etc/rc.subr name="vbox" start_cmd="${name}_start" stop_cmd=":" vboxm_start() { /sbin/kldload vboxnetflt /sbin/kldload vboxnetadp } vbox_start() { if checkyesno vbox_enable; then echo ' VirtualBox modules' vboxm_start fi } load_rc_config $name run_rc_command "$1" ------------------------------------------------------- You have to place vbox_enable="YES" on /etc/rc.conf -- Mario Lobo http://www.mallavoodoo.com.br FreeBSD since version 2.2.8 [not Pro-Audio.... YET!!] (99,7% winfoes FREE)