When I format a drive to NTFS under Windows and plug it into the Ubuntu machine, it is perfectly usable. But when I format it under Ubuntu using Disks (delete all partitions and create one single partition with NTFS), it does not show up when plugged into the Windows machine.
Please note that in both cases the USB drive contains only one, primary partition formatted to NTFS, for example:
/dev/sdb
- the actual device/dev/sdb1
- the only, primary partition
I've observed this behaviour both with a solid state USB pen-drive, as well as with an external USB magnetic HDD.
How to (re)format a USB HDD or a stick to NTFS under Ubuntu 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 withsudo 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:
ntfs
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 packagentfs-3g
:Find the partition of your USB drive with
lsblk -f
ordf -Th
. Let's assume it's at/dev/sdb1
.Unmount the drive with
umount /dev/sdb
, otherwise you'll get the errorThen format the partition:
If that succeeded, you'll see a message like this:
Indeed Ubuntu Disks utility creates partition with the wrong id:
When you create the partiton with GParted the partition gets created with the right id and it is perfectly visible under Windows:
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?
I have succeeded with this task using gparted, as suggested already.
It is also possible to let mkusb create a persistent live drive (with standard Ubuntu or a community flavour: Kubuntu, Lubuntu ... Xubuntu). In this process, partition #1 will be created as an NTFS partition for sharing data with Windows.
msftdata
according to the listed output ofparted
.The first time Windows sees the USB pendrive, it might want to repair it. Answer yes, let it try to repair it. Windows will respond something like 'no error found', but it does something, probably writes somewhere, that it has seen the partition and marked it 'good', because next time it will not want to repair it.
You find more details at the following links,