kernel panic


 
Thread Tools Search this Thread
Operating Systems Linux kernel panic
# 1  
Old 10-26-2005
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

Smilie

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

Last edited by Davide71; 10-26-2005 at 01:37 PM..
# 2  
Old 10-26-2005
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 Smilie
My guess is you did not compile modules
Code:
make modules; make modules_install

i dont really remember correct syntax ... google a bit Smilie
# 3  
Old 10-26-2005
All done

I have already typed in /home/linux 2.6.12 Smilie :

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 Smilie ? Thank you andryk.

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

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

Last edited by Davide71; 10-26-2005 at 01:14 PM.. Reason: Reply to andryk
# 4  
Old 11-03-2005
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.
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. Red Hat

Kernel panic-not syncing

dear experts linux i am using RHEL 5.5 run on a physical server. i am front of a big trouble, the Rhel can't run correctly , it show me this error message in black screen: reading all physical volumes. this my take a while .. found volume group "VolGroup00" using metadata type lvm2 9... (1 Reply)
Discussion started by: wassimpb
1 Replies

2. SCO

Kernel Panic

Hello when i booting my SCO Server I become this Message PLS can anyone help me? Cheers Christoph (1 Reply)
Discussion started by: cga
1 Replies

3. UNIX for Advanced & Expert Users

what does the kernel panic mean?

Hi, all: How should I obtain the reason of kernel panic? How should I debug the program which result in a kernel panic? What can I get from the panic information? li, kunlun (3 Replies)
Discussion started by: liklstar
3 Replies

4. UNIX for Dummies Questions & Answers

Kernel 3.0 giving me panic :)

I was very exited to try out new kernel version so i decided to give it a try. http://www.conceivablytech.com/7683/products/linux-torvalds-approves-linux-3-0-rc1 So i downloaded the kernel 3.0-rc1 from The Linux Kernel Archives It was my first kernel compilation everything went smooth... (1 Reply)
Discussion started by: pinga123
1 Replies

5. UNIX for Dummies Questions & Answers

simulating kernel panic

How can a kernel panic be simulated? (5 Replies)
Discussion started by: proactiveaditya
5 Replies

6. Red Hat

Kernel Panic problem

Hi all, When i load my block device driver in Fedoracore10 kernel 2.6.27. i got this type of error kernel panic - not syncing : Fatal exception in interrupt. I am unable to save the log file.... Can any one help me..... regards sundar (4 Replies)
Discussion started by: sundhar
4 Replies

7. Linux

kernel panic on RHEL3

hello all, please, help! we suffered out of power today and one of our Linux boxes cannot boot properly: .. hda set_driver_speed_status error 0X04 VFS: Unable to mount root fs on 00:00 ... the only thing that i can do - is boot in the rescue mode. i've already added noinitrd to... (2 Replies)
Discussion started by: MarGur
2 Replies

8. Linux

Kernel panic - not syncing: cannot execute a PAE-enabled kernel on PAE-less CPU

ok so I just installed fedora core 6 on my dell inspiron 700m and I go to boot into linux and I get this error. Has anyone seen this before? I also had XP Pro and Vista installed on this pc prior to putting fedora core 6 on the machine. I'm trying to setup a triple boot system. Please Help... (2 Replies)
Discussion started by: dave043
2 Replies

9. UNIX for Dummies Questions & Answers

kernel panic

hello :-) I have one problem with my LiLO... I installed PLD Linux on my computer but when it boots, the last thing I can see is: request_module Root fs not mounted VFS: Cannot open root device 03:01 Kernel panic: VFS: unable to mount root fs on 03:01 and the system stops :-( what... (1 Reply)
Discussion started by: pgas
1 Replies

10. UNIX for Dummies Questions & Answers

RH 7.3 Kernel Panic.

I've installed rh 7.3 a fewday ago and I'm trying to boot it and I get this" Kernel panic: no init found. try passing init=options to kernel" ????? What do I do. Thanks. F,Ruiz. (2 Replies)
Discussion started by: ruizf
2 Replies
Login or Register to Ask a Question