From owner-freebsd-questions@FreeBSD.ORG Wed Sep 4 12:40:41 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id A4BB346E for ; Wed, 4 Sep 2013 12:40:41 +0000 (UTC) (envelope-from paul-freebsd@fletchermoorland.co.uk) Received: from hydra.fletchermoorland.co.uk (78-33-207-170.static.enta.net [78.33.207.170]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 1D1862FC6 for ; Wed, 4 Sep 2013 12:40:40 +0000 (UTC) Received: from demophon.fletchermoorland.co.uk ([192.168.0.112]) by hydra.fletchermoorland.co.uk (8.14.3/8.14.3) with ESMTP id r84CHZ59050340; Wed, 4 Sep 2013 13:17:35 +0100 (BST) (envelope-from paul-freebsd@fletchermoorland.co.uk) Message-ID: <522724DF.1020702@fletchermoorland.co.uk> Date: Wed, 04 Sep 2013 13:17:35 +0100 From: Paul Wootton User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:12.0) Gecko/20120530 Thunderbird/12.0.1 MIME-Version: 1.0 To: Sergey Subject: Re: Custom release ISO questions. References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.9 required=7.0 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on hydra.fletchermoorland.co.uk Cc: freebsd-questions@freebsd.org X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 04 Sep 2013 12:40:41 -0000 On 09/04/13 10:27, Sergey wrote: > Hi all! > > Is there a way to create custom ISO without buildworld? > I just want to edit some configs and bsdinstall scripts for silent > automated install - why need to recompile whole world? > It will be great if you'll share some useful links about this process. > > Thanks. Hi, To create a custom ISO, download the ISO you want to use as your base, use tar to extract the ISO into a new directory, make the changes you want and then run "mkisofs -V FreeBSD9 -J -R -b boot/cdboot -no-emul-boot -o ../freebsd_custom.iso ." from the new directory. That will create a bootable CD. What I did when making a custom install CD for my server (it's 1000s of miles away in a datacenter) was a slightly different approach. I created a sparse file (sparse to save on disk space) the exact size of my server harddrive on my running BSD box, used mdconfig to give me a md device and pointed VirtualBox at it. Within a VBox session, I did a normal install (manually created the ZFS filing systems), made all the config changes I wanted, installed the apps I wanted then shut the VBox session down. I DD-ed in the md device and piped it to bzip2, creating a bz2 file. Added the bz2 file to the custom BSD install ISO and modified /etc/rc.local file to un-bzip the bz2 file, pipe it to mbuffer (so the opperator could see something was happening) and write the output to the harddrive, popping the reset line when complete. When the server restarted, it was configured with all the right user accounts, ip addresses, nameserver settings etc. Just my 2 pence worth... Paul