From owner-freebsd-questions@FreeBSD.ORG Fri Jun 7 23:17:36 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.FreeBSD.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id D0D87410 for ; Fri, 7 Jun 2013 23:17:36 +0000 (UTC) (envelope-from norman@khine.net) Received: from mail-oa0-x235.google.com (mail-oa0-x235.google.com [IPv6:2607:f8b0:4003:c02::235]) by mx1.freebsd.org (Postfix) with ESMTP id 9E7CE19C7 for ; Fri, 7 Jun 2013 23:17:36 +0000 (UTC) Received: by mail-oa0-f53.google.com with SMTP id g12so3830920oah.40 for ; Fri, 07 Jun 2013 16:17:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=ToBly0KMv9bCvVXqgAf1cA7b9XGoYOw8JocTY3TE43s=; b=jzF/f8iEn8ePrEN3wIbPQatEmuBi0U2PjbD/9ckHUOaQqE1ITu86isS+I8CyTaQArB TQtmG7nUs5HzoWUKe5ABi0Yqj8uf10FHuHphlT0nNy7DoLCMa1aJBKRy7F11gJim1+Hd sTlh3QSgTawxitPRo9nXCdbfWDw97eEonFJCNI/atcc6Pr7a6XkrY5MaJgL2s/lBdS+O CTwlijF+OgNr3nn3rdhnynNeHHN+NNPgk/cQFDEz+Pzek9WfJkjwxE8RUENhT8ntu2Yu gqm2sOWkl/tW6kbRbMlBEUuaa1dRDTMCEnZz3MTUWa//shHBegZ2gMzsOUZeyRFq2ZG/ CjuA== MIME-Version: 1.0 X-Received: by 10.182.42.168 with SMTP id p8mr659441obl.37.1370647055141; Fri, 07 Jun 2013 16:17:35 -0700 (PDT) Received: by 10.76.115.137 with HTTP; Fri, 7 Jun 2013 16:17:35 -0700 (PDT) In-Reply-To: <20130608005444.6741d6cd.freebsd@edvax.de> References: <20130608005444.6741d6cd.freebsd@edvax.de> Date: Sat, 8 Jun 2013 01:17:35 +0200 Message-ID: Subject: Re: custom kernel installation From: Norman Khine To: Polytropon X-Gm-Message-State: ALoCoQnY6N6x5ayrHY2TekAFZx7d9LhjMs/NCQ2cVbsbsw3/LyyswHKRnBM39gJuhNS7lTfmqr4b Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 07 Jun 2013 23:17:36 -0000 thanks for the quick reply On Sat, Jun 8, 2013 at 12:54 AM, Polytropon wrote: > On Sat, 8 Jun 2013 00:37:02 +0200, Norman Khine wrote: > > hello, > > i have a dedicated server from OVH and have updated freebsd to 9.1 and > want > > to enable IPFW in the kernel as this is not enabled. > > Why not use the module for this? For many years now, you > do not need a custom kernel if you want to use IPFW (which > _had_ to be compiled into the kernel in the past). Use > > # kldload ipfw.ko > is it good idea to run this like this, would i have to do some settings, as i don't want to be locked out of the system? > > and maybe > > # kldload ipfw_nat.ko > > if it's just about having IPFW. Of course, if explicitely > having it _in_ the kernel is your objective, unread this > comment. :-) > > yes i would like to see if i can compile a kernel on an OVH box for freebsd i have tried, but there is always something that fails :-( so i wanted the use the one by OVH and modify it for my use. > > > > the way i updated the system was to copy /boot/kernel.old to > /boot/GENERIC > > then followed ch25 > > > http://www.freebsd.org/doc/en/books/handbook/updating-upgrading-freebsdupdate.htmlthis > > went well and the system is up to date. > > So you did freebsd-update to update to 9.1-RELEASE. > yes > > > > > so i got the 9.1 sources and now in /usr/src/sys/amd64/conf i have a > > GENERIC file, but this is too generic, besides i don't have access to the > > physical box. > > This file is what the GENERIC kernel (distributed with the OS) > has been generated from. Use it as a template for your own > custom kernel. > well, there was no /usr/src when the system arrived from OVH i downloaded this from freebsd ftp site. so i will need to update it to suit my system and i was just looking for a shortcut. > > > > what will be the correct way to include the IPFW to existing /boot/kernel > > is there a way to generate the GENERIC file from the existing loaded > kernel? > > No, you can simply copy it and then make changes. For example: > > # cd /usr/src/sys/amd64/conf > # cp GENERIC MYKERNEL > (or use any other descriptive name) > # vi MYKERNEL > (make changes as desired, then :wq) > # cd /usr/src > # make buildkernel KERNCONF=MYKERNEL > # make installkernel KERNCONF=MYKERNEL > # reboot > > Keep in mind that kernel and world have to be in sync version-wise! > > Regarding IPFW, you will probably add lines like the following: > > options DUMMYNET > options IPFIREWALL > options IPFIREWALL_DEFAULT_TO_ACCEPT > options IPFIREWALL_VERBOSE > options IPFIREWALL_VERBOSE_LIMIT=500 > options IPFILTER > options IPDIVERT > > Of course you can also remove lines for hardware you don't have > in your box, like trimming the support for NICs or SCSI controllers > and the like. :-) > > > > > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > -- %>>> "".join( [ {'*':'@','^':'.'}.get(c,None) or chr(97+(ord(c)-83)%26) for c in ",adym,*)&uzq^zqf" ] )