Fedora Linux Support Community & Resources Center
Old 15th April 2006, 10:16 PM
joskaefer Offline
Registered User
Join Date: Apr 2006
Posts: 29
erase & format USB stick

I'm starting to feel rather stupid, because I'm not able to find out how to erase everything from my USB stick, and make one, large partition on it. I've been playing around with it, inserted it in a Mac and told the Mac to erase and partition it, but that did things I don't understand.

Under linux, It should be something with fdisk and mkfs, but what exactly... If someone just could tell me in a cookbook-like way which command to type in my terminal, and when and how often to reinsert the stick, I would be very grateful.

Reply With Quote
Old 15th April 2006, 10:51 PM
brandor Offline
Registered User
Join Date: May 2005
Posts: 534
fdisk YOURUSBDEVICE (where YOURUSBDEVICE is something like /dev/sda)

At the fdisk prompt, type p and hit enter to display the partitioning.

Hit d and hten the # of partition you want to delete.

Once your done deleting all that you want hit n to create a new partition.

Once you have made the partition, change it's type to whatever you like. I recommend vfat, which is choice 'b' I think. Check the instructions in fdisk to be sure.

After you're done making your partition hit w and then q to save the changes and quit.

then you want to mkdosfs /dev/sda1 or whatever to format it.

That's pretty much it. Man pages will help when you have questions.
Reply With Quote
Old 15th April 2006, 11:04 PM
nlkrio Offline
Registered User
Join Date: Jun 2005
Location: Athens-Greece
Posts: 1,331
to learn about fdisk visit http://www.linuxcommand.org/superman_pages.php
Drink more beer but never drive !!!
:) :p :eek:
Reply With Quote
Old 15th April 2006, 11:31 PM
joskaefer Offline
Registered User
Join Date: Apr 2006
Posts: 29
Well, it makes me feel even more stupid...
Let's see:
I'm root, and the usbstick is not mounted
/sbin/fdisk/ /dev/sda9
I hit p, which shows one partition
I hit d, and get a response 'Selected partition 1'
p shows no partitions anymore
n prompts me to choose e or p, I choose p
I should give a partition number, 1 seems logical
First cylinder: 1 seems nice
Last cylinder: since I can choose from 1-17, I choose 17, thinking it will use the whole device then
To put this on the device, I hit w
It starts complaining: "WARNING: Re-reading the partition table failed with error 22: Invalid argument.
The kernel still uses the old table.
The new table will be used at the next reboot.
Syncing disks."
Rebooting my computer is not an option, and it seems rather unlikely that this is necessary, so I just ignore this.
fdisk has terminated now.
I unplug the thing, and go to the toilet
I plug the usbstick in, and wait untill fedora has automounted it.
I wonder how much data I can put on it, so I type df -h
/dev/sda9 8.5M 320K 8.2M 4% /media/Boot_OSX
8.5M? But the print on the stick says 512MB. Should I send it back to Dell, or did I do something wrong with fdisk?
After /sbin/mkdosfs /dev/sda9 and remounting, I see
/dev/sda9 8.5M 0 8.5M 0% /media/usbdisk
Which doesn't seem pretty much of an improvement.

What should I do to use the 512MB of the stick? The manpages contain a load of information, and it's difficult to find the appropriate things.

Reply With Quote
Old 26th December 2008, 08:08 AM
sanjiv Offline
Registered User
Join Date: Dec 2007
Posts: 64
this seems very techyy and geeky to me...go step wise guys so that naive like us can understand quickly....i am having the same problem but the solution is very vague i guess...thank you...
Reply With Quote
Old 26th December 2008, 01:41 PM
weitjong Offline
Registered User
Join Date: Oct 2006
Location: Singapore, 新加坡
Posts: 948
At time when I feel brave, I use fdisk command for task like this. On other times, however, I use gparted application which has an intuitive graphical user interface reminiscent of PartitionMagic application on Windows land.

If you don't have it, install it using:

# yum install gparted
YaoWT - Leave no window unbroken ♪ (^。^) 
Reply With Quote
Old 26th December 2008, 02:44 PM
sanjiv Offline
Registered User
Join Date: Dec 2007
Posts: 64
thank you very much...this is good for a naive like me...thanx
Reply With Quote
Old 26th December 2008, 04:27 PM
Magickman Offline
Registered User
Join Date: Oct 2008
Posts: 326
I too use Gparted for my wife and son's MP3 players. When they want to put new music on them, I just format the thing with the GUI interface. Works like magic!
Reply With Quote

erase, format, stick, usb

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
cant erase dvd in k3b bitodd Using Fedora 2 31st March 2007 03:21 AM
How to do a Full-format (erase all partitions) of a hard disk? Prion Using Fedora 4 16th October 2006 11:09 PM
can't erase cd-rw iamroot Using Fedora 7 2nd July 2006 07:08 AM
Format/Erase??? Dark_NecrO Using Fedora 5 5th February 2006 02:40 PM

Current GMT-time: 10:33 (Thursday, 18-12-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Arossim Beach,Goa,India Travel Photos - Longji Rice Terrace Instagram Photos - Whitestar - Plage Ksar Sghir Travel Photos on Instagram