getting started with USB hard drive

Giorgos Keramidas keramida at
Wed Feb 22 00:56:12 PST 2006

On 2006-02-21 14:28, Peter <petermatulis at> wrote:
> Thanks for your links.  I have a hell of a time setting up
> disks.  This is what I did:
> # fdisk -BI da0 (using just -I failed)
> # bsdlabel -w da0
> Then I get stuck.
> # bsdlabel da0s1 (fails)

That's ok.  You used:

    # bsdlabel /dev/da0

This installs a "BSD label" starting at the boot record of the
disk, not in a BIOS-like partition.

You can then use BSD partitions named:


If you really want to use a single BIOS slice (what DOS calls a
"partition"), that contains one or more BSD partitions defined by
a label, then you should install the BSD label on `da0s1' instead
of `da0':

    # dd if=/dev/zero of=/dev/da0 bs=1024 count=64
    # fdisk -B -I /dev/da0
    # bsdlabel -w -B /dev/da0s1

Note the device name passed to bsdlabel.  It's not da0, but da0s1.

> Now I wonder why this disk which is supposed to be 200 GB, was
> detected by FreeBSD (when connected) as 190 GB, shows up as 186
> GB inside sysinstall, and has a size of 180 GB when seen by df.

A certain amount of slack space is occupied by partition and
filesystem metadataand/or reserved for the superuser.  You can't
really do much to avoid wasting some space for a partition table,
but that's pretty minimal.  What you *can* and should do is think
about the average file size you will be using and specify an
appropriate set of newfs(8) or tunefs(8) options to configure the
resulting filesystems.  The tuning(7) manpage has some hints, but
a bit of prior experience with tuning filesystems and some
experimentation before the filesystem is put to real use can also
go a long way :)

- Giorgos

More information about the freebsd-questions mailing list