LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 02-11-2004, 09:43 PM   #31
Boneglorious
LQ Newbie
 
Registered: Jan 2004
Distribution: Mandrake 10.0, Debian 3.0
Posts: 14

Rep: Reputation: 0

I have a problem that was already described by itsjustme

I have RH9, kernel 2.4.20; my device is Fujifilm and is allegedly supported by "Linux kernel 2.4.0 and above".

Like itsjustme, I followed the instructions, and my computer told me it sda1 was not a valid block device. The tail command gave me what the other person with the same problem already told, which is reproduced below for your convenience:

Jan 12 21:12:26 localhost su(pam_unix)[2268]: session opened for user root by (uid=500)
Jan 12 21:13:13 localhost kernel: Initializing USB Mass Storage driver...
Jan 12 21:13:13 localhost kernel: usb.c: registered new driver usb-storage
Jan 12 21:13:13 localhost kernel: USB Mass Storage support registered.

Unlike itsjustme, lsusb -v gives me a whole host of variations of the following:

"Unknown line at line 6"
(where the variation is in the number, as you probably guessed)

Any ideas, anyone? itsjustme apparently wasn't supported by his OS, but the documentation that came with mine didn't mention any particular distro, only the kernel, and I have a kernal that is alleged to be supported.

Last edited by Boneglorious; 02-11-2004 at 09:47 PM.
 
Old 02-17-2004, 12:19 AM   #32
brassj41
LQ Newbie
 
Registered: Feb 2004
Location: Texas
Distribution: Mandrake 9.1
Posts: 1

Rep: Reputation: 0
[QUOTE]Originally posted by Mad Merlin
It's probably not exactly the same thing, but with Mandrake 9.1, I was able to plug in a smartcard using the usb smartcard reader for my digital camera, and was able to read/write to it immediately without any fiddling. Pretty nifty stuff, but from the looks of it, the usb flash drives are different. [/QUOTE

I am running Mandrake Linux 9.1 and I just bought a Lexar JumpDrive usb flash drive. All I did was plug it in, and Mdk automatically updated my fstab file, and created a new folder at "/mnt/removable". All I had to do to access it was "mount /mnt/removable".
 
Old 02-19-2004, 08:15 PM   #33
chakkerz
Member
 
Registered: Dec 2002
Location: Brisbane, Australia
Distribution: a few...
Posts: 654

Rep: Reputation: 32
Ah ... very nice HOWTO, but there was one issue missing.

With 2.6 series of the linux kernel SCSI emulation is no longer needed to burn CDs, so i didn't have any SCSI compiled in, or as a module. Which meant the drive didn't work.

A "quick" recompile later and SCSI emulation was added (i added general as well as for CD and HDD drive) and compiled into the kernel, AND it all worked fine. Just as was already documented.

In short SCSI is needed.
 
Old 02-22-2004, 01:55 AM   #34
verstapp
Member
 
Registered: Feb 2004
Location: canberra australia
Distribution: Suse 9.0
Posts: 44

Rep: Reputation: 15
Thanls for the brilliant USB tutorial, membrax. It contained the level of detail needed by us newbies. I especially liked the before-and -after views of files, eg fstab.

Now if only you can do the same for CDROMs and 'how to set up a PPPoE connection' then my life would be complete, for the moment anyway.

ps.KDevelop is giving me some grief too.

Last edited by verstapp; 02-22-2004 at 01:57 AM.
 
Old 02-23-2004, 03:42 PM   #35
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
I use a SanDisk SD Card reader on my two SuSE 8.2 Pro systems and it works fine...

I probably should have just gotten another identical SD Card with reader,... However, I recently picked up a SanDisk Cruzer Mini 128 (model SDCZ2-128). Initially, I got it to accept a file from my desktop machine without too much hassle. Thereafter, I can't get it to recognize as a USB Mass Storage Device at all. I have tried mounting it as /dev/sda1,... /dev/sdb1,... /dev/sdb11 and everything in between. I have edited the fstab file, the mtab file,... and even tried to figure out what it is being identified as with the graphical usbview application...

USBVIEW sees the flash drive, but I can't the thing to mount. I tried to format the drive as a fat32 drive under windoze 2000 (which sees and writes and reads the thing just fine). Still, when I [alt] [cntrl] [f10], the process window shows the thing being seen by hotplug services, it tries to mount it as a scsi device (like sdb, for example), it just doesn't seem to be reading the partitioning of the device...

I would be happy if I could just get a couple of command lines to work to access the thing (that way I could write a script to dump info to it, one to erase stuff from it, and another one to read stuff off it). However, I'm at a loss. I had a similar problem with an HP USB enabled digital camera, but it works just fine now that a member of my LUG helped me with the command line gphoto2...

The usb-storage module is installed and working (insmod usb-storage returned a message saying it was already installed, lsmod shows it working). I got the thing to be mounted once on the desktop machine, moved a file to it, never on my laptop machine,... but not since...

I can't understand why a fairly standard USB Mass Storage Device doesn't work. Can anyone assist???
 
Old 02-24-2004, 03:32 PM   #36
JaseP
Senior Member
 
Registered: Jun 2002
Location: Eastern PA, USA
Distribution: K/Ubuntu 18.04-14.04, Scientific Linux 6.3-6.4, Android-x86, Pretty much all distros at one point...
Posts: 1,802

Rep: Reputation: 157Reputation: 157
As a follow-up,...

I got the cruzer mini working on my desktop system, but on my laptop, the thing freezes as I try to mount the drive.

The initial problem was not having all of the scsi stuff for SuSE installed. As far as the laptop is concerned though, I am at a loss. It just hangs while trying to mount the drive.

My desktop machine does have some problems such as sometimes not wanting to umount unless I do a lazy umount as root...
 
Old 02-27-2004, 01:55 PM   #37
athmpou
LQ Newbie
 
Registered: Feb 2004
Posts: 1

Rep: Reputation: 0
Unhappy Same problem

I have a simmilar problem with my usb stick and fedora core 1
after
#mount -t vfat /dev/sda1 /mnt/flash
i get a message :
mount: wrong fs type,bad option, bad superblock on /dev/sda1,...

i (think i) have all needed modules loaded, the messages on the monitoring console are:

Feb 27 21:47:53 localhost kernel: hub.c: new USB device 00:1f.2-2, assigned address 8
Feb 27 21:47:53 localhost kernel: hub.c: USB hub found
Feb 27 21:47:53 localhost kernel: hub.c: 1 port detected
Feb 27 21:47:53 localhost kernel: hub.c: new USB device 00:1f.2-2.1, assigned address 9
Feb 27 21:47:53 localhost kernel: usb.c: USB device 9 (vend/prod 0x67b/0x2517) is not claimed by any active driver.
Feb 27 21:47:56 localhost usb.agent[11042]: missing kernel or user mode driver usbcore
Feb 27 21:47:56 localhost usb.agent[11042]: missing kernel or user mode driver usbcore
Feb 27 21:47:57 localhost kernel: Initializing USB Mass Storage driver...
Feb 27 21:47:57 localhost kernel: usb.c: registered new driver usb-storage
Feb 27 21:47:57 localhost kernel: scsi1 : SCSI emulation for USB Mass Storage devices
Feb 27 21:47:57 localhost kernel: Vendor: USB 2.0 Model: Flash Disk Rev: PROL
Feb 27 21:47:57 localhost kernel: Type: Direct-Access ANSI SCSI revision: 02
Feb 27 21:47:57 localhost kernel: Attached scsi removable disk sda at scsi1, channel 0, id 0, lun 0Feb 27 21:47:57 localhost kernel: SCSI device sda: 128000 512-byte hdwr sectors (66 MB)
Feb 27 21:47:57 localhost kernel: sda: Write Protect is off
Feb 27 21:47:57 localhost kernel: sda: sda1 sda2 sda3 sda4
Feb 27 21:47:57 localhost kernel: USB Mass Storage support registered.
Feb 27 21:48:00 localhost devlabel: devlabel service started/restarted



any help would be nice!!
 
Old 03-10-2004, 12:21 PM   #38
refields
LQ Newbie
 
Registered: Mar 2004
Location: Santa Fe
Distribution: Red Hat 9, WS 3
Posts: 14

Rep: Reputation: 0
Thanks, Membrax! Excellent instructions.

Lexar JumpDrive 2.0Pro 256 MB here on Red Hat WS3 works like a charm.

Tonight I configure my Red Hat 9 box at home.
 
Old 03-11-2004, 12:35 PM   #39
Visko
LQ Newbie
 
Registered: Mar 2004
Posts: 18

Rep: Reputation: 0
My experiences with flash drives

I've got an Apacer Handy Steno 2.0 (apparently the first of the line that actually works with Linux) and went through about 4 hours of grief trying to get it working. At this point, I have an icon for not only it, but also my camera on the desktop that allows me to click the icon and pull up the drive. (Clicking the icon again unmounts and removes it from the system; I'll post the perl script later.)

I found that you need the following things for everything to work:
usb mass storage
scsi support
An open mind

I've noticed a lot of people assuming that sda1 or sdb1 is the default location for a usb device; in the case of my configuration (RH9.1, kernel 2.4.24, 2-year-old Tyan MP board) the default location for my flash drive is /dev/sda, and my camera is /dev/sdb1. It's weird, I don't quite understand it (although I have my suspicions), but there it is. Make sure you try /dev/sda as well as the partition numbers; this is actually an un-partitioned device you're trying to mount (usually) so you may not need to specify partition numbers.

Ok, now the perl script. You can run it on a command line, but I just created an icon which links to it:

#!/usr/bin/perl

@mod = `lsmod`;
@mount = `mount -l`;
$found = 0;
foreach $element (@mod)
{
@split = split(/ /, $element);
if (@split[0] eq "usb-storage")
{
foreach $el (@mount)
{
@split2 = split(/ /, $el);
if (@split2[0] eq "/dev/sda")
{
$found = 1;
`umount /flashdrive`;
}
}
if (@split[15] == 1 or @split[15] == 0)
{
`rmmod usb-storage`;
}
}
}
if ($found == 1) { die; }
else
{
$probe = 1;
foreach $element (@mod)
{
@split = split(/ /, $element);
if (@split[0] eq "usb-storage")
{
`mount /dev/sda /flashdrive`;
$probe = 0;
}
}
if ($probe == 1)
{
`modprobe usb-storage`;
`mount /dev/sda /flashdrive`;
}
`konqueror /flashdrive &`;
}

This can be a bit of overkill if you don't have multiple usb mass-storage devices on your system, as I do; at that point, rip out all of that module checking code.

Obviously you'll need to switch out /dev/sda with whatever device your drive connects to, and /flashdrive with whatever folder you want to mount it on. And if you don't like using konqueror to browse your files, switch that out too.

I also recognize that this code is REALLY un-optimized and bulky, but I wasn't going for elegance here. If anyone can come up with a smaller, more efficient version, please post it. I'd be interested in studying it.

-Visko
 
Old 03-11-2004, 12:40 PM   #40
Visko
LQ Newbie
 
Registered: Mar 2004
Posts: 18

Rep: Reputation: 0
I almost forgot...

I have a question for anyone who knows more about kernel modules than I do (I'm of the old-school monolithic kernel part of the world), why does the mass-storage module freak out and become non-functional when it's gone from non-zero devices depending on it to 0? I had to add checking into my perl script because if you don't remove the module when its device number hits 0, everything breaks.

What's up with that? Has it been fixed by 2.6?

-Visko
 
Old 03-11-2004, 01:06 PM   #41
Boneglorious
LQ Newbie
 
Registered: Jan 2004
Distribution: Mandrake 10.0, Debian 3.0
Posts: 14

Rep: Reputation: 0
Re: Instructions in post 1

I'd like to point out that the line one adds to /etc/fstab is variable. If your flash drive is not formatted in vfat format, replace vfat with the appropriate format. The part that says "noauto, user, etc." can be made "defaults" (I mention it because the one in the original instructions didn't work on my particular installation; so if such is the case for someone else, try defaults.)

Also, I think that if you have all the correct modules loaded, the computer will detect the usb drive before you edit /etc/fstab (my did, at any rate; it may not be true in general), and the material point is that it will tell you what device it is in the logs. You can then edit /etc/fstab with whatever device, whether it's sda or what.

Last edited by Boneglorious; 03-11-2004 at 01:13 PM.
 
Old 03-11-2004, 01:45 PM   #42
Visko
LQ Newbie
 
Registered: Mar 2004
Posts: 18

Rep: Reputation: 0
Re: Boneglorious

I noticed that the default partitioning of my flash drive was causing all sorts of problems, actually, so I popped it into window long enough to format it fat32, and it runs fine with vfat now. Takes care of a lot of problems and makes it more compatible with the fstab post.

-Visko
 
Old 03-11-2004, 01:55 PM   #43
Boneglorious
LQ Newbie
 
Registered: Jan 2004
Distribution: Mandrake 10.0, Debian 3.0
Posts: 14

Rep: Reputation: 0
formats

The default format on mine was ms-dos, so I changed it to FAT32, which is fine for linux, but seems not to be supported by Mac OS X. I've been having real trouble finding a format that I can use with my Linux and OS X. I think, according to some stuff I read on the internet, I'm going to have to learn to recompile my kernel with some additional modules in order to have it support a format that OS X supports. (I'm hoping to find an easier solution after more research.)

Perhaps oddly, the fact that my linux doesn't support ms-dos wasn't a problem for me. I used "ms-dos" in /etc/fstab, mounted the drive and reformatted it using parted, then changed /etc/fstab to reflect the format change.

Last edited by Boneglorious; 03-11-2004 at 01:58 PM.
 
Old 03-11-2004, 02:44 PM   #44
Visko
LQ Newbie
 
Registered: Mar 2004
Posts: 18

Rep: Reputation: 0
OSX doesn't support fat32? Man, I must be missing something....

I could have sworn even OS8 was supporting fat32 filesystem format....are you sure it's not an option you turned off during OSX installation? Also, since OSX is based on BSD, you should be able to find fat32 support from the BSD, linux, or mac community (the modules are there, if still a bit buggy. I'm constantly reading/writing to fat32 partitions on Linux, but I admit to a lot of cluelessness when dealing with OSX.

-Visko
 
Old 03-11-2004, 02:55 PM   #45
Boneglorious
LQ Newbie
 
Registered: Jan 2004
Distribution: Mandrake 10.0, Debian 3.0
Posts: 14

Rep: Reputation: 0
I'm pretty clueless about OS X, all I know is that after the drive was reformatted, I plugged it into a Mac, on which it previously worked, and it told me it didn't understand the format. My drive came formatted with Ms-dos format, according to the documentation, for Mac/Windows cross-compatibility. I can't imagine any reason to use that format over FAT32 than because OS X doesn't support FAT32. I'm hopeful that my personal OS X guru will soon show up and show me a checkbox in the system preferences that will fix the problem, though, and your reply gave me more hope that that's the case. I'll update this when I solve the problem, so everyone will know the answer to that eternal question: does OS X support FAT32?! (I'm sure everyone's waiting with baited breath!)
 
  


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
Mount USB mp3 flash drive in linux houler Linux - Hardware 3 04-09-2005 06:09 PM
Installing Linux on a USB Flash Drive spaaarky21 Linux - Distributions 3 11-02-2004 02:17 PM
Accessing USB Flash Drive under Redhat Linux kn_sravan Linux - Hardware 7 08-18-2003 12:56 AM
Installing Linux from a usb flash drive? jck Linux - General 0 08-03-2003 04:35 PM
Installing Linux on a USB flash drive!? delphinus Linux - General 4 03-15-2003 06:32 PM

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

All times are GMT -5. The time now is 12:25 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