From owner-freebsd-questions@FreeBSD.ORG Wed Sep 12 20:34:25 2007 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 E334C16A417 for ; Wed, 12 Sep 2007 20:34:25 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from snoogles.rachie.is-a-geek.net (66-230-99-27-cdsl-rb1.nwc.acsalaska.net [66.230.99.27]) by mx1.freebsd.org (Postfix) with ESMTP id A4AD713C474 for ; Wed, 12 Sep 2007 20:34:25 +0000 (UTC) (envelope-from fbsd.questions@rachie.is-a-geek.net) Received: from localhost (localhost [127.0.0.1]) by snoogles.rachie.is-a-geek.net (Postfix) with ESMTP id 6B4111CCDD for ; Wed, 12 Sep 2007 12:34:24 -0800 (AKDT) From: Mel To: freebsd-questions@freebsd.org Date: Wed, 12 Sep 2007 22:34:22 +0200 User-Agent: KMail/1.9.7 References: <539c60b90709121247y51113fb2obdfe25ba23c06ab6@mail.gmail.com> In-Reply-To: <539c60b90709121247y51113fb2obdfe25ba23c06ab6@mail.gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Content-Disposition: inline Message-Id: <200709122234.23066.fbsd.questions@rachie.is-a-geek.net> Subject: Re: fastest way to ghost/image multiple machines? 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: Wed, 12 Sep 2007 20:34:26 -0000 On Wednesday 12 September 2007 21:47:23 Steve Franks wrote: > I'm interested in how to specify a release and a bunch of packages, > and squirt it to multiple machines. Or perhaps I'd like to spec the > current binary contents of my machine (sans config files) so I could > rebuild it from scratch later, without backups, or perhaps install > another machine with my current set of packages, but 7.x instead of > 6.2, etc. Permutations on this theme seem endless, and don't appear > to be focused on in the handbook. > > Also interested in installing to a spare disk in my system, then > putting said disk in another system. I always get errors after > label'ing when I try it, presumably because I already have a > filesystem mounted as root, and it trys to mount the new one as root > to copy onto... Sysinstall isn't smart enough. Use the source, Luke: - /usr/src/UPDATING and search for cross-install (Hint: DESTDIR is your friend) - /usr/obj|src can be nfs-mounted and installed from, here's a good tutorial you can expand on: http://www.freebsddiary.org/makeworld-2boxes.php Some gotchas/pointers: - /sparedisk/etc/master.passwd will have stock user accounts - sshd_enable=YES will not be in /sparedisk/etc/rc.conf (important when doing this remotely :) ) - /sparedisk/etc/rc.conf will not contain your network config. - /sparedisk/boot/loader.conf does not exist, so you might be missing some drivers/features your new machine relies on. - You can use sysinstall to partition the sparedisk, works like a charm even on running system, but....: - Use [W]rite before [Q]uit - Make sure there's an 'a' partition for what will be root ('/'), else the bootloader will give a cryptic error on the new system. This is best done by giving a mount point '/' initially, then going over and changing it's name. - Do not use mount points as they 'should' be, instead use a prefix, like: mkdir /mnt/usr /mnt/var /mnt/home then use /mnt as what should be '/', '/mnt/usr' what should be '/usr' etc. Sysinstall will also succeed in mounting then and you can go right ahead and make install DESTDIR=/mnt . -- Mel who did the cross-install current not too long ago