Can't access or eject USB flash drive

Quick to answer questions about finding your way around Linux Mint as a new user.
Forum rules
There are no such things as "stupid" questions. However if you think your question is a bit stupid, then this is the right place for you to post it. Stick to easy to-the-point questions that you feel people can answer fast. For long and complicated questions use the other forums in the support section.
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
gumby
Level 3
Level 3
Posts: 161
Joined: Sun Feb 15, 2009 12:57 pm

Re: Can't access or eject USB flash drive

Post by gumby »

Garda,

I just plugged my other flash drives into the USB port and they all worked. The HP flash drive worked, the Kingston one worked. I also have another Transcend Jetflash, I think the exact same model as the one that doesn't work, and it worked.

But the original one still does not work. It works fine in Windows.

One thing I noticed on my other Jetflash, the one that worked: when I unmounted it, its icon in Nautilus dimmed, but the light on the flash drive did not go out as it's supposed to. So I did not feel I could pull it out of the USB port without restarting and seeing the light go out as it does in Windows.

Gumby
gumby
Level 3
Level 3
Posts: 161
Joined: Sun Feb 15, 2009 12:57 pm

Re: Can't access or eject USB flash drive

Post by gumby »

garda wrote:Gumby, let's see if we can mount the flash drive manually. First, with the flash drive unplugged, comment out the added line (add a hash mark in front of it):

Code: Select all

sudo su

Code: Select all

gksu gedit /etc/fstab
Make the string look like this:
# UUID=09EA-3A0B /media/trjf1 vfat rw,noauto,nosuid,nodev,users,shortname=mixed,utf8,umask=077,flush 0 0

Then save the changes and close the file. Back to the terminal, type these commands in the terminal (plug the flash drive first):

Code: Select all

mkdir /media/test

Code: Select all

mount -t vfat /dev/sdb1 /media/test
Then check whether you can read from and write to the flash drive.
No luck, Garda. Didn't work.
Thanks for not giving up on me. I hope you have some more ideas. :?
garda

Re: Can't access or eject USB flash drive

Post by garda »

Linux does not turn off (a.k.a eject) storage devices like Windows does. As long as they have been unmounted, they may safely be removed.

Now back to the non-functioning flash drive, I think you have to format the drive in Mint. Therefore, you should boot to Windows and copy your important files from there then boot back to Mint and format the drive using Partition Editor (Control Center > Partition Editor). Here is the more detailed steps:
1. Connect your flash drive.
2. Open up Partition Editor (Control Center > Partition Editor).
3. Choose '/dev/sdb' from the combo box on the top right corner.
4. Right-click on /dev/sdb1 and choose 'Delete'
5. Click the Apply button in the toolbar and click Apply again when a confirmation dialog appears.
6. Right-click on 'unallocated' in the list and choose 'New'.
7. Make it a primary partition with FAT32 filesystem. And make sure 'Round to cylinders' is checked. Click Add when you are finished.
8. Click on the Apply button in the toolbar and again in the confirmation dialog.
9. Close Partition Editor, unplug the flash drive and plug it back in.
garda

Re: Can't access or eject USB flash drive

Post by garda »

Forgot an important note: Make sure the fstab line for the flash drive is still commented out before repartitioning it.

If the above trick does not work either, post the output of this command after you connect the flash drive:

Code: Select all

dmesg | tail -n 20
There are a few JetFlash drives here as well, but none of them has ever given me trouble. :?:
gumby
Level 3
Level 3
Posts: 161
Joined: Sun Feb 15, 2009 12:57 pm

Re: Can't access or eject USB flash drive

Post by gumby »

Garda,

It worked! Thanks again for helping this clueless newb. :)

Only thing is, in partitioning, I lost the label for the flash drive that I had made in Windows.

Didn't make a label in Gparted. Maybe I should have. But "2 GB media" is good enough I guess.

Thanks Garda. We ignorant newbs would be lost without fellows like you and Fred. :D
garda

Re: Can't access or eject USB flash drive

Post by garda »

Glad to know the flash drive is now usable in Mint. :)

We cannot use GParted to add disk labels, though. So you did not miss anything nor did something wrong either. In order to add disk labels to VFAT partitions, you must reformat the drive using this command in the Terminal:

Code: Select all

sudo mkfs.vfat -F 32 -n DISKLABEL /dev/sd[alpha][numeric]
Breakdown of the syntax:
-F 32 : Format the disk/partition as FAT32. Use -F 16 to format it as FAT16.
-n DISKLABEL : Gives the disk/partition a label "DISKLABEL".
/dev/sd[alpha][numeric] : Block device name of the partition. Example: /dev/sdb1.

And make sure that the drive/partition is not mounted before executing the command.
gumby
Level 3
Level 3
Posts: 161
Joined: Sun Feb 15, 2009 12:57 pm

Re: Can't access or eject USB flash drive

Post by gumby »

Garda, if I did that, would the label be visible in Windows too? I don't really feel like doing it right now because I've already copied all the files back to the flash drive and reformatting would mean I'd have to do it again. No big deal, but I can live without the label now. If I change my mind in future I will follow your instructions. Thanks again.
garda

Re: Can't access or eject USB flash drive

Post by garda »

if I did that, would the label be visible in Windows too?
Yes, it will be visible in Windows too. But since you have Windows, of course you can just boot to Windows and add the label there without having to reformat.
gumby
Level 3
Level 3
Posts: 161
Joined: Sun Feb 15, 2009 12:57 pm

Re: Can't access or eject USB flash drive

Post by gumby »

Hmmm...I seem to recall that when I added the label to that flash drive in Windows, I didn't have to reformat. It was pretty simple. If I add the label back in Windows, do you think the flash drive will still mount in Linux?
gumby
Level 3
Level 3
Posts: 161
Joined: Sun Feb 15, 2009 12:57 pm

Re: Can't access or eject USB flash drive

Post by gumby »

Sorry Garda, I added that last post before I read your post suggesting the same thing. :oops:
Locked

Return to “Beginner Questions”