From owner-freebsd-questions@FreeBSD.ORG Tue Dec 11 21:22:27 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E84DF106 for ; Tue, 11 Dec 2012 21:22:27 +0000 (UTC) (envelope-from Devin.Teske@fisglobal.com) Received: from mx1.fisglobal.com (mx1.fisglobal.com [199.200.24.190]) by mx1.freebsd.org (Postfix) with ESMTP id A73278FC15 for ; Tue, 11 Dec 2012 21:22:27 +0000 (UTC) Received: from smtp.fisglobal.com ([10.132.206.31]) by ltcfislmsgpa03.fnfis.com (8.14.5/8.14.5) with ESMTP id qBBLMKqv016762 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Tue, 11 Dec 2012 15:22:20 -0600 Received: from [10.0.0.102] (10.14.152.61) by smtp.fisglobal.com (10.132.206.31) with Microsoft SMTP Server (TLS) id 14.2.309.2; Tue, 11 Dec 2012 15:22:19 -0600 Subject: Re: make release and mfsroot MIME-Version: 1.0 (Apple Message framework v1283) From: Devin Teske In-Reply-To: Date: Tue, 11 Dec 2012 13:22:18 -0800 Message-ID: <04ABE8E0-8D63-4C68-92C4-69B516818160@fisglobal.com> References: To: Rick Miller X-Mailer: Apple Mail (2.1283) X-Originating-IP: [10.14.152.61] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.9.8327, 1.0.431, 0.0.0000 definitions=2012-12-11_08:2012-12-11,2012-12-11,1970-01-01 signatures=0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: FreeBSD Questions X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Devin Teske List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 11 Dec 2012 21:22:28 -0000 Hi Rick, If you want, you could follow my approach which is to take the completed mf= sroot.gz and use a Makefile to manage the creation of custom mfsroots (keep= ing the original unmodified, making it simpler to test different iterations= ). The advantage is that you don't have to re-perform the release(7) process e= ach time you want to make a change to your mfsroot. Check it out: http://druidbsd.cvs.sourceforge.net/viewvc/druidbsd/druidbsd/druid/dep/free= bsd/mfsroot/standard/ Basically, you'd grab the Makefile (link below): http://druidbsd.cvs.sourceforge.net/viewvc/druidbsd/druidbsd/druid/dep/free= bsd/mfsroot/standard/Makefile?revision=3D1.1 Then create a "dep" directory and "src" directory: Next, take the virgin mfsroot.gz produced by the release(7) process and dum= p it into the "dep" directory. Next, put your install.cfg into the "src" directory (just like you see that= I did). Optionally populate more files into the "src" directory (see the first link= above for an example -- example includes "boot/modules/nullfs.ko", "etc/fs= tab", and "etc/group", etc.). When the "src" directory represents what you'd like to add to the mfsroot, = you're ready to produce a new copy of the stored original (at "dep/mfsroot.= gz"), complete with your additions. Execute: make from_dep NOTE: sudo is required What will happen is that "dep/mfsroot.gz" will be copied to the current wor= king directory, the mfsroot is ripped open (requires sudo privileges), the = "src" directory is layered onto the mfsroot, and finally the mfsroot is pac= kaged back up (leaving you with a custom "./mfsroot.gz" for deployment). --=20 Cheers, Devin On Dec 11, 2012, at 11:02 AM, Rick Miller wrote: > Hi All, >=20 > I generate a bootonly ISO and want to add files to the mfsroot.gz > created by the release.8 target. I want sysinstall to load an > install.cfg which makes a call to doconfig.sh. The target destination > for the files is stand/. My question is will the below patch > accomplish this for me provided install.cfg and doconfig.sh exist in > /usr/src/release? >=20 > # diff -u Makefile.orig Makefile > --- Makefile.orig 2012-12-11 18:15:29.000000000 +0000 > +++ Makefile 2012-12-11 19:01:46.000000000 +0000 > @@ -509,6 +509,7 @@ > rm foo; \ > fi > -test -f install.cfg && cp install.cfg ${CHROOTDIR}/usr/src/release > + -test -f doconfig.sh && cp doconfig.sh ${CHROOTDIR}/usr/src/release > echo "#!/bin/sh" > ${_MK} > echo "set -ex" >> ${_MK} > echo "trap 'umount /dev || true' 0" >> ${_MK} > @@ -823,7 +824,9 @@ > done > .endif > -test -f ${.CURDIR}/install.cfg \ > - && cp ${.CURDIR}/install.cfg ${RD}/mfsfd > + && cp ${.CURDIR}/install.cfg ${RD}/mfsfd/stand > + -test -f ${.CURDIR}/doconfig.sh \ > + && cp ${.CURDIR}/doconfig.sh ${RD}/mfsfd/stand > @mkdir -p ${RD}/mfsfd/boot > .if ${TARGET_ARCH} !=3D "ia64" && ${TARGET_ARCH} !=3D "powerpc" > @cp ${RD}/trees/base/boot/boot* ${RD}/mfsfd/boot >=20 >=20 > --=20 > Take care > Rick Miller > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg" _____________ The information contained in this message is proprietary and/or confidentia= l. If you are not the intended recipient, please: (i) delete the message an= d all copies; (ii) do not disclose, distribute or use the message in any ma= nner; and (iii) notify the sender immediately. In addition, please be aware= that any message addressed to our domain is subject to archiving and revie= w by persons other than the intended recipient. Thank you.