Partitioning with gpart

Thomas Mueller mueller23 at
Wed Aug 29 07:55:31 UTC 2012

from "Lynn Steven Killingsworth" <blue.seahorse.syndicate at>:

> I have installed PC-BSD 9.1 RC1 last week.  Very nice I must say.

> The default file system is zfs.  I have one storage disk which is ufs and
> another which is on an mbr partition.  I thought I would format the mbr
> disk with zfs and move everything from the ufs disk and then format the
> ufs disk with zfs.

> I have not tried the command line before so I just tried to create over
> the disk with: gpart create -s gpt ada2

> The message is that ada2 already exists as a file system.

> Show indicates that it is not gpt but mbr.

> Then in order to start over I tried to delete and destroy by starting with:

> gpart delete -i 1 ada2s1

> The message is that ada2s1 is an invalid argument.

> I cannot experiment on my backup as it has only one disk.

> Comment please?

Either gpt (included in FreeBSD prior to the switch to gpart) or gdisk (now at v0.8.5 and in FreeBSD ports) can migrate an MBR-partitioned disk to GPT without loss of data in many cases, though backing up is still advised.

You can find information about gdisk at

gdisk is much more versatile than gpart, can be used to make partitions for Windows, Linux, NetBSD, etc.

I don't think you can get gpt for FreeBSD, but if you're curious, you can go to
and look for the documentation/man pages.

It was gpt in NetBSD that I used to migrate an NTFS partition (MBR) spanning an entire 3 TB Western Digital My Book USB 3.0 hard drive to GPT, no data was lost.

I subsequently booted Linux from the System Rescue CD ( and copied the software/data to a USB stick so I could free the USB 3.0 hard drive for better things.  Maybe I could have done the repartitioning with gdisk, which is included on the System Rescue CD, this would be Linux.


More information about the freebsd-questions mailing list