Click to See Complete Forum and Search --> : USB Pro Disk - Debian Sarge


mudra
03-14-2005, 06:02 PM
I am trying to get my USB Pro Flash Drive (128 Mb) to work with my Debian Sarge laptop. I have read the other threads, but I do not appear to have a /dev/sda1

This is the output from dmesg.

usb-storage: waiting for device to settle before scanning
Vendor: Model: USB DISK Pro Rev: 1.09
Type: Direct-Access ANSI SCSI revision: 00
usb-storage: device scan complete
usb 4-1: USB disconnect, address 4
usb 4-1: new high speed USB device using ehci_hcd and address 5
scsi3 : SCSI emulation for USB Mass Storage devices
usb-storage: device found at 5
usb-storage: waiting for device to settle before scanning
Vendor: Model: USB DISK Pro Rev: 1.09
Type: Direct-Access ANSI SCSI revision: 00
usb-storage: device scan complete

I have tried /dev/ttyUSBn but this doesn't work either.

I would be really grateful for any help that anyone can give.

TIA

Mudra

bwkaz
03-14-2005, 07:19 PM
Hmm... /dev/ttyUSBx is usually for USB modems -- at least, I'm pretty sure that's what it is. I know the ttyUSBx devices are all character devices, not block devices, so there's no way they'll work anyway. ;)

Does Sarge (actually, your installation of it) use some kind of automatic device node management? (It would use either udev, which requires kernel 2.6, or devfs, which is deprecated in 2.6. If it uses kernel 2.4, then if it uses any automatic device management, it'll be devfs.)

If it does not, then you might just have to create the /dev/sda and /dev/sda1 device nodes, to be able to access the usb-storage device. They'll be block devices (mknod /dev/sda1 b <major number> <minor number>), but I don't know what to use for <major number> and <minor number> for SCSI disks.

teeitup
03-15-2005, 12:59 AM
Is this a stock Debian Sarge kernel? What version?

What is the exact command you are using?

What modules are loaded? before and after connection of USB device.

What's the output of lsusb?

Try opening a console window, su to root, type tail -f /var/log/messages

Plugin the device, remove the device, what does it say?

mudra
03-15-2005, 06:04 PM
Not got laptop with me tonight will try tomorrow and let you know.

Thanks for trying to help me.

Mudra

mudra
03-16-2005, 03:54 PM
(1) I am using a stock 2.6.10 kernel (acquired through apt-get).

(2) I am trying to mount the usb flash drive using the following entry in fstab.

/dev/sda1 /mnt/usb vfat user,noauto,umask=0 0

(I have tried various combinations of /dev/usb ... etc etc....)

(3) lsusb gave me the following (1st time before I plugged in drive, and the second after I had plugged in.)

james@debian:~$ lsusb
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000
james@debian:~$ lsusb
Bus 004 Device 002: ID 0d7d:1420 Phison Electronics Corp. PS2044 Pen Drive
Bus 004 Device 001: ID 0000:0000
Bus 003 Device 001: ID 0000:0000
Bus 002 Device 001: ID 0000:0000
Bus 001 Device 001: ID 0000:0000

(4) Here is the output from tail....

debian:/home/james# tail -f /var/log/messages
Mar 16 19:50:46 localhost kernel: Vendor: Model: USB DISK Pro Rev: 1.09
Mar 16 19:50:46 localhost kernel: Type: Direct-Access ANSI SCSI revision: 00
Mar 16 19:50:46 localhost scsi.agent[8943]: disk at /devices/pci0000:00/0000:00:1d.7/usb4/4-1/4-1:1.0/host0/target0:0:0/0:0:0:0
Mar 16 19:52:50 localhost kernel: usb 4-1: USB disconnect, address 2
Mar 16 19:52:54 localhost kernel: usb 4-1: new high speed USB device using ehci_hcd and address 3
Mar 16 19:52:54 localhost kernel: scsi1 : SCSI emulation for USB Mass Storage devices
Mar 16 19:52:55 localhost usb.agent[9077]: usb-storage: already loaded
Mar 16 19:52:59 localhost kernel: Vendor: Model: USB DISK Pro Rev: 1.09
Mar 16 19:52:59 localhost kernel: Type: Direct-Access ANSI SCSI revision: 00
Mar 16 19:52:59 localhost scsi.agent[9120]: disk at /devices/pci0000:00/0000:00:1d.7/usb4/4-1/4-1:1.0/host1/target1:0:0/1:0:0:0
Mar 16 19:53:12 localhost kernel: usb 4-1: USB disconnect, address 3
Mar 16 19:53:16 localhost kernel: usb 4-1: new high speed USB device using ehci_hcd and address 4
Mar 16 19:53:16 localhost kernel: scsi2 : SCSI emulation for USB Mass Storage devices
Mar 16 19:53:17 localhost usb.agent[9225]: usb-storage: already loaded


Hope this all makes sense to someone. (I can't make head nor tail of it) no pun intended.

TIA,

Mudra

teeitup
03-17-2005, 04:32 AM
Your output looks OK.

Do you already have a sda1?
What's the output of df -k?

I assume you've created the directory /mnt/usb

Try mounting from the command line so we can see any errors.

As root...

mount -t vfat /dev/sda1 /mnt/usb
mount -t vfat /dev/sda2 /mnt/usb

post back,

XiaoKJ
03-17-2005, 02:05 PM
in any terminal emulation,

ls /dev/sd

then tab twice there.

if you see only sda, then you issue mount /dev/sda /mnt/usb

that will mean that your usb drive is not partitioned and you mount it as a whole.

mudra
03-17-2005, 03:14 PM
Thanks for all the further suggestions. I hope the following information helps.


james@debian:~$ df -k
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda7 5333336 3014860 2318476 57% /
tmpfs 517160 0 517160 0% /dev/shm
/dev/hda6 9767184 224132 9543052 3% /home
/dev 5333336 3014860 2318476 57% /.dev
none 10240 2696 7544 27% /dev
/dev/hda1 21904920 10972732 10932188 51% /mnt/xp
/dev/hda2 20962592 6871760 14090832 33% /mnt/backup
//FRANKENSTEIN/Primary
76589056 12996608 63592448 17% /home/james/smb4k/FRANKENSTEIN/Primary
james@debian:~$

(2)
james@debian:~$ su
Password:
debian:/home/james# mount -t vfat /dev/sda1 /mnt/usb
mount: special device /dev/sda1 does not exist
debian:/home/james# mount -t vfat /dev/sda2 /mnt/usb
mount: special device /dev/sda2 does not exist
debian:/home/james# cd /mnt
debian:/mnt# ls
backup usb xp

(3) debian:/dev# ls sd
ls: sd: No such file or directory
debian:/dev#

Hope this make sense to someone.

Thanks for all the help.

Mudra

teeitup
03-17-2005, 11:45 PM
What's the output of /sbin/lsmod?

Looking for scsi_mod

If it's not there, as root, depmod -a scsi_mod

It seems odd that a basic sarge install would be missing the scsi device files.

Maybe it's a 2.6 kernel thing. I still prefer the 2.4 series.

???

mrBen
03-18-2005, 05:27 AM
Couple of pointers:

1. You will need to do ls /dev/sd* rather than just /dev/sd to list all the sd devices

2. I've seen drives 'swap' devices before - check it's not on /dev/sdb (or c or d)

mudra
03-18-2005, 04:58 PM
I have tried the suggestions and I appear to have the scsi support in the kernel, but no /dev/sda

(1)/sbin/lsmod

bitblit 5600 1 fbcon
vesafb 7704 1
cfbcopyarea 3936 1 vesafb
cfbimgblt 2880 1 vesafb
cfbfillrect 3584 1 vesafb
debian:/sbin# lsmod | grep scsi
scsi_mod 130016 2 sr_mod,sbp2

(2)debian:/sbin# ls /dev/sd*
ls: /dev/sd*: No such file or directory
debian:/sbin#

I hope that this helps.

I will try and recompile the kernel tonight and see if that cures the problem.

TIA,

Mudra.

EDIT: Gave up and installed MEPIS 3.3 in the end, and this works OK.