From owner-freebsd-questions@FreeBSD.ORG Mon Sep 13 00:36:26 2004 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CD86516A4CE for ; Mon, 13 Sep 2004 00:36:26 +0000 (GMT) Received: from clunix.cl.msu.edu (clunix.cl.msu.edu [35.9.2.10]) by mx1.FreeBSD.org (Postfix) with ESMTP id 1955243D41 for ; Mon, 13 Sep 2004 00:36:26 +0000 (GMT) (envelope-from jerrymc@clunix.cl.msu.edu) Received: (from jerrymc@localhost) by clunix.cl.msu.edu (8.11.7p1+Sun/8.11.7) id i8D0Xm919154; Sun, 12 Sep 2004 20:33:48 -0400 (EDT) From: Jerry McAllister Message-Id: <200409130033.i8D0Xm919154@clunix.cl.msu.edu> To: wojtek@tensor.3miasto.net (Wojciech Puchar) Date: Sun, 12 Sep 2004 20:33:46 -0400 (EDT) In-Reply-To: <20040912094901.H59154@chylonia.3miasto.net> from "Wojciech Puchar" at Sep 12, 2004 09:49:50 AM X-Mailer: ELM [version 2.5 PL2] MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit cc: Jerry McAllister cc: freebsd-questions@freebsd.org Subject: Re: moving to larger drive X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 13 Sep 2004 00:36:26 -0000 > > > > > Use fdisk to slice and do the mbr. > > In 4.xxx use disklabel to do disk labeling (partitioning) and boot block. > > In 5.xxx use bsdlabel to do disk labeling and boot block. > > > > Then use newfs to create filesystems in the partitions created > > with disklabel/bsdlabel. > > > > > > > > manually > > > ? > > > i know how to do it in NetBSD, but here it's a bit different. > > > > > > i need to move everything from one disk to another. > > > > Once you create the new drive, then, in single user, dump(8) | restore(8) > > from the old partitions/file systems to the new ones. > > that is what i know but fdisk/bsdlabel i do not. > > is fdisk compulsory? If you want to do what you say you want to do, yes, well,,, mostly... fdisk writes the main label that makes the slices on the disk. It also writes the MBR if you tell it to. You can tell it to make one large slice for the whole disk or up to 4 slices named 1..4. So, on a second SCSI disk (eg disk 1) slice 1 would look like /dev/da1s1... Then disklabel writes the partition label within any one those slices. which divides the slice (not the whole disk) up in to as many as 8 partitions named a..h with a, b, c, d sort of special cased by convention and expectation of some software. 'a' is root if you are booting on thee drive, 'b' is usually used for swap, 'c' is normally reserved for special accessing the entire disk in some special places and 'd' is something historical. 'a', 'b' and probably 'd' can be used for other things if not being used for their conventional thing, but I usually skip over them if I don't need them. disklabel also writes the boot block for the given slice, if you tell it to. So, on our second SCSI disk with slice 1 divided in to partitions then partition 'a' (typically root) would look like /dev/da1s1a. Filesystems are built in those partitions. You can create what is often, in the docs, referred to as a dangerously dedicated disk and do a disklabel on a whole disk without the slices. But, I think you still need fdisk or another main label writing utility (can't remember the name at the moment) to write that MBR you want. Actually, you can even get along without that if you never want to access the disk in any other way. I have never used it that way. It is usually suggested not to do it that way and it only uses up a few bytes of disk space, so do the fdisk. Just try it out and then ask more questions if needed. It actually does work just like the documentatino says. ////jerry > > in NetBSD i don't create fdisk partition table at all just bsd label > _______________________________________________ > 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" >