I have created a liveUSB-stick with Xubuntu 12.04 on it. I installed Xubuntu from it on a MacBook Air. If I now plug in the usb stick, it is not recognized anymore. How can I make it recognized and format it in order to use it again as a normal storage USB stick?
2 Answers
here's some simple instructions just for your reference.
A. First we need to delete the old partitions that remain on the USB key.
Open a terminal and type sudo su
Type fdisk -l and note your USB drive letter.
Type fdisk /dev/sdx (replacing x with your drive letter)
Type d to proceed to delete a partition
Type 1 to select the 1st partition and press enter
Type d to proceed to delete another partition (fdisk should automatically select the second partition)
B. Next we need to create the new partition.
Type n to make a new partition
Type p to make this partition primary and press enter
Type 1 to make this the first partition and then press enter
Press enter to accept the default first cylinder
Press enter again to accept the default last cylinder
Type w to write the new partition information to the USB key
Type umount /dev/sdx1 (replacing x with your drive letter)
C. The last step is to create the fat filesystem.
Type mkfs.vfat -F 32 /dev/sdx1 (replacing x with your USB key drive letter)
That's it, you should now have a restored USB key with a single fat 32 partition that can be read from any computer.
-
Thanks vicd for the details, exactly what I was looking for. I indeed now see the USB stick again :-) It has the strange name D4C4-DD6D. How (or where) could I have specified a normal name like "USB"? May 20, 2012 at 13:13
-
Glad to hear you've solved this issue. To label your usb stick, feel free to use -n option, if you want to specify a name like "USB", try this command
mkfs.vfat -F 32 -n USB /dev/sdx1
– vicdMay 20, 2012 at 13:47 -
In addtion, you can get this done easily by using "Gparted Partion Editor"(default installed in ubuntu), that's a GUI way without re-formating it :-) The ONLY thing you need to pay attention is to unmount your usb stick before renaming it.– vicdMay 20, 2012 at 13:52
While this may be less optimal for some right after installing Linux. The easiest fix I've found is formatting the USB on Windows.
If it doesn't Appear tap Start > Right Click Computer > Disk (or device) Manager > Carefully delete all the USB partitions then format the new partition.
dmesg
that /dev/sdc has 2 GB, so I guess that's my USB stick. I then triedsudo mkfs -t vfat /dev/sdc
and obtained: "Device partition expected, not making filesystem on entire device '/dev/sdc' (use -I to override)". What am I doing wrong?