LinuxQuestions.org
Latest LQ Deal: Linux Power User 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 04-12-2004, 02:59 PM   #1
gavinbeatty
Member
 
Registered: Nov 2003
Location: Ireland
Distribution: Debian testing
Posts: 79

Rep: Reputation: 15
kernel compile errors


I've retried this kernel malarkey a couple of times now and I'm positive I haven't chosen any incorrect KERNEL options as such, but I still can't actually use my kernel.
I don't have a clue what it really means but I get these errors on choosing my kernel:

Loading jbd.ko module
jbd: version magic '2.6.3-4mdk 586 gcc-3.3' should be '2.6.5 586 gcc-3.3'
Error inserting '/libjbd.ko': -1 Invalid module format
ERROR: /bin/insmod exited abnormally!
Loading ext3.ko module
ext3: version magic '2.6.3-4mdk 586 gcc-3.3' should be '2.6.5 586 gcc-3.3'
Error inserting '/lib/ext3.ko': -1 Invalid module format
ERROR: /bin/insmod exited abnormally!
mounting /proc filesystem
Creating device files
Mounting sysfs
Creating root device
Mounting root filesystem
mount: error 19 mounting ext3 flags defaults
well, retrying without the option flags
mount: error 19 mounting ext3
well, retrying read-only without any flag
mount: error 19 mounting ext3
pivotroot: pivot_root (/sysroot, /sysroot /initrd) failed: 2
Remounting devfs at correct place if necessary
Mounted devfs on /dev
Freeing unused kernel memory: 264k freed
Kernel panic: No init found. Try passing init= option to kernel

I'd really appreciate any help on this as I feel it's my duty as a Linux user to customise as much as possible and eventaully join the Slackware community.

Last edited by gavinbeatty; 04-13-2004 at 11:20 AM.
 
Old 04-12-2004, 03:12 PM   #2
jmorse
Member
 
Registered: Mar 2004
Location: United Kingdom
Distribution: LFS
Posts: 74

Rep: Reputation: 15
Im no expert at this, but it looks like you boot using an 'initrd', and the modules that the initrd loads, don't match what the kernel expects.

There is an option in the kernel called 'Module versioning support', under 'Loadable module support', which may solve the problem, however it also claims to be 'experimental'.

In the mean time, copying the new jbd.ko and ext3.ko to overwrite the ones in the initrd, should solve the problem. [Obviously backup first in case I am wildly wrong!] [also check don't have support for your root filesystem as a module!]
 
Old 04-13-2004, 11:11 AM   #3
gavinbeatty
Member
 
Registered: Nov 2003
Location: Ireland
Distribution: Debian testing
Posts: 79

Original Poster
Rep: Reputation: 15
I'm recompiling now with ext3 as a component, not a module with the same for anything like jbd but somehow I feel this won't be a complete solution.
To be honest I couldn't even find ext3.ko or jbd.ko when I had them set as modules (for some strange reason) in .config and trust me, I tried in ~/linux-2.6.5/fs/ext3 and ~/linux-2.6.5/fs/jbd and have even less of a clue where they would go (i.e. where the originals are for my current kernel).

Here's the text for the fs part of my compile for ext3 and then jbd (compile as yet uncomplete):

CC fs/ext3/balloc.o
CC fs/ext3/bitmap.o
CC fs/ext3/dir.o
CC fs/ext3/file.o
CC fs/ext3/fsync.o
CC fs/ext3/ialloc.o
CC fs/ext3/inode.o
CC fs/ext3/ioctl.o
CC fs/ext3/namei.o
CC fs/ext3/super.o
CC fs/ext3/symlink.o
CC fs/ext3/hash.o
CC fs/ext3/xattr.o
CC fs/ext3/xattr_user.o
CC fs/ext3/xattr_trusted.o
CC fs/ext3/acl.o
CC fs/ext3/xattr_security.o
LD fs/ext3/ext3.o
LD fs/ext3/built-in.o

and

CC fs/jbd/commit.o
CC fs/jbd/recovery.o
CC fs/jbd/checkpoint.o
CC fs/jbd/revoke.o
CC fs/jbd/journal.o
LD fs/jbd/jbd.o
LD fs/jbd/built-in.o

Does this mean anything to you?
Long-shot but hey, I'm an idiot!


Another unrelated problem is that when I do "make xconfig" all the fonts are screwy and are just random patterns (not wingdings or anything like that so I presume there's a lib or two in error).
All the Kconfig files located with the untarred kernel are in good old English so that's another POSSIBLE source out of the way.

Last edited by gavinbeatty; 04-13-2004 at 11:19 AM.
 
Old 04-13-2004, 11:53 AM   #4
jmorse
Member
 
Registered: Mar 2004
Location: United Kingdom
Distribution: LFS
Posts: 74

Rep: Reputation: 15
I have no idea what any of the output from 2.6's make means.

Setting something as a module causes it to be built as a '.ko', eg ext3.ko. This is then copied from the source tree to /lib/modules/2.6.5/kernel/fs/ etc.

The initrd has a partial copy of this /lib/modules/... tree, and loads modules needed during boot.

Theoretically mounting the initrd 'mount -o loop ./initrd /mnt/loop0' and then copying the new modules from /lib/modules/2.6.5/kernel/fs/... etc to /mnt/loop0/lib/modules/2.6.5/kernel/fs/..., then umount the initrd, and throw in an 'e2fsck ./initrd' for luck, should solve the problem.

Compiling in support for the bits that won't load will also solve the problem, but you may get odd error messages appearing in your log files as the initrd still tries to load them.

I use menuconfig, so I cant help with xconfig problems!
 
Old 04-13-2004, 12:11 PM   #5
gavinbeatty
Member
 
Registered: Nov 2003
Location: Ireland
Distribution: Debian testing
Posts: 79

Original Poster
Rep: Reputation: 15
Haven't tried your 'mount -o loop....' stuff yet but I'll try it tomorrow. Too tired to go into complex stuff.

I have noticed this line at the end of my compile:

if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.6.5; fi

Does this have something to do with the fact that I've called my bzImage, vmlinuz-2.6.5_Custom, and my System.map, System.map-2.6.5_Custom?
Does this mean I need to link my new Sytem.map-2.6.5_Custom to something or does it only deal with replacing the standard System.map?

Also, /lib/modules/ contains a 2.6.5 folder. Does this need to be 2.6.5_Custom? The other entries are 2.6.3-4mdk and 2.6.3-4mdkcustom for my current and previous (and unaltered) compiles respectively.

I know I'm asking a whole load of questions before even trying your suggestions but I'm still hoping my spidey-senses can guide me (or at least make me feel big).
 
Old 04-13-2004, 12:19 PM   #6
jmorse
Member
 
Registered: Mar 2004
Location: United Kingdom
Distribution: LFS
Posts: 74

Rep: Reputation: 15
I haven't ever tried changing what the kernel calls itself. Making the kernel call itself 2.6.5_Custom probably involves changing the makefile, rather than renaming the bzImage.

If there is a 2.6.5 folder under /lib/modules, then the kernel will be calling itself 2.6.5. [Also check 'uname -r'].

I think that last line is running depmod with the symbols for the new kernel. [http://www.dirac.org/linux/system.map/] explains. Just copy the new one, and create a link from it to /boot/System.map so that anything that needs it can find it.
 
Old 08-17-2004, 03:07 PM   #7
mustangmark
LQ Newbie
 
Registered: Aug 2004
Posts: 1

Rep: Reputation: 0
You need to do a 'make modules_install' to get the correct modules for your kernel.....you do this after the make.

what is happening in your case is that you are getting the jbd.ko module for the previous kernel.

the module versioning helps to keep modules from failing by making sure that you run the module on the same version of the kernel for which it was compiled...i normally turn this off since it can be a pain when putting modules on other similiar systems...but the kernel is slightly different.

cheers,

Mark.
 
Old 08-17-2004, 03:49 PM   #8
gavinbeatty
Member
 
Registered: Nov 2003
Location: Ireland
Distribution: Debian testing
Posts: 79

Original Poster
Rep: Reputation: 15
WHOOOOOOOOAAAAAAAAAAA!

Forgot about this thread for a few months there.

I found the problem was down to me compiling support for my root partition as a module (and the fact that mandrake is buggy - not in this instance but just in general).

I'm on slack10 now and I'm lovin' it to borrow a horrible marketing slogan.

Thanks though for replying after so much time of inactivity.
 
  


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
kernel compile errors slinky2004 Linux - General 1 10-22-2005 05:16 PM
kernel compile errors... ash4stuff Linux - Software 15 01-01-2004 04:48 PM
Kernel compile errors! kierse Slackware 4 12-04-2003 12:25 AM
kernel compile errors justwantin Slackware 2 08-23-2003 05:47 PM
Redhat 7.2 Kernel Compile Errors GOLDF1NG3R Linux - General 2 01-26-2002 03:53 AM


All times are GMT -5. The time now is 08:16 PM.

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