LinuxQuestions.org
Review your favorite Linux distribution.
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 02-02-2005, 09:34 PM   #1
phishphan420
LQ Newbie
 
Registered: Oct 2003
Location: Naugatuck, CT, USA, Earth
Distribution: Fedora Core 3
Posts: 21

Rep: Reputation: 15
Usb Hdd?


I just got Debian Sarge installed, and have many questions. One at a time I guess. I've got a 20 GB USB HDD formatted FAT32, that I'd like to use on my debian system as well. It works under knoppix, but when i plug it into my Deb system, there's no handy notification of new hardware found, nothing to indicate that i even plugged it in. Any clues as to where to start? I really have no clue, but seem to remember someone mentioning the /etc/hotplug folder as pertaining to this? and maybe MODPROBE? Am i gonna have to edit FSTab? And then when i'm done using it, how to safely unmount it(umount?)?

I'm running Debian Sarge, 2.4(not sure) kernel. If I left anything else out, Let me know and I'll fill you in as best i can.

One thing i gotta say is, using the net install, downloading a 50 MB ISO, and then watching it download the other 1.5 GB is pretty damn cool. Made me feel 1337 even.
 
Old 02-02-2005, 10:09 PM   #2
koheleth
LQ Newbie
 
Registered: Aug 2004
Distribution: Gentoo, Debian Sarge
Posts: 10

Rep: Reputation: 0
Quick Method

Might as well try the fast test:

(as root)
Code:
# mkdir /media/usb
# mount /dev/sda1 /media/usb
If /dev/sda1 doesn't work, you may want to try /dev/sda3

Anyway... here's some of the other info you wanted:

Information about the drive (for 2.4 kernels) lives in /proc/bus/usb

To find out what devices are attached to USB, do:

Code:
# cat /proc/bus/usb/devices
USB drives are treated like SCSI drives. You ought to be able to see info about them in /proc/scsi/scsi

Code:
# cat /proc/scsi/scsi
If neither of those work, you may have to modprobe the right modules. You will mainly want (I hope I remember this... I just upgraded my new Sarge install to the 2.6 kernel) usb-storage. That should automatically insmod all of the other stuff (note: usb-uhci might be usb-ohci on yours):

Code:
# modprobe usb-uhci usb-storage
Finally, when you get it all installed, you can edit /etc/fstab. My line for my USB key thingy looks like this:
Code:
/dev/sda1       /media/usbkey   auto    rw,user,noauto  0       0
If you want it all to happen automatically, you will probably need to:

1) add the right modules to /etc/modules to be automatically loaded at boot.
2) install something like supermount or autofs to handle mounting and unmounting (I don't know for sure, but I've heard that hotplug is not the ideal solution, though you may be able to make do with it).
 
Old 02-03-2005, 12:11 PM   #3
phishphan420
LQ Newbie
 
Registered: Oct 2003
Location: Naugatuck, CT, USA, Earth
Distribution: Fedora Core 3
Posts: 21

Original Poster
Rep: Reputation: 15
Thanks! I'm gonna try this after work tonight.
Could you decipher that FSTab line for me?
 
Old 02-03-2005, 05:38 PM   #4
MarkhamNR
LQ Newbie
 
Registered: Dec 2004
Distribution: Fedora Core 2
Posts: 4

Rep: Reputation: 0
Re: Quick Method

koheleth, maybe you (or someone else) can help me with a similar problem I'm having. I have a USB HDD I'm trying to use with Knoppix. (It works fine with FC2.) The drive shows up in /proc/bus/usb/devices and in the output of lsusb and dmesg. It doesn't show up in /proc/scs/scsi, nor can I mount it. (I tried /dev/sd[abcd].)

lsmod shows usb-storage, usb-uhci and usbcore loaded, if that's any help.

Thanks in advance.
 
Old 02-03-2005, 06:00 PM   #5
Brian1
Guru
 
Registered: Jan 2003
Location: Seymour, Indiana
Distribution: Distribution: RHEL 5 with Pieces of this and that. Kernel 2.6.23.1, KDE 3.5.8 and KDE 4.0 beta, Plu
Posts: 5,700

Rep: Reputation: 61
Heres some stuf I have learned messing with USB devices. Some kernel releases may not work with some USB controllers or USB storage devices. Then the next release may see all and work fine. Then the next may not work with the controller again. Later release the controller is fine then the storage device does not. Some devices may work some may not. Currently 2.6.10-fc2 kernel works very well for me It sees and works well with all of my current hardware. The 2.6.9 would see all my hardware ( Printers, 20 storage drive, couple of sandisk cards) but would not my removable MP3 player in the notebook. It new there was something there but failed to recognise it. Kernel 2.6.7 seen it and so does 2.6.10, but 2.6.9 does not. Might see what version each use and go from there. On might even compile a kernel of the same release as the knoppix on fc3 and see if the stitution can be duplicated.

Brian1
" Google the Linux way @ http://www.google.com/linux "
 
Old 02-03-2005, 10:51 PM   #6
phishphan420
LQ Newbie
 
Registered: Oct 2003
Location: Naugatuck, CT, USA, Earth
Distribution: Fedora Core 3
Posts: 21

Original Poster
Rep: Reputation: 15
The quick test gets:
Code:
P2:/home/david# mkdir /media/usb
P2:/home/david# mount /dev/sda1 /media/usb
mount: you must specify the filesystem type
So i went deeper:
Code:
P2:/home/david# cat /proc/bus/usb/devices
T:  Bus=01 Lev=00 Prnt=00 Port=00 Cnt=00 Dev#=  1 Spd=12  MxCh= 2
B:  Alloc=  0/900 us ( 0%), #Int=  0, #Iso=  0
D:  Ver= 1.00 Cls=09(hub  ) Sub=00 Prot=00 MxPS= 8 #Cfgs=  1
P:  Vendor=0000 ProdID=0000 Rev= 0.00
S:  Product=USB UHCI Root Hub
S:  SerialNumber=1020
C:* #Ifs= 1 Cfg#= 1 Atr=40 MxPwr=  0mA
I:  If#= 0 Alt= 0 #EPs= 1 Cls=09(hub  ) Sub=00 Prot=00 Driver=hub
E:  Ad=81(I) Atr=03(Int.) MxPS=   8 Ivl=255ms
T:  Bus=01 Lev=01 Prnt=01 Port=01 Cnt=01 Dev#=  2 Spd=12  MxCh= 0
D:  Ver= 2.00 Cls=00(>ifc ) Sub=00 Prot=00 MxPS=64 #Cfgs=  1
P:  Vendor=05e3 ProdID=0702 Rev= 0.02
S:  Product=USB TO IDE
C:* #Ifs= 1 Cfg#= 1 Atr=c0 MxPwr= 96mA
I:  If#= 0 Alt= 0 #EPs= 2 Cls=08(stor.) Sub=06 Prot=50 Driver=usb-storage
E:  Ad=81(I) Atr=02(Bulk) MxPS=  64 Ivl=0ms
E:  Ad=02(O) Atr=02(Bulk) MxPS=  64 Ivl=0ms
I think this means that it's detecting my USB HDD, and also that it's supported. I also did cat /proc/scsi/scsi, which gives the following:
Code:
Attached devices:
Host: scsi0 Channel: 00 Id: 00 Lun: 00
  Vendor: MITBISHI Model: LS-120 COSM   05 Rev: 0515
  Type:   Direct-Access                    ANSI SCSI revision: ffffffff
Host: scsi1 Channel: 00 Id: 00 Lun: 00
  Vendor: IC25N020 Model: ATMR04-0         Rev: 0811
  Type:   Direct-Access                    ANSI SCSI revision: 02
The first entry I recognize as my LS-120 superdrive. The second is the drive attached to the USB-IDE adapter.
Typing simply 'mount' gives:
Code:
/dev/hda1 on / type ext3 (rw,errors=remount-ro)
proc on /proc type proc (rw)
devpts on /dev/pts type devpts (rw,gid=5,mode=620)
tmpfs on /dev/shm type tmpfs (rw)
/dev/hda5 on /home type ext3 (rw)
usbfs on /proc/bus/usb type usbfs (rw)
I got it!!!
Code:
P2:/proc/bus/usb/001# mount -t vfat  /dev/sdb1 /media/usb
it occurred to me that because of the LS-120 drive, USB must be on SDB! Cheers!

-Dave
 
Old 02-03-2005, 11:09 PM   #7
phishphan420
LQ Newbie
 
Registered: Oct 2003
Location: Naugatuck, CT, USA, Earth
Distribution: Fedora Core 3
Posts: 21

Original Poster
Rep: Reputation: 15
Uh- Oh. Having trouble with umount.
Code:
P2:/media/usb# umount /media/usb
umount: /media/usb: device is busy
umount: /media/usb: device is busy
P2:/media/usb# umount /dev/sdb1
umount: /media/usb: device is busy
umount: /media/usb: device is busy
I'd also like to make some sort of shortcut on my desktop to mount and umount this drive.
Quote:
Originally Posted by koheleth
If you want it all to happen automatically, you will probably need to:

1) add the right modules to /etc/modules to be automatically loaded at boot.
2) install something like supermount or autofs to handle mounting and unmounting (I don't know for sure, but I've heard that hotplug is not the ideal solution, though you may be able to make do with it).
I'd like to know the best, easiest way to do this.
 
Old 02-04-2005, 04:40 AM   #8
nnsg
Member
 
Registered: Apr 2004
Distribution: Slackware 9.1/10.1, Mandrake 9.1/10.1
Posts: 75

Rep: Reputation: 15
You are in the /media/usb directory, so it won't umount.

"cd" to another directory first.
 
  


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
usb 2.0 hdd working through usb 2.0 pcmcia card full speed in 2.4, but slow in 2.6 chilly_willy2 Linux - Hardware 11 02-02-2006 06:16 PM
USB hdd engrneil Linux - Hardware 1 10-10-2005 02:40 PM
Dual boot XP(internal IDE HDD) Debian(external USB-IDE HDD) using boot.ini PolarDog Linux - Laptop and Netbook 2 07-01-2005 09:50 PM
Install directly to HDD from iso on HDD/USB, with out burning cd vivinuthappa DamnSmallLinux 7 11-16-2004 10:03 AM
Usb Hdd hellblazer Linux - Hardware 0 09-28-2004 03:17 PM


All times are GMT -5. The time now is 06:49 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration