[conspire] parted question - how do I tell parted to partion /dev/sdb

Rick Moen rick at linuxmafia.com
Sun Mar 28 22:56:35 PDT 2010

Quoting Darlene Wallach (freepalestin at dslextreme.com):

> I don't see how to tell parted to partition the Seagate FreeAgent Go 1T

To recap:

1.  Personally, I'd zero out the first part of the drive before anything
else.  Like:  dd if=/dev/zero of=/dev/sdb bs=512 count=200
This (effectively) gets rid of _everything_ on the drive in one swell
foop.   It blitzes the shipped NTFS partition and all of its data
structures, and it deletes (by zeroing out) whatever partition table the
drive has.

If you _don't_ zero out the drive, then don't forget that there's an
existing partition table (of some sort) and an NTFS partition, which
you'll need to take into account before doing anything else with the
drive, e.g., "rm" the NTFS partition inside GNU parted to make its
partition table space available again.

2.  Then (_if_ I decided to use GNU parted and a GUID Partition
Table[1]), I'd fire up GNU parted and do "mklabel gpt".

3.  Then, I would (while still in parted) do either "mkpart" a number of
times to allocate entries in the partition table for various desired
partitions, or would do "mkpartfs".

Tony has given a good argument for mkpart, i.e., that it's kinda nice to 
be in full control of the filesystem-creation process as a separate
step (after leaving the partitioning utility).  On the other hand, 
it's a bit handy that parted _can_ do everything in a single step.  
Doesn't make a huge difference either way.  Do whichever suits you.

> I'm assuming I want mkpartfs. But I don't see how I can specify which drive.

Er, "which drive"?  {boggle}  Didn't you say "parted /dev/sdb" when you
launched the program.  That's specifying the drive.

http://www.gnu.org/software/parted/manual/parted.html says:

  Parted has two modes: command line and interactive. Parted should
  always be started with:

  # parted device

  where device is the hard disk device to edit. (If you're lazy and omit
  the DEVICE argument, Parted will attempt to guess which device you

Call me funny, but I like being really extremely specific when I'm
telling system-wide utilities running with root-user authority which
mass-storage device to blow away.

Really, I'll say it again:  You need to be extremely careful when using
partitioning utilities of any sort.  Unless you decide you don't mind
vast amounts of file data disappearing by accident.  Which makes me sad
when it happens, personally.

> What am I missing?

Specificity?  ;->

More information about the conspire mailing list