From owner-freebsd-questions@FreeBSD.ORG Wed Feb 3 18:26:53 2010 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E8ECA1065670 for ; Wed, 3 Feb 2010 18:26:52 +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 8B68F8FC19 for ; Wed, 3 Feb 2010 18:26:51 +0000 (UTC) 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 o13IPRpd015984; Wed, 3 Feb 2010 13:25:27 -0500 (EST) (envelope-from jerrymc@gizmo.acns.msu.edu) Received: (from jerrymc@localhost) by gizmo.acns.msu.edu (8.13.6/8.13.6/Submit) id o13IPRJU015983; Wed, 3 Feb 2010 13:25:27 -0500 (EST) (envelope-from jerrymc) Date: Wed, 3 Feb 2010 13:25:27 -0500 From: Jerry McAllister To: Steve Franks Message-ID: <20100203182526.GA15860@gizmo.acns.msu.edu> References: <539c60b91002021859h6761ef1fk244d69000e089c65@mail.gmail.com> <20100203151808.GC15086@gizmo.acns.msu.edu> <539c60b91002030926r28d67355u3930058b9fc759d7@mail.gmail.com> <20100203183722.06ead46a.freebsd@edvax.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20100203183722.06ead46a.freebsd@edvax.de> User-Agent: Mutt/1.4.2.2i Cc: FreeBSD Mailing List Subject: Re: can't make an 'a' slice except with auto-defaults 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: Wed, 03 Feb 2010 18:26:53 -0000 On Wed, Feb 03, 2010 at 06:37:22PM +0100, Polytropon wrote: > On Wed, 3 Feb 2010 10:26:06 -0700, Steve Franks wrote: > > I'm just trying > > to make a fresh disk ready for dump/restore with a 1G /, so I guess > > sysinstall is out as an option at this time. > > Why so complicated? The command > > # newfs /dev/ad1 > > will prepare the disk, assuming ad1 is the new disk. It > will create one single partition covering the whole disk, > with no slice. You can then run > > # mount /dev/ad1 /mnt > > to access it; /dev/ad1 is the same as /dev/ad1c, "the > whole disk". This gets you what is referred to as a "dangerously dedicated" disk in the documentation. If you are doing nothing unusual with other OSen, then it works fine. But, it is also not at all hard to use fdisk and bsdlabel to create the full slice+partition. Here is the basic routine. dd if=/dev/zero of=/dev/ad1 bs=512 count=1024 fdisk -BI ad1 dd if=/dev/zero of=/dev/ad1s1 bs=512 count=1024 bsdlabel -w -B ad1s1 bsdlabel -e ad1s1 The second bsdlabel command puts you in to an edit session. Edit the partition table to something like this, then save[write] and exit. (Just those two lines for a single partition disk) # /dev/ad1s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] c: 89867610 0 unused 0 0 # "raw" part, don't edit h: * 0 4.2BSD 2048 16384 8 You can use any partition identifier except 'c', but I like to reserve 'a' for bootable root (/) and 'b' for swap to reduce the confusion in my head. If the disk will not be bootable take out the 'B' from each of the fdisk and bsdlabel commands. You probably do not need the two dd-s, but sometimes they are needed if the system cannot read the sector 0 on the disk for some reason. Finally, when that is done, do: newfs /dev/ad1s1d Make yourself a mount point and mount the new disk. mkdir /bigwork mount /dev/ad1s1d /bigwork Edit /etc/fstab so it will mount automatically. It is not weird or mysterious, though I admit the man pages for both fdisk and bsdlabel could stand a going through. They do not follow the conventions of most man pages in the way they describe the switches and parameters. Fortunately they have lots of examples (but could use even more). ////jerry > > By the way, have you tried the program > > # sade > > instead of sysinstall? > > > -- > Polytropon > Magdeburg, Germany > Happy FreeBSD user since 4.0 > Andra moi ennepe, Mousa, ... > _______________________________________________ > 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"