LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   *BSD (https://www.linuxquestions.org/questions/%2Absd-17/)
-   -   USB storage drive problem (https://www.linuxquestions.org/questions/%2Absd-17/usb-storage-drive-problem-373580/)

realnerd 10-16-2005 08:22 AM

USB storage drive problem
 
I have been using FreeBSD 5.4, GENERIC kernel for two weeks now. I am very satisfied with it.
However I have an irritating problem: I cannot mount my USB storage drive (Iomega 256Mb) which has data from my work (Win 2000) on it.

This is what I do:

mount -t msdosfs /dev/usb0 /mnt/usbdrive

and what I get:

/dev/usb0: Block device required

Here is the result of usbdevs -v:

umass0: I0MEGA Mini256MB*IOM2A5, rev 2.00/2.00, addr 2
umass0: at uhub0 port 2 (addr 2) disconnected
umass0: detached
umass0: I0MEGA Mini256MB*IOM2A5, rev 2.00/2.00, addr 2

when I attach or detach the drive.

A dmesg | tail shows that the drive is detected.

I have searched in Google, in this forum, but could not find an example with a solution. Pardon me if my question has already been posted a number of times.

Could you give me some advice?

Thanks in advance.

RJW 10-16-2005 08:36 AM

Are there any slices on the USB drive? To find out run:
Code:

# ls /dev|grep usb0
if you see additional entries, such as usb0s1, then try mount one of those.

realnerd 10-16-2005 09:08 AM

Thanks for your so quick reply. :)

# ls /dev|grep usb

gives usb0 and usb, nothing more.

I see that I had make a mistake in my previous post, I gave the result of dmesg | tail.

This is the result of usbdevs -v:

umass0: I0MEGA Mini256MB*IOM2A5, rev 2.00/2.00, addr 2
umass0: at uhub0 port 2 (addr 2) disconnected
umass0: detached
umass0: I0MEGA Mini256MB*IOM2A5, rev 2.00/2.00, addr 2

Does it give more information ?

realnerd 10-17-2005 01:29 PM

Result of usbdevs -v:

Controller /dev/usb0:
addr 1: full speed, self powered, config 1, UHCI root hub(0x0000), Intel(0x0000) , rev 1.00
port 1 powered
port 2 addr 2: full speed, power 178 mA, config 1, Mini256MB*IOM2A5(0x0012), I0 MEGA(0x08ec), rev 2.00

Does it give new indication?

Thanks for any help!

cnjohnson 10-17-2005 01:43 PM

/dev/usbx (/dev/usb0, etc) is probably not what you want, it is the device attached to the /dev/usbx device that you are looking for, and not the usb device. The /dev/umass0 device means that (AFAIK) freebsd communicates with your device; in fact, your device does identify itself. So, you are looking for the device that you can mount. Do an ls /dev before you plug the device in. Then do an ls /dev after you plug in the device and see if there is another device (like /da0, or da1, etc) that gets created. If there is, then try to mount the first slice. Suppose you created this mount point: /mnt/iomega, and /dev shows a /da0 device. Try this:

mount -t msdosfs /dev/da0s1 /mnt/iomega

Cheers--
Charles

realnerd 10-18-2005 02:18 PM

I tried what you said but unfortunately got no new device in /dev, especially no /da* (0, 1 ...) created when I plug in my USB drive.
Could it be a problem of USB2 (my USB drive) versus USB1 port (it's an old computer it should not have all this modern hardware)?

Thanks for any advice!

RJW 10-18-2005 06:29 PM

Check your kernel config and make sure all the USB devices are set.

// Edit.

Someone who had similiar problems. It's since been resolved.

http://www.linuxquestions.org/questi...hreadid=366935

realnerd 10-19-2005 02:02 PM

Thanks for the thread, it was very useful: I am in the same situation, ehci is commented out in the config file of the generic kernel.

I have made the following experience:

realnerd 10-19-2005 02:12 PM

Thanks for the thread, it was very useful: I am in the same situation, ehci is commented out in the config file of the generic kernel.

I have made the following experience: I have tried another USB pen drive and it worked: I was able to mount it using mount -t msdosfs /dev/da0s1 /mnt/usbdrive and to read and copy data. So, *big success*.

I retried the initial pendrive and no success (no appearance of /dev/da*) and a third one with the same failure. Both USB drives work perfectly on win2000 (at work) and debian sarge (at home).

Would my FreeBSD box be able to mount and use only certain types of USB pen drives, and not others? Is it related to the type of USB key (version 1. or 2.0) or USB port? What could I do to use all types?

Please, advise. And thanks for your help, I think that I am learning a lot through my difficulties.

RJW 10-20-2005 03:27 AM

Did you recompile the kernel with the extra USB devices uncommented?

Are the USB devices MSDOS or NTFS?

realnerd 10-21-2005 02:53 PM

On my sarge fdisk -l /dev/sda1 gives W95 FAT16 (LBA).

No I have not yet tried to recompile the kernel; I will try to-morrow and keep you informed.

Thanks

realnerd 10-23-2005 03:15 PM

I have uncommented device ehci in GENERIC and built a new kernel, and then rebooted.

But it does not help, always the same problem: I cannot mount the usb drive. The other devices: scbus, da, umass, uhci, ohci, usb, ugen are not commented.

What could I try now? Is it a problem of fs on the drive?

mrcheeks 10-23-2005 03:37 PM

Your usb device should be something like da0s1. If it doesn't work, when you plug the usb drive look at the first console(alt-f1) you should see the device name.

Code:

mount -t msdosfs -o rw /dev/da0s1 /mnt/usbdrive

cnjohnson 10-23-2005 05:37 PM

Quote:

Originally posted by realnerd
I have uncommented device ehci in GENERIC and built a new kernel, and then rebooted.

But it does not help, always the same problem: I cannot mount the usb drive. The other devices: scbus, da, umass, uhci, ohci, usb, ugen are not commented.

What could I try now? Is it a problem of fs on the drive?

I have been able to reproduce (sort of) your problem. My laptop has USB 2.0 ports. They will not "see" a 1.0 device. I stumbled across this quite by accident. Don't know why, either.

Cheers--
Charles

realnerd 10-26-2005 02:39 PM

Many thanks for your replies!

My FreeBSD system can mount certain USB drives (e.g. Intuix 128MB) and not others (Iomega 256MB) (but the latter works with win2000 and debian sarge). I think that both are USB 2.0 drives. My computer is an old one (1998) and I'm almost sure that in 1998 computers had only USB 1.1 ports I don't have the data of the computer: is there a software in FreeBSD which could tell me type of USB ports the computer has?

Thanks for any hint!


All times are GMT -5. The time now is 03:44 AM.