From owner-freebsd-questions Fri Dec 27 13:41:27 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id NAA09921 for questions-outgoing; Fri, 27 Dec 1996 13:41:27 -0800 (PST) Received: from xmission.xmission.com (softweyr@xmission.xmission.com [198.60.22.2]) by freefall.freebsd.org (8.8.4/8.8.4) with ESMTP id NAA09916 for ; Fri, 27 Dec 1996 13:41:24 -0800 (PST) Received: (from softweyr@localhost) by xmission.xmission.com (8.8.4/8.7.5) id OAA15047; Fri, 27 Dec 1996 14:40:51 -0700 (MST) From: Softweyr LLC Message-Id: <199612272140.OAA15047@xmission.xmission.com> Subject: Re: disklabel To: Hudginsj@smtp.dancooks.com (Jason Hudgins) Date: Fri, 27 Dec 1996 14:40:50 -0700 (MST) Cc: questions@freebsd.org In-Reply-To: <3066D7A31@smtp.dancooks.com> from "Jason Hudgins" at Dec 27, 96 02:07:30 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-questions@freebsd.org X-Loop: FreeBSD.org Precedence: bulk > > I'm trying to recreate the disklabel on my western digital IDE hd. > I am doing this from a custom made fixit floppy...I try this.. > > disklabel -w -B -b /usr/mdec/wdboot -s /usr/mdec/bootwd /dev/wd0 auto > > and it complains that with the auto option I must supply a "canonical > disk name" > > I am assuming that this is referring to a drive type in /etc/disktab. Yup. > There is nothing in /etc/disktab that vaguely resembles anytype of > WD ide drive...furthermore if I could try and create an entry..but > I have no idea how to answer most of the questions such as > how many tracks per cylinder ..etc. Is this the only way to do > this? Or is there an easier way? OK, I've read so much whining about this topic on this list over the (2) years, I'm going to finally say it: CREATING A DISKTAB ENTRY IS CHILDS PLAY! JUST DO IT! There. got that out of my system. Get a calculator (xcalc or bc will do). Read the label pasted on the top of your disk drive. See where it tells you how many sectors, heads, and cylinders your disk has? That's everything you need to know. When creating the parition sizes, remember that you a) leave off any partitions you don't want, and b) swap partitions are always "b". Calculate the size of a cylinder, in blocks, and make all partition sizes and offsets multiples of this size. Example: Seagate ST3120A (I happen to have one of these lying on my desk): 17 sectors/track 12 heads (or tracks/cylinder) 1024 cyliners Lets say for some reason you're dumb enought to waste an IDE slot for this little gem. With calculator in hand (well, in mouse) we calc: 1 cylinder = 17 * 12 = 204 blocks, or just about 10K bytes. Let's say we want to create a 16M swap partition and dedicate the rest of the disk to a single storage partition. This gives us: part offset size b 0 32640 (160 cyls) c 0 208896 (whole disk) h 32640 176256 (rest of disk from b) Now just edit this information into disktab and label your disk. Not that hard, was it? -- "Where am I, and what am I doing in this handbasket?" Wes Peters Softweyr LLC http://www.xmission.com/~softweyr softweyr@xmission.com