Re: some question about mount usb flash

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi:
2009/7/30 loody <miloody@xxxxxxxxx>:
> Dear all:
> I try to mount usb flash on my embedded system.
> But I get the error message as "Invalid argument".
> (I attach the log at the end of letter)
> From the log, it seems scsi driver address the usb flash as sda1 and
> /dev/sda1 node has been created as block device with (8,0), (major,
> minor) number.
> I also have create /mnt there.
> Did I forget something?
> appreciate your help,
> miloody
>
> usb 1-1: new high speed USB device using ehci and address 4
> usb 1-1: Product: Mass Storage Device
> usb 1-1: Manufacturer: JetFlash
> usb 1-1: SerialNumber: H7DXB40C
> usb 1-1: configuration #1 chosen from 1 choice
> scsi2 : SCSI emulation for USB Mass Storage devices
>  Vendor: JetFlash  Model: TS4GJFV30         Rev: 8.07
>  Type:   Direct-Access                      ANSI SCSI revision: 02
> SCSI device sda: 7987198 512-byte hdwr sectors (4089 MB)
> sda: Write Protect is off
> sda: assuming drive cache: write through
> SCSI device sda: 7987198 512-byte hdwr sectors (4089 MB)
> sda: Write Protect is off
> sda: assuming drive cache: write through
>  sda:<7>usb-storage: queuecommand called
>  sda1
> sd 2:0:0:0: Attached scsi removable disk sda
> sd 2:0:0:0: Attached scsi generic sg0 type 0
> /temp # mount -t vfat /dev/sda1 /mnt/
> mount: mounting /dev/sda1 on /mnt/ failed: Invalid argument
>
> /temp # ls /dev -l
> crw-------    1 500      500        5,   1 Jan  1 00:00 console
> drwxr-xr-x    3 0        0               0 Jan  1 00:00 dvb
> crw-r--r--    1 500      500        1,   1 Jan  1 00:00 mem
> crw-r--r--    1 0        0          1,   3 Jan  1 00:00 null
> crw-rw-rw-    1 0        0          1,   8 Jan  1 00:00 random
> crw-r--r--    1 0        0         10, 135 Jan  1 00:00 rtc
> brw-r--r--    1 0        0          8,   0 Jan  1 00:00 sda1
> crw-r--r--    1 500      500        5,   0 Jan  1 00:00 tty
> crw-------    1 500      500        4,  64 Jan  1 00:34 ttyS0
> crw-r--r--    1 0        0          4,  65 Jan  1 00:00 ttyS1
> crw-r--r--    1 0        0         10, 130 Jan  1 00:00 watchdog
> crw-rw-rw-    1 0        0          1,   5 Jan  1 00:00 zero
> /temp # ls / -l
> drwxr-xr-x    2 0        0               0 Jan  1 00:00 bin
> drwxr-xr-x    3 0        0               0 Jan  1 00:09 dev
> drwxr-xr-x    3 0        0               0 Jan  1 00:00 etc
> lrwxrwxrwx    1 500      500            11 Jan  1 00:00 init -> bin/busybox
> drwxr-xr-x    2 0        0               0 Jan  1 00:00 lib
> drwxr-xr-x    2 0        0               0 Jan  1 00:05 mnt
> dr-xr-xr-x   28 0        0               0 Jan  1 00:00 proc
> drwxr-xr-x    2 0        0               0 Jan  1 00:00 sbin
> drwxr-xr-x   10 0        0               0 Jan  1 00:00 sys
> drwxr-xr-x    2 0        0               0 Jan  1 00:00 temp
> drwxr-xr-x    3 0        0               0 Jan  1 00:00 usr
>
I found my dmesg, append at the end of mail, shows the scsi commands,
TEST_UNIT_READY and READ_10 are send and receive CSW successfully.
The flash can be recognized on my ununtu system as vfat.
And I also insmod all the file modules I think I need as below.

/temp # lsmod
Module                  Size  Used by    Not tainted
ehci_hcd               45104  0
ntfs                  295600  0
vfat                   11424  0
fat                    52048  1 vfat
nls_iso8859_1           3904 10
nls_cp437               5568  0
nls_base                6720  5 ntfs,vfat,fat,nls_iso8859_1,nls_cp437
usb_storage            51824  0
sd_mod                 17328  0
sg                     31296  0
scsi_mod               94752  3 usb_storage,sd_mod,sg
usbcore               137552  3 ehci_hcd,usb_storage
/temp #
Did I miss something?
appreciate your help,
miloody

usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)
usb-storage:  00 00 00 00 00 00
usb-storage: Bulk Command S 0x43425355 T 0xe L 0 F 0 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0xe R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command READ_10 (10 bytes)
usb-storage:  28 00 00 00 00 00 00 00 01 00
usb-storage: Bulk Command S 0x43425355 T 0xf L 512 F 128 Trg 0 LUN 0 CL 10
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_sglist: xfer 512 bytes, 1 entries
usb-storage: Status code 0; transferred 512/512
usb-storage: -- transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0xf R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command TEST_UNIT_READY (6 bytes)
usb-storage:  00 00 00 00 00 00
usb-storage: Bulk Command S 0x43425355 T 0x10 L 0 F 0 Trg 0 LUN 0 CL 6
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x10 R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.
usb-storage: queuecommand called
usb-storage: *** thread awakened.
usb-storage: Command READ_10 (10 bytes)
usb-storage:  28 00 00 00 00 00 00 00 01 00
usb-storage: Bulk Command S 0x43425355 T 0x11 L 512 F 128 Trg 0 LUN 0 CL 10
usb-storage: usb_stor_bulk_transfer_buf: xfer 31 bytes
usb-storage: Status code 0; transferred 31/31
usb-storage: -- transfer complete
usb-storage: Bulk command transfer result=0
usb-storage: usb_stor_bulk_transfer_sglist: xfer 512 bytes, 1 entries
usb-storage: Status code 0; transferred 512/512
usb-storage: -- transfer complete
usb-storage: Bulk data transfer result 0x0
usb-storage: Attempting to get CSW...
usb-storage: usb_stor_bulk_transfer_buf: xfer 13 bytes
usb-storage: Status code 0; transferred 13/13
usb-storage: -- transfer complete
usb-storage: Bulk status result = 0
usb-storage: Bulk Status S 0x53425355 T 0x11 R 0 Stat 0x0
usb-storage: scsi cmd done, result=0x0
usb-storage: *** thread sleeping.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ



[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux