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 |
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.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
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.
|
|
|
01-15-2010, 05:14 AM
|
#16
|
Member
Registered: Apr 2008
Location: Toulon (France)
Distribution: FEDORA CORE
Posts: 493
Rep:
|
Code:
grub.conf
# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You do not have a /boot partition. This means that
# all kernel and initrd paths are relative to /, eg.
# root (hd0,0)
# kernel /boot/vmlinuz-version ro root=/dev/sda1
# initrd /boot/initrd-version.img
#boot=/dev/sda
default=1
timeout=0
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.32.3)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32.3 ro root=UUID=21d34cba-e758-4a3d-8f2f-e98988868a68 rhgb quiet
initrd /boot/initrd-2.6.32.3.img
title Fedora (2.6.27.5-117.fc10.i686)
root (hd0,0)
kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=UUID=21d34cba-e758-4a3d-8f2f-e98988868a68 rhgb quiet
initrd /boot/initrd-2.6.27.5-117.fc10.i686.img
"default" is set to 1 (grub start counting to 0), and it's the standard fedora kernel. More over, you have a time out of 0, that means that the menu to choose the kernel is not displayed, add 5 or 10 to display it 5 (or 10) seconds before booting with the default kernel.
Last edited by jf.argentino; 01-15-2010 at 05:15 AM.
Reason: fixing end code block
|
|
|
01-15-2010, 05:20 AM
|
#17
|
LQ Newbie
Registered: Jan 2010
Posts: 19
Original Poster
Rep:
|
@ anishakaul
compiled the code it is generating .ko file but when i do
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
insmod kernel
insmod: can't read 'kernel': No such file or directory
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
new kernel is latest one 2.6.32.3
old kernel is my fedor10 2.6.27.5
++++++++++++++++++++++++++++++++++++
grub.conf
++++++++++++++++++++++++++++++++++++
title Fedora (2.6.32.3)
root (hd0,0)
kernel /boot/vmlinuz-2.6.32.3 ro root=UUID=21d34cba-e758-4a3d-8f2f-e98988868a68 rhgb quiet
initrd /boot/initrd-2.6.32.3.img
title Fedora (2.6.27.5-117.fc10.i686)
root (hd0,0)
kernel /boot/vmlinuz-2.6.27.5-117.fc10.i686 ro root=UUID=21d34cba-e758-4a3d-8f2f-e98988868a68 rhgb quiet
initrd /boot/initrd-2.6.27.5-117.fc10.i686.img
~
|
|
|
01-15-2010, 05:21 AM
|
#18
|
Senior Member
Registered: Dec 2008
Posts: 4,732
|
Quote:
Originally Posted by rachilmeth
@ anishakaul
compiled the code it is generating .ko file but when i do
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
insmod kernel
insmod: can't read 'kernel': No such file or directory
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
|
try from root:
Last edited by Aquarius_Girl; 01-15-2010 at 05:24 AM.
|
|
|
01-15-2010, 05:25 AM
|
#19
|
LQ Newbie
Registered: Jan 2010
Posts: 19
Original Poster
Rep:
|
insmod kernel.ko
insmod: error inserting 'kernel.ko': -1 Invalid module format
|
|
|
01-15-2010, 05:28 AM
|
#20
|
Senior Member
Registered: Dec 2008
Posts: 4,732
|
Quote:
Originally Posted by rachilmeth
insmod kernel.ko
insmod: error inserting 'kernel.ko': -1 Invalid module format
|
That's quite surprising . I tried it on my terminal now, it worked fine !!
Kindly post the output of 'make' command !
|
|
1 members found this post helpful.
|
01-15-2010, 05:33 AM
|
#21
|
LQ Newbie
Registered: Jan 2010
Posts: 19
Original Poster
Rep:
|
Makefile output :make
make -C /lib/modules/2.6.32.3/build M=/root/abc modules
make[1]: Entering directory `/root/linux-2.6.32.3'
CC [M] /root/abc/kernel.o
Building modules, stage 2.
MODPOST 1 modules
CC /root/abc/kernel.mod.o
LD [M] /root/abc/kernel.ko
make[1]: Leaving directory `/root/linux-2.6.32.3'
File generated are
-rw-r--r-- 1 root root 236 kernel.c
-rw-r--r-- 1 root root 140 Makefile
-rw-r--r-- 1 root root 0 Module.symvers
-rw-r--r-- 1 root root 31 modules.order
-rw-rw-r-- 1 root root 35064 kernel.o
-rw-rw-r-- 1 root root 35088 kernel.mod.o
-rw-r--r-- 1 root root 497 kernel.mod.c
-rw-r--r-- 1 root root 69195 kernel.ko
|
|
|
01-15-2010, 05:37 AM
|
#22
|
Senior Member
Registered: Dec 2008
Posts: 4,732
|
Remove ONLY the following files from your folder and then do make and insmod again:
Code:
rm Module.symvers modules.order kernel.o kernel.mod.o kernel.mod.c kernel.ko
|
|
|
01-15-2010, 05:41 AM
|
#23
|
LQ Newbie
Registered: Jan 2010
Posts: 19
Original Poster
Rep:
|
@Anisha
still same
insmod kernel.ko
insmod: error inserting 'kernel.ko': -1 Invalid module format
|
|
|
01-15-2010, 05:46 AM
|
#24
|
Senior Member
Registered: Dec 2008
Posts: 4,732
|
It never happened like this with me !!
Now my last question, have u properly inserted tabs in u r makefile ?
I am asking this because this program is working very fine on my computer !!
Last edited by Aquarius_Girl; 01-15-2010 at 06:17 AM.
|
|
|
01-15-2010, 05:48 AM
|
#25
|
LQ Newbie
Registered: Jan 2010
Posts: 19
Original Poster
Rep:
|
yeah ...otherwise make won't work properly ..can u show me your output of make & files created , thanks ...
|
|
|
01-15-2010, 05:55 AM
|
#26
|
Senior Member
Registered: Dec 2008
Posts: 4,732
|
Code:
linux:/home/anisha/t # make
make -C /lib/modules/2.6.31.8-0.1-desktop/build M=/home/anisha/t modules
make[1]: Entering directory `/usr/src/linux-2.6.31.8-0.1-obj/x86_64/desktop'
make -C ../../../linux-2.6.31.8-0.1 O=/usr/src/linux-2.6.31.8-0.1-obj/x86_64/desktop/. modules
CC [M] /home/anisha/t/ker.o
Building modules, stage 2.
MODPOST 1 modules
LD [M] /home/anisha/t/ker.ko
make[1]: Leaving directory `/usr/src/linux-2.6.31.8-0.1-obj/x86_64/desktop'
Code:
linux:/home/anisha/t # ls -l
total 240
-rw-r--r-- 1 root root 237 2010-01-15 16:21 ker.c
-rw-r--r-- 1 root root 236 2010-01-15 16:20 ker.c~
-rw-r--r-- 1 root root 82299 2010-01-15 16:21 ker.ko
-rw-r--r-- 1 root root 132 2010-01-15 16:21 .ker.ko.cmd
-rw-r--r-- 1 root root 700 2010-01-15 16:21 ker.mod.c
-rw-r--r-- 1 root root 46864 2010-01-15 16:21 ker.mod.o
-rw-r--r-- 1 root root 19362 2010-01-15 16:21 .ker.mod.o.cmd
-rw-r--r-- 1 root root 36992 2010-01-15 16:21 ker.o
-rw-r--r-- 1 root root 19239 2010-01-15 16:21 .ker.o.cmd
-rw-r--r-- 1 root root 153 2010-01-15 16:20 Makefile
-rw-r--r-- 1 root root 0 2010-01-15 16:21 Module.markers
-rw-r--r-- 1 root root 29 2010-01-15 16:21 modules.order
-rw-r--r-- 1 root root 0 2010-01-15 16:21 Module.symvers
drwxr-xr-x 2 root root 4096 2010-01-15 16:21 .tmp_versions
Code:
linux:/home/anisha/t # insmod ker.ko
linux:/home/anisha/t #
Last edited by Aquarius_Girl; 01-15-2010 at 05:57 AM.
|
|
|
01-15-2010, 06:02 AM
|
#27
|
LQ Newbie
Registered: Jan 2010
Posts: 19
Original Poster
Rep:
|
@anisha
hiw many kernels you have installed in your system.
|
|
|
01-15-2010, 06:06 AM
|
#28
|
Senior Member
Registered: Dec 2008
Posts: 4,732
|
I didn't install any special kernel on my comp.
I am working with the default kernel on OpenSuse 11.2
I suppose u should fix your kernel problem (uname -r) first and then try anything else, coz. now kernel problem is the only difference between your comp and my comp w.r.t insmod !
|
|
1 members found this post helpful.
|
01-15-2010, 06:06 AM
|
#29
|
LQ Newbie
Registered: Jan 2010
Posts: 19
Original Poster
Rep:
|
yes very true ...thanks
|
|
|
01-15-2010, 06:11 AM
|
#30
|
Senior Member
Registered: Dec 2008
Posts: 4,732
|
1. Try whatever jf.argentino has said.
2. Also read the links I pointed to.
If still u r unable to solve the version problem then u can start a new thread for it !
Good Luck
Last edited by Aquarius_Girl; 01-15-2010 at 06:13 AM.
|
|
|
All times are GMT -5. The time now is 12:11 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.
|
Latest Threads
LQ News
|
|