From owner-freebsd-hackers@FreeBSD.ORG Tue Sep 25 16:27:32 2007 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B025616A41B for ; Tue, 25 Sep 2007 16:27:32 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from nf-out-0910.google.com (nf-out-0910.google.com [64.233.182.190]) by mx1.freebsd.org (Postfix) with ESMTP id 18BD313C45B for ; Tue, 25 Sep 2007 16:27:31 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: by nf-out-0910.google.com with SMTP id b2so1486467nfb for ; Tue, 25 Sep 2007 09:27:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; bh=pXK5u6k5keSHYYd7iYukw5MgoVrQULN2Zv52pVcjd8w=; b=Luwzwsk5ACMWdrvBRiEvl/aBs90SvzszxOl80XDgM6I/nwV2KnKs7REOG9qwuk7axad8BgTyudm7GeLe0T7mMcYMtKuEQx2NJYrbEyOCIR3L75GeanKV6Cgu4Xw4kiTi1DhQfe1ZX0ajlT//d+GQDo+9FusimgC8bg5+h+4jIYY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:to:subject:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=Zon3xJ3GvkZTb2hno0F4HhNsHe0gGNE5fqeuJJAJ5mqTCWo8FWfDrNH3pFRYh4yPV4iGlpfcUIK8bay30tCtiSBFYwmMV17uckwH4QmVW09jS5+k1ms83o/rzhdP9FigzsigVV/Kpdxajogs8USshSdVD7iyFmZCCVojXJECehc= Received: by 10.78.201.2 with SMTP id y2mr4513412huf.1190737649542; Tue, 25 Sep 2007 09:27:29 -0700 (PDT) Received: by 10.78.173.13 with HTTP; Tue, 25 Sep 2007 09:27:29 -0700 (PDT) Message-ID: <7ad7ddd90709250927o772264b1v34446145d292b8bd@mail.gmail.com> Date: Tue, 25 Sep 2007 18:27:29 +0200 From: "Ulrich Spoerlein" To: freebsd-hackers@freebsd.org In-Reply-To: <20070924225841.GA75866@server.idefix.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <46F22228.5070203@fechner.net> <20070923151916.GB1444@roadrunner.spoerlein.net> <20070924225841.GA75866@server.idefix.lan> Subject: Re: Own Install CD with custom kernel X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Sep 2007 16:27:32 -0000 On 9/25/07, Matthias Fechner wrote: > thx a lot for your really great answer, but I have some more short > questions. :) > Do you copy the release target to the Makefile in > /usr/src/release/Makefile or do you execute from another place? Since we need to be able to reproduce our releases, we use the chroot facility and build those releases in their very own directory. That way we can also easily use a custom make.conf, especially for the package building (which are built in that same chroot). So, with the variables as defined below, I first run the 'init' target, which sets up the chroot environment init: mkdir -p ${TLR}/usr ${TLR}/etc ${TLR}/usr/ports/local mkdir -p ${TFR}/packages ${TFR}/distfiles ${TLR}/usr/ports/packages ${TLR}/usr/ports/distfiles cd ${TLR}/usr && ${CVS} co -r ${SRCBRANCH} ${SRCDATE} src cd ${TLR}/usr/src && make -j4 buildworld DESTDIR=${TLR} cd ${TLR}/usr/src && make installworld DESTDIR=${TLR} cd ${TLR}/usr/src && make distribution DESTDIR=${TLR} cd ${TLR}/usr && ${CVS} co ${PORTSDATE} ports cp -pr ports/* ${TLR}/usr/ports/local then 'release' is run as given in my previous mail. After that, the 'packages' target does a lot of voodoo and then loops over a make variable which contains all the packages we are interested in and builds them. It is kind of messy, though as we have local patches which are to be applied to the cvs checkout. Makeing this step idempotent is ... interesting. > > rm -f ${TLR}/usr/src/release/.install.cfg > > [...] > > cd ${TRR}/R/ftp && find -d . | cpio --quiet -dumpl ${TFR} > > hm, cannot found the variables TLR and TRR anywhere defined. Can you > please give me some more information how your buildprocess looks? These are just arbitrary places where the stuff is located, they are defined as # Build tree, needs LOTS of space ... T= /build # Shortcuts TLR= $T/live/${RELEASE} TRR= $T/release/${RELEASE} TFR= $T/ftproot/pub/FreeBSD/${RELEASE} > > And files/install.cfg contains the following > > where should I store that file? > man release doesn't give here any information about it. This is documented somewhere in sysinstall(8), I guess. You can place it on a floppy (yeah, right). I put it in ${TLR}/usr/src/release/install.cfg as you saw from the example in my previous mail and it should then make it into the ISO. How exactly this works, I can't remember right now ... Ah, src/release/Makefile contains under the release.8 target: -test -f ${.CURDIR}/install.cfg \ && cp ${.CURDIR}/install.cfg ${RD}/mfsfd So it ends up in the MFS from which FreeBSD installs itself. > > So basically, sysinstall is intructed to not install any kernel, but > > after all distributions are extracted the following commands are run > > > > command=/bin/sh -c "cd /dist/${RELEASE}/kernels && ./install.sh GENERIC" > > system > > command=/bin/sh -c "cd /dist/${RELEASE}/kernels && ./install.sh SMP" > > system > > where can you say sysinstall that it should run such commands after > the installation? install.cfg, take a look at /usr/src/usr.sbin/sysinstall/install.cfg hth, Uli