Howto format a USB Drive to FAT32 or NTFS

For all Linux users using usb drives, is really easy. Just plug and play then share data with Windows users through it, is very simple. But if you format it using Linux ext3 or any other Linux mode, you will not be able to share data with Windows users. What you need is to format the usb drive using FAT32 or NTFS file system.

So to format a usb drive, first insert your usb drive in the usb slot of your computer, and check using below command:
$ fdisk -l
(You will see the usb disk)

Let say /dev/sdb is where my usb thumb drive was connected.

We need to unmount it:
$ umount /dev/sdb

Now, fdisk the usb stick, and not the partition:
$ fdisk /dev/sdb

Press ‘p’ to view the partitions on the drive. Delete all partitions. Create a new one with ‘n’. It will be a primary partition, and it will be partition 1. Then ‘w’ to write the partition table, and exit:

Command (m for help): p

Disk /dev/sdb: 1027 MB, 1027604480 bytes
64 heads, 32 sectors/track, 980 cylinders
Units = cylinders of 2048 * 512 = 1048576 bytes
Disk identifier: 0x610fbfb2

Device Boot Start End Blocks Id System
/dev/sdb1 * 1 980 1003504 c ext3

Command (m for help): d
Selected partition 1

Command (m for help): n
Command action
e extended
p primary partition (1-4)
p
Partition number (1-4): 1
First cylinder (1-980, default 1):
Using default value 1
Last cylinder, +cylinders or +size{K,M,G} (1-980, default 980):
Using default value 980

Command (m for help): w
The partition table has been altered!

Calling ioctl() to re-read partition table.
Syncing disks.

use the mkfs.vfat or mkfs.ntfs command to format to FAT32 or NTFS filesystem:
$ sudo mkfs.vfat -n ‘Label’ -I /dev/sdb
(Replace Label with the name you want the pen drive to have)

4. That’s it! When done formatting, you’ll be returned to the prompt
$ mkfs.vfat -n ‘sathya’ -I /dev/sdb
mkfs.vfat 2.11 (12 Mar 2011)

Remove and insert the pen drive to have mounted again!

jonboy60

I’m a Malaysian, my name is Jon Loh (jonboy60) living in Kuala Lumpur and working in Petaling Jaya, Malaysia. Jonboy60.com is a blog magazine about Linux and other open source softwares. All about to a daily jobs or real life experiences I had since the year 2002 administrating Linux and Windows server in a hosting company. Basically i will be offering Linux tips, howto, tricks, latest news and tutorial. Contact Me for Career opportunities, business offers, Linux solutions for business or home, web and email server solutions, Linux consulting and expertise requests. Email to me on jonboy60{@}gmail.com. The site I’m running is VenCouture.com – Malaysia Online Fashion Shopping Boutique, VenCouture. We sell fashion clothes, sexy lingeries, baby clothing and etc.

More PostsWebsite

Follow Me:
TwitterFacebook

One thought on “Howto format a USB Drive to FAT32 or NTFS

Leave a Reply

Your email address will not be published. Required fields are marked *

Connect with Facebook

*


7 + = 13

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

CommentLuv badge