From owner-freebsd-questions@FreeBSD.ORG Sat Feb 4 16:17:02 2012 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3AB821065670 for ; Sat, 4 Feb 2012 16:17:02 +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 EDDB78FC14 for ; Sat, 4 Feb 2012 16:17:01 +0000 (UTC) Received: from pps.filterd (ltcfislmsgpa06 [127.0.0.1]) by ltcfislmsgpa06.fnfis.com (8.14.4/8.14.4) with SMTP id q14FQDB2010307; Sat, 4 Feb 2012 10:17:00 -0600 Received: from smtp.fisglobal.com ([10.132.206.16]) by ltcfislmsgpa06.fnfis.com with ESMTP id 12s6eg8831-1 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=NOT); Sat, 04 Feb 2012 10:17:00 -0600 Received: from [10.0.0.102] (10.14.152.28) by smtp.fisglobal.com (10.132.206.16) with Microsoft SMTP Server (TLS) id 14.1.323.3; Sat, 4 Feb 2012 10:16:59 -0600 MIME-Version: 1.0 (Apple Message framework v1084) From: Devin Teske In-Reply-To: Date: Sat, 4 Feb 2012 08:16:56 -0800 Message-ID: <85DC764B-7A66-4730-97A9-4809DCF93744@fisglobal.com> References: To: Amitabh Kant X-Mailer: Apple Mail (2.1084) X-Originating-IP: [10.14.152.28] X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:5.6.7361, 1.0.260, 0.0.0000 definitions=2012-02-04_05:2012-02-03, 2012-02-04, 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.5 Cc: freebsd-questions@freebsd.org Subject: Re: FreeBSD custom CD and extra files to be included in the iso 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: Sat, 04 Feb 2012 16:17:02 -0000 On Feb 4, 2012, at 1:37 AM, Amitabh Kant wrote: > On Sat, Feb 4, 2012 at 2:50 PM, Amitabh Kant wrot= e: >=20 >> I have been able to use the "make release" command to create a custom iso >> for FreeBSD which includes some changes to the various bsdinstall script= s. >> It all works well as the iso / memory stick images / ftp files are >> generated and usable. >>=20 >> What I would now like to do is try adding couple of files, scripts and/or >> packages, to this custom iso. I am a little confused on where the files >> should be placed so that it is placed in either root's home directory af= ter >> installation? >>=20 >> Amitabh >>=20 >=20 > Sorry for not making it clear in my last mail, I am using FreeBSD 9.0 > RELEASE on amd64 arch. >=20 If you use the DRUID (http://druidbsd.sf.net/), this is extremely easy. Step-by-step instructions... NOTE: Feel free to use ANY operating system you like, so long as it has (1)= /bin/sh (2) cvs (3) mkisofs (4) GNU make. Including (but not limited to) M= ac OS X (with developer tools installed), Cygwin, Linux, and of course, Fre= eBSD. 1. mkdir druidbsd.sf.net 2. cd druidbsd.sf.net 3. cvs -d:pserver:anonymous@druidbsd.cvs.sourceforge.net:/cvsroot/druidbsd = login NOTE: Press "ENTER" when prompted for "CVS password:" NOTE: Ignore warning about "failed to open ~/.cvspass" 4. cvs -z3 -d:pserver:anonymous@druidbsd.cvs.sourceforge.net:/cvsroot/druid= bsd co -P druidbsd/druid NOTE: The screen will stream information for about 5-10 minutes as it downl= oads 510MB of source code to the FreeBSD DRUID installer -- a sysinstall(8)= based custom FreeBSD 9.0 installer capable of installing *either* i386 or = amd64 from the same disc (among many many other things). 5. cd druidbsd/druid NOTE: The DRUID has a special directory in-which anything placed there gets= copied to the target installation disk automatically after installation of= the Operating System completes (but before any post-installation scripts a= re run). This directory is called "sys_custom" and it lives within the RELE= ASE directory. Within sys_custom, files are copied exactly as-is, so since = you mentioned that you wanted to copy files to "/root", let's operate under= that assumption below. 6. mkdir -p src/freebsd/repos/9.0-RELEASE-amd64/sys_custom/root 7. cp myfiles src/freebsd/repos/9.0-RELEASE-amd64/sys_custom/root/ NOTE: If you want the same files available for the installation of the i386= release of 9.0-RELEASE, you should repeat the above steps 6-7 with the des= tination directory "src/freebsd/repos/9.0-RELEASE/sys_custom/root" (remembe= r, the DRUID is a unified installer that supports both the installation of = i386 and amd64 from the same disc). 8. ./configure 9. make freebsd NOTE: Replace "make" with "gmake" if on FreeBSD NOTE: If you're using FreeBSD, you may have to first say "pkg_add -r gmake"= followed by "rehash" (if using csh or tcsh as your shell). NOTE: Also, if you need to get "mkisofs", it's "pkg_add -r cdrtools" (and a= gain, "rehash" if using csh or tcsh as your shell). 10. You now have a custom "FreeBSD_Druid-9.0b56.iso" that will install your= custom files automatically to /root when either i386 or amd64 is installed. ASIDE: sys_custom is like a "dumping ground" for anything and everything yo= u simply want to be copied to-disk post-installation of the OS. If instead = you want to write scripts to be run as part of the post-installation proces= s, see instead "dep/freebsd/run_once/template.sh" and "src/freebsd/repos/9.= 0-RELEASE/run_once/*.sh" and "src/freebsd/repos/9.0-RELEASE-amd64/run_once/= *.sh". The "run_once" directory unlike "sys_custom" is a "dumping ground" f= or post-installation scripts (any script ending in ".sh" in that directory = will automatically be executed as part of the post-installation procedure a= fter installing the OS. ASIDE: As you can tell, the DRUID is a FreeBSD installer that was designed = to be *easily* extended by anybody/everybody on any OS they like (any OS th= at can produce or edit an ISO that is). --=20 Devin _____________ 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.