From owner-freebsd-questions@FreeBSD.ORG Sun Sep 16 09:41:39 2007 Return-Path: Delivered-To: questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 268D416A417 for ; Sun, 16 Sep 2007 09:41:39 +0000 (UTC) (envelope-from idefix@fechner.net) Received: from anny.lostinspace.de (anny.ipv6.lostinspace.de [IPv6:2a01:138:100:1:219:d1ff:fe6a:ef49]) by mx1.freebsd.org (Postfix) with ESMTP id 5B8F813C465 for ; Sun, 16 Sep 2007 09:41:38 +0000 (UTC) (envelope-from idefix@fechner.net) Received: from server.idefix.lan (ppp-82-135-65-76.dynamic.mnet-online.de [82.135.65.76]) (authenticated bits=0) by anny.lostinspace.de (8.14.1/8.14.1) with ESMTP id l8G9fQYV006268 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Sun, 16 Sep 2007 11:41:31 +0200 (CEST) (envelope-from idefix@fechner.net) Received: from idefix by server.idefix.lan with local (Exim 4.68 (FreeBSD)) (envelope-from ) id 1IWqcU-000HnN-4G for questions@freebsd.org; Sun, 16 Sep 2007 11:40:50 +0200 Date: Sun, 16 Sep 2007 11:40:50 +0200 From: Matthias Fechner To: questions@freebsd.org Message-ID: <20070916094049.GA63915@server.idefix.lan> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="6c2NcOVqGQ03X4Wi" Content-Disposition: inline X-Crypto: GnuPG/1.0.6 http://www.gnupg.org X-GnuPG: 0x1B756EF6 User-Agent: Mutt/1.5.16 (2007-06-09) Sender: Matthias Fechner X-Greylist: Sender succeeded SMTP AUTH authentication, not delayed by milter-greylist-3.0 (anny.lostinspace.de [80.190.182.2]); Sun, 16 Sep 2007 11:41:32 +0200 (CEST) X-Spam-Status: No, score=-2.0 required=5.0 tests=AWL,BAYES_00, UNPARSEABLE_RELAY autolearn=ham version=3.2.3 X-Spam-Checker-Version: SpamAssassin 3.2.3 (2007-08-08) on anny.lostinspace.de X-Virus-Scanned: ClamAV 0.91.2/4289/Sun Sep 16 07:49:23 2007 on anny.lostinspace.de X-Virus-Status: Clean Cc: Subject: Own Install CD with custom kernel X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 16 Sep 2007 09:41:39 -0000 --6c2NcOVqGQ03X4Wi Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi, I'm working currently on a custom FreeBSD install CD with included I4B. But I have my problems and every try takes about 8 hours to rebuild the CDs again so hopefully I'll get some help here to speed it up a little :) What I did: Prepared my environment like (checkout cvs, copy files, created patch etc. - default FreeBSD CD builds fine) 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 the patch to this email. cd /usr/src/release make release CHROOTDIR=/home/storage/ownfreebsd BUILDNAME=FreeBSD-I4B \ CVSROOT=/home/storage/ncvs RELEASETAG=RELENG_6 MAKE_ISOS=1 \ KERNEL_FLAGS=-j4 WORLD_FLAGS=-j4 \ LOCAL_PATCHES=/root/patch.diff PATCH_FLAGS=-p1 \ KERNELS="I4B I4BSMP GENERIC SMP" |tee /root/build.log Then I execute the make release command and some hours later I got all the ISO I need to install my new system. Ok so far so good. Now I booted with the new created ISO and try to install from it. I checked if the right kernel is select in the distribution selection and yes that is fine. But at the installation itself it seems that sysinstall is not copying the kernel to the right place. I got the following message (debugging messages in sysinstall are enabled): DEBUG: installFixupKernel: Install I4B kernel DEBUG: Executing command 'mv /boot/I4B /boot/kernel' mv: rename /boot/I4B to /boot/kernel: No such file or directory DEBUG: Command 'mv /boot/I4B /boot/kernel' ressturns status of 1 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. What must I change now that sysinstall install my custom kernel? Thx a lot for help! Best regards, Matthias -- "Programming today is a race between software engineers striving to build bigger and better idiot-proof programs, and the universe trying to produce bigger and better idiots. So far, the universe is winning." -- Rich Cook --6c2NcOVqGQ03X4Wi Content-Type: text/x-diff; charset=us-ascii Content-Disposition: attachment; filename="sysinstall_kernel_I4B.diff" diff -Nur src.orig/usr.sbin/sysinstall/Makefile src/usr.sbin/sysinstall/Makefile --- src.orig/usr.sbin/sysinstall/Makefile 2006-03-11 19:52:47.000000000 +0100 +++ src/usr.sbin/sysinstall/Makefile 2007-09-05 07:38:50.000000000 +0200 @@ -50,6 +50,9 @@ .if exists(${.CURDIR}/../../sys/${MACHINE}/conf/SMP) CFLAGS+=-DWITH_SMP .endif +.if exists(${.CURDIR}/../../sys/${MACHINE}/conf/I4B) +CFLAGS+=-DWITH_I4B +.endif DPADD+= ${LIBDEVINFO} LDADD+= -ldevinfo .endif diff -Nur src.orig/usr.sbin/sysinstall/dist.c src/usr.sbin/sysinstall/dist.c --- src.orig/usr.sbin/sysinstall/dist.c 2007-03-30 21:21:56.000000000 +0200 +++ src/usr.sbin/sysinstall/dist.c 2007-09-06 01:37:43.000000000 +0200 @@ -100,8 +100,16 @@ static Distribution KernelDistTable[] = { DTE_TARBALL("GENERIC", &KernelDists, KERNEL_GENERIC, "/boot"), #ifdef WITH_SMP +#ifdef WITH_I4B + DTE_TARBALL("I4BSMP", &KernelDists, KERNEL_I4BSMP, "/boot"), +#else DTE_TARBALL("SMP", &KernelDists, KERNEL_SMP, "/boot"), #endif +#else +#ifdef WITH_I4B + DTE_TARBALL("I4B", &KernelDists, KERNEL_I4B, "/boot"), +#endif +#endif DTE_END, }; @@ -216,11 +224,19 @@ selectKernel(void) { #ifdef WITH_SMP +#ifdef WITH_I4B + return DIST_KERNEL_I4B; +#else /* select default kernel based on deduced cpu count */ return NCpus > 1 ? DIST_KERNEL_SMP : DIST_KERNEL_GENERIC; +#endif +#else +#ifdef WITH_I4B + return DIST_KERNEL_I4B; #else return DIST_KERNEL_GENERIC; #endif +#endif } int diff -Nur src.orig/usr.sbin/sysinstall/dist.h src/usr.sbin/sysinstall/dist.h --- src.orig/usr.sbin/sysinstall/dist.h 2006-03-11 19:52:47.000000000 +0100 +++ src/usr.sbin/sysinstall/dist.h 2007-09-06 01:31:31.000000000 +0200 @@ -74,6 +74,8 @@ /* Subtypes for KERNEL distribution */ #define DIST_KERNEL_GENERIC 0x00001 #define DIST_KERNEL_SMP 0x00002 +#define DIST_KERNEL_I4B 0x00004 +#define DIST_KERNEL_I4BSMP 0x00008 #define DIST_KERNEL_ALL 0xFFFFF /* Canned distribution sets */ diff -Nur src.orig/usr.sbin/sysinstall/install.c src/usr.sbin/sysinstall/install.c --- src.orig/usr.sbin/sysinstall/install.c 2006-12-31 19:34:58.000000000 +0100 +++ src/usr.sbin/sysinstall/install.c 2007-09-15 09:27:35.000000000 +0200 @@ -910,13 +910,30 @@ * NB: we assume any existing kernel has been saved * already and the /boot/kernel we remove is empty. */ + msgDebug("installFixupKernel: Remove /boot/kernel\n"); vsystem("rm -rf /boot/kernel"); -#if WITH_SMP - if (dists & DIST_KERNEL_SMP) + + msgDebug("installFixupKernel: Checking for SMP and I4B\n"); + if (dists & DIST_KERNEL_I4BSMP) + { + msgDebug("installFixupKernel: Install I4BSMP kernel\n"); + vsystem("mv /boot/I4BSMP /boot/kernel"); + } + else if (dists & DIST_KERNEL_SMP) + { + msgDebug("installFixupKernel: Install SMP kernel\n"); vsystem("mv /boot/SMP /boot/kernel"); + } + else if (dists & DIST_KERNEL_I4B) + { + msgDebug("installFixupKernel: Install I4B kernel\n"); + vsystem("mv /boot/I4B /boot/kernel"); + } else -#endif + { + msgDebug("installFixupKernel: Install GENERIC kernel\n"); vsystem("mv /boot/GENERIC /boot/kernel"); + } } return DITEM_SUCCESS | DITEM_RESTORE; } diff -Nur src.orig/usr.sbin/sysinstall/menus.c src/usr.sbin/sysinstall/menus.c --- src.orig/usr.sbin/sysinstall/menus.c 2007-05-26 09:31:47.000000000 +0200 +++ src/usr.sbin/sysinstall/menus.c 2007-09-06 01:38:13.000000000 +0200 @@ -1045,9 +1045,18 @@ { " GENERIC", "GENERIC kernel configuration", dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_GENERIC }, #ifdef WITH_SMP +#ifdef WITH_I4B + { " I4BSMP", "I4B symmetric multiprocessor kernel configuration", + dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_I4BSMP }, +#else { " SMP", "GENERIC symmetric multiprocessor kernel configuration", dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_SMP }, #endif +#endif +#ifdef WITH_I4B + { " I4B", "I4B kernel configuration", + dmenuFlagCheck, dmenuSetFlag, NULL, &KernelDists, '[', 'X', ']', DIST_KERNEL_I4B }, +#endif { NULL } }, }; diff -Nur src.orig/usr.sbin/sysinstall/system.c src/usr.sbin/sysinstall/system.c --- src.orig/usr.sbin/sysinstall/system.c 2005-08-17 15:32:29.000000000 +0200 +++ src/usr.sbin/sysinstall/system.c 2007-09-14 08:40:25.000000000 +0200 @@ -143,6 +143,7 @@ if (!sysctlbyname("debug.boothowto", &boothowto, &i, NULL, 0) && (i == sizeof(boothowto)) && (boothowto & RB_VERBOSE)) variable_set2(VAR_DEBUG, "YES", 0); + variable_set2(VAR_DEBUG, "YES", 0); /* Are we running as init? */ if (getpid() == 1) { --6c2NcOVqGQ03X4Wi--