LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   initrd error - "error inserting'/lib/uhci-hcd.ko' : -1 Unknown symbol in module" (https://www.linuxquestions.org/questions/fedora-35/initrd-error-error-inserting-lib-uhci-hcd-ko-1-unknown-symbol-in-module-701861/)

os.techie 02-03-2009 04:41 AM

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

jschiwal 02-03-2009 09:03 PM

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.

os.techie 02-04-2009 11:36 AM

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.


All times are GMT -5. The time now is 05:27 PM.