LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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 10-14-2008, 06:33 PM   #1
LinuxTexan
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Rep: Reputation: 15
manual insmod of usbcore, uhci and usb-storage works. Why not on boot?


I have updated the kernel from 2.6.7 to 2.6.22 to solve an issue. The issue is fixed but now my USB memory stick will not mount. I did an lsmod and found none of the USB drivers were there any more.

I manually installed the usbcore.ko, uhci-hcd.ko and usb-storage.ko modules and the mount worked. I edited the rc.sysinit to put these in the boot process since they weren't there. I don't know how the previous kernel was working without loading the modules but the mount always worked.

Now, every time I boot, usbcore and uhci-hcd are loaded at boot. But usb-storage refuses to load at boot. The mount then fails. Manually installing the module after boot does work.

What am I doing wrong?
 
Old 10-15-2008, 02:12 AM   #2
Bruce Hill
HCL Maintainer
 
Registered: Jun 2003
Location: McCalla, AL, USA
Distribution: Gentoo (all servers at work are openSUSE)
Posts: 6,932

Rep: Reputation: 128Reputation: 128
Welcome to LQ!

How did you upgrade the kernel?

Why did you not get the latest stable (2.6.27),
or why did you get 2.6.22?

Why did you not build USB support into the kernel?

Did you consider using an initrd image to load them?

What Linux distribution are you using?
 
Old 10-15-2008, 08:51 AM   #3
LinuxTexan
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Original Poster
Rep: Reputation: 15
All good questions. The target system is an embedded computer with limited space. The manufacturer used a "custom modified" version of linux originally based on slackware 9.1 with kernel 2.6.7. The person(s) who developed it then left that company so the support is non-existant.

My development system has 2.6.22.15 (PCLinuxOS) on it and has been very stable so I used the same version on this. I might upgrade it later but right now I'm trying to get the embedded system to work. I didn't need the additional hassle of trying to get my development system upgraded since gcc is on it. Part of the issue has been getting things to run on the embedded system when I can't build code on it due to limited space. Building on another system with the same kernel works OK.

The manufacturer provided a config file that their documentation says to use. I didn't want to modify it. The original kernel must have it built in since I don't see any modules installed. Don't know why it built as modules so I need to verify the config file for that. Newbie here.

I haven't used initrd before. I'll look into that as well as building USB in.

Thanks. Any other ideas?
 
Old 10-15-2008, 09:42 AM   #4
LinuxTexan
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Original Poster
Rep: Reputation: 15
I found the problem. The scsi_mod and sd_mod modules were not being installed. Evidently, performing insmod on the USB modules pulled them in manually. Don't know how (or care at this point).

Adding these two modules prior to the USB modules in rc.sysint worked.

Maybe I'll be able to do this 'linux' thing after all. My confidence has been kind of low...
 
Old 12-08-2008, 10:24 PM   #5
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Rep: Reputation: 31
Hello LinuxTexan,
Good one...can you tell me how you get that usbcore.ko module?i too not having this same..but i dont know what to do....i copied the /drivers/usb/core file and i compiled but i am getting the below thing..but i didnt get .ko file....

sharief@sharief-desktop:~/Desktop/drivers/core$ make
make -C /lib/modules/2.6.26/build M=/home/sharief/Desktop/drivers/core modules
make[1]: Entering directory `/home/sharief/Desktop/kernelroot/linux2/linux-2.6.26'
Building modules, stage 2.
MODPOST 0 modules
make[1]: Leaving directory `/home/sharief/Desktop/kernelroot/linux2/linux-2.6.26'
sharief@sharief-desktop:~/Desktop/drivers/core$


Help me what to do....
 
Old 12-09-2008, 10:40 AM   #6
LinuxTexan
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Original Poster
Rep: Reputation: 15
I'm not sure on that one. You should find the .ko file under /lib/modules/'kernelrevnum'/kernel/drivers/usb/core where 'kernelrevnum is 2.6.... It is usually the only file there. If it's missing then your .config file probably doesn't have the usb options enabled when the kernel was built. Rebuilding the kernel with the proper options should recreate the file.

Good luck.
 
Old 12-09-2008, 12:48 PM   #7
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Rep: Reputation: 31
Actually i disabled the usb option when i build the kernel....tis is for college project...now i have to make the usb to work...so i copied the /drivers/usb/core file and i compiled...but i didnt get .ko file..thats what i am asking..i didnt get any source...searching from last month....can you help me
 
Old 12-10-2008, 08:36 AM   #8
LinuxTexan
LQ Newbie
 
Registered: Oct 2008
Posts: 21

Original Poster
Rep: Reputation: 15
The source is in the kernel. Look in the directory where you placed the source when you built the kernel (most people use /usr/src or similar). The file should be there in a directory structure similar to the /lib/modules path. You will have to figure out the make commands for it.

It's probably simpler and less error prone to rebuild the kernel with USB active.
 
Old 12-10-2008, 12:05 PM   #9
shariefbe
Member
 
Registered: Aug 2008
Location: Tiruchirappalli, India
Distribution: UBUNTU 11.04
Posts: 368

Rep: Reputation: 31
yes i already done that..but i didnt find the solution...i will post my "Makefile" below...kindly refer that i suggest me plz...

sharief@sharief-desktop:~/Desktop/drivers/core$ cat Makefile
#
# Makefile for USB Core files and filesystem
#


usbcore-objs := usb.o hub.o hcd.o urb.o message.o driver.o \
config.o file.o buffer.o sysfs.o endpoint.o \
devio.o notify.o generic.o quirks.o

ifeq ($(CONFIG_PCI),y)
usbcore-objs += hcd-pci.o
endif

ifeq ($(CONFIG_USB_DEVICEFS),y)
usbcore-objs += inode.o devices.o
endif

obj-$(CONFIG_USB) += usbcore.o

ifeq ($(CONFIG_USB_DEBUG),y)
EXTRA_CFLAGS += -DDEBUG
endif

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname
-r)/build M=$(PWD) clean
sharief@sharief-desktop:~/Desktop/drivers/core$
 
  


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 external harddrive works with uhci but not ehci nicola1013 Linux - Hardware 2 07-16-2005 10:25 AM
disable 'usbcore' and 'uhci' modules on boot... lazlow69 Slackware 6 05-09-2004 08:52 PM
USB-Storage: After fresh boot works once only zahid@allbd.com Linux - Hardware 3 02-03-2004 11:24 PM
Similar usb-uhci hanging at boot time problem GrayGh0st Linux - Hardware 16 06-24-2003 05:26 PM
usbcore, usb-uhci shawnsdl Linux - Newbie 5 05-05-2003 02:45 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 06:08 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