From owner-freebsd-questions@FreeBSD.ORG Sun Feb 5 12:23:44 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 9CB90106566C for ; Sun, 5 Feb 2012 12:23:44 +0000 (UTC) (envelope-from amitabhkant@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 5873E8FC0A for ; Sun, 5 Feb 2012 12:23:42 +0000 (UTC) Received: by vbbfa15 with SMTP id fa15so5302733vbb.13 for ; Sun, 05 Feb 2012 04:23:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; bh=l5XT/yX0e004QkzLmxVZSwQ4UuoYH7lMEYH9itFrzcQ=; b=ryZBGF1emugl9GzmpdRnm0cgxPMa2yLQQ3hn7McqCEX5okGtCDqQbCHObsOdrReFc9 UAbDNcHGOSxtsr4twymYogBUSYEZ4W5T9WVOrneDhqJjIlkNTfuxgrmnxnstcxvlRnW2 Hx46CkQRum2SPrtrIqt3W+BVUI4VKlmX2GHP0= Received: by 10.52.27.70 with SMTP id r6mr6337695vdg.41.1328444620163; Sun, 05 Feb 2012 04:23:40 -0800 (PST) MIME-Version: 1.0 Received: by 10.52.76.8 with HTTP; Sun, 5 Feb 2012 04:23:20 -0800 (PST) In-Reply-To: <85DC764B-7A66-4730-97A9-4809DCF93744@fisglobal.com> References: <85DC764B-7A66-4730-97A9-4809DCF93744@fisglobal.com> From: Amitabh Kant Date: Sun, 5 Feb 2012 17:53:20 +0530 Message-ID: To: Devin Teske Content-Type: text/plain; charset=ISO-8859-1 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: Sun, 05 Feb 2012 12:23:44 -0000 On Sat, Feb 4, 2012 at 9:46 PM, Devin Teske wrote: > > On Feb 4, 2012, at 1:37 AM, Amitabh Kant wrote: > > On Sat, Feb 4, 2012 at 2:50 PM, Amitabh Kant > wrote: > > 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 scripts. > > It all works well as the iso / memory stick images / ftp files are > > generated and usable. > > > 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 after > > installation? > > > Amitabh > > > > Sorry for not making it clear in my last mail, I am using FreeBSD 9.0 > RELEASE on amd64 arch. > > > 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) Mac OS X (with developer tools installed), Cygwin, Linux, and of > course, FreeBSD. > > 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/druidbsd > co -P druidbsd/druid > > NOTE: The screen will stream information for about 5-10 minutes as it > downloads 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 are run). This directory is called "sys_custom" > and it lives within the RELEASE 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 > destination directory "src/freebsd/repos/9.0-RELEASE/sys_custom/root" > (remember, 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 > again, "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 > you 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 process, 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" for post-installation > scripts (any script ending in ".sh" in that directory will automatically be > executed as part of the post-installation procedure after 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 > that can produce or edit an ISO that is). > -- > Devin > _____________ > The information contained in this message is proprietary and/or > confidential. If you are not the intended recipient, please: (i) delete the > message and all copies; (ii) do not disclose, distribute or use the message > in any manner; and (iii) notify the sender immediately. In addition, please > be aware that any message addressed to our domain is subject to archiving > and review by persons other than the intended recipient. Thank you. > Thanks Devin. Would take a look at DRUID. Amitabh