From owner-freebsd-questions@FreeBSD.ORG Sun Dec 8 19:11:48 2013 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 09614492 for ; Sun, 8 Dec 2013 19:11:48 +0000 (UTC) Received: from mail-oa0-f44.google.com (mail-oa0-f44.google.com [209.85.219.44]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id C45AD180A for ; Sun, 8 Dec 2013 19:11:47 +0000 (UTC) Received: by mail-oa0-f44.google.com with SMTP id m1so2952940oag.17 for ; Sun, 08 Dec 2013 11:11:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=0UP9xsPncLmhck/XnQMM6mKYUT+NaxmZIuBbO5x0NcU=; b=AZ57y0aqa0EitKhwqwZQ+ZsI03s14zQYCHF1BA3KP0hPbUHk3eSZxKZqHzYd3urc3f dBrQGJtBqe6PPcIOLpBhd3D/6lvcIQWXuuIlpKtVhmKrgaAgcXSSoh38tQ6spqRebF9i NkbjOw6jovtmy/p9CF8HtlZEKYCfFafMk3au5n0pSXarexHmAummcqrjgqMlr4u99crE HbPi+j/NaAivDvcBOd/3iuaQ3jVCtUryTIHrHUSqI3yKfjjHwxElXTv1ES9OnacwfrXB hJ+dWYXzdXudHfbTBeDH4nICNgOAFoxhvs6WD69DQKqseogMjYybVOOZU7POs9EX44Ng lqlQ== X-Gm-Message-State: ALoCoQmoFsUYezM7ALAcDkCsNVqubUWoeklhlj9OXfS7B/CQD7gw0EzAxdNsWXWX2+7CBILA3keN MIME-Version: 1.0 X-Received: by 10.60.117.198 with SMTP id kg6mr53071oeb.80.1386528420143; Sun, 08 Dec 2013 10:47:00 -0800 (PST) Received: by 10.60.21.69 with HTTP; Sun, 8 Dec 2013 10:47:00 -0800 (PST) In-Reply-To: References: Date: Sun, 8 Dec 2013 10:47:00 -0800 Message-ID: Subject: Re: Using bsdinstall for an additional drive From: Michael Sierchio To: Doug Hardie Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "freebsd-questions@freebsd.org Questions" X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 08 Dec 2013 19:11:48 -0000 I think it's worth the effort to try to understand gpart et al. If you have a new disk, DISK=3Dad4, for example # remove any possible existing data at beginning and end of disk (this is just an example) offset=3D`diskinfo $DISK | awk '{ print $4 - 131072 }'` dd if=3D/dev/zero of=3D/dev/$DISK bs=3D64k count=3D1 dd if=3D/dev/zero of=3D/dev/$DISK bs=3D64k seek=3D$offset The following is for a boot drive, with some fixed ideas about partitions, but is possibly useful as an example. The assumption here is alignment to 64k boundaries. If you don't need a bootable drive, just skip the parts for that. You could create one big partition, if that's what you want, with just the last bit. # create partition table gpart create -s gpt ${DISK} # add boot partition # p1 gpart add -t freebsd-boot -l boot -s 64k ${DISK} # put boot code in boot partition gpart bootcode -b /boot/pmbr -p /boot/gptboot -i 1 ${DISK} # add 1G root, make sectors aligned # p2 gpart add -t freebsd-ufs -l root -a 64k -s 1G ${DISK} # add 2G swap # p3 gpart add -t freebsd-swap -l swap -a 64k -s 2G ${DISK} # add 1G tmp # p4 gpart add -t freebsd-ufs -l tmp -a 64k -s 1G ${DISK} # add 2G var # p5 gpart add -t freebsd-ufs -l var -a 64k -s 2G ${DISK} # add 2G opt # p6 gpart add -t freebsd-ufs -l opt -a 64k -s 2G ${DISK} # add remainder of disk for usr # p7 gpart add -t freebsd-ufs -l usr -a 64k ${DISK} On Sun, Dec 8, 2013 at 10:25 AM, Doug Hardie wrote: > I have a running 9.2 system that I need to add another drive to. With sy= sinstall it was easy (once you understood it) to add a new drive. However,= I have not figured out how to do that with bsdinstall. I don't want to ex= periment much as the running system would take forever to rebuild. Is ther= e a way to do this without affecting the existing system? > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.o= rg"