From owner-freebsd-questions@FreeBSD.ORG Mon Apr 30 03:02:21 2007 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0CD7C16A401 for ; Mon, 30 Apr 2007 03:02:21 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (gizmo.acns.msu.edu [35.8.1.43]) by mx1.freebsd.org (Postfix) with ESMTP id B488B13C448 for ; Mon, 30 Apr 2007 03:02:20 +0000 (UTC) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: from gizmo.acns.msu.edu (localhost [127.0.0.1]) by gizmo.acns.msu.edu (8.13.6/8.13.6) with ESMTP id l3U2xZQo015235; Sun, 29 Apr 2007 22:59:35 -0400 (EDT) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id l3U2xXjG015234; Sun, 29 Apr 2007 22:59:33 -0400 (EDT) (envelope-from jerrymc) Date: Sun, 29 Apr 2007 22:59:33 -0400 From: Jerry McAllister To: Kris Kennaway Message-ID: <20070430025933.GD15045@gizmo.acns.msu.edu> References: <20070429215319.GA18753@demeter.hydra> <20070429221638.GA33593@xor.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20070429221638.GA33593@xor.obsecurity.org> User-Agent: Mutt/1.4.2.2i Cc: FreeBSD Questions Subject: Re: CLI filesystem format tool 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: Mon, 30 Apr 2007 03:02:21 -0000 On Sun, Apr 29, 2007 at 06:16:39PM -0400, Kris Kennaway wrote: > On Sun, Apr 29, 2007 at 03:53:19PM -0600, Chad Perrin wrote: > > Is there a simple command line tool in FreeBSD for creating a filesystem > > on an already extant slice? > > > > I'm working on a system with three main slices -- ad0s1, ad0s2, and > > ad0s3. The ad0s2 slice is further split up into the default parts of a > > FreeBSD install. The ad0s1 slice is in use by another OS. The ad0s3 > > slice has nothing of value on it, and I want to make it a FreeBSD-native > > filesystem then mount it at /usr/home. > > > > I've been hoping to find something akin to the Linux tool mkfs for this > > purpose, but so far have come up empty. Isn't there something that > > works similarly to that? Example: I would suggest that you first use bsdlabel to create a single partition on that slice. You can use the a: partition, or if you feel squimish about using that one that is traditionally used for root, then use the d: partition. Do this: bsdlabel -w ad0s3 To initialize a partition label, then bsdlabel -e ad0s3 You enter an edit more. Just duplicate the c: line --Do NOT change the c: line-- edit that duplicate line and make it a: or d: or whatever. Change the tuype to BSD4.2 You can add values for [fsize bsize bps/cpg], maybe to: 2048 16384 28552 But I think you can just leave them blank. write/quit the edit session and the label is written. Then you need to run newfs on that new partition. newfs /dev/ad0s3a or newfs /dev/ad0s3d if you named it d: Then, just edit /etc/fstab to make it mount at boot time and mount it up. If you already have stuff in /home, then you will need to make one of them a temporary mount somewhere to move stuff over. ////jerry > > > > command /dev/ad0s3 fstype > > newfs > > Kris > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org"