From owner-freebsd-questions@FreeBSD.ORG Wed Apr 22 05:47:51 2009 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 963F11065678 for ; Wed, 22 Apr 2009 05:47:51 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from mx01.qsc.de (mx01.qsc.de [213.148.129.14]) by mx1.freebsd.org (Postfix) with ESMTP id 23E8E8FC1B for ; Wed, 22 Apr 2009 05:47:50 +0000 (UTC) (envelope-from freebsd@edvax.de) Received: from r55.edvax.de (port-92-196-27-202.dynamic.qsc.de [92.196.27.202]) by mx01.qsc.de (Postfix) with ESMTP id 466F23CDB8; Wed, 22 Apr 2009 07:47:49 +0200 (CEST) Received: from r55.edvax.de (localhost [127.0.0.1]) by r55.edvax.de (8.14.2/8.14.2) with SMTP id n3M5lht4001429; Wed, 22 Apr 2009 07:47:44 +0200 (CEST) (envelope-from freebsd@edvax.de) Date: Wed, 22 Apr 2009 07:47:43 +0200 From: Polytropon To: Jerry McAllister Message-Id: <20090422074743.6914db5b.freebsd@edvax.de> In-Reply-To: <20090421224711.GA1729@gizmo.acns.msu.edu> References: <20090421235132.e08c3ff0.freebsd@edvax.de> <20090421224711.GA1729@gizmo.acns.msu.edu> Organization: EDVAX X-Mailer: Sylpheed 2.4.7 (GTK+ 2.12.1; i386-portbld-freebsd7.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: complists@risei.net, freebsd-questions@freebsd.org, Scott Seekamp Subject: Re: Customized Remote Install X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: Polytropon List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 22 Apr 2009 05:47:52 -0000 On Tue, 21 Apr 2009 18:47:11 -0400, Jerry McAllister wrote: > On Tue, Apr 21, 2009 at 11:51:32PM +0200, Polytropon wrote: > > > On Tue, 21 Apr 2009 14:42:32 -0600, Scott Seekamp wrote: > > > My hope was that I could make an automated install CD/DVD that > > > configured all the options I want AND change some base config files so > > > I can actually get to the box (or install an SSH key). > > > [...] > > > I'm open to other options if someone has gone down this road before! > > > > I'd like to advertize a method that I think is very comfortable > > in such a setting. It's worth mentioning that this method > > usually requires (a) modern enough PCs or (b) you to know what > > is the hardware profile of the PC. > > > > The method works as follows: > > > > First create a FreeBSD as you want it to be on the clients. > > Install and configure everything as you intend. > > > > Then dump the created partitions onto a CD or DVD and create > > a simple script that: > > 1. initializes the client's hard disk > > 2. slices the disk and newfses the partitions > > 3. dumps the partition images onto the disks > > 4. reboots the machine into operating state. > > > > After this, you should be able to SSH into the client and > > change settings that need to be changed. > > This works very well. I just realize that I missed something: Better than dd, I think dump & restore are the preferred tools to create the partition images. When you're done on your "template system", umount its partitions (in SUM) and use dump to dump them into files. These files go to the installation DVD and are later on restored onto the (empty) partitions using the restore command. This will preserve any permissions and other file properties. > I have done essentially the same many times. > The one thing missing is that you need to have something to set the > network information -- hostname, IP address, gateway, netmask > and name-server. These will be different for each machine. > So, your script will have to accomodate this - read console > input for these items and plug them in to the proper places > before rebooting. That's correct. I always used a kind of "CHANGE THIS!" items to do so, or, if none are given, they are automatically created so the system boots up and runs, but then again, require service afterwards. This can be made work this way: When the "incomplete" system is up and running, it mails the distant administrator (or contacts him in another way) requiring him to finish the settings. But I think it's the best solution to propmt for these specific settings at "installation time" (read, when the restore job is done, the partitions can be mounted -o rw and the files neccessary to be changed can be created or modified). The "installation" will then continue and finish. Of course, the dump & restore method lacks a lot of bling, blitzen, eye candy, bells and whistles, but it honours the abstinence to such stuff with speed and easyness of use. But it's still neccessary to read (and understand) and press a few keys on the keyboard. :-) -- Polytropon >From Magdeburg, Germany Happy FreeBSD user since 4.0 Andra moi ennepe, Mousa, ...