From owner-freebsd-questions@FreeBSD.ORG Sun May 9 01:41:10 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 15CED16A4CE for ; Sun, 9 May 2004 01:41:10 -0700 (PDT) Received: from mtaw4.prodigy.net (mtaw4.prodigy.net [64.164.98.52]) by mx1.FreeBSD.org (Postfix) with ESMTP id D10EE43D4C for ; Sun, 9 May 2004 01:41:09 -0700 (PDT) (envelope-from kris@obsecurity.org) Received: from obsecurity.dyndns.org (892ef0c0434bd405ebcb4ad070abc9be@adsl-67-115-73-128.dsl.lsan03.pacbell.net [67.115.73.128]) by mtaw4.prodigy.net (8.12.10/8.12.10) with ESMTP id i498f36g016057; Sun, 9 May 2004 01:41:04 -0700 (PDT) Received: by obsecurity.dyndns.org (Postfix, from userid 1000) id E6DA2523EC; Sun, 9 May 2004 01:41:03 -0700 (PDT) Date: Sun, 9 May 2004 01:41:03 -0700 From: Kris Kennaway To: Ruben de Groot Message-ID: <20040509084103.GA1870@xor.obsecurity.org> References: <409DAA0B.30107@crossthread.com> <20040509081750.GA62178@ei.bzerk.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="9amGYk9869ThD9tj" Content-Disposition: inline In-Reply-To: <20040509081750.GA62178@ei.bzerk.org> User-Agent: Mutt/1.4.2.1i cc: questions@freebsd.org cc: Tim Pushor Subject: Re: Scripted fdisk/slice/fs generation? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 May 2004 08:41:10 -0000 --9amGYk9869ThD9tj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sun, May 09, 2004 at 10:17:50AM +0200, Ruben de Groot wrote: > On Sat, May 08, 2004 at 09:48:27PM -0600, Tim Pushor typed: > > Hi all, > >=20 > > I do CPIO style image backups of my FreeBSD systems. In the event that = I=20 > > need to restore one of these backups, I usually use the FreeBSD=20 > > installation media to fdisk and create filesystems, then mount the new= =20 > > filesystems and restore the CPIO archive. > >=20 > > This system works great for me, but I would like to automate the=20 > > restoration process. I have worked a little with fdisk and disklabel=20 > > back in FreeBSD 2.x days (and trying early versions of OpenBSD) but=20 > > wouldn't really know where to start automating that process. ( I do=20 > > write code, but the thought of trying to use disklabel to read the=20 > > geometry of the disks, calculate sizes, cylinder boundaries, etc give m= e=20 > > a headache ) > >=20 > > I would really like to specify minimum sizes of partitions and=20 > > filesystems, with one having all the excess (rather than having to coun= t=20 > > cylinders). > >=20 > > I've done some searching on Google and havn't really come up with=20 > > anything conclusive. > >=20 > > Can anyone point me in the right direction? >=20 > Sounds like you want to use sysinstall in batch mode. The manpage > sysinstall(8) gives a detailed explanation on how to do this. See also the diskprep port that was committed a few days ago. Kris --9amGYk9869ThD9tj Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAne6fWry0BWjoQKURAtG9AKDhd0NwRRqetmO/tO4BywudeXZzMQCguIhP Ww1Y5caZYtynrxtFMdSFhMA= =3J8u -----END PGP SIGNATURE----- --9amGYk9869ThD9tj--