LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Cannot find USB Flash Drive (https://www.linuxquestions.org/questions/fedora-35/cannot-find-usb-flash-drive-274514/)

jclieber 01-06-2005 04:31 AM

Cannot find USB Flash Drive
 
I have a home built PC with Linux/Fedora. I can plug in USB Flash drive on startup and the Fedora Hard Drive Config. Util sees both my hard drive and flash drive.

I do not see anywhere in Linux desktop, how to locate, access files on USB, xfer files to USB drive. I do not see the drive show up on any file trees as well.

I'm new to Linux and am probably missing something simple.

Can someone point me in the right direction? Many thanks.

DaneM 01-06-2005 05:01 AM

Hello, jclieber.

1) Most likely, if you've set it up in Fedora's configuration utilities there should be a directory for it somewhere in /mnt. Open a console window and type "cd /mnt" and then "ls". You'll probably find something that looks suspiciously like a usb drive. If not just plug in your drive and start looking in all the directories in /mnt for the stuff on the drive. If that doesn't get you anywhere go to #2.

2) Unplug your USB drive. Open a console window and type "df -ah". Now plug in the drive and type "df -ah" again. Check for differences. If there are differences but you can't make anything out of them post the results of those two commands and I'll take a look. If that doesn't work go on to step 3.

3) Use your favorite text editor to open /etc/fstab. You should have entries there for each hard drive partition and every data storage device that's set up on your computer. Use the process of elimination to pick which entry applies to your flash drive. If none of them look like the one post the entire fstab here and I'll take a look at it.

4) If you've gotten to this step chances are that you don't have a mount directory for your flash drive, so we'll have to create one. First we need to find out what its device name is. Unplug the drive. Open a console window and type "ls /dev > /tmp/before.txt". Now plug in the drive and type "ls /dev > /tmp/after.txt". Finally type "diff /tmp/before.txt /tmp/after.txt". Post these results, along with your /etc/fstab (if you haven't already) and we'll go from there.

--Dane

linmix 01-06-2005 05:03 AM

The fact that it is recognised at start-up doesn't mean it is configured so you can access it. What you see really isn't your flash drive, but the USB controllers being loaded. In order to access the drive you'll first have to mount it.
I'll put any comments between (brackets)
first become root:

$ su
password (type root password here)

Then make a directory to mount the flash drive under /mnt

# mkdir /mnt/usb (or any other directory you want to use to mount your flash drive)

Then mount the drive

# mount -t auto /dev/sda1 /mnt/usb

if you 'cd' to /mnt/usb you should now be able to see the contents of it (use 'ls')
if you're lucky you'll aslo see an icon on your desktop.
If it worked nicely you are now ready to add an entry to your fstab so it will mount automatically every time you plug it in. My entry reads:

/dev/sda1 /mnt/usb auto rw,user,noauto 0 0

PBSchmidt 01-06-2005 05:04 AM

Hi jclieber,

Hmm, I am *not* common with FC, in a regular Linux setup, you have to
  • use the usbstorage driver (modprobe if it is present)
  • mount the drive
For you stated that in bootup, the drive is "seen", I assume the driver is there.
So, the thing you might miss is mounting the drive. For once, you can do it (as root) by
Code:

mount -t vfat /dev/sda1 /mnt
(assuming you have a mountpoint /mnt already made using mkdir /mnt, probably you wish to mount it to /mnt/usb or somewhere, and assuming you have the usb drive maped to sda1, which should be true in most SCS-driveless systems).

If this does the trick, consider adding it to you fstab file, so you can mount it in your regular account.

Hints:
man mount
http://www.linux-usb.org/FAQ.html

HTH,

Peter

MasterC 01-06-2005 05:11 AM

Reported and requested a move to the Fedora Forum.

Cool

Valindar 01-06-2005 05:23 AM

Something I do that wasn't mentioned here is to open a root console with the following command running:
Code:

tail -f /var/log/messages
Then plug in your flash stick and look for it being recognised and registered by the usb-storage module.
Scan what it says and it should say what device name it's been registered as (ie and most commonly is /dev/sda). Then just mount it "mount /dev/sda1 /mnt/usbstick" in my case.

XavierP 01-06-2005 06:27 AM

Moved to the Fedora section.


All times are GMT -5. The time now is 11:45 AM.