From owner-freebsd-questions@FreeBSD.ORG Thu Dec 5 15:57:29 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 879B8A02 for ; Thu, 5 Dec 2013 15:57:29 +0000 (UTC) Received: from mail-wi0-f179.google.com (mail-wi0-f179.google.com [209.85.212.179]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 14219169F for ; Thu, 5 Dec 2013 15:57:28 +0000 (UTC) Received: by mail-wi0-f179.google.com with SMTP id z2so8464104wiv.12 for ; Thu, 05 Dec 2013 07:57:27 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:content-type:mime-version:subject:from :in-reply-to:date:cc:message-id:references:to; bh=XUXWL6d3jbHvFCLkZDoGOgp6JhK8cP07Z2Z6HIKFPCY=; b=by6DvIq/cN4XkWvI+XOCXqHtGIRBQkw3gM8EuzulBZQMF3qotF83HkBfq4Nxw4WZ83 /Pn7gBDJP183PsSUYnFP05FLEUF9eKNVm+hDO90am22usYzYbaaz09voSeHkET1EBLpG 1OOFu6z6CEi8R8eKL5HoVSytFGIj4ZTZ4dr/GkuSlRerECN9WjDONWrVuO6j8DQQsvim ERllxEX9YqHjxKQxa9RS1v2KVqtgZabmayh3oFwUT/u/EKeyAiFGEpqZ6jcQH00TMGFd 3kGf+e4Ap+wWw0HAgrdCXaT66F9UmVIyIf/nGnPOf8Cscu1l+F/fQ/IVOrNkSM2AQIBp UAmA== X-Gm-Message-State: ALoCoQnYOR6F4rqMcsYrzvPafjk6PYqxagOjbGdeEbDP1yLGZUB3s6am4XsXsCuFRxSShk7KQy/f X-Received: by 10.194.84.72 with SMTP id w8mr17690034wjy.55.1386259047197; Thu, 05 Dec 2013 07:57:27 -0800 (PST) Received: from dfleuriot.paris.hi-media-techno.com ([83.167.62.196]) by mx.google.com with ESMTPSA id uc18sm7465406wib.11.2013.12.05.07.57.25 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 05 Dec 2013 07:57:26 -0800 (PST) Mime-Version: 1.0 (Mac OS X Mail 6.6 \(1510\)) Subject: Re: do I have to compile a new kernel? or just add options somehow? From: Fleuriot Damien In-Reply-To: Date: Thu, 5 Dec 2013 16:57:25 +0100 Message-Id: References: <1A249B2C-B341-4270-B343-627901FD9562@my.gd> To: "firmdog@gmail.com" X-Mailer: Apple Mail (2.1510) Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.17 Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Dec 2013 15:57:29 -0000 Oh but you can load modules at boot time for GENERIC just fine. While there is a "crypto" module nested under = /usr/src/sys/modules/crypto/ , I'm not familiar enough with it to say = whether it incorporates both the device and the IPSEC options you're = interested in. You're better off rebuilding GENERIC, or your own kernel, IMHO. If you're curious, you can always run : kldload crypto If kldload says the module doesn't exist (I think it should, for = GENERIC), you'll need to build it: cd /usr/src/sys/modules/crypto/ && make && make install Here's little me trying to load it under a brand new 8.4 box: # kldload /boot/kernel/crypto.ko kldload: can't load /boot/kernel/crypto.ko: Exec format error If you run into this error like me, "dmesg" will provide you with a = clue, as it does in my case: KLD crypto.ko: depends on zlib - not available or version mismatch linker_load_file: Unsupported file type I really encourage you to rebuild your own kernel, stripped of all the = stuff you don't want/need (ISA NICs, wifi, firewire, floppy = controller... ) Warren Block has written pretty cool articles, here: http://www.wonkity.com/~wblock/docs/html/buildworld.html http://www.wonkity.com/~wblock/docs/html/kernelconfig.html I hope that helps, On Dec 5, 2013, at 4:30 PM, "firmdog@gmail.com" = wrote: >=20 > So the answer is that it's NOT possible to load modules at boot time = for GENERIC? I have to actually build a new kernel? >=20 > Thanks! >=20 >=20 > On Thu, Dec 5, 2013 at 9:42 AM, Fleuriot Damien wrote: >=20 > On Dec 5, 2013, at 3:35 PM, "firmdog@gmail.com" = wrote: >=20 > > I am having difficulty understanding what is compiled into the = GENERIC > > kernel. > > > > I need to enable "device crypto" with IPSEC and IPSEC_NAT_T options. > > > > Can I just configure the GENERIC kernel in a config file? Or do I = have to > > compile a totally new kernel? > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to = "freebsd-questions-unsubscribe@freebsd.org" >=20 >=20 > While it's far from being a good practice, you can simply add your: > device crypto > options IPSEC > options IPSEC_NAT_T >=20 > to /sys/amd64/conf/GENERIC (assuming you're running a 64bit release = that is). >=20 >=20 > Then: cd /usr/src && make kernel-toolchain && make buildkernel >=20 > Once the kernel is built, you only need to "make installkernel" and = reboot. >=20 > It is good practice, before rebooting, to run "mergemaster -p" , even = if you've only done a minor upgrade, let good habits sink in ;) >=20 >=20 >=20 >=20 > Regarding what is compiled in the GENERIC kernel, you can find the = included options and devices at: > /sys/amd64/conf/GENERIC > or > /sys/i386/conf/GENERIC >=20 > You may also run config -x /boot/kernel/kernel , if your kernel was = built with INCLUDE_CONFIG_FILE , which GENERIC does. >=20 >=20