# Unable to create an NTFS partition in a new GPT table



## Micrified (Aug 3, 2022)

*Context*

I've added a fancy new NVMe storage device to my system. I wish to install an operating system on it. To achieve this, I believe I should:

Setup a GPT partition table scheme
Create an NTFS partition within the GPT table scheme
Reboot and use a prepared USB to install my new operating system onto the NVMe (Windows 10)
*Steps *



DescriptionCommand/EditResultEnable NVMe direct access
with device driver (`nda`)`echo 'nvme_load="YES"' >>
  /boot/loader.config &&
echo 'nvd_load="YES"' >>
  /boot/loader.config &&
echo 'hw.nvme.use_nvd=0' >>
  /boot/loader.config &&
reboot`N/AList my devices`nvmecontrol devlist``nvme0: Samsung SSD 980 1TB
    nvme0ns1 (953869MB)
nvme1: Samsung SSD 960 EVO 250GB
    nvme1ns1 (238475MB)`List `ndaX`
device(s)`ls /dev/nda*``/dev/nda0
/dev/nda1
/dev/nda1p1
/dev/nda1p2
/dev/nda1p3`Create a `gpt`
partition table scheme`gpart create -s gpt /dev/nda0``nda0 created`Add an NTFS partition`gpart add -t NTFS -l Windows10 nda0`gpart: invalid argument


Now I have run into a problem. I would like to create this NTFS partition, but gpart refuses to. Unfortunately, the error is not very informative. If I inspect the device, I see the following



DescriptionCommand/EditResultShow device`gpart show nda0``40  1953525088 nda0 GPT (982G)
40  1953525088          - free -  (932G)`


I would think I would now be able to create a partition. Why can't I? Am I missing something? 

*Resources*


*Inconclusive*: https://forums.freebsd.org/threads/partition-and-file-system-creation-on-nvme-based-ssd.44983/


----------



## Micrified (Aug 3, 2022)

Okay, when reading https://www.freebsd.org/cgi/man.cgi?gpart(8), I found the following: 



> *ms-basic-data*        A basic data partition (BDP) for Microsoft operat-
> ing    systems.  In the GPT this type is the equiva-
> lent to partition types *fat16*, *fat32* and *ntfs* in
> MBR.  This type is used for    GPT exFAT partitions.
> ...



When I run the command with 
	
	



```
gpart add -t ms-basic-data nda0
```
 instead of NTFS, then it works. Strange. (BSD 14.0 FYI).


----------

