LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 04-25-2006, 09:47 AM   #1
mis2o
LQ Newbie
 
Registered: Apr 2006
Location: Bratislava, Slovakia
Distribution: debian
Posts: 4

Rep: Reputation: 0
Question cannot mount usbkey on linux


hi guys, here comes my first post to this forum:

i've got difficulties with mounting my 128MB usb key manufactured by EMTEC under debian sarge (however this is not related to distro probably).

i checked the loaded kernel modules, the usb-storage module is present. when i insert the key into a usb port i get no notification, no sign of message in dmesg or syslog. when i try to mount the key like this: mount -t vfat /dev/sda1 /mnt i get an error message about probably a bad super block or invalid filesystem. when i try /dev/sda2,sda3 etc or /dev/sdb1,sdb2 etc i get "not a valid block device" message. i'm using SATA hard disk which is detected as /dev/sda and i'm using its logical partitions /dev/sda5 and higher. i used sg_scan and sg_map to find out which scsi-like devices are detected but i only could find /dev/sda which refers to my hard disk.

i thought maybe the disk being referred to as /dev/sda and usb keys being usually being referred to as /dev/sda1 could cause some kind of interferrence, but i know too little about this to judge. please share your opinion about what might cause this and give me a hint to solve it if you can..

other relevant info is that i'm using generic 2.6 kernel and had the same usb key tested by my friend on his debian machine and all worked for him..

Last edited by mis2o; 04-25-2006 at 09:56 AM.
 
Old 04-25-2006, 11:22 AM   #2
guedellas
Member
 
Registered: Dec 2005
Location: Espaņa
Distribution: Fedora Core 8 + Debian 4.0 + Vista
Posts: 61

Rep: Reputation: 15
I had the same problem not long ago...

You probably need to modprobe also the modules usb-uhci or usb-ehci (the first is for support of usb 1.1 and the second one for usb 2.0)

Here is the post where I got it solved:
http://www.linuxquestions.org/questi...d.php?t=398644
 
Old 04-28-2006, 09:26 AM   #3
mis2o
LQ Newbie
 
Registered: Apr 2006
Location: Bratislava, Slovakia
Distribution: debian
Posts: 4

Original Poster
Rep: Reputation: 0
Unhappy

i had a look at it yesterday and found out the following:

-the module names are probably uhci-hcd and ehci-hcd
-both of them are loaded
-i get no syslog messages when plugging the key into the port

i tried the same device with Knoppix live CD:
-originally the key was not detected
-i could see uhci-hcd among loaded modules, ehci-hcd was not loaded
-after loading ehci-hcd, the key was detected and i had no problem to access it

so i still have no idea why the device is not working with my Debian Sarge install, i don't think it's a matter of USB driver as i can use the USB mouse without problems and the modules are loaded..

your help is very much appreciated!
 
Old 04-28-2006, 09:37 AM   #4
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
First item, if your Hard drive is SATA and it's device name is /dev/sda it is impossible for your USB key to also be /dev/sda.. it would at the very least have to be /dev/sdb and would probably be mounted as /dev/sdb1.

do you have the following modules loaded ?

sd_mod
scsi_mod
usb_storage
usbcore
uhci_hcd

modprobe whichever ones are not loaded..

open the log file for viewing
tail -f /var/log/messages about 10 lines of log should scroll onto the screen
plug in the usb drive and see what designation the system gives it. when you plug in the usb key you should see the messages scroll right up on the screen identifying the drive designation.

CTRL+C to exit the log

Debian doesn't have a /mnt folder by default is that something you added ? if not create a folder to mount he usbdrive
mkdir /media/usbdrive
mount the drive using the designation shown in the messages log..I'll use sdb for this example
mount /dev/sdb1 /media/usbdrive

If all that works update your /etc/moudules.conf to add hte missing modules and add an entry into /etc/fstab so your uuser can mount the drive.

Last edited by farslayer; 04-28-2006 at 09:42 AM.
 
Old 05-10-2006, 10:08 AM   #5
mis2o
LQ Newbie
 
Registered: Apr 2006
Location: Bratislava, Slovakia
Distribution: debian
Posts: 4

Original Poster
Rep: Reputation: 0
hi, me again i checked it and all of the modules listed by farslayer are loaded. i also tried modprobing ehci-hcd, as this helped me when trying USB key on Knoppix. but not this time. I tried modprobing other modules which seemed to a have a connection with usb or scsi but with no luck. only messages in /var/log/messages were connected with successfull loading these modules. When trying this on Knoppix, I could see a messages about assigning /dev/sdb1 to usb key immediately after loading ehci-hcd.

in fact, there is a /mnt directory by default in debian, but i created a different one for sure. mounting with "mount -t vfat /dev/sdb1 /mnt/usbkey" results with "not a valid block device" message. I also tried others (sdb2, even sdc) without success.

if you have any sugestions, please share it with me..
 
Old 05-10-2006, 08:32 PM   #6
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
So when you did the tail -f on the messages log and then plugged in teh USB Drive you saw absolutely nothing scroll onto the screen ?
 
Old 05-11-2006, 09:11 AM   #7
mis2o
LQ Newbie
 
Registered: Apr 2006
Location: Bratislava, Slovakia
Distribution: debian
Posts: 4

Original Poster
Rep: Reputation: 0
yes, exactly
 
Old 05-11-2006, 04:50 PM   #8
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
are you sure your USB ports are active under linux ?

Check your dmesg log to ensure the USB ports are detected at boot time..
Quote:
itg-debian:~# more /var/log/dmesg | grep uhci
uhci_hcd 0000:00:1f.2: Intel Corp. 82801BA/BAM USB (Hub #1)
uhci_hcd 0000:00:1f.2: irq 11, io base 0000ff80
uhci_hcd 0000:00:1f.2: new USB bus registered, assigned bus number 1
uhci_hcd 0000:00:1f.4: Intel Corp. 82801BA/BAM USB (Hub #2)
uhci_hcd 0000:00:1f.4: irq 11, io base 0000ff60
uhci_hcd 0000:00:1f.4: new USB bus registered, assigned bus number 2
 
Old 05-11-2006, 05:24 PM   #9
milanc
LQ Newbie
 
Registered: Apr 2006
Posts: 27

Rep: Reputation: 15
Some USB keys have directly a vfat filesystem, and are not partitioned... try mounting /dev/sdb
Another thing: on my (weird) toshiba laptop, usb didn't work out of the box, though IT WAS DETECTED - had to recompile my kernel...

No panic if you've never done it:
Login as root and:
Code:
apt-get install libncurses-dev gcc make bzip2
wget ftp://ftp.kernel.org/pub/linux/kernel/v2.6/linux-2.6.16.16.tar.bz2
tar xjf linux-2.6.16.16.tar.bz2
cd linux-2.6.16.16
make menuconfig # configure everything according to your hardware, use lspci to find out what ='s inside your pc and experiment!
make
make deb-pkg
cd ../
dpkg -i linux-2.6.16.16_2.6.16.16*.deb
update-grub   # if you use grub
apt-get install udev module-init-tools # if you used a 2.4 kernel
You'll probably get a kernel panic or two at reboot , that's normal if you use intel ich6 SATA... you might check ftp://jypmtm.homeip.net , i don't know if i uploaded my config file, so that you might see how to configure for some strange chipsets...
Choose built-in rather than modules, if it's for non-removable devices... and always put your root fs driver and your hd driver compiled-in, even if you prefer modules...

Last edited by milanc; 05-12-2006 at 02:37 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
automounting usbkey using udev bbenn Linux - Software 0 10-04-2005 05:16 AM
Slackware image on usbkey DarkNeo Linux - Software 5 08-15-2005 07:44 AM
zipslack & usbkey eno_on Linux - General 1 01-09-2005 12:23 AM
usbkey only works once after boot jkobrien Linux - Hardware 6 01-06-2005 06:41 AM
Usbkey Lobais Linux - Hardware 3 09-28-2004 09:28 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 04:53 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration