The final commands should be modified appropriate to your disk and partition. Enter:
diskutil list
Check the number of disk and partition. Then X and Y in diskXsY parameters in commands from further steps must be replaced with appropriate values (for example disk1s1)
Format:
First it is required to unmount volume with
sudo diskutil unmount diskXsY
Then format the partition:
sudo diskutil eraseVolume “<filesystem>” “LABEL” /dev/diskXsY
or format the whole disk:
sudo diskutil eraseDisk “<filesystem>” “LABEL” /dev/diskX
Possible values for <filesystem>:
UFSD_NTFS – Windows NT File System*
UFSD_EXTFS – Linux Extended File System 2**
UFSD_EXTFS3 – Linux Extended File System 3**
UFSD_EXTFS4 – Linux Extended File System 4**
* for NTFS for Mac
** for ExtFS for Mac
“LABEL” – specify volume label.
To change partition table format, please add the following value after “LABEL”:
GPTFormat – GUID Partition Table
MBRFormat – Master Boot Record
APMFormat – Apple Partition Map
OS9Drivers – Apple Partition Map (for Mac OS 9)
To verify the volume:
diskutil verifyVolume /dev/diskXsY
To repair the volume:
diskutil repairVolume /dev/diskXsY
ExtFS for Mac, General, NTFS for Mac OS X
Tags: extf, format, mac, ntfs, terminal