Mounting usb in lpc3250 board (ported with linux version 2.6.34)
Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Mounting usb in lpc3250 board (ported with linux version 2.6.34)
Hi,
I am having LPC3250 board,which i have configured in Host mode,using the menuconfig(linux kerenl 2.6.34).When i am attaching a USB device to the usb port,the device is getting detected which i am think based on my below observation
1.USB led blinking
2.In the linux ported on lpc3250 board file system when i am using this command mdev -s , sda is appearing in the dev directory
But when i try to mount the usb using this command mount /dev/sda1 /media1
it is giving this problem as mentioned below
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
sd 8:0:0:0: [sda] Unhandled error code
sd 8:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 8:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 00 00 02 00 00 02 00
end_request: I/O error, dev sda, sector 2
EXT2-fs (sda): error: unable to read superblock
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
sd 8:0:0:0: [sda] Unhandled error code
sd 8:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 8:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 00 00 00 00 00 08 00
end_request: I/O error, dev sda, sector 0
Buffer I/O error on device sda, logical block 0
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
sd 8:0:0:0: [sda] Unhandled error code
sd 8:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 8:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 00 00 00 00 00 10 00
end_request: I/O error, dev sda, sector 0
Buffer I/O error on device sda, logical block 0
Buffer I/O error on device sda, logical block 1
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
sd 8:0:0:0: [sda] Unhandled error code
sd 8:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 8:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 00 00 08 00 00 10 00
end_request: I/O error, dev sda, sector 8
Buffer I/O error on device sda, logical block 1
Buffer I/O error on device sda, logical block 2
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
sd 8:0:0:0: [sda] Unhandled error code
sd 8:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 8:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 00 00 10 00 00 10 00
end_request: I/O error, dev sda, sector 16
Buffer I/O error on device sda, logical block 2
Buffer I/O error on device sda, logical block 3
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
sd 8:0:0:0: [sda] Unhandled error code
sd 8:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 8:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 00 00 18 00 00 08 00
end_request: I/O error, dev sda, sector 24
Buffer I/O error on device sda, logical block 3
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
sd 8:0:0:0: [sda] Unhandled error code
sd 8:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 8:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 00 00 00 00 00 01 00
end_request: I/O error, dev sda, sector 0
FAT: unable to read boot sector
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
sd 8:0:0:0: [sda] Unhandled error code
sd 8:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 8:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 00 00 00 00 00 01 00
end_request: I/O error, dev sda, sector 0
FAT: unable to read boot sector
mount: mounting /dev/sda on /media failed: Input/output error
end_request: I/O error, dev sda, sector 0
FAT: unable to read boot sector
mount: mounting /dev/sda on /media failed: Input/output error
that states it all, you are not trying to mount /dev/sda1, you are mounting /dev/sda that or the USB device has not been formatted properly.
i would not use /media as your mount point as that is by default on many Linux systems the upper directory for auto-mounter like your CD or DVD or USB devices.
to manually mount first verify that it is properly formatted (use fdisk -l) that is a lower case L, not a one, to verify what the format type is as well as its partition table.
then after you know for a fact what the device is formatted as and what its partition table looks like you can mount it as follows:
Code:
mount -t ext3 /dev/sdaX /mnt/USB
replace X with the proper partition number and create /mnt/USB to mount the usb drive. also replace ext3 with what ever format type you have on the flash drive.
I tried the mount -t ext2 /dev/sda /mnt/USB but same reset problem is coming.
In current scenario once power to board is turned on ,Linux 2.6.39.2 kernel version boots up ,and then initial file system ram-disk runs on the board,
As per your response what i understood is that pen-drive should be formatted with the same file system which is running on the board/PC machine.So i have reached to following conclusion that we need to run ext2 or ext3 file system on the lpc3250 board and format pen drive with same compatible file format
please guide me if i am correct in my understanding.
if i am right can you please provide me link to install ext2 or ext3 file system on ram-disk.
following is the procdeure i used to mount the USB
### Application running ...
~ #
~ # mkdir sys
~ # mount -t sysfs sysfs /sys
~ # mkdir mnt
~ # cd mnt/
/mnt # mkdir usb
~ # ls
bin etc home linuxrc proc sys usr
dev ftp lib mnt sbin tmp var
following is the output of the command executed on our lpc3250 board
~ # mount -t ext2 /dev/sda /mnt/usb/
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
sd 0:0:0:0: [sda] Unhandled error code
sd 0:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 0:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 00 00 08 00 00 08 00
end_request: I/O error, dev sda, sector 8
EXT2-fs (sda): error: unable to read group descriptors
mount: mounting /dev/sda on /mnt/usb/ failed: Invalid argument
following is the procdeure i used to mount the USB
### Application running ...
~ #
~ # mkdir sys
~ # mount -t sysfs sysfs /sys
~ # mkdir mnt
~ # cd mnt/
/mnt # mkdir usb
Why are you creating /sys that directory typically is already there?
~ # ls
bin etc home linuxrc proc sys usr
dev ftp lib mnt sbin tmp var
following is the output of the command executed on our lpc3250 board
Quote:
~ # mount -t ext2 /dev/sda /mnt/usb/
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
usb 1-1: reset full speed USB device using usb-ohci and address 2
sd 0:0:0:0: [sda] Unhandled error code
sd 0:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 0:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 00 00 08 00 00 08 00
end_request: I/O error, dev sda, sector 8
EXT2-fs (sda): error: unable to read group descriptors
mount: mounting /dev/sda on /mnt/usb/ failed: Invalid argument
also you did not mount the drive properly, were is the partition you are mounting? you have no partition number in your command. what is the output of
sir the above output is on the LPC3250 develpoment board
When the kernel boots up and intial ramdisk file system comes up sys dir is not there.
I created sys directory and the executed this command :
~# mount -t sysfs sysfs /sys
~ # ls
bin etc home linuxrc proc sys usr
dev ftp lib mnt sbin tmp var
output of the command:
root@amit-desktop:/home/amit# fdisk -l
Disk /dev/sda: 500.1 GB, 500107862016 bytes
255 heads, 63 sectors/track, 60801 cylinders, total 976773168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xd9cfd9cf
Device Boot Start End Blocks Id System
/dev/sda1 * 63 102398309 51199123+ 7 HPFS/NTFS/exFAT
/dev/sda2 102398371 976771071 437186350+ f W95 Ext'd (LBA)
/dev/sda5 102398373 511991549 204796588+ 7 HPFS/NTFS/exFAT
/dev/sda6 511991613 880635104 184321746 7 HPFS/NTFS/exFAT
/dev/sda7 880635904 900165631 9764864 82 Linux swap / Solaris
/dev/sda8 900167680 976771071 38301696 83 Linux
Disk /dev/sdb: 8022 MB, 8022654976 bytes
49 heads, 50 sectors/track, 6395 cylinders, total 15669248 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x3b2c8a9c
Device Boot Start End Blocks Id System
/dev/sdb1 2048 15669247 7833600 83 Linux
now that you have the fdisk printout you can read the partition number to use. earlier you posted that you used the following command that failed:
Code:
# mount -t ext2 /dev/sda /mnt/usb/
correct, that command will ALWAYS fail as you did not tell the system what partition you wanted to mount. you just tried to mount a device. can not be done. In addition to that you also were trying to tell the system to mount a device that is already mounted with 8 partitions.
Instead you need to use the following command:
Code:
# mount -t ext2 /dev/sdb1 /mnt/usb/
please use the code and quote tags it really does make life much simpler to read what you are doing.
but same problem coming
mount: mounting /dev/sdb1 on /mnt/usb/ failed: Invalid argument
First of all fdisk command not working on my development board,how to make it work ???
from start point :
As soon as power is given to development board and after the system is ready ,i attach my usb it is giving the reset messages as below
Quote:
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
sd 8:0:0:0: [sda] Unhandled error code
sd 8:0:0:0: [sda] Result: hostbyte=0x07 driverbyte=0x00
sd 8:0:0:0: [sda] CDB: cdb[0]=0x28: 28 00 00 00 00 02 00 00 02 00
end_request: I/O error, dev sda, sector 2
EXT2-fs (sda): error: unable to read superblock
usb 1-1: reset full speed USB device using usb-ohci and address 10
usb 1-1: reset full speed USB device using usb-ohci and address 10
Since I know the fdisk output on linux system is /dev/sdb1
So I created a node in the development board as follows
Then I created mnt directory as its not there in file system
Code:
Mkdir mnt
Cd mnt
Mkdir usb
Cd ../
Then I executed the command
Code:
Mount –t ext2 /dev/sdb1 /mnt/usb
mount: mounting /dev/sdb1 on /mnt/usb/ failed: Invalid argument
Sir what is wrong i am not getting
Someone suggested to mount the ext2 or ext3 file system on the initial ramdisk filesystem running on the board.My douth is,that is this correct,and if we can do this how can i install the ext2/ext3 file system,i searched net but did not found any thing.
Today i mounted the usbdevfs file system on the intial ramdisk filesystem running on the board as follows
Code:
mount -t usbfs none /proc/bus/usb
Code:
~ # mount
Quote:
rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw,relatime,errors=continue,user_xattr,acl)
proc on /proc type proc (rw,relatime)
none on /proc/bus/usb type usbfs (rw,relatime)
Code:
# ls -l /proc/bus/usb
Quote:
dr-xr-xr-x 2 root root 0 Jan 1 00:00 001
-r--r--r-- 1 root root 0 Jan 1 00:07 devices
but as per document i am refering to say this should also come in the output which i am not getting
-r--r--r-- 1 root root 0 Sep 19 22:30 drivers
Code:
~ # cat /proc/scsi/usb-storage/0
Quote:
Host scsi0: usb-storage
Vendor: General
Product: USB Flash Disk
Serial Number: 00000000000005A6
Protocol: Transparent SCSI
Transport: Bulk
Quirks:
i tried mounting the device but it failed
~ # mkdir mnt
~ # mknod /dev/sdb1 b 8 1
~ # mount -t ext2 /dev/sdb1 /mnt/
mount: mounting /dev/sdb1 on /mnt/ failed: No such device or address
What i think is drivers are missing.
Sir can you please guide me what should i do next
---------- Post added 04-09-13 at 06:40 AM ----------
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.