2

What I Did

  1. I attach an HDD, lsblk -S shows this drive as sdc
  2. I use sudo parted /dev/sdc/ to start parted against sdc
  3. I create a partition table as: mklabel gpt
  4. I make a partition: mkpart my-cool-partition and,
  5. select ext2 as my file type

According to man, this actually:

Creates a new partition, without creating a new file system on that partition

You may specify a file system type, to set the appropriate partition code in the partition table for the new partition

Therefore, I understand that Parted kindly "provisioned" or "optimized" (I hope that's the correct mindset) for me to later format the drive with ext2, for my above example.

However...

  1. then I use sudo mkfs.ntfs to format with NTFS instead of ext2. The result is: mkntfs completed successfully. Have a nice day

I don't understand how mkpart is necessary at all. I will not lie to Parted in real life, but if I did, will there be problems?

Environment: Debian, XFCE, xfce4-terminal, Bash

2
  • 1
    Does unix.stackexchange.com/questions/551030/… answer your question? Commented May 26, 2022 at 11:51
  • Yes, that awesome post answered most of my doubt. Before I closed this post as a duplicate, I received yet another great answer, so I accepted the answer instead of closing this question. I also up-voted that answer. Commented May 27, 2022 at 15:56

1 Answer 1

3

Depending on where you're going to use that disk: there might be problems - Linux doesn't care, but other OS'es/appliances might.

Years ago I had a box for recording TV that needed an external disk to save the recordings to. The documentation for the box said that it supported using NTFS and VFAT, but the box' own software only supported making NTFS, and as NTFS wasn't well-supported on Linux (it might have been read-only or something, and I wanted to be able to use it from Linux) in those days. So I attached the disk to my linux, and made a VFAT filesystem on it. When I moved it back to the box, it could see the disk but not use it (it might have tried, but failed very quickly). I had a hard time figuring out what was wrong, until I for some reason got to think about partition types - and quite right: the partition was marked to contain an NTFS filesystem, but contained a VFAT filesystem (because I hadn't cared about the partition type when, as soon as I had changed the partition type, the box had no problems using the disk.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.