Welcome to Linux Forums! With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.
Find the answer to your Linux question:
New to Linux Forums? Register here for free!
    Linux Forums > GNU Linux Zone > Linux Newbie > How to format USB drive

Forgot Password?
 Linux Newbie   If you're new to the wonderful world of Linux, start here!

Site Navigation
Linux Articles
Linux Forums
Linux Downloads
Linux Hosting
Free Magazines
Job Board
IRC Chat
RSS Feeds


Linux Forum Topics
Linux Forums
Your Distro
Linux Resources
GNU Linux Zone
The Community
Closed Thread
 
Thread Tools Display Modes
Old 12-26-2004   #1 (permalink)
Linux Newbie
 
rat007's Avatar
 
Join Date: Jul 2004
Location: Brno
Posts: 230
How to format USB drive

Big Fat Guy brought me new USB pendrive. How can I format it? Can I use a different filesystem than FAT32? (EXTx)
rat007 is offline  


Old 12-26-2004   #2 (permalink)
Linux Guru
 
dylunio's Avatar
 
Join Date: Aug 2004
Location: Cymru
Posts: 4,157
To format it (as root):
Code:
fdisk /dev/sda
mkfs -t vfat /dev/sda1
this will make a FAT format od somekind, I'm dot sure which (Ithink FAT32), I'm not suse if you can use something else.

dylunio
__________________
Registered Linux User #371543!
Get force-get May The Source Be With You
/dev/null
/dev/null2
dylunio is offline  
Old 12-26-2004   #3 (permalink)
Linux Newbie
 
rat007's Avatar
 
Join Date: Jul 2004
Location: Brno
Posts: 230
Thanx, this did FAT32 formating and now it works just fine. Dunno why but the default filesystem on pendrive was strange and didn't allow me to upload more than 20Megs of data even that it's 256M!
rat007 is offline  
Old 11-08-2006   #4 (permalink)
Linux Newbie
 
felipe1982's Avatar
 
Join Date: Oct 2006
Posts: 165
This isn't working for me. I have a 128Mb usb drive that i used to use no problems in linux. After a clean install of suse 10.1, I can't seem to write to it (i checked the write protect, and it is off)

when I type fdisk in konsole, this is what I get command not found.

How can I format it? I don't really want it mounted anywhere -- i only wanted it formated in FAT. ps - what is the diff b/w fat and vfat?
__________________
Visit Felipe Alvarez's website.
Linux & Windows is like Motorbikes & Cars...they work in fundamentally different ways...you should pick whichever is appropriate, not pick one and expect it to do everything that the other can do [link]
felipe1982 is offline  
Old 11-08-2006   #5 (permalink)
Trusted Penguin
 
Cabhan's Avatar
 
Join Date: Jan 2005
Location: Boston, MA, USA
Posts: 2,691
You need to be root to use fdisk. I would recommend using cfdisk, though, as it is more user-friendly.

VFAT was an extension to FAT16 that allowed long filenames. FAT32 is a version of the FAT filesystem that had a larger drive size limit than FAT16 did.

You can learn more at:

http://en.wikipedia.org/wiki/File_Allocation_Table
__________________
DISTRO=Gentoo
Registered Linux User #388732
Gentoo Linux, 410 GB HD, 1.2 GB RAM, Fluxbox, These are a Few of my Favorite Things
Cabhan is offline  
Old 11-08-2006   #6 (permalink)
Linux Newbie
 
felipe1982's Avatar
 
Join Date: Oct 2006
Posts: 165
This is what I get at konsole
sudo fdisk
root's password:
sudo: fdisk: command not found

sudo cfdisk
sudo: cfdisk: command not found
__________________
Visit Felipe Alvarez's website.
Linux & Windows is like Motorbikes & Cars...they work in fundamentally different ways...you should pick whichever is appropriate, not pick one and expect it to do everything that the other can do [link]
felipe1982 is offline  
Old 11-08-2006   #7 (permalink)
Super Moderator
 
devils casper's Avatar
 
Join Date: Jun 2006
Location: Chandigarh, India
Posts: 21,081
Send a message via Yahoo to devils casper
Quote:
Originally Posted by felipe1982
sudo fdisk
root's password:
sudo: fdisk: command not found
use 'su' instead of 'sudo'
Code:
su -
fdisk /dev/sda
mkfs -t vfat /dev/sda1



casper
__________________
It takes a lot of time to be a genius, you have to sit around so much doing nothing, really doing nothing. - Gertrude Stein
New Users: Read This First
devils casper is offline  
Old 11-14-2006   #8 (permalink)
Linux Newbie
 
felipe1982's Avatar
 
Join Date: Oct 2006
Posts: 165
solved: thanks

Code:
# cfdisk
This works beautifully. Thanks everybody.
Code:
# parted
Is another very good utility for partitioning free space, and formatting partitions. It has a few more filesystems to chose from compared with cfdisk (most I'll never use, but FAT32 on cfdisk was not compatible with my windows (xp pro SP2) whereas FAT32 in parted worked correctly.)
__________________
Visit Felipe Alvarez's website.
Linux & Windows is like Motorbikes & Cars...they work in fundamentally different ways...you should pick whichever is appropriate, not pick one and expect it to do everything that the other can do [link]
felipe1982 is offline  
Old 11-14-2006   #9 (permalink)
Super Moderator
 
devils casper's Avatar
 
Join Date: Jun 2006
Location: Chandigarh, India
Posts: 21,081
Send a message via Yahoo to devils casper
Quote:
Is another very good utility for partitioning free space, and formatting partitions.
you can use GParted. its a front end od 'parted'.





casper
__________________
It takes a lot of time to be a genius, you have to sit around so much doing nothing, really doing nothing. - Gertrude Stein
New Users: Read This First
devils casper is offline  
Old 11-14-2006   #10 (permalink)
Linux Newbie
 
felipe1982's Avatar
 
Join Date: Oct 2006
Posts: 165
the good thing about parted is you don't have to reboot. With GParted, you do. Gparted is much friendlier, though, which is good for me
__________________
Visit Felipe Alvarez's website.
Linux & Windows is like Motorbikes & Cars...they work in fundamentally different ways...you should pick whichever is appropriate, not pick one and expect it to do everything that the other can do [link]
felipe1982 is offline  
Closed Thread


Currently Active Users Viewing This Thread: 2 (0 members and 2 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off

Free Magazines
Run Your Own Web Server Using Linux & Apache - Free 191 Page Preview
Learn about everything you'll need to build and maintain your Linux servers, and to deploy Web applications to them.
subscribe
Open Source Security Myths Dispelled
Dispel the five major myths surrounding Open Source Security and gain the tools necessary to make a truly informed decision for your IT organization
subscribe
InformationWeek
InformationWeek is the only newsweekly you'll need to stay on top of the latest developments in information technology.
subscribe



All times are GMT. The time now is 02:14 AM.






© 2000 - 2009 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.3.0 RC2