Format USB drive to NTFS so it is usable under Windows

gparted (GNU Partition Editor) is a good graphical tool for formating drives to a variety of different filesystem types. You can install it with sudo apt-get install gparted.

Just as when you are using Disks, be very careful that you are making changes to the correct device. You can format your device to NTFS using the following steps:

  1. Select the correct device from the dropdown selector on the top right.
  2. Delete any partitions that already exist on the device.
  3. Create a new partition using all of the available space and set the type to ntfs
  4. Click the "Apply" button and wait for the operations to complete

If Windows still doesn't recognize the device, the partition table may be in a different type than the MS-DOS type (Ubuntu uses gpt partition type by default I think). Click "View >> Device Information" from the menu to see what the partition table type is. In this case, use the "Device >> Create Partition Table" menu option to change the partition table type to MS-DOS. You may have to follow the above steps again to create your NTFS partition.


With mkntfs

Install mkntfs which is provided by package ntfs-3g:

sudo apt-get install ntfs-3g

Find the partition of your USB drive with df -h. Let's assume it's at /dev/sdb1.

Unmount the drive with umount /dev/sdb, otherwise you'll get the error

/dev/sdb1 is mounted.
Refusing to make a filesystem here!

Then format the partition:

sudo mkntfs --fast --label myUsbDrive /dev/sdb1

If that succeeded, you'll see a message like this:

Cluster size has been automatically set to 4096 bytes.
Creating NTFS volume structures.
mkntfs completed successfully. Have a nice day.

Indeed Ubuntu Disks utility creates partition with the wrong id:

$ sudo fdisk /dev/sdc

Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sdc: 57,9 GiB, 62109253632 bytes, 121307136 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0xcee48da0

Device     Boot Start       End   Sectors  Size Id Type
/dev/sdc1        2048 121307135 121305088 57,9G 83 Linux

Command (m for help): q

When you create the partiton with GParted the partition gets created with the right id and it is perfectly visible under Windows:

$ sudo fdisk /dev/sdc

Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/sdc: 57,9 GiB, 62109253632 bytes, 121307136 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x0bce1084

Device     Boot Start       End   Sectors  Size Id Type
/dev/sdc1        2048 121307135 121305088 57,9G  7 HPFS/NTFS/exFAT

Command (m for help): q 

$ 

It is always possibile to change the partition type with fdisk, but the conclusion is that it is better just to always use GParted.

Perhaps we shall file a bug ticket with Disks developers?