The UNIX and Linux Forums  
Hello and Welcome from United States to the UNIX and Linux Forums! Thank You for Visiting and Joining Our Global Community.

Go Back   The UNIX and Linux Forums > Operating Systems > Linux
.
google unix.com



Linux RedHat, Ubuntu, SUSE, Fedora, Debian, Mandriva, Slackware, Gentoo linux, PCLinuxOS. All Linux questions here!

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
kernel panic on RHEL3 MarGur Linux 2 07-31-2007 10:42 AM
Kernel panic - not syncing: cannot execute a PAE-enabled kernel on PAE-less CPU dave043 Linux 2 05-10-2007 01:57 AM
kernel panic pgas UNIX for Dummies Questions & Answers 1 04-19-2004 02:32 PM
kernel panic: No init found linuxpenguin Linux 5 12-03-2003 04:37 PM
RH 7.3 Kernel Panic. ruizf UNIX for Dummies Questions & Answers 2 09-25-2002 01:50 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 10-26-2005
Davide71 Davide71 is offline
Registered User
  
 

Join Date: Feb 2005
Location: Italy
Posts: 7
kernel panic

I have compiled kernel version 2.6.12 in my linux box mandrake 10.1. I have followed http://www.digitalhermit.com/linux/K...ild-HOWTO.html instructions. I have copied .config file from /usr/src/linux and lightly modified it (only the processor type) by xconfig. I have compiled the source and modules. I have configured lilo.

This is what I have in :




Code:

/boot directory

-rw-r--r--  1 root root     512 mar  6  2005 boot.0200
-rw-r--r--  1 root root     512 mar 10  2005 boot.0800
-rw-r--r--  1 root root 1223389 mar 13  2005 bzImage
-rw-r--r--  1 root root 1297010 ott 24 19:13 bzImage-2.6.12
lrwxrwxrwx  1 root root      32 ott 26 09:18 config -> config-2.6.8.1-10mdk-i586-up-1GB
-rw-r--r--  1 root root   59391 ott 24 15:22 config-2.6.12
-rw-r--r--  1 root root   60295 set  8  2004 config-2.6.8.1-10mdk-i586-up-1GB
-rw-r--r--  1 root root    5032 set 14  2004 diag1.img
-rw-r--r--  1 root root   16796 set 14  2004 diag2.img
drwxr-xr-x  2 root root    4096 mar  6  2005 grub/
-rw-r--r--  1 root root  139440 ott 25 22:19 initrd-2.6.12.img
-rw-r--r--  1 root root  168377 ott  9 22:02 initrd-2.6.8.1-10mdk-i586-up-1GB.img
-rw-rw-r--  1 root root  141287 mar 12  2005 initrd-i586-up-1GB.img
lrwxrwxrwx  1 root root      36 mar  6  2005 initrd.img -> initrd-2.6.8.1-10mdk-i586-up-1GB.img
-rw-r--r--  1 root root     256 mar  6  2005 it-latin1.klt
lrwxrwxrwx  1 root root      40 ott 26 09:20 kernel.h -> /boot/kernel.h-2.6.8.1-10mdk-i586-up-1GB
-rw-r--r--  1 root root     537 mar  6  2005 kernel.h-2.6.8.1-10mdk-i586-up-1GB
-rw-------  1 root root  377344 ott 24 19:20 map
lrwxrwxrwx  1 root root      15 ott 24 19:20 message -> message-graphic
-rw-r--r--  1 root root  280792 ott  9 22:02 message-graphic
-rw-r--r--  1 root root     141 mar  6  2005 message-text
-rw-r--r--  1 root root  545730 ott 24 19:09 old_System.map
lrwxrwxrwx  1 root root      36 ott 25 19:18 System.map -> System.map-2.6.8.1-10mdk-i586-up-1GB
-rw-r--r--  1 root root  586635 ott 24 15:22 System.map-2.6.12
-rw-r--r--  1 root root  545730 set  8  2004 System.map-2.6.8.1-10mdk-i586-up-1GB
lrwxrwxrwx  1 root root      33 mar  6  2005 vmlinuz -> vmlinuz-2.6.8.1-10mdk-i586-up-1GB
-rw-r--r--  1 root root 1297010 ott 24 15:22 vmlinuz-2.6.12
-rw-r--r--  1 root root 1278195 set  8  2004 vmlinuz-2.6.8.1-10mdk-i586-up-1GB


and in /lib/modules

drwxr-xr-x  3 root root 4096 ott 25 17:58 2.6.12/
drwxr-xr-x  3 root root 4096 ott 23 19:11 2.6.8.1-10mdkcustom/
drwxr-xr-x  3 root root 4096 ott 23 19:11 2.6.8.1-10mdk-i586-up-1GB/
When I start with new kernel:

"
.................
.................

insmod: error inserting /lib/jbd.ko: error 8

loading ext3.ko module
ext3: version magic 2.6.8.1-10mdk-i586-upGB gcc3-4 should be 2.6.12 K6 gcc 3-4
insmod error inserting /lib/ext3.ko: errorno = 8

........

mount error 19 mounting ext 3
kernel panic - not syncing : not init found
try passing init = option to kernel"


Could you give me any suggestion? Thanks



P.S. : My linux box keep on working fine, and I recompiled the kernel just for fun.....It is only curiosity!

Last edited by Davide71; 10-26-2005 at 12:37 PM..
  #2 (permalink)  
Old 10-26-2005
andryk's Avatar
andryk andryk is offline Forum Advisor  
Registered User
  
 

Join Date: Sep 2003
Posts: 448
Seems like some kernel part is to be built as module but u did not compile/install it, especially for filesystem which is ext3. Your box ended up with nothing mounted
My guess is you did not compile modules
Code:
make modules; make modules_install
i dont really remember correct syntax ... google a bit
  #3 (permalink)  
Old 10-26-2005
Davide71 Davide71 is offline
Registered User
  
 

Join Date: Feb 2005
Location: Italy
Posts: 7
All done

I have already typed in /home/linux 2.6.12 :

Code:
make modules
make modules_install
and then followed instructions.I guess at boot time the system try to load a module compiled for the kernel 2.6.8 installed by mandrake. In fact

Code:

.....
ext3: version magic 2.6.8.1-10mdk-i586-upGB gcc3-4 should be 2.6.12 K6 gcc 3-4
.....

My question is why ? Thank you andryk.

PS Modules compiled for 2.6.12 kernel are in /lib/modules/2.6.12 .

This topic is very difficult, I know, but I have time

Last edited by Davide71; 10-26-2005 at 12:14 PM.. Reason: Reply to andryk
  #4 (permalink)  
Old 11-03-2005
Neo's Avatar
Neo Neo is online now Forum Staff  
Administrator
  
 

Join Date: Sep 2000
Location: Asia Pacific
Posts: 6,668
The last time I experienced this problem was that I did not update the system map files. The kernel will not automatically find the modules from the kernel image. The system map files must be edited to match the kernel version to get the right modules to load.

This is a bit of a "pain" in Linux, as I would expect that the boot loader could read the kernel and know which modules directory to open. Maybe in the future, we hope!

See this link

Quote:
# Backup the present kernel which is in "/boot" for most systems. You can tell where it is by looking at "/etc/lilo.conf" . sometimes lilo.conf will point to a link file. Trace the link file and backup the file being pointed to.
# Have an alternate way to boot such as another linux system on your computer or an emergency boot disk that you can access your filesystem from in case your new kernel crashes.
# Back up your kernel modules in the directory "/modules". There is probably a directory full of modules so you should be able to back it up using "cp –dpr dir1 dir2" where dir1 is the name of the directory where your modules are and dir2 is where you want to put them.
# Go to "/usr/src/linux". There is a "/usr/src/linux/.config" file used to do the compile. It is modified by typing "make config" and the values in it are used to determine defaults while doing the "make config". Back this file up to keep your original settings if you want.
# Type "make config" and answer the hundreds of questions asked. On another terminal, open the file "/usr/src/linux/Documentation/Configure.help" to determine what each configuration is. Also you can type "make menuconfig" or from an X session "make xconfig".
# Type "make dep"
# Type "make clean"
# Type "make bzImage" or "make zImage" if the kernel is small.
# Type "make modules"
# Type "make modules_install"
# Copy the file "/usr/src/linux/arch/i386/boot/bzImage" to "/boot/vmlinuz".
# Copy the file "System.map" from "/usr/src/linux" to the "/boot" directory. Rename it "System.map=w.x.y" and make sure there is a link file called "System.map" pointing to it. This step will keep you from getting warning messages when you boot. It seems to be a step they forgot to include in the kernel-howto.

* cp /usr/src/System.map /boot/System.map-2.2.14
* cd /boot
* rm System.map
* ln –s System.map-2.2.14 System.map

# Run rdev on the new kernel image to verify the root filesystem device. "rdev /boot/vmlinuz /dev/hda2". Please note that this step may be optionally dependent on whether you want to use the boot loader, lilo, to point to the root device.
# Make sure the /etc/lilo.conf file is correct (image=/boot/vmlinuz)
# If your kernel has a feature supported by a module that is required to boot, you will need to make a RAM disk boot image or your system won't boot.

* Type "lsmod" and look to see if the "loop" module is loaded. If it is skip the next step.
* Type "insmod /lib/modules/2.2.14/block/loop.o"
Use this command if the loopback module is not installed. This assumes you compiled the support into your kernel. In my example, I used kernel version 2.2.14, but your kernel version may have a different number. Substitute the appropriate values.
* Type "mkinitrd /boot/initrd-2.2.14.img 2.2.14"
Again, this example is for kernel version 2.2.14. This command will create a RAM image module for your kernel to load into.
* Add an entry similar to "initrd=/boot/initrd-2.2.14.img" to the "/etc/lilo.conf" file for the stanza that is used to boot this kernel. An example of the stanza follows.

image=/boot/vmlinuz
label=rhl
initrd=/boot/initrd-2.2.14.img
read-only
root=/dev/hda2


Read the section about LILO for more information or read the lilo and lilo.conf man pages.

# Run lilo by typing "lilo". If you didn't set the root device in step 12, you will need a line like "root=/dev/hda2" in /etc/lilo.conf in the group of commands for your kernel. This will tell the kernel where your root filesystem is.
Also,

Visit this link - also discusses system.map in Linux kernel building.
Closed Thread

Bookmarks

Tags
linux commands, linux mandrake

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

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
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 07:50 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0