LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
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 08-18-2006, 05:36 AM   #1
siochain
LQ Newbie
 
Registered: Aug 2006
Posts: 2

Rep: Reputation: 0
Mounting a USB device


This is my first time posting a question, so please excuse any problems.
I am trying to mount a usb storage device onto RedHat enterprise server 3.0. It had been previously mounted, so I know the Kernel supports usb. This is what I did :

Physically attached the USB device.

Mount -t usbdevfs usbdevfs /proc/bus/usb
...succeeds
mkdir /mnt/backup
...succeeds
Mount -t usbdevfs /dev/sda1 /mnt/backup
...succeeds

ls -al /mnt/backup

All I see is directories 001,002,003,004,devices and drivers.

cat /proc/scsi/scsi
shows only one attached device - a WD disk.

ls /proc/scsi/usb-storage-0/
shows one file called 2 ( I tried /dev/sda2 - same result )
The last line of this file shows attached=No

Then unmounted /dev/sda1 and tried
mount -t ext2 /dev/sda1 /mnt/backup
got message "wrong fs type or too many mounted filesystems"
Then tried
mount /dev/sda1 /mnt/backup
got message "must specify file type"
Then tried
Mount -t usbdevfs /dev/sda1 /mnt/backup
...succeeds
but
ls -al /mnt/backup

All I see is directories 001,002,003,004,devices and drivers.

Any advice appreciated

Thanks
 
Old 08-18-2006, 07:29 AM   #2
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
I noticed your preference is to use usbfs so this may help?
http://www.linux-usb.org/USB-guide/x173.html

but I do it differently.....Mandriva has a HAL daemon...a kind of hw detection...and I have an entry in my /etc/fstab like this

/dev/uba /mnt/flash xfs noauto,users 0 0

the device is inserted and I click on a device icon in KDE to mount it....then right hand click the icon to umount it.

btw if you use a CLI its umount and not unmount but I am sure you knew that
 
Old 08-18-2006, 07:35 AM   #3
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
Did you reformat the usb drive for ext2? They usually use a fat filesystem, and the type to mount would be vfat.

Also, the version is recent enough to where a usb drive may be handled by udev.

In any event, you might try
sudo mount -t vfat /dev/sda1 /mnt/backup -o defaults,umask=000,rw,noatime
or
sudo mount -t auto /dev/sda1 /mnt/backup -o defaults

Also, check /proc/filesystems and see if vfat is listed. You might need to "modprobe vfat" first.
 
Old 08-18-2006, 09:34 AM   #4
siochain
LQ Newbie
 
Registered: Aug 2006
Posts: 2

Original Poster
Rep: Reputation: 0
mount /dev/sda1 /mnt/backup
must give filesystem type

mount -t vfat /dev/sda1 /mnt/backup
wrong fs type

cat /etc/filesystems

ext3
ext2
nodev proc
nodev devpts
iso9660
vfat
hfs
--------------------------------------------

I then unplugged it and replugged it in and checked
tail /var/log/messages

Aug 18 13:33:18 PC35261-RHEL3 kernel: Device 08:00 not ready.
Aug 18 13:33:18 PC35261-RHEL3 kernel: I/O error: dev 08:00, sector 24
Aug 18 13:33:19 PC35261-RHEL3 devlabel: devlabel service started/restarted
Aug 18 13:33:19 PC35261-RHEL3 kernel: hub.c: connect-debounce failed, port 6 disabled
Aug 18 13:36:45 PC35261-RHEL3 kernel: hub.c: new USB device 00:1d.7-6, assigned address 4
Aug 18 13:36:48 PC35261-RHEL3 /etc/hotplug/usb.agent: ... no modules for USB product 4cf/8818/a301

------------------------------------------
dmesg

hub.c: connect-debounce failed, port 6 disabled
hub.c: new USB device 00:1d.7-6, assigned address 4
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 4
FAT: bogus logical sector size 0
VFS: Can't find a valid FAT filesystem on dev 08:01.

------------------------------------------

I am learning lots but still cannot mount this device.
Having just done the above - decided to stick my usb memory stick in
and guess what...

tail /var/log/messages
Aug 18 15:04:59 PC35261-RHEL3 kernel: scsi3 : SCSI emulation for USB Mass Storage devices
Aug 18 15:04:59 PC35261-RHEL3 kernel: Vendor: SanDisk Model: Cruzer Mini Rev: 0.1
Aug 18 15:04:59 PC35261-RHEL3 kernel: Type: Direct-Access ANSI SCSI revision: 02
Aug 18 15:04:59 PC35261-RHEL3 kernel: Attached scsi removable disk sdb at scsi3, channel 0, id 0, lun 0
Aug 18 15:04:59 PC35261-RHEL3 kernel: SCSI device sdb: 501759 512-byte hdwr sectors (257 MB)
Aug 18 15:04:59 PC35261-RHEL3 kernel: sdb: Write Protect is off
Aug 18 15:04:59 PC35261-RHEL3 kernel: sdb: sdb1
Aug 18 15:05:02 PC35261-RHEL3 /etc/hotplug/usb.agent: Setup usb-storage for USB product 781/5150/10
Aug 18 15:05:03 PC35261-RHEL3 devlabel: devlabel's temporary ignore list /etc/sysconfig/devlabel.d/ignore_list has been emptied due to a change in device configuration.
Aug 18 15:05:04 PC35261-RHEL3 devlabel: devlabel service started/restarted
-------------------------------------

Thanks for all your help - I thought I was doing something wrong - now I believe the device is corrupt or a llose connection, since Redhat clearly succeeds in recognizing my usb stick

Thanks again - my first time doing anything like this - amazing
 
Old 08-19-2006, 07:44 AM   #5
jschiwal
LQ Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682Reputation: 682
I once had a pen drive that wouldn't mount in Linux or Windows. It looked blank in Windows but I knew it wasn't. I used fdisk on the device and found that the partition type had been changed somehow. Fixing that fixed the problem.
 
Old 08-20-2006, 07:47 AM   #6
aus9
LQ 5k Club
 
Registered: Oct 2003
Location: Western Australia
Distribution: Icewm
Posts: 5,842

Rep: Reputation: Disabled
did you notice RH detected it as a sdb1?
 
  


Reply



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
mounting a USB device issey *BSD 6 03-01-2006 03:16 AM
Mounting a recognized USB device harisund Linux - Hardware 2 09-24-2005 08:07 AM
Mounting a USB device jaakkop Linux - Hardware 4 05-29-2005 05:50 AM
mounting usb device (muvo2) YBA^[x] Slackware 20 12-21-2004 08:14 AM
Mounting USB device Valhalla Linux - Hardware 17 12-11-2004 02:19 PM

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

All times are GMT -5. The time now is 10:55 AM.

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