[conspire] verifying I'm doing this correctly - fdisk, mkfs.ext3, e2label for FreeAgent Go 1T

Rick Moen rick at linuxmafia.com
Sun Mar 28 21:37:35 PDT 2010

Quoting Darlene Wallach (freepalestin at dslextreme.com):

> I found the following *gparted* available for Fedora 10:
> # yum list *parted*
> Loaded plugins: refresh-packagekit
> Installed Packages
> parted.i386                           1.8.8-8.fc10                     installed
> Available Packages
> gparted.i386                          0.4.8-1.fc10                     updates
> parted-devel.i386                     1.8.8-8.fc10                     fedora
> pyparted.i386                         1.8.9-5.fc9                      fedora
> qtparted.i386                         0.4.5-18.fc9                     fedora
> I'm installing gparted now.
> *argh*! Just realizing I downloaded parted already so I don't need
> gparted - duh!

Um, I recommended GNU parted.  I did not recommend GParted.  

GParted appears to be a similar program made by the GNOME people using
the same libparted back-end library used by (and invented for) GNU
Parted.  GParted is, like other GNOME stuff, dependent on the gnomelibs
and the gtk2+ graphics library.  The main point, though, is that it's a
different (albeit related) program from the one I spoke of.

I cited and recommended GNU Parted, _not_ GParted, QtParted, KDE Partition
Manager, Pyparted, or nparted.  ;->

> And I have to figure out the commands I need to partition the Seagate
> FreeAgent Go 1T. 

Well, you would just use whatever command set parted offers.  It's
probably not difficult to figure out.

> Does it matter if I use mkpart or mkparfs?

Sort of.  See below.

> When I use parted to list, I get:
> Model: Seagate FreeAgent Go (scsi)
> Disk /dev/sdb: 1000GB
> Sector size (logical/physical): 512B/512B
> Partition Table: msdos
> Number  Start   End     Size    Type     File system  Flags
>  1      32.3kB  1000GB  1000GB  primary  ntfs
> So does this look correct to you?

It does look like a correct description of an NTFS partition spanning an
entire terabyte hard drive.  Is that what you mean by "look correct"?
I'm not sure I understand your question.

> This would make the first partition for my data:
> mkpart primary ext3 32.3kB 960.2G
> Would this be the second partition?
> mkpart primary ext3 960.2G 1000G

Darlene, you're asking me for help with a program _I've_ never used.
As I think I mentioned, I've never had a terabyte hard drive, thus no
need for GUID Partition Tables or GNU parted.

Also, unlike me, you actually have GNU parted in front of you.
Presumably, you have the manual, too.  If not, it's available here:

Anyway, if I were in your shoes and wanted to learn about GNU parted and 
GUID Partition Tables, I'd just play with the software, where necessary
look things up, and see what happens.  (I hope I'm not going to come
across as sounding grouchy, but answering your questions basically
requires me to look up things in that manual, and I'm OK with doing
that, but you should be doing that, too.)

Alternatively, you could of course just zero out the first few sectors
of the hard drive using "dd", and then have at it with good ol'

   dd if=/dev/zero of=/dev/sdb bs=512 count=200

"bs" is blocksize, so this command says please overwrite the first 200
blocks, assuming a block size of 512 bytes per block, with zeroes.
(Naturally, you would want to make _extremely_ sure that /dev/sdb is the 
correct device before doing such a command, but the same is true of
using any and all partitioning tools, too.)

Anyway, please understand, as I said, that I know next to nothing about
GNU parted.  _However_, I just skim-read through the manual, and it says
that the "mkpart" subcommand creates a partition entry in the partition
table _without_ mkfs'ing an actual partition within that allocated
space.  You can, alternatively, use the "mkpartfs" subcommand, which
allocates space in the partition table and _then_ does whatever is the
appropriate mkfs operation (mkfs.ext3 in the case of ext3 filesystems).

To answer your earlier question, there's no reason why you couldn't use
either mkpart or mkpartfs.  The latter takes care of the mkfs step for
you; the former doesn't and leaves that step to you as a separate
operation.  There might be any number of reasons to prefer one over the
other, but personally I think I'd try mkpartfs first simply to save a
separate manual step.

Anyway, if you're using GNU parted, you might actually first want to
start with the "mklabel" subcommand, to make sure you have a disk label
aka partition table of the desired type as your _first_ step, through
the simple expedient of blowing away whatever's there and creating a
partition table of the desired type.  Then, you know for certain what
you have.  To my knowledge, you've not ascertained what partition type
you have at present; I'd personally want to know.

According to the manual, this subcommand creates a GPT partition:

  mklabel gpt

This subcommand creates a traditional IBM/Microsoft partition table:

  mklabel msdos

But getting back to what you said:  You presumably noticed that GNU
parted reports an approximately 1 TB NTFS partition that starts, for
reasons I cannot fathom, 32.3kB into the drive space.  You were
proposing to issue a "mkpart" subcommand to allocate space for an ext3
partition starting at the same initial offset (32.3kB) and running to
960.2G from the beginning of the drive.

One, why not use "mkpartfs" and save work?  However, two, er, don't you
need to "rm" the existing NTFS partition, first?  I would think you

Of course, if you either start with zeroing out the first part of the
drive using "dd" or use GNU parted's "mklabel" subcommand before doing
partitions, you won't have that problem.

Personally, I _really_ feel better starting with the first few sectors
of the disk zeroed out, so that I'm certain what I'm starting with.  So,
I'd personally do the dd thing, before anything else.

> Yep. When I install Fedora I think I do *not* select automount stuff.

Well, I vaguely recall that both GNOME and KDE have their own
automounters by default.

> The man page says: If this option is specified twice, then a slower
> read-write test is used instead of a fast read-only test.
> So I thought "-c -c" would be a better option - even though the drive
> is new.

Oh!  OK, I learn something new every day.  Thank _you_.  The problem is
that I look at that manpage so seldom, I miss some things and forget

> I don't see this in the man page for mkfs.ext3

It's not an mkfs.ext3 option; it's an option to the mount command.

> > Notice, too, the  "commit=nnnn" mount option, to specify how frequently
> > the disk buffers are to be flushed.  You might want to relax that
> > refresh to something significantly longer than 5 seconds.  Also, note
> > the directory-hashing.
> Don't see "commit=" in man page for mkfs.ext3

Again, as I said, it's a _mount option_, i.e., an option to the mount

More information about the conspire mailing list