From owner-freebsd-stable@FreeBSD.ORG Thu May 10 00:16:34 2007 Return-Path: X-Original-To: freebsd-stable@freebsd.org Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2FC7C16A400 for ; Thu, 10 May 2007 00:16:34 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (apollo.backplane.com [216.240.41.2]) by mx1.freebsd.org (Postfix) with ESMTP id 02DB513C43E for ; Thu, 10 May 2007 00:16:33 +0000 (UTC) (envelope-from dillon@apollo.backplane.com) Received: from apollo.backplane.com (localhost [127.0.0.1]) by apollo.backplane.com (8.13.8/8.13.7) with ESMTP id l4A0GX1t048039 for ; Wed, 9 May 2007 17:16:33 -0700 (PDT) Received: (from dillon@localhost) by apollo.backplane.com (8.13.8/8.13.4/Submit) id l4A0GXnY048038; Wed, 9 May 2007 17:16:33 -0700 (PDT) Date: Wed, 9 May 2007 17:16:33 -0700 (PDT) From: Matthew Dillon Message-Id: <200705100016.l4A0GXnY048038@apollo.backplane.com> To: References: <001601c79287$58721420$0502a8c0@IBMA618C20271E> Subject: RE: Creating one's own installer/mfsroot X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 May 2007 00:16:34 -0000 :> You could also look at the INSTALL guides for (early versions of?) :> Dragonfly, it taught me how to install a BSD system from :> scratch, using :> only what's in base of liveCD :) :... : :We have set up a boot CD (or pxeboot/nfs environment) where we can run a :Ruby script that will take directives from a configuration file, configure :the disks, slices and partitions, align the partitions to start on a block :... I came up with a neat little script-driven remote configurator called rconfig (/usr/src/sbin/rconfig in the DragonFly codebase) as an alternative to the standard features in our installer. I recommend checking it out. http://www.dragonflybsd.org/cvsweb/src/sbin/rconfig/ rconfig is really easy to use. Basically its just a client/server pair with socket broadcast capabilities. All it does is negotiate a shell script download from the server to the client (server on the same subnet), then runs the script on the client. That's it. I wanted to be able to boot a CD, login as root, dhclient the network up, and then just go 'rconfig -a' and have my script do the rest. It takes a bit of time to write the shell script to do a full install from fdisk to completion, but if you have a fully working CD based environment (all the binaries in /, /usr, a writable /tmp, /etc, and so forth)... then shell scripts are just as easy to write as they are on fully installed machines. I use rconfig to do fresh installs of my test boxes from CD, with all the customization, my ssh keys, fstab entries, NFS mounts, etc that I need to be able to ssh into the box and start using it immediately. NFS booting is 'ok', but requires a lot of infrastructure and gets out of date easily. Often you also have to mess with the BIOS settings, which is very annoying because you have to change them back after you finish the install. I used NFS booting for a while, but just couldn't depend on it always being operational. With rconfig I just leave the rconfig server running on one of my boxes and the worst I have to do is tweak my script a bit. And adding smarts to the script is easy whereas you just can't add much smarts to a NFS boot without a lot of messing around with the RC sequence. In anycase, check it out. My assumption is that rconfig would compile nearly without modification on a FreeBSD box. -Matt Matthew Dillon