6

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?

7
  • 1
    Plug it in and format it. May 20, 2012 at 12:44
  • Well, that was my idea. But I don't see the USB stick anywhere in the file system, it is not mounted in /media. And: How can I format it? May 20, 2012 at 12:46
  • If you are using Linux, try the command "dmesg". It will show you whether the device has been detected or not. May 20, 2012 at 12:48
  • For how to format using the command line, check this: askubuntu.com/questions/9499/… May 20, 2012 at 12:50
  • okay, I saw with dmesg that /dev/sdc has 2 GB, so I guess that's my USB stick. I then tried sudo 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? May 20, 2012 at 12:57

2 Answers 2

8

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.

3
  • 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
    – vicd
    May 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.
    – vicd
    May 20, 2012 at 13:52
1

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.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .