Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 10 Jul 2000 23:46:19 -0700
From:      "Crist J. Clark" <cristjc@earthlink.net>
To:        Harry Putnam <reader@newsguy.com>
Cc:        freebsd-questions@FreeBSD.ORG
Subject:   Re: disklabel output confusing or meaningless
Message-ID:  <20000710234618.C182@dialin-client.earthlink.net>
In-Reply-To: <m2bt058ifx.fsf@reader.ptw.com>; from reader@newsguy.com on Mon, Jul 10, 2000 at 08:16:50PM -0700
References:  <m2bt058ifx.fsf@reader.ptw.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Mon, Jul 10, 2000 at 08:16:50PM -0700, Harry Putnam wrote:
> 
> Coming from a linux background I'm used to using fdisk to get
> important info such as what device names are attache to what partition.
> 
> Linux fdisk gives a clear precise output, formated in a sensible easy
> to read fashion.  Usable to write fstab or create mount commands etc.
> 
> FreeBSD's `fdisk' gives a poorly formatted jumble of information most of
> which is nearly useless since it is not related to any device names.
> Just uses a numbering system, completely different than used by the
> OS.

It gives information about the Microsoft style partition table in the
same format the Microsoft's fdisk does. Since MS-style partitions,
a.k.a. slices, are Microsoft artifacts and not native to a UNIX-style
system, using the MS nomenclature seems logical to me. Conversion to
FreeBSD slices is straightforward, 

  MS partition - 1 = FreeBSD slice

> Someone told me to use `disklabel' to get information about disks.

That will tell you about partitions on disks.

> Using disklabel -r  /dev/ad0s4e  ( a recently created
> `anex' partition)
> 
> I see what appears to be at best confusing and at worst nonsense
> information.

Hmmm...

> [...] snip
>  8 partitions:
> #        size   offset    fstype   [fsize bsize bps/cpg]
>   c:  3213000        0    unused        0     0         # (Cyl.    0 - 199)
>   e:  3213000        0    4.2BSD     1024  8192    16   # (Cyl.    0 - 199)
> root@satellite /
> 
> 
> This is one partition but it is reported as 8.

Reported as 8? I see two. There are eight possible partitions.

> Apparentluy two of those 8 are displayed, but wait, they are both at
> the same offset, span the same cylinders and are the same size. That
> size is twice what I partitioned.
> 
> Wait again, one is unused and the other is 4.2bsd.  
> 
> Hopeless gibberish apparently.

No, well documented and precise information. From disklabel(8),

     All disklabel forms require a disk device name, which should always be
     the raw "complete" (or "c") partition, for example /dev/rda0c. disklabel
     understands the abbreviation da0, which it converts internally to
     /dev/rda0c.

The second entry is for a piece of the whole disk and may be used for
a filesystem, swap, vinum partition, etc. In this case, there is only
one UFS partiton using the whole disk.

> Is there an aftermarket or ported or whatever util that gives usabel
> readable information about the disk setup?

Looks quite readable. RTFM for the details.
-- 
Crist J. Clark                           cjclark@alum.mit.edu


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-questions" in the body of the message




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