Date: Tue, 11 Dec 2012 13:22:18 -0800 From: Devin Teske <devin.teske@fisglobal.com> To: Rick Miller <vmiller@hostileadmin.com> Cc: FreeBSD Questions <freebsd-questions@freebsd.org> Subject: Re: make release and mfsroot Message-ID: <04ABE8E0-8D63-4C68-92C4-69B516818160@fisglobal.com> In-Reply-To: <CAHzLAVHBfoodHoe72f9Ls_Wq1hnG8y-98DX7LkkZbs=79SjOdw@mail.gmail.com> References: <CAHzLAVHBfoodHoe72f9Ls_Wq1hnG8y-98DX7LkkZbs=79SjOdw@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?04ABE8E0-8D63-4C68-92C4-69B516818160>