From owner-freebsd-hackers@FreeBSD.ORG Sun Sep 23 15:54:13 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 002E516A419 for ; Sun, 23 Sep 2007 15:54:12 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: from ug-out-1314.google.com (ug-out-1314.google.com [66.249.92.174]) by mx1.freebsd.org (Postfix) with ESMTP id 6967813C448 for ; Sun, 23 Sep 2007 15:54:12 +0000 (UTC) (envelope-from uspoerlein@gmail.com) Received: by ug-out-1314.google.com with SMTP id a2so832175ugf for ; Sun, 23 Sep 2007 08:54:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:received:received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; bh=BO+spTJN4+gfrdmg76Uz7Y3zj7bNvQwKvKUNuDLiUv4=; b=QrpJty2BYSqAdBrJlFBOAXyCLfjnIg6Yj7BWdlMP9te9ngLaKTHX9cQgr4Mky3qv6iK4JH8fbSuozhEELyJcfYOMEWJHgHobBKspoRN9q4MXrYcg22LVzmCGayOUb/JQYg4zI9JgrALXxVQsY8OyXk1idsjMMs6ZhPGpDol5PQc= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:date:from:to:cc:subject:message-id:mail-followup-to:references:mime-version:content-type:content-disposition:in-reply-to:user-agent; b=BcfrMzT4DRmRNv/YFxQZkV2h5SaNGQ1UJtPAbxtdBJb9xuBqRdojUzH+LNGXmCFr7P6d1ONrdiMVExM2xxbgn6bt0QvbXxThcT6s05RNg4j32NIeASjcM4vZx0LiMqFRMkgCu/1j990LPHzEUlQLmp8cWd8eAlEEgE6WiMjxl+U= Received: by 10.67.22.14 with SMTP id z14mr6772475ugi.1190561351847; Sun, 23 Sep 2007 08:29:11 -0700 (PDT) Received: from roadrunner.spoerlein.net ( [85.180.157.142]) by mx.google.com with ESMTPS id k28sm6508660ugd.2007.09.23.08.29.10 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 23 Sep 2007 08:29:11 -0700 (PDT) Received: from roadrunner.spoerlein.net (localhost [127.0.0.1]) by roadrunner.spoerlein.net (8.14.1/8.14.1) with ESMTP id l8NFT8XA092728; Sun, 23 Sep 2007 17:29:08 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Received: (from q@localhost) by roadrunner.spoerlein.net (8.14.1/8.14.1/Submit) id l8NFJHhU092607; Sun, 23 Sep 2007 17:19:17 +0200 (CEST) (envelope-from uspoerlein@gmail.com) Date: Sun, 23 Sep 2007 17:19:17 +0200 From: Ulrich Spoerlein To: Matthias Fechner Message-ID: <20070923151916.GB1444@roadrunner.spoerlein.net> Mail-Followup-To: Matthias Fechner , freebsd-hackers@freebsd.org References: <46F22228.5070203@fechner.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <46F22228.5070203@fechner.net> User-Agent: Mutt/1.5.16 (2007-06-09) Cc: freebsd-hackers@freebsd.org 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: Sun, 23 Sep 2007 15:54:13 -0000 On Thu, 20.09.2007 at 09:32:56 +0200, Matthias Fechner wrote: > It seems that sysinstall will not install per default the new kernel. > For a non SMP system (like mine) it is I4B. > So it seems to me that I must change /usr/src/usr.sbin/sysinstall to > do this. I attached a patch to this email which should do it. > > [...] > > I checked now the the installed system and there is absolutly no kernel > installed. (no /boot/GENERIC, no /boot/I4B or anything else) > > I'm sure that I must oversaw something in sysinstall to change but I > cannot find it. > Can please anyone provide with some help? Hi, we need to install multiple kernels per system and instead of relying on sysinstall (I couldn't figure out, how to install multiple kernels with it, especially since it wants to install the default kernel to 'kernel') I hacked up my own kernel installation I'm using a Makefile to drive our release and package building and for the releases I'm using an install.cfg, which gets created on the fly, since the names of the kernels change now and then, here is the release target KERNELS= SERVER GENERIC SMP release rerelease: # Write automation script for sysinstall rm -f ${TLR}/usr/src/release/.install.cfg for k in ${KERNELS}; do printf "%s\n%s\n" "command=/bin/sh -c \"cd /dist/${RELEASE}/kernels && ./install.sh $$k\"" "system" \ >> ${TLR}/usr/src/release/.install.cfg; done sed '/^#KERNELS#/r ${TLR}/usr/src/release/.install.cfg' files/install.cfg > ${TLR}/usr/src/release/install.cfg cp files/src.diff ${TLR}/usr/src/release/src.diff # Create a src patch for our kernels on the fly, so we can pass it to make release (for i in ${KERNELS}; do diff -u /dev/null kernels/$$i 2>/dev/null || true; done) | sed 's,kernels/,sys/i386/conf/,' \ > ${TLR}/usr/src/release/kernels.diff # Copy them over again for rerelease, perhaps something changed .if make(rerelease) .for k in ${KERNELS} -cp kernels/$k ${TRR}/usr/src/sys/i386/conf/ .endfor .endif cd ${TLR}/usr/src/release && make ${.TARGET} \ BUILDNAME=${RELEASE} \ CHROOTDIR=${TRR} \ WORLD_FLAGS="-j4 \ MODULES_WITH_WORLD=yes \ WITHOUT_MODULES='3dfx 3dfx_linux ath ath_hal ath_rate_amrr ath_rate_onoe ath_rate_sample aue\ bktr cardbus coda coda5 dcons dcons_crom fatm firewire firmware harp hatm \ if_ndis ip6fw ipw iwi joy kue ndis pccard ral splash syscons umodem ural urio\ uscanner utopia uvisor wi wlan wlan_acl wlan_ccmp wlan_tkip wlan_wep wlan_xauth'" \ KERNEL_FLAGS="-j4 MODULES_WITH_WORLD=yes" \ KERNELS_BASE=''\ NODOC=YES NOPORTS=YES NOSRC=YES NO_FLOPPIES=YES \ RELEASENOUPDATE=YES \ LOCAL_PATCHES='src.diff kernels.diff' \ KERNELS='${KERNELS}' \ CVSROOT=${CVSROOT} \ CVSCMDARGS='${SRCDATE}' \ RELEASETAG=${SRCBRANCH} cd ${TRR}/R/ftp && find -d . | cpio --quiet -dumpl ${TFR} And files/install.cfg contains the following debug=yes mediaSetCDROM # Select which distributions we want. We omit the kernels here, we do them by hand dists= base doc manpages games catpages dict info distSetCustom # Partition Editor diskInteractive=YES bootManager=standard diskPartitionEditor diskLabelEditor installCommit # Magic marker, don't edit! Is set automatically from the Makefile! #KERNELS# # End of magic marker 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 It has the nice side effekt of GENERIC and SMP landing in /boot/{GENERIC,SMP} We also ship a /boot/loader.conf that sets the correct kernel to boot and is versioned and centrally controlled, yadda yadda yadda hth, Ulrich Spoerlein -- It is better to remain silent and be thought a fool, than to speak, and remove all doubt.