LinuxQuestions.org
Go Job Hunting at the LQ Job Marketplace
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices



Reply
 
Search this Thread
Old 02-03-2009, 05:41 AM   #1
os.techie
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Rep: Reputation: 0
Question initrd error - "error inserting'/lib/uhci-hcd.ko' : -1 Unknown symbol in module"


Hi all,
I am a newbie to this group and forum as well as linux. I am trying to understand how initrd creates character devices, loads all the modules, functionalities of pivot_root and chroot system call, by writing my own utilities. I have written my own shell which calls custom cat, echo, mount, unmount, mknod, chmod, rm, mv, cd, ls, pivot_root and chroot. I havenot done the insmod part.

Now I have unzipped the initrd-2.6.21-1.3194.fc7.cpio.gz from the /boot/ and done cpio -iv<initrd-2.6.21-1.3194.fc7.cpio to get all the files extracted. I have replaced the init file with my custom shell. So ideally, after booting, the control goes to my shell. From here I am manually adding devices. Everything happens fine till creating the devices.
When it comes to insmod, it is throwing up the following error.
"error inserting'/lib/uhci-hcd.ko' : -1 Unknown symbol in module"
I have some doubts.
1. What is the function of hotplug and mkblkdevs commands?
2. Is hotplug utility and mkblkdevs implemented for executing these commands or are they available anywhere else that I should call them from?
3. Can I use the insmod given in the bin folder and integrate it with my custom shell?

Awaiting your reply,
Balaji.V
 
Old 02-03-2009, 10:03 PM   #2
jschiwal
Guru
 
Registered: Aug 2001
Location: Fargo, ND
Distribution: SuSE AMD64
Posts: 15,733

Rep: Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655Reputation: 655
What do you mean by custom shell? You replaced nash with your own version? Don't you mean "shell script"?

Nash is used as a shell interpreter instead of bash. It has built in support for many of the commands found in the init script including mknod.
 
Old 02-04-2009, 12:36 PM   #3
os.techie
LQ Newbie
 
Registered: Jan 2009
Posts: 2

Original Poster
Rep: Reputation: 0
Thanks for your response,
I wrote my own shell that will execute my custom utilities. The utilities I could implement are mycat, myecho, mymount, mymknod, mypivot_root, mychroot, mychmod, myrm, mymv, mycd, myls (Their functionalities are same as their originals.). I have not implemented "insmod" utility. As you said, the init is a shell script. But I have replaced the init with myshell binary file. Now instead of init, myshell will be executed and the control is transferred to the user. I am trying to manually create the character devices, install those modules etc. This is the point where I was getting the above said error.
 
  


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
insmod: error inserting 'usbip.ko': -1 Invalid module format barunparichha Linux - Software 1 01-13-2007 09:51 PM
Error msg: error: C++ preprocessor "/lib/cpp" fails sanity check wild_willy Linux - Newbie 4 01-04-2007 12:30 PM
avgscan "relocation error" "undefined symbol: __dynamic_cast_2" Monster_user Linux - Software 0 02-22-2006 12:57 PM
insmod: error inserting 'new.ko': -1 Invalid module format hemk76 Programming 2 01-26-2005 11:52 AM
insmod: error inserting 'new.ko': -1 Invalid module format hemk76 Programming 2 01-24-2005 11:42 AM


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