[H-GEN] USB on Linux

Frank Brand fbrand at uq.net.au
Sat Apr 13 22:05:21 EDT 2002


[ Humbug *General* list - semi-serious discussions about Humbug and     ]
[ Unix-related topics. Posts from non-subscribed addresses will vanish. ]

NOTE: THIS IS A FAIRLY LONG REPLY. IF YOU ARE NOT THE SLIGHTEST BIT
INTERESTED YOU MIGHT LIKE TO DELETE IT!!


>> >If its anything like my cd-burner, (which is ide though). I have to
append
>> >/dev/hdc=ide-scsi
>>
>> Problem though...you already know what your CDROM is mounted on
.../dev/hdc.
>>
>
>if this is a usb device, it still should get registered at boot when all
the usb
>stuff is loaded, so maybe you will get some pointers there. However you are
>right, it will end up being /dev/sda (also check sga) or something like, so
it
>shouldn't take too long to find. I'd like to know how you go with it too.


There are a number of issues here which have caused me to give this a miss
at present and concentrate on other things. I can use the drive quite easily
in Windows but getting it working in Linux is a pain.

USB seems to have relatively good driver support in the kernel and modules
and, looking through the kernel config, I can see why the easy stuff -
modems, scanners, cameras, printers etc will mostly work relatively simply -
ie just by plugging them in maybe. Incidentally digital imagers, for my
digital camera downloads I have a USB card reader (A Microtech Zio) that i
just slip the memory chip into and get high speed downloads...it is treated
as a removeable hard drive. I don't use any of the proprietory download
software. For small file transfer and backup this is a great system too.
Michrotech driver is included in the latest Linux kernels.

However, USB hard drives are a significant bother...not at all simplistic.

Sometimes the USB drive is operated through a USB->SCSI interface but mine
is through an ATAPI-4 bridge. The device is detected at start up but dmesg
tells me that no driver is associated with it, so I am less than
enthusiastic about chasing this up at this stage.

The propensity for Linux to treat IDE, Floppy and USB etc devices as SCSI is
archaic. I remember when the only CD Burners recognised were SCSI and that
only some were recognised (you had to have a supported brand)...now IDE CD
burners are recognised as SCSI. It is this level of complexity and confusion
that scares users back to Billy!! (see below for a news group post).

Problem 1.  To support USB hard drives (or IDE drives in USB enclosures)
your kernel needs to support SCSI. This is a chore for newbies although most
default kernels support SCSI in some form but why would you expect this as
you do not have any SCSI devices on your box.

Problem 2. My box...not having any SCSI devices has no device files (eg sda,
sdb, sdc, sdd etc etc) mmm makedev or mknod required...mmm how many people
know the major and minor numbers of SCSI drives...OK its in with the kernel
source in devices.txt but I will bet a lot of experienced users don't know
that...how are inexperienced users to know that?

Problem 3. What device should it be mounted on...you would expect sda but
some devices like other mount points.

Problem 4. ide-scsi module needs to run and usb-storage module needs to run.
Neither of these want to run on my box...possible because of lack of SCSI
support or mount points or something?


Maybe other problems that I have not yet encountered but I am giving this a
miss at the moment and I will use it in Windows and transfer files
internally across my network. I am sceptical that my drive will actually
operate because a driver is not allocated to it, but, with some fiddling at
some later time I might just be able to sort it out.

The following is an interesting news group post from what looks like a
relatively competent computer user ( and prepared to have a go at doing
things not just looking for a simple answer on a news group )but new to
Linux and a Linux user who is trying like buggery to help the newbie. (I
take my hat off to this Linux guy).

------start of post--------------------------------------------------

Michael Thomas wrote:

> On Sat, 01 Dec 2001 21:31:27 GMT, no at way.com (Justin ) wrote:
>
> >On Fri, 30 Nov 2001 08:59:24 -0800, Michael Thomas <mt at armory.com>
> >wrote:
> >
> >>On Fri, 30 Nov 2001 04:35:34 GMT, no at way.com (Justin ) wrote:
> >>
> >>>On Thu, 29 Nov 2001 17:54:30 -0800, Michael Thomas <mt at armory.com>
> >>>wrote:
> >>>
> >>>>On Thu, 29 Nov 2001 07:10:15 GMT, no at way.com (Justin ) wrote:
> >>>>
> >>>>>On Tue, 27 Nov 2001 23:00:59 -0800, Michael Thomas <mt at armory.com>
> >>>>>wrote:
> >>>>>
> >>>>>>On Wed, 28 Nov 2001 03:45:44 GMT, no at way.com (Justin ) wrote:
> >>>>>>
> >>>>>>>I've been unable to find any information on using FAT32 formatted
USB
> >>>>>>>external hard drives with RedHat 7.2. I'm already using a USB
mouse,
> >>>>>>>so I know USB is working. At boot time, a line also goes by about
> >>>>>>>starting USB storage....
> >>>>>>>
> >>>>>>>I know how to use the mount command to mount drives/partitions at a
> >>>>>>>location of my choosing - but how do I find out "where" the USB
drives
> >>>>>>>are? For example, /dev/sda4 or whatever.
> >>>>>>>
> >>>>>>>Thanks!
> >>>>>>
> >>>>>>Take a look in /etc/sysconfig/hwconf or /proc/mounts -  there's
> >>>>>>something about usbfs in there.
> >>>>>>
> >>>>>>I always just look really closely during boot for the device to be
> >>>>>>recognized and it shows up there.  Maybe ctrl-s to freeze the
screen?
> >>>>>>
> >>>>>>MT
> >>>>>
> >>>>>
> >>>>>Based on your advice, I looked in /etc/sysconfig/hwconfig, and found
> >>>>>the following:
> >>>>>
> >>>>>class: HD
> >>>>>bus: USB
> >>>>>detached: 0
> >>>>>driver: usb-storage
> >>>>>desc: "ScanLogic Corp. IDE Bridge"
> >>>>>usbclass: 8
> >>>>>usbsubclass: 6
> >>>>>usbprotocol: 50
> >>>>>usbbus: 1
> >>>>>usblevel: 1
> >>>>>usbport: 0
> >>>>>vendorId: 04ce
> >>>>>deviceId: 0002
> >>>>>productrevision: unknown
> >>>>>
> >>>>>That is definitely the device in question... but where does it
"live"?
> >>>>>This file doesn't say.
> >>>>
> >>>>I think this article will help you out.  Watch for word wrap.
> >>>>
>
>>>>http://groups.google.com/groups?hl=en&selm=slrn9qvm52.m1.danceswithcrows
%40samantha.crow202.org
> >>>>
> >>>>According to it the commands are:
> >>>>
> >>>>modprobe usb-storage
> >>>>modprobe ide-scsi
> >>>>
> >>>>plug in the disk
> >>>>disk should be recognized as /dev/sda unless you have any other scsi
> >>>>disks.
> >>>>
> >>>>MT
> >>>>
> >>>>

-----This bit appears to be from a third person-------------------------

> >>>Michael, what can I say? I really appreciate you following this thread
> >>>and trying to help.
> >>>
> >>
> >>Funny part of it is I don't even have any USB storage devices on my
> >>linux box.  I guess I'm just curious.

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

> >>>I followed those instructions to the letter, and it just doesn't work.
> >>>
> >>>
> >>>It's always the same error, "unknown device" when I do "mount /dev/sda
> >>>/mnt/mymountpoint". I also tried dev/sda1, 2, 3... there's nothing
> >>>there.
> >>>
> >>
> >>OK.  Since it's established that the system does recognize the device
> >>as emulating SCSI, try looking into /proc/scsi for any devices.
> >>Hopefully there will be a reference there.  Might be something in
> >>/proc/scsi/scsi, so do a cat on that.  If you find an sdx reference
> >>(wouldn't that be sweet?) then you can try to mount it by going
> >>through 'mount /dev/sdxx /mnt/<mountpoint' and you will have some
> >>success.  Might have to go up a few numbers.
> >>
> >>I wish I knew where to find the device number that the system assigns
> >>devices at boot.  I can always find hda, sda, etc. but never hda1, 2,
> >>3, etc.  That info has got to be somewhere in a file on the system.
> >>
> >>>Is it possible the drives live somewhere else? /dev/usb or something?
> >>>What's most infuriating, of course, is that plugging either of these
> >>>two USB drives in under Windows 2000 results in the drive immediately
> >>>turning up with a drive letter..., which is really frustrating when
> >>>I'm trying to drop Windows in favor of Linux.
> >>
> >>Linux is almost always a pain in the ass, which is why it's free.  At
> >>least that's my take.  I still love it, though.
> >>
> >>MT
> >
> >
> >Allright, now we're getting somewhere! I booted with the drive plugged
> >in and found a folder called "usb-storage-0" inside the /proc/scsi
> >folder. Inside is a file called "0" that contains the following entry:
> >
> >
> > Host scsi0: usb-storage
> >       Vendor: ScanLogic USBIDE
> >      Product: ScanLogic USBIDE
> >Serial Number: None
> >     Protocol: Transparent SCSI
> >    Transport: Bulk
> >         GUID: 04ce00020000000000000000
> >     Attached: 1
> >
> >There is also a folder called "usb-storage-1", which contains a file
> >called "1". That file is empty.
> >
> >Finally, inside /proc/scsi is a file called "scsi" that contains:
> >
> >Attached devices:
> >Host: scsi1 Channel: 00 Id: 00 Lun: 00
> >  Vendor:          Model:                  Rev:
> >  Type:   <NULL>                ANSI SCSI revision: ffffffff
> >
> >Does this help at all?
> >
> >Justin
>
> Hey Justin,
>
> While it's great the system can find it, this doesn't help.  But I
> found this link which says you have to *turn on* SCSI support and SCSI
> disk support.  Both of these need to be compiled into your kernel.
> Here is a link:
>
>
http://groups.google.com/groups?hl=en&threadm=wkg0h1o0zp.fsf%40mail.hex.net&
rnum=5&prev=/groups%3Fq%3Dscsi%2Bdisk%2Bsupport%26hl%3Den%26rnum%3D5%26selm%
3Dwkg0h1o0zp.fsf%2540mail.hex.net
>
> Again, watch for word wrap.
>
> Looks like this is a good place to start looking.  You need to get the
> SCSI disk support working and then I think it will be as easy as
> plugging it in and going with it.
>
> http://www.linux-usb.org/ has all you supposedly need to know about
> all of this stuff.
>
> Good luck.  It's gotta work eventually.
>
> MT

Well, that's enough for me. There's no way in hell I'm going to recompile
the kernel to make a stupid plain-vanilla USB drive work. This is
ridiculous. This is RedHat 7.2, the most recent
version available! Why would support not be built into the kernel already?

I am not even that Linux-savvy and I'm in way over my head. It's crap like
this that makes people stay with Windows! Laugh all you want but at least I
can access my files.

(Michael this is not an attack on you, thanks for your help).

-----------end of post------------------------------------

This guy is in front of me, his drive is recognised and a driver, the driver
you want too...usb-storage, is allocated to it. I suspect the problem in the
case above is either that the kernel is not supporting SCSI or that mount
points are not present.

Probably enuff controversy for today but, for the life of me, I cant
understand the necessity for all the SCSI stuff....Windows sorted out IDE
and USB ages ago...Linux knows about IDE drives and USB gear.

Why do we need to kid that the CD Burner is a SCSI drive?

MMMM another world...the majority of computer users dont even know what SCSI
is, then for others its all there is.



Frank Brand



--
* This is list (humbug) general handled by majordomo at lists.humbug.org.au .
* Postings to this list are only accepted from subscribed addresses of
* lists 'general' or 'general-post'.  See http://www.humbug.org.au/



More information about the General mailing list