How to make linux-formatted NTFS partition recognized by Windows?

I formatted a file system in Linux using sudo mkfs.ntfs, and ran a script that ended up generating up to a Terrabyte of information. I need to process this information in Windows. As it turns out, this filesystem cannot be read in Windows. I thought it was because the filesystem created is actually a fuse NTFS file system — however, I formatted another partition in NTFS in Windows, and the filesystem it generated has the exact same flags:

type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)

except the block size of my filesystem is 2048, whereas Windows’s filesystem’s block size is 4096.

Do you have an idea why the filesystem formatted in Linux refuses to be recognized in Windows 10? Can I somehow make it recognized in Windows without reformatting? What should have I done differently to make sure the file system that’s created is recognized in Windows?

Update:

For the second partition, I deleted it in Windows, and created it anew, formatting it in NTFS. I then went to Linux, and ran the same mkfs.ntfs command that I ran on the first partition, and the partition is still recognized in Windows. So it is probably not the formatting that made a difference.

Maybe the partition start and/or end location? I set the first partition to start at sector 2048, so that might have something to do with why Windows is not recognizing it…

Asked By: Alex

||

(I’m resuscitating an old question because I faced the same issue this morning.)

According to personal experience, it’s possible this issue happened if you created the actual partition in Linux with e.g. fdisk.

Apparently, fdisk gives the partition type 0x83 to the partitions it creates, which is labeled "Linux". It so happens that, while Linux doesn’t appear to discriminate according to this value, Windows does – requiring the partition type to be 0x07, also known as "HPFS/NTFS" on older(?) versions of fdisk.

If that’s the case, all that is needed to solve the issue is to use fdisk to change the partition type.
Assuming the partition to be /dev/sda2, one would first need to access the fdisk prompt via sudo fdisk /dev/sda2, then identify the offending partition by using p to display the partition table. Then, use t to enter the type-changing menu, enter your partition number and finally the type you wish to apply, which is 7. Lastly, commit the changes with w.

The whole procedure shouldn’t damage the existing data, as it doesn’t alter anything apart from the type identifier.

Answered By: Grimoire

This may also be corrected in Windows using diskpart:

For example, using an Administrator-launched Command Prompt:

C:WindowsSystem32>diskpart

Microsoft DiskPart version 10.0.22621.1

Copyright (C) Microsoft Corporation.
On computer: PCNAME

DISKPART> list disk

  Disk ###  Status         Size     Free     Dyn  Gpt
  --------  -------------  -------  -------  ---  ---
...

DISKPART> sel disk 1

Disk 1 is now the selected disk.

DISKPART> list parti

  Partition ###  Type              Size     Offset
  -------------  ----------------  -------  -------
...

DISKPART> select parti 1

Partition 1 is now the selected partition.

DISKPART> help setid

    Changes the partition type field for the partition with focus.

Syntax:  SET ID={<BYTE> | <GUID>} [OVERRIDE] [NOERR]

    ID={<BYTE> | <GUID>}

                Specifies the new partition type.

                For master boot record (MBR) disks, you can specify a partition
                type byte, in hexadecimal form, for the partition. Any
                partition type byte can be specified with this parameter except
                for type 0x42 (LDM partition). Note that the leading '0x' is
                omitted when specifying the hexadecimal partition type.

                For GUID partition table (GPT) disks you can specify a
                partition type GUID for the partition. Recognized GUIDs
                include:

                    EFI System partition:
                        c12a7328-f81f-11d2-ba4b-00a0c93ec93b

                    Basic data partition:
                        ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

                Any partition type GUID can be specified with this parameter
                except for the following:
...

DISKPART> SET ID=ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

DiskPart successfully set the partition ID.

DISKPART> exit

Leaving DiskPart...
Answered By: mstrthealias
Categories: Answers Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.