Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 27 Dec 1996 14:40:50 -0700 (MST)
From:      Softweyr LLC <softweyr@xmission.com>
To:        Hudginsj@smtp.dancooks.com (Jason Hudgins)
Cc:        questions@freebsd.org
Subject:   Re: disklabel
Message-ID:  <199612272140.OAA15047@xmission.xmission.com>
In-Reply-To: <3066D7A31@smtp.dancooks.com> from "Jason Hudgins" at Dec 27, 96 02:07:30 pm

next in thread | previous in thread | raw e-mail | index | archive | help

> 
> 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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612272140.OAA15047>