Ubuntu Linux format USB pen drive
Q. How do I format a USB pen drive under Ubuntu Linux for ext3 file system?
A. You can format USB pen drive with the help of following commands:
[a] fdisk : Partition table manipulator for Linux
[b] mkfs.ext3 : Create an ext2/ext3 filesystem by formatting given partition name (/dev/partition)
[c] e2label : Change the label on an ext2/ext3 filesystem
First make sure USB pen is not mounted. Click on Places > Computer > Select USB pen > Right click > Select Unmount Volume.
Let us assume that /dev/sda1 is your partition name for USB pen. To format type the following command (Open X terminal and type the command)
$ sudo mkfs.ext3 /dev/sda1
Caution: Careful while entering device/partition name; wrong name can wipe out entire hard disk!!!
Now use e2label command to change the filesystem label on the ext3 filesystem located on device /dev/sda1:
$ sudo e2label /dev/sda1 usb-pen
You can also create an MS-DOS/Windows XP file system under Linux, enter:
$ sudo mkfs.vfat /dev/sda1
Now you are ready to use USB pen.
E-mail this to a friend
Printable version
Related Other Helpful FAQs:
- Linux Formatting a CDRW / DVD Media ( blank media ) Commands
- Linux format external USB hard disk Partition
- How do I use cpio command under Linux?
- Linux tape backup with mt and tar command - howto
- Howto: Linux formatting floppy and zip disk and create filesystem
Discussion on This FAQ
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!
Tags: e2label command, fdisk command, format drive ubuntu, format pendrive linux, format usb drive ubuntu, format usb ubuntu, linux format pendrive, linux format usb, linux format usb drive, mkfs, mkfs.ext3_command, ubuntu format, ubuntu format drive, ubuntu format usb



December 12th, 2007 at 2:00 am
This guide was simple and effective. I have a Kingston 2 Gb pen drive. When I transferred some files into it from Ubuntu, the pen drive stopped working normally in Windows. When I right clicked it’s icon in windows, instead of ‘Open’ in the context menu, it showed some garbled characters. I could not format it in windows. Following the instructions given above I was able to format it to FAT32 and use it again normally.
December 21st, 2007 at 5:01 am
Dear Mr. Gain,
With regard to your posting, I wish to bring to you notice that nobody the phaque cares what you do with your pen drive. The problems you have stated are bound to happen since the hardware/software that you are using are totally jali as you yourself. If in future, if such a problem arises, I would give you a plain and simple solution and that is, you can take your pen drive and shove it up…you know know where…sideways.
With regards,
Axl
December 24th, 2007 at 10:19 pm
Axl:
The problem you demonstrate is called narcissism. I have known at least two persons with your symptoms. Unfortunately, psychiatric help for this condition is very rare.
Sorry,
Ed
January 2nd, 2008 at 9:12 pm
Hey, come on, be nice folks. Mr. Gain brought up a valid point. I do use VFAT on USB sticks for the exact purpose of going back and forth between my GNU/Linux box and MS Windows. What Mr. Gain shared above is actually yet more evidence that our favorite platform (GNU/Linux) is superior to the offerings from Microsoft. GNU/Linux made that USB stick of his *truly* interoperable, not the farce that Microsoft pretends to promise.
–TP
June 20th, 2008 at 9:14 pm
Vivek,
Thanks for the great Q&A. It helped me to format my USB drive to ext3 quickly and without problems.
-JD
August 3rd, 2008 at 9:55 pm
I have a solution more easy:
Just install gparted from synaptic.
Is easy, simple and you can format and partition in all formats.
You can format pendrive, zip, diskette, disk, etc.
Buckaroo from Argentina.
Viva Ubuntu!!