From owner-freebsd-questions@FreeBSD.ORG Wed Sep 4 13:21:16 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 A48AA796 for ; Wed, 4 Sep 2013 13:21:16 +0000 (UTC) (envelope-from power.real@gmail.com) Received: from mail-ob0-x22e.google.com (mail-ob0-x22e.google.com [IPv6:2607:f8b0:4003:c01::22e]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 7088D235D for ; Wed, 4 Sep 2013 13:21:16 +0000 (UTC) Received: by mail-ob0-f174.google.com with SMTP id wd6so309349obb.33 for ; Wed, 04 Sep 2013 06:21:15 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=Ef0hYCdvDLs77ELvt4eAUcinbQVNBto+1q6YlAxy1HA=; b=cBjjYC7RTGfItVlQDJ3ZkuhawY8M4juLB3m2jOIFagBC96qan1qEunAWTIxPYzEV52 wDanq2fKV9APMwWJ8xJaBhhuMKxZooROfeW/7KbjJy43R5tHCyJFhsVNv7ZcTYkdx1yv F9+WpOOcwrrIBPNI2HljsicFc22feEFp4gjtXdu1UDitDfOiVNNhmbfrKyK64yz9kYrI g8SE8hJOcW8jTQ5QaB+f3TLylE3sgWUNUywlVvxT/PdHC5+JjquXkj3f5kLEzmm0smlE ry+SOvQ0pruyE+O0oupId8qnJjh9AhGyOzwq+Pf8wxb1BBAYow/Z/bCqAmTMoevYbkAx wRZg== MIME-Version: 1.0 X-Received: by 10.182.165.5 with SMTP id yu5mr2056099obb.93.1378300875668; Wed, 04 Sep 2013 06:21:15 -0700 (PDT) Received: by 10.182.87.97 with HTTP; Wed, 4 Sep 2013 06:21:15 -0700 (PDT) In-Reply-To: <522724DF.1020702@fletchermoorland.co.uk> References: <522724DF.1020702@fletchermoorland.co.uk> Date: Wed, 4 Sep 2013 17:21:15 +0400 Message-ID: Subject: Re: Custom release ISO questions. From: Sergey To: Paul Wootton Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 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 13:21:16 -0000 Thank you Paul! > mkisofs ... It is interesting, does the Linux version of mkisofs fit? > slightly different approach. Very nice! Thanks again. On Wed, Sep 4, 2013 at 4:17 PM, Paul Wootton < paul-freebsd@fletchermoorland.co.uk> wrote: > 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 >