I had a USB stick laying around and I had to put HFS+ on it to do some Mac OS X specific activities. Initially I had NTFS on it (just so I could use the usb stick across all OSes), and I wanted to format it back to NTFS using Mac OS X. As I was reading up on the process, I realized there are a couple of different ways to the approach.
Install ntfs-3g
Sep 10, 2020 GPT, GUID Partition Table, is the newer standard compared to MBR first introduced as part of the UEFI initiative. Compared with the MBR partitioning scheme, it's more flexible and has better compatibility with modern hardware. The first sector on a GPT disk is also the MBR sector.
I already had mac-ports setup on my mac (check out this post on the install process). After you have mac-ports installed, you can use the following to install ntfs-3g :
- GPT fdisk is a tiny CLI utility designed to help you create partitions using commands. It is worth noting that the tool comprises of a set of tools, namely gdisk, cgdisk, sgdisk, and fixparts.
- When I connect the drive with my Mac (I'm running on OSX 10.11.4), I can see that the total drive size is 500GB like below: But, only first partition appeared and I can't see the second partition (GPT) one. What should I do now to read and access that GPT partition? Running diskutil list command from terminal give me this.
That will come with all the necessary tools to use NTFS (mount NTFS as read-write and to actually format partitions as NTFS) on Mac OS X.
BTW I was on Mac OS X Mavericks:
NTFS with MBR Using fdisk
So plug in the drive and check out it's partitions:
FDisk_partition_scheme is the MBR style scheme and it looks like it has a FAT filesystem on it. So let's erase the disk partition information from the drive:
Nikon wireless mobile utility free download - Samsung Mobile Utility, Apple AirPort Utility, Apple Bluetooth (Jaguar), and many more programs. Nikon wireless mobile utility for mac. Camera and smartphone, connected. The Wireless Mobile Utility app wirelessly connects your compatible iPhone ®, iPad ® and/or iPod touch ® or Android ™ powered device to compatible Nikon digital cameras, letting you download photos, take pictures remotely, and share them hassle-free via e-mail or upload to social networking sites. The Wireless Mobile Utility app is used with select Nikon. Nikon retain ownership of the Manual and all copies thereof and all related intellectual property rights, and reserves all rights not expressly granted to you under this Agreement. This Agreement constitutes the complete and exclusive agreement, oral or written, between you and Nikon. Wireless Transmitter Utility Full Ver. 1.9.3 2020/08/18.
Now checking out the drive, I don't have any partitions on it:
Now let's initialize the MBR style partition scheme on the disk
The above will also create a FAT partition on the disk. So let's change the partition type with fdisk to NTFS:
As a side note if you don't initialize the MBR scheme and you use fdisk it will ask you to initialize the partition table:
But then you will have create the partition with fdisk manually and it will create a FAT partition, which we will have to change later to NTFS (so inititiazing with disk from the command is faster… I think).
At this point you should see the following on the usb drive:
Now we format our partition as NTFS:
Lastly we can mount the partition
It will be mounted as read-write too:
NTFS with MBR Using diskutil and fdisk
We can also use diskutil to create an MBR partition scheme with a FAT partition all one command. First make sure nothing in on the disk:
Then run the following to create the MBR Scheme and FAT 32 Partition
From here you can do the same thing, change the partition type with fdisk,and then use mkntfs (from the ntfs-3g package) to format it as NTFS. BTW for reference here is a list of supported file systems by diskutil:
NTFS with GPT Using gpt and gdisk
Now let's create a GPT partition scheme and put NTFS on the first partition. Let's clear out the partitions and make sure nothing is one them:
To put a GPT partition scheme, run the following:
You can also use gpt to confirm the GPT Partition scheme is on there:
Now let's use gdisk to create a partition of type NTFS on it:
Same thing from here, we can format it with mkntfs and mount it with ntfs-3g.
Remove GPT Partition Scheme
To remove the GPT paritition scheme first unmount the drive and then use gdisk :
At this point the disk should be empty:
We can also use dd to zero out both locations (GPT is stored/resides in two locations: at the beginning and end of the disk). From the gpt show
command we can see where the end is:
First let's zero out the secondary (end of the disk) GPT table:
The seek value is basically the value of the end of the partition seen from the gpt show
command.
Now let's do the primary (begining of disk) GPT Table:
Download Gpt Fdisk For Mac
And now the GPT partition scheme should be gone:
if you want, you can zero out the disk completely with diskutil (this process will be longer and it depends on the size of your usb drive… mine takes 24 mins and it's 8GB).
NTFS with GPT Using diskutil
diskutil can create a GPT Partition Scheme and an MSDOS partion all in one swoop, make sure no partitions exists:
Then run the following to partition the drive:
Then you can just umount the disk and reformat it with NTFS since it's type is already 07:
It's actually strange cause regular fdisk shows it as FAT:
Here is the unmount:
And to format:
Just to be safe, I unplugged the usb drive and plugged it back in and Mavericks auto mounted the drive as NTFS.
Replace mount_ntfs with ntfs-3g
By default when Mac OS X sees an NTFS Filesystem it mounts it as read-only. If you feel adventurous, you can follows the instructions laid out here to replace the default Mac OS NTFS mount binary. Here is the process:
Step 1. Install the ntfs-3g port.
Step 2. Find out your userid and groupid.
NTFS with MBR Using fdisk
So plug in the drive and check out it's partitions:
FDisk_partition_scheme is the MBR style scheme and it looks like it has a FAT filesystem on it. So let's erase the disk partition information from the drive:
Nikon wireless mobile utility free download - Samsung Mobile Utility, Apple AirPort Utility, Apple Bluetooth (Jaguar), and many more programs. Nikon wireless mobile utility for mac. Camera and smartphone, connected. The Wireless Mobile Utility app wirelessly connects your compatible iPhone ®, iPad ® and/or iPod touch ® or Android ™ powered device to compatible Nikon digital cameras, letting you download photos, take pictures remotely, and share them hassle-free via e-mail or upload to social networking sites. The Wireless Mobile Utility app is used with select Nikon. Nikon retain ownership of the Manual and all copies thereof and all related intellectual property rights, and reserves all rights not expressly granted to you under this Agreement. This Agreement constitutes the complete and exclusive agreement, oral or written, between you and Nikon. Wireless Transmitter Utility Full Ver. 1.9.3 2020/08/18.
Now checking out the drive, I don't have any partitions on it:
Now let's initialize the MBR style partition scheme on the disk
The above will also create a FAT partition on the disk. So let's change the partition type with fdisk to NTFS:
As a side note if you don't initialize the MBR scheme and you use fdisk it will ask you to initialize the partition table:
But then you will have create the partition with fdisk manually and it will create a FAT partition, which we will have to change later to NTFS (so inititiazing with disk from the command is faster… I think).
At this point you should see the following on the usb drive:
Now we format our partition as NTFS:
Lastly we can mount the partition
It will be mounted as read-write too:
NTFS with MBR Using diskutil and fdisk
We can also use diskutil to create an MBR partition scheme with a FAT partition all one command. First make sure nothing in on the disk:
Then run the following to create the MBR Scheme and FAT 32 Partition
From here you can do the same thing, change the partition type with fdisk,and then use mkntfs (from the ntfs-3g package) to format it as NTFS. BTW for reference here is a list of supported file systems by diskutil:
NTFS with GPT Using gpt and gdisk
Now let's create a GPT partition scheme and put NTFS on the first partition. Let's clear out the partitions and make sure nothing is one them:
To put a GPT partition scheme, run the following:
You can also use gpt to confirm the GPT Partition scheme is on there:
Now let's use gdisk to create a partition of type NTFS on it:
Same thing from here, we can format it with mkntfs and mount it with ntfs-3g.
Remove GPT Partition Scheme
To remove the GPT paritition scheme first unmount the drive and then use gdisk :
At this point the disk should be empty:
We can also use dd to zero out both locations (GPT is stored/resides in two locations: at the beginning and end of the disk). From the gpt show
command we can see where the end is:
First let's zero out the secondary (end of the disk) GPT table:
The seek value is basically the value of the end of the partition seen from the gpt show
command.
Now let's do the primary (begining of disk) GPT Table:
Download Gpt Fdisk For Mac
And now the GPT partition scheme should be gone:
if you want, you can zero out the disk completely with diskutil (this process will be longer and it depends on the size of your usb drive… mine takes 24 mins and it's 8GB).
NTFS with GPT Using diskutil
diskutil can create a GPT Partition Scheme and an MSDOS partion all in one swoop, make sure no partitions exists:
Then run the following to partition the drive:
Then you can just umount the disk and reformat it with NTFS since it's type is already 07:
It's actually strange cause regular fdisk shows it as FAT:
Here is the unmount:
And to format:
Just to be safe, I unplugged the usb drive and plugged it back in and Mavericks auto mounted the drive as NTFS.
Replace mount_ntfs with ntfs-3g
By default when Mac OS X sees an NTFS Filesystem it mounts it as read-only. If you feel adventurous, you can follows the instructions laid out here to replace the default Mac OS NTFS mount binary. Here is the process:
Step 1. Install the ntfs-3g port.
Step 2. Find out your userid and groupid.
User ID:
Group ID:
Step 3. Use a modified mount_ntfs executable and save the OS X original to /sbin/mount_ntfs.orig.
Then paste in the following code and save it by typing Control-X and pressing 'Y'. NOTE:
- You can optionally substitute in your User ID and Group ID (from Step 2 above) in place of 501 and 20 in lines 4 and 5 below.
This script also assumes the standard MacPorts install location of /opt/local/ so you will need to modify it if yours is different.
With that in place, if you ever plugin a usb-drive with NTFS on it, it will auto mount it as read-write.
Install Gptfdisk On Mac OSX – Mac App Store
Strangely enough there is another utility called pdisk, which allows you to create APM (Apple Partition Map) partition schemes, but diskutil can do that as well.