Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I've been running a small media server at home for 10+ years and looking at replacing it (before it breaks).

I intend to hook up a new drive to my old system, partition and format (ext4 seems most stable right now) and copy the media over to the new disk, so that I can install that in a new computer (I will be leaving some partitions free on the drive for that).

I have been reading my setup notes from 2002 when I used fdisk for partitioning, now I often see gparted or parted is used.

Is there any need to use (and install and learn) parted? My current, old system is 32bit and I read somewhere that parted is needed for 64 bit. I don't have parted on the system, but I don't want to make a disk that doesnt work well with the new setup.

share|improve this question
1  
fdisk is still totally fine, and it is a bit more flexible than parted -- except WRT to resizing, in which case parted is easier. You may be interested in this: blog.stgolabs.net/2012/09/fdisk-updates-and-gpt-support.html –  goldilocks Dec 8 '13 at 17:12
add comment

3 Answers 3

up vote 4 down vote accepted

The primary reason to use gparted or parted is if the new disk is bigger than 2TB. But you probably will not be able to effectively set that up from a 32 bit system.

If you want to run the new disk from your old system. Stay with a disk smaller than 2TB. You should be able to partition, format and run that from you old computer using fdisk for partitioning.

If you want to buy a bigger disk as 2TB, then partition it from the new system with parted. New installation CDs nowadays work with parted (or its library) by default to prevent problems with big disks.

share|improve this answer
    
You can use a >2TB disk in a 32 bit system just fine. –  psusi Dec 9 '13 at 4:29
add comment

Use fdisk for drives that are < 2TB and either parted or gdisk for disk > 2TB. The actual difference has to do with the partitioning formats that these tools are manipulating.

For disks < 2TB you're often using MBR (Master Boot Record). For disks > 2TB you're using GPT (GUID Partitioning Table). Here's a good article that covers the differences as well, titled: The Differences Between MBR and GPT.

What to use?

In a nutshell you can continue to use fdisk as long as the new HDDs are < 2TB. If they're larger then you can use parted or gdisk. If you need to convert from MBR to GPT you can do so (use caution with this) using gdisk.

You can read more about gdisk here on the primary website, titled: GPT fdisk Tutorial.

Example

$ gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.4

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): B40CXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 8-sector boundaries
Total free space is 0 sectors (0 bytes)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              34      5860533134   2.7 TiB     FD00  primary

You can also opt to use parted exclusively. It can contend with both MBR and GPT.

Example

$ parted -l

Model: ATA ST3250820AS (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      32.3kB  49.4MB  49.3MB  primary   fat16             
 2      49.4MB  2204MB  2155MB  primary   fat32             
 3      2204MB  2410MB  206MB   primary   ext3         boot 
 4      2410MB  250GB   248GB   extended                    
 5      2410MB  2517MB  107MB   logical   ext3              
 6      2517MB  250GB   247GB   logical                lvm  



Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sdb: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  3001GB  3001GB               primary  raid 



Model: ATA ST3000DM001-1CH1 (scsi)
Disk /dev/sdc: 3001GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt

Number  Start   End     Size    File system  Name     Flags
 1      17.4kB  3001GB  3001GB               primary  raid 

NOTE: Here you can see I have a 250GB MBR drive (/dev/sda) along with 2 3TB GPT drives (/dev/sdb & /dev/sdc).

share|improve this answer
add comment

In my experience fdisk is more powerful (especially in the advanced mode), but it can leave your disk in a somewhat weird state.

For example fdisk will allow your partitions to lie out of order unless you specifically tell it to reorder them, most other tools (and unless i'm very mistaken parted is one of them) will make assumptions that you want everything to be 'clean' once you are finished, even when you didn't expect to have some action performed.

When I write 'out of order' I mean something like this:

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *        2048    24000094    11999023+  83  Linux
/dev/sda2        24000512    48001023    12000256   83  Linux
/dev/sda3        48003070   488396799   220196865    5  Extended
/dev/sda4        24000095    24000511         208+  83  Linux
/dev/sda5       480397312   488396799     3999744   82  Linux swap / Solaris
/dev/sda6        48003072   480395263   216196096   83  Linux

Note that sda6 lies before sda5 on the disk.

share|improve this answer
add comment

Your Answer

 
discard

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.