Can I format a partition in Linux with FAT32 or NTFS?

I tried in fedora 9 to format a partition with FAT32 or NTFS but failed

mkfs -t NTFS /dev/sdb3
mkfs -t FAT32 /dev/sdb3

In both the output says the the device isn't present.
the output is something like this:
mkfs.FAT32: no device present
mkfs.NTFS: no device present

I am able to format in Linux with ext3/4 and so I expected the format type to be visible in the below command output but isn't present in the output

fdisk /dev/sdb
command (m for help): l

I pressed l so as to list the diff. format types
I don't find ext3 or ext4 present. There is a type named 'Extended' but when I run the mkfs command with this type the same error I get. Why so?

ext3 and ext4 are filesystem types, not partition types as shown by fdisk. FAT partition types shown by fdisk exist for mostly historical reasons and have nothing to do with Linux. You likely want to create a Linux of Linux LVM type of partition, and then format it using ext3 or ext4.

# ls /sbin/mkfs.*
/sbin/mkfs.cramfs  /sbin/mkfs.ext2  /sbin/mkfs.ext3  /sbin/mkfs.ext4  /sbin/mkfs.ext4dev  /sbin/mkfs.xfs

# mkfs -t ext4 /dev/sdb
Filesystem label=
OS type: Linux
Block size=4096 (log=2)
Fragment size=4096 (log=2)
Stride=0 blocks, Stripe width=0 blocks
393216 inodes, 1572864 blocks
78643 blocks (5.00%) reserved for the super user
First data block=0
Maximum filesystem blocks=1610612736
48 block groups
32768 blocks per group, 32768 fragments per group
8192 inodes per group
Superblock backups stored on blocks: 
	32768, 98304, 163840, 229376, 294912, 819200, 884736

While I've never had cause (or wanted to) create an MSDOS filesystem, there is a package you can install to do so:

# yum install dosfstools
...
# ls /sbin/mkfs
[root@test1 ~]# ls /sbin/mkfs.*
/sbin/mkfs.cramfs  /sbin/mkfs.ext3  /sbin/mkfs.ext4dev  /sbin/mkfs.vfat
/sbin/mkfs.ext2    /sbin/mkfs.ext4  /sbin/mkfs.msdos    /sbin/mkfs.xfs
1 Like

Linux does not natively support NFTS. You can format a FAT32 filesystem in Fedora using something like the following

mkfs.vfat -F 32 /dev/sdb3

or

mkfs.msdos -F 32 /dev/sdb3
1 Like