From owner-freebsd-hackers@FreeBSD.ORG Fri Mar 5 13:43:48 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 4F253106564A; Fri, 5 Mar 2010 13:43:48 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 0BD288FC17; Fri, 5 Mar 2010 13:43:48 +0000 (UTC) Received: from bigwig.baldwin.cx (66.111.2.69.static.nyinternet.net [66.111.2.69]) by cyrus.watson.org (Postfix) with ESMTPSA id 965D146B38; Fri, 5 Mar 2010 08:43:47 -0500 (EST) Received: from jhbbsd.localnet (smtp.hudson-trading.com [209.249.190.9]) by bigwig.baldwin.cx (Postfix) with ESMTPA id 9D2268A01F; Fri, 5 Mar 2010 08:43:44 -0500 (EST) From: John Baldwin To: freebsd-hackers@freebsd.org, randi@freebsd.org Date: Fri, 5 Mar 2010 08:01:00 -0500 User-Agent: KMail/1.12.1 (FreeBSD/7.3-CBSD-20100217; KDE/4.3.1; amd64; ; ) References: <20100304213329.GJ57205@bunrab.catwhisker.org> In-Reply-To: <20100304213329.GJ57205@bunrab.catwhisker.org> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-15" Content-Transfer-Encoding: 7bit Message-Id: <201003050801.00440.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (bigwig.baldwin.cx); Fri, 05 Mar 2010 08:43:44 -0500 (EST) X-Virus-Scanned: clamav-milter 0.95.1 at bigwig.baldwin.cx X-Virus-Status: Clean X-Spam-Status: No, score=-1.5 required=4.2 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on bigwig.baldwin.cx Cc: 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 13:43:48 -0000 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. > > 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). > > 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. > > 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 > > partition=exclusive > > which doesn't seem like a good choice for what I'm doing. :-} > > > After my first attempt failed, I poked around on the Net & found > , > (dated 18-11-08, 10:40 PM ), in which Peter Steele describes something > 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? > > 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. > | > | Unable to make device node for /dev/ad0s1a in /dev > > which doesn't seem very encouraging. > > > 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....) > > (I'm using 7.x sysinstall, if that matters.) 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. 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. -- John Baldwin