# Can't mount Windows 10 EFI NTFS (ms-basic-data)



## marcelbonnet (Feb 20, 2019)

Hi, folks.

I have two Dell notebooks running Win10 here: on one notebook, "gpart show" tells me the disk is NTFS , so it is mountable with ntfs-3g.
But the one I'm having trouble "gpart show" identifies the disk as ms-basic-data, as you see below:


```
# gpart show
=>        40  1953525088  ada0  GPT  (932G)
          40       81920     1  efi  (40M)
       81960        1024     2  freebsd-boot  (512K)
       82984     4193272     3  freebsd-ufs  (2.0G)
     4276256     4194304     4  freebsd-ufs  (2.0G)
     8470560     4194304     5  freebsd-swap  (2.0G)
    12664864    16777216     6  freebsd-ufs  (8.0G)
    29442080   337641472     7  freebsd-ufs  (161G)
   367083552   121634816     8  freebsd-ufs  (58G)
   488718368   203423744     9  freebsd-ufs  (97G)
   692142112  1260388352    10  freebsd-ufs  (601G)
  1952530464      994664        - free -  (486M)

=>       34  500118125  ada1  GPT  (238G)
         34       2014        - free -  (1.0M)
       2048    1331200     1  efi  (650M)
    1333248     262144     2  ms-reserved  (128M)
    1595392  498522112     3  ms-basic-data  (238G)
  500117504        655        - free -  (328K)

=>       34  500118125  diskid/DISK-TW0WJT50LOH0085I01UZ  GPT  (238G)
         34       2014                                    - free -  (1.0M)
       2048    1331200                                 1  efi  (650M)
    1333248     262144                                 2  ms-reserved  (128M)
    1595392  498522112                                 3  ms-basic-data  (238G)
  500117504        655                                    - free -  (328K)
```

fuse was already loaded:


```
# kldstat | grep fuse
34    1 0xffffffff82dd8000     9b98 fuse.ko
```

I tried to mount as NTFS, since Windows Explorer identifies the partition as NTFS file system:


```
# ntfs-3g o permissions /dev/ada1p3 /mnt/win/
NTFS signature is missing.
Failed to mount '/dev/ada1p3': Invalid argument
The device '/dev/ada1p3' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
```

And also:


```
# ntfs-3g o permissions /dev/ada1 /mnt/win/
NTFS signature is missing.
Failed to mount '/dev/ada1': Invalid argument
The device '/dev/ada1' doesn't seem to have a valid NTFS.
Maybe the wrong device is used? Or the whole disk instead of a
partition (e.g. /dev/sda, not /dev/sda1)? Or the other way around?
```

The only mountable partition is this one.


```
# mount_msdosfs /dev/ada1p2 /mnt/win/
# ls /mnt/win/
Boot/         bootmgfw.efi  bootmgr       bootmgr.efi   EFI/          NTLDR         sources/
```


```
# df -h /mnt/win/
Filesystem     Size    Used   Avail Capacity  Mounted on
/dev/ada1p1    646M    405M    241M    63%    /mnt/win
```

EDIT:
I can't understand what "ms-basic-data" means (some encryption? something related to secure boot?)  it is this: https://en.wikipedia.org/wiki/Microsoft_basic_data_partition

How can I mount this partition?

Thanks in advance,
Marcel


----------



## aragats (Feb 21, 2019)

According to the same Wikipedia article: «A Basic Data Partition can be formatted with any filesystem, although most commonly BDPs are formatted with the NTFS, exFAT, or FAT32 filesystems».
NTFS and exFAT share the same partition code 0x07. You may want trying sysutils/fusefs-exfat instead of sysutils/fusefs-ntfs.


----------



## SirDice (Feb 21, 2019)

Wozzeck.Live said:


> And if I am not wrong... EFI partition MUST be in FAT32, this CAN'T be NTFS or any other filesystem


You're not wrong. It has to be FAT. I do believe FAT16 and FAT12 are also supported but still, it must be FAT.


----------



## marcelbonnet (Feb 21, 2019)

Thank you guys. I'm sorry, I was not very clear.
My goal is to mount the ms-basic-data partition that is formatted with NTFS, the one where Windows is installed with all other user's data.
My FreeBSD is running from a inner HDD and windows is on a SSD .

Thanks in advance.


----------



## twllnbrck (Feb 21, 2019)

As aragats suggested you could use sysutils/fusefs-ntfs.

```
mount -t ntfs-3g /dev/ada1p3 /your/mount
```
should mount the NTFS partition in read write mode for everybody.


----------



## Wozzeck.Live (Feb 21, 2019)

Lanakus said:


> As aragats suggested you could use sysutils/fusefs-ntfs.
> 
> ```
> mount -t ntfs-3g /dev/ada1p3 /your/mount
> ...



If you read the first message, his attempts refers to ntfs-3g command, so this means fusefs-ntfs is already installed on his system

The command

`ntfs-3g -o ro /dev/... /mnt`

Is totally equivalent to yours and is much straightforward as it shows clearly that we are using the fusefs-ntfs port, rather than the internal read only "mount -t ntfs", also the option "-t ntfs-3g" delegates the mounting process to fusefs-ntfs.

And no, mounting NTFS in read/write by default isn't a good idea.

I have been clear in my first message, NTFS is a journalised filesystem. If the FS is dirty, mounting NTFS in non native environment can break or deprecate the journal. So mounting back the drive under Windows, and the FS can't replay the journal, data may be lost. There is no problem if FS was clean, in such case the data in the journal are not required at startup, and windows can refresh the journal, this is the reason why in most of case there is no issue.

The problem occurs in the same way with Ext3/4. The kernel module ext2fs doesn't handle journalizing, and so there are often mounting issues.
Either you deactivate Ext3/Ext4 journal, either you use fusefs-lkl which offers a quasi Linux native support as it is based on the Linux Kernel (Linux Kernel as a library) . Fusefs-lkl is able to replay the journal, not the FreeBSD kernel module ext2fs

So we should mount NTFS in read write mode only in some circumstances.


----------



## marcelbonnet (Feb 21, 2019)

Wozzeck.Live said:


> this means fusefs-ntfs is already installed on his system



Exactly.


----------



## twllnbrck (Feb 21, 2019)

Wozzeck.Live said:


> If you read the first message, his attempts refers to ntfs-3g command, so this means fusefs-ntfs is already installed on his system


Okay, my fault.


----------



## marcelbonnet (Feb 21, 2019)

Wozzeck.Live said:


> this may suggest that the Windows main filesystem could be located in the 4th partition (ada


There are no other than:
`# ls /dev/ada1p*
ada1p[1-3]`


----------



## twllnbrck (Feb 21, 2019)

Does your Dell use TPM/Bitlocker?


----------



## marcelbonnet (Feb 21, 2019)

Wozzeck.Live said:


> I don't understand the syntax you use "o permissions", what does it mean ?



Whatever -o ro , -o rw or -o permissions z the problem is the same: I can't mount windows NTFS hidden in that ms-basic-data .

From ntfs-3g(8)
permissions Set standard permissions on created files and use standard access control. This option is set by default when a user map- ping file is present.


----------



## marcelbonnet (Feb 21, 2019)

Lanakus said:


> Does your Dell use TPM/Bitlocker?


I have no idea what is this. Could you elaborate on that, please?


----------



## marcelbonnet (Feb 21, 2019)

marcelbonnet said:


> I have no idea what is this. Could you elaborate on that, please?


I think it has no TPM. My laptop is not listed in https://www.dell.com/support/articl...muns-do-tpm-e-do-bitlocker?lang=pt#TPM_models


----------



## twllnbrck (Feb 21, 2019)

marcelbonnet said:


> I think it has no TPM. My laptop is not listed in https://www.dell.com/support/articl...muns-do-tpm-e-do-bitlocker?lang=pt#TPM_models


Thats good. You can avoid this source of error cause TPM/Bitlocker keep Unix/Linux often from mounting the main NTFS partition. Sometimes you dont even realize that it is encrypted cause it doesn't ask for a password on a cold boot.


----------



## marcelbonnet (Feb 21, 2019)

Lanakus said:


> Thats good. You can avoid this source of error cause TPM/Bitlocker keep Unix/Linux often from mounting the main NTFS partition. Sometimes you dont even realize that it is encrypted cause it doesn't ask for a password on a cold boot.



I did not understand if can be encrypted without TPM . The fact is  no password is required on boot... So I was never concerned about encryption.


----------



## twllnbrck (Feb 21, 2019)

marcelbonnet said:


> I did not understand if can be encrypted without TPM .


What i mean is not that your Dell use it but rather thats a common source of error.
But i think you should be able to check if bitlocker exits/is enabled within the system settings of your Win10.


----------



## RobCrowston (Feb 21, 2019)

I had a similar problem recently; where after I connected a SATA drive with an NTFS partition on it, the partition was mislabelled as "ms-basic-data" instead of NTFS. The disk had been used reliably for archive on a Windows box, not boot, and did not have bitlocker enabled on it.

I never found an explanation, but after disconnecting and reconnecting the drive several times, it eventually showed up as NTFS in gpart and was mountable by ntfs-3g. Possibly it is helpful to load the required kernel module before connecting the drive.

If this is a common problem I can try to put together a reproduction.


----------



## tedbell (Feb 21, 2019)

Try using dsbmd/dsbmc-cli.


----------

