LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This 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


Reply
  Search this Thread
Old 03-26-2013, 06:59 AM   #1
biyabani
Member
 
Registered: Mar 2013
Posts: 65

Rep: Reputation: Disabled
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
 
Old 03-26-2013, 10:24 AM   #2
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
Quote:
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.
 
1 members found this post helpful.
Old 04-02-2013, 02:26 AM   #3
biyabani
Member
 
Registered: Mar 2013
Posts: 65

Original Poster
Rep: Reputation: Disabled
Sir,

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.
 
Old 04-03-2013, 06:15 AM   #4
biyabani
Member
 
Registered: Mar 2013
Posts: 65

Original Poster
Rep: Reputation: Disabled
Sir,

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
 
Old 04-03-2013, 07:11 AM   #5
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
Quote:
Originally Posted by biyabani View Post
Sir,

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
Code:
# fdisk -l
again that is a lower case L, not a one.
 
Old 04-04-2013, 02:02 AM   #6
biyabani
Member
 
Registered: Mar 2013
Posts: 65

Original Poster
Rep: Reputation: Disabled
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
 
Old 04-04-2013, 07:24 AM   #7
lleb
Senior Member
 
Registered: Dec 2005
Location: Florida
Distribution: CentOS/Fedora
Posts: 2,630

Rep: Reputation: 495Reputation: 495Reputation: 495Reputation: 495Reputation: 495
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.
 
Old 04-04-2013, 09:11 PM   #8
biyabani
Member
 
Registered: Mar 2013
Posts: 65

Original Poster
Rep: Reputation: Disabled
I executed the command

Code:
# mount -t ext2 /dev/sdb1 /mnt/usb/
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


Code:
Mknod /dev/sdb1 b(device type) 80(major number) 1(minor number)
It got created

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.
 
Old 04-09-2013, 06:39 AM   #9
biyabani
Member
 
Registered: Mar 2013
Posts: 65

Original Poster
Rep: Reputation: Disabled
Sir,

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:
but in document following is the output

Quote:
Host scsi1: usb-storage
Vendor: Generic
Product: Mass Storage Device
Serial Number: None
Protocol: Transparent SCSI
Transport: Bulk
GUID: 0ed166800000000000000000
Attached: Yes/No
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 ----------

http://www.tldp.org/HOWTO/Flash-Memo...fications.html

Refernce doc is this

Last edited by biyabani; 04-09-2013 at 06:44 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
USB mounting in ARM based LPC3250 controller nightrapper Linux - Hardware 1 03-15-2013 10:51 AM
USB mounting in ARM based LPC3250 controller nightrapper Linux - Newbie 1 03-09-2013 04:16 AM
S3C6410 single board computer ported with 4 OS lykmyn Linux - Newbie 1 07-14-2009 05:44 AM


All times are GMT -5. The time now is 02:54 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration