I would like to know how to create a ntfs partition on /dev/sdx. I could not figure out if I should use partition type 7 86 or 87.

What is the full list of commands to use?

  • With partition type 7 86 or 87 I assume you mean the fdisk shell partition types, of course. – Sopalajo de Arrierez Oct 6 '17 at 21:02
  • This is no longer valid for GPT.... type 7 in GPT partitioning is for power pc – Raul Luna Sep 21 '20 at 15:14
  1. create a partition using fdisk

    fdisk /dev/sdx


    • to create the partition: n, p, [enter], [enter]
    • to give a type to the partition: t, 7 (don't select 86 or 87, those are for volume sets)
    • if you want to make it bootable: a
    • to see the changes: p
    • to write the changes: w
  2. create a ntfs fileystem on /dev/sdx1:

    mkfs.ntfs -f /dev/sdx1

    (the -f argument makes the command run fast, skipping both the bad block check and the zeroing of the storage)

  3. mount it wherever you want

    mount /dev/sdx1 /mnt/myNtfsDevice
  • 1
    when your disk size larger than 2TB, should use gdisk instead of fdisk. commands are simliar – temple Nov 27 '17 at 0:52
  • 10
    If you have a large file system and dont want to wait hours to write zeroes through it, you can skip that part by running mkfs.ntfs -f /dev/sdx1 instead – DCIndieDev Jun 14 '18 at 1:39
  • If your are using a GPT partition table, use 11 (Microsoft Basic Data) for the type instead of 7 – seg Feb 23 at 10:25

You can use fdisk to create the partition "disk" division but for the partition's file system you can use the mkfs.ntfs to create the file system in the partition that will use ...

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.