How to format USB in Linux

Posted on 2011-10-02
Medium Priority
Last Modified: 2012-05-12
Would like to format my USB and make a FAT32 file system in the USB memory stick on Federo 10 linux server. How to do it? Do any gurus offer some tips or links??
Question by:jl66
LVL 13

Accepted Solution

themrrobert earned 1400 total points
ID: 36901096
easy do this:

(as root):

type fdisk -l  to identify the drive (/dev/sdc in my system)

then, type cfdisk /dev/sdc

(or whatever your drive name)
use this tool to remove the existing partition and create a new, Fat32 / vfat partition.

after you create the partition, use the arrow keys to move to the "Write" option then save to disk.

Quit the tool,

At the prompt, type:  mkfs.vfat /dev/sdc1

LVL 13

Assisted Solution

themrrobert earned 1400 total points
ID: 36901099
You will now be able to mount the volume like:

mkdir /mnt/sdc1
mount /dev/sdc1 /mnt/sdc1


Author Comment

ID: 36901149
themrrobert: thanks a lot for your tip. Closely following it, we got

[root@bare ~]# fdisk -l /dev/sdb1

Disk /dev/sdb1: 2003 MB, 2003828224 bytes
62 heads, 62 sectors/track, 1018 cylinders
Units = cylinders of 3844 * 512 = 1968128 bytes
Disk identifier: 0x6dec580f

     Device Boot      Start         End      Blocks   Id  System
[root@bare ~]#

Nothing shows up for USB. How to proceed it?? Do I need to create sth first?


Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

LVL 21

Assisted Solution

Papertrip earned 200 total points
ID: 36901150
Don't give a device name to fdisk, just do 'fdisk -l' like themrrobert said.

Assisted Solution

KishorDas earned 400 total points
ID: 36928846
First Use the command   fdisk -l to list all the detected mass storage devices on your computer. Then carefully observe the output of the command and find out the device identificaion i.e. /dev/sdb or /dev/sdc by looking into the size of your storage device.

Then unmount the usb disk, if it is auto mounted by your OS by right clicking on the usb disk, then select the unmount command.

Then as root, use the mkfs.vfat   <your device id with partition no>

# mkfs.vfat   /dev/sdb1

Assuming your disk is identified as /dev/sdb and it has a single partition. (sbd1).  The file system vfat is used because it can be accessible by both windows and linus system. Otherwise you can use linux specific file system like ext3/ext4 along with the mkfs cmmand.

Author Closing Comment

ID: 36937628
Thanks a lot. It is helpful.

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The purpose of this article is to fix the unknown display problem in Linux Mint operating system. After installing the OS if you see Display monitor is not recognized then we can install "MESA" utilities to fix this problem or we can install additio…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
This video shows how to quickly and easily deploy an email signature for all users in Office 365 and prevent it from being added to replies and forwards. (the resulting signature is applied on the server level in Exchange Online) The email signat…
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
Suggested Courses
Course of the Month16 days, 17 hours left to enroll

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question