From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 18:52:59 2010 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 876951065692; Fri, 5 Mar 2010 18:52:59 +0000 (UTC) (envelope-from jpaetzel@freebsd.org) Received: from mail.iXsystems.com (newknight.ixsystems.com [206.40.55.70]) by mx1.freebsd.org (Postfix) with ESMTP id 623EA8FC1B; Fri, 5 Mar 2010 18:52:59 +0000 (UTC) Received: from mail.ixsystems.com (localhost [127.0.0.1]) by mail.iXsystems.com (Postfix) with ESMTP id 13B0AA664EA; Fri, 5 Mar 2010 10:35:39 -0800 (PST) Received: from mail.iXsystems.com ([127.0.0.1]) by mail.ixsystems.com (mail.ixsystems.com [127.0.0.1]) (amavisd-maia, port 10024) with ESMTP id 87960-07; Fri, 5 Mar 2010 10:35:38 -0800 (PST) Received: from ix.tcbug.org (unknown [10.10.1.127]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.iXsystems.com (Postfix) with ESMTPSA id 7F828A664B5; Fri, 5 Mar 2010 10:35:38 -0800 (PST) From: Josh Paetzel Organization: FreeBSD To: freebsd-hackers@freebsd.org Date: Fri, 5 Mar 2010 12:33:37 -0600 User-Agent: KMail/1.13.1 (FreeBSD/9.0-CURRENT; KDE/4.4.1; amd64; ; ) References: <20100304213329.GJ57205@bunrab.catwhisker.org> <201003050801.00440.jhb@freebsd.org> In-Reply-To: <201003050801.00440.jhb@freebsd.org> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1481085.XorV0iKE7L"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <201003051233.42861.jpaetzel@freebsd.org> X-Virus-Scanned: Maia Mailguard 1.0.2a Cc: randi@freebsd.org, David Wolfskill Subject: Re: Scripting sysinstall(8) to create & use multiple slices on a disk? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 05 Mar 2010 18:52:59 -0000 --nextPart1481085.XorV0iKE7L Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable On Friday 05 March 2010 07:01:00 John Baldwin wrote: > On Thursday 04 March 2010 4:33:29 pm David Wolfskill wrote: > > For reasons that may well be idiosyncratic, I like to set up FreeBSD > > machines to have at least 2 bootable slices -- e.g., one can act as a > > fallback if an attempted software upgrade proves to have been ill-timed. > >=20 > > In the past, I've done this manually; while a bit tedious & fairly > > "target-rich" with opportunities for human error, it's something that is > > typically done infrequently (i.e., once) in the life of a machine (or at > > least its boot drive). > >=20 > > At work, the IT folks use a scripted sysinstall(8) to set machines up; > > to increase the probability that I'll be able to get 3 "special" > > machines set up the way I want, I'm trying to set up a sysinstall config > > file to make this as painless as possible. > >=20 > > I managed to get a copy of the config script IT uses, so I had a > > starting-point ... but they were setting the machines up with > >=20 > > partition=3Dexclusive > >=20 > > which doesn't seem like a good choice for what I'm doing. :-} > >=20 > >=20 > > After my first attempt failed, I poked around on the Net & found > > > le- >=20 > slices-4387807/>, >=20 > > (dated 18-11-08, 10:40 PM ), in which Peter Steele describes something > >=20 > > similar to what I was about to try next, and writes: > > | My intent here is to create three slices-one 6GB in size, another 1GB > > | in size, and the third sized to consume the remaining free space. When > > | I run this through sysinstall, it complains that it can't find the > > | space for the partitions. It even complains that it can't find any > > | free space. Because the slices don't get created, the subsequent label > > | assignments fail as well. What is the proper commands for creating > > | multiple slices in install.cfg? > >=20 > > In a foillowup, he writes: > > | After a lot of experimenting, my impression is that sysinstall simply > > | doesn't support multiple slice installations. It works to a point, but > > | I get some unexpected errors, e.g. > > |=20 > > | Unable to make device node for /dev/ad0s1a in /dev > >=20 > > which doesn't seem very encouraging. > >=20 > >=20 > > Would someone please either confirm the limitation or provide a > > suitable excerpt from a sysinstall config script to demonstrate > > that it is actually possible? (Or show me where it's spelled out in the > > man page....) > >=20 > > (I'm using 7.x sysinstall, if that matters.) >=20 > If you are doing a fully scripted install you may be better off just using > a dedicated shell script to format your disks and mount them and then use > the various *-install.sh scripts from the release distributions to install > the code. You could still do this via sysinstall by sticking your shell > script in /stand in the MFS root and having your sysinstall script just > run that script. You might want to build a custom mfsroot to add some more > useful tools though. >=20 > I really think sysinstall needs to support a disk "backdoor" whereby the > user can either manually partition disks and then mount them at /mnt (or > have a script do it), and tell sysinstall to just skip the disk stuff and > assume /mnt is mounted. David, I second the ditching sysinstall for a shell script idea. A shell script t= hat=20 replaces sysinstall is nearly as short as the install.cfg and a lot easier = to=20 figure out. I've written a half dozen auto installers for FreeBSD, from=20 trivial to complex and would be more than willing to help you get something= =20 set up. I can send you code if you want as well. =2D-=20 Thanks, Josh Paetzel =46reeBSD -- The power to serve --nextPart1481085.XorV0iKE7L Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iQEcBAABAgAGBQJLkU6GAAoJEKFq1/n1feG2Qo0H+wauZ9YQ5uGKBQuqSMAyGhvl dG1DzY4QUWLcYhA1Z/YQx8XhdzJ59LgqSeB9YEaszYhP+Eua4nzmbVeGdeNyqGZw Hndu49VuXVnYid/dzxn1K5Q3H5RVJqrrpztEtOgFKG/5ONRUKjJVRVkuaxwm2trD nyHTgIeAJjF9X5wTku9HqpVQcNv05jFGXb8Gf4HAfd/4Pd/v1OEE/VuOL6veUYrd D6/YW4i5ksl1+u1iXrI1CGGLh80cQeNVekuJio9mLCWpG/3fBiT9ez51ezgnzXKw htO9bna9Dx8xUg8R1XPu/5/WHggrzXZLY4bRrzrevI97/Txu4nXJxoJS0ESnkHU= =hY+3 -----END PGP SIGNATURE----- --nextPart1481085.XorV0iKE7L--