Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to use parted in the most basic way: format an external USB hard drive as ext2 (ideally ext4 but didn't seem like an option). It is 3TB and unmounted at /dev/sdd

sudo parted /dev/sdd
[type gpt]
[type yes to agree that everything on that hard drive will be lost]
[type myDefaultPartitionName]
[type what for Start? prompt]

After I can get past that, how do I know what to type for end?

Thank you

share|improve this question
Can't test right now, but just add a very big number and I think it will automatically be rounded down to the largest possible. – terdon Jan 9 '13 at 21:08
do i want the largest possible number for start though? – tarabyte Jan 9 '13 at 21:09
i tried Start?0 and End?3000. The units are unclear but I think they are MB. I get:'Warning: The resulting parittion is not properly aligned for best performance.' – tarabyte Jan 9 '13 at 21:22
units are indeed MB – tarabyte Jan 9 '13 at 21:45
Not what thou hast asked for, but would do the job: thou couldst use gdisk to create the GPT, including the partition (it will prompt with defaults of the earliest and last viable points for the new partition), and then mke2fs -t ext4 /dev/sdx1 (for relevant x, and assuming thou only wantest the one partition) to create the filesystem. Does have the minor advantage that it'll create an ext4 filesystem rather than an ext2 one, which thou sayest is preferable. – Darael Jan 9 '13 at 22:56
up vote 0 down vote accepted

Special thank you to Darael for helping me discover gdisk. Below are my steps to what has successfully allowed me to partition my external hard drive. Replace x below with however your drive is named.

sudo apt-get install gdisk

sudo parted -l        # inspect your drive's name and make sure it is the external one!
sudo umount /dev/sdx1 # ensure that drive is NOT mounted
sudo gdisk /dev/sdx1  # launch gdisk on the drive of interest
?       # explore the features gdisk offers
n       # create a [n]ew partition
[enter] # choose default first sector
[enter] # choose default last sector
a502    # choose FreeBSD
v       # [v]erify
c       # [c]hange the name of the partition, e.g. MY_1TB_BACKUP
p       # [p]rint to ensure the renaming is to your liking
w       # [w]rite the changes to disk

sudo mkfs -t ext4 /dev/sdx1 # create the filesystem as type ext4
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.