How to format a new hard drive?

Duke Robillard yellowdog-general@lists.terrasoftsolutions.com
Fri Mar 12 06:46:01 2004


 >>
 >> It's the other way around... first create partitions, then create
 >> filesystems. Each filesystem "lives" on one partition.
 >
 >That's why I shouldn't be allowed to answer these questions!
 >
 >Well, I looked it up in my _Running Linux_ book, and it seemed to imply
 >the opposite. The man pages, as usual, were highly informative, and of
 >no use whatsoever.


"Partitioning" is a relatively low-level disk concept.  It divides
the disk into separate pieces, each of which can be treated as a
separate box of gigabytes.

Partitions aren't Operating System things...they're below that, sort
of at the BIOS or firmware level.  Like, in the x86 world, you can
partition a disk into four pieces (for example) and you'll be able
to see those four pieces from DOS, Windows, Linux, whatever.

Often when you buy a disk, it'll already have one big partition on
it, to facilitate using it with a <gack, spit> Microsoft OS.

Filesystems are an Operating System thing.  Once you've got an OS
running, you can create a filesystem for it to put files into.
Normally, you use a whole partition for a filesystem, but that's
not really a requirement.  In the BSDs on x86, for example, you can
split up a disk partition into several pieces and put a bunch of
filesystems on it.

The word "Format" in the original post was the word that DOS (and
Windows) used to mean "build a file system on a disk partition."

So when you get a new disk for linux, first you decide on how to
partition it.  For an external disk that you're gonna store data
on, one big partition is probably fine.  Then you run pdisk (in the
PPC world, fdisk in x86) to create your partitions.  Then you
decided what kind of filesystem you wanto use, and run mkfs to
put the filesystems on your partitions.

There are a lot of details to pdisk/fdisk and mkfs, but given that
info, maybe the man pages won't be so obscure.  :-)


Duke