Visit Jeremy's Blog.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 10-19-2005, 02:59 PM   #1
LQ Newbie
Registered: Oct 2005
Location: Italy
Distribution: Ubuntu
Posts: 7

Rep: Reputation: 0
compiling kernel panic!

Hello all!

I'm new to kernel compilation, so after reading the manual i got a kernel panic and i do not know hot to go on.
i downloaded it from version, no patches
i tryed to compile on Ubuntu 5.04 and Debian Sarge: same result!

this is what appears to me after booting from grub:

modprobe: FATAL: could not load /lib/modules/ no such file or directory (repeated a lot of times)
umount : devfs: not mounted
pivot_root: no such file or directory
/sbin/init: 432 cannot open dev/console. No such file or directory
Kernel panic-not syncing : Attempted to kill init

the procedure i did follow to comple is:

untar the linux.
make mrpropermake xconfig (i deleted just the code maturity level option because i am not used enought to the hardware to choice without doubts, thus the other modules i intalled was in the default configuration)
make dep (despite it wasn't required)
make clean
make && make modules
make install && make modules install
mkinitrd -o /boot/initrd.img-
i updated my grub's menu.lst and that's all!

of course the /lib/modules/ file exists!

thank you for your attenction!
Old 10-19-2005, 03:49 PM   #2
Simon Bridge
LQ Guru
Registered: Oct 2003
Location: Waiheke NZ
Distribution: Ubuntu
Posts: 9,211

Rep: Reputation: 198Reputation: 198
In xconfig, you have to wade through all the module choices reading as much of the documentation as you can stand - and then some. The default configuration will not work - it is very minimal. You must customise it.

Doing it this way will also mess up your package configuration. You are well advised to use the distro kernels via apt-get upgrade kernel.

Is there a particular feature available to a 2.6.13 custom kernel you require which is not in the 2.6.12 distro version?
Old 10-20-2005, 06:02 AM   #3
LQ Newbie
Registered: Oct 2005
Location: Italy
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
first of all thank you for your help (coming from the other side of the earth : i am in italy !)

the reason why i am compiling is that i need to install a program from sourceforge that's guaranteed to work with vanilla
kernel only, so my aim is to use this program and not to optimize my kernel performances and that's the reason why i left default
configuration, hoping it to work without problems.
wath do you mean when you say i will lose my deb package configuration?
i want to leave the previous kernel for normal use, will i lose the config just when i use the new kernel or forever?
Do you know if is possible to get also the vanilla kernel via the apt-get ?

good bye
Old 10-20-2005, 08:21 AM   #4
Senior Member
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
I haven't used Ubuntu (or GRUB either) but have some experience with Debian, which might be close enough.

Compiling your own kernel outside the Debian package system is mostly harmless. So long as you do not overwrite the official kernel/module setup you can keep both and boot either one.

Most application-related packages in Debian should not be affected by running a different kernel, but you can get some problems. For example with 2.4 kernels the ALSA sound system was separate from the kernel, and the Debian packages would not work with a non-Debian kernel. Some other system/kernel related packages might have similar problems. So overall it is better (and probably easier) to use the official Debian/Ubuntu kernel source package if you can.

I don't know what 'vanilla' kernel means. All kernels have some flavour or other . Have you tried the app with your current kernel?

In order to boot, a kernel at least needs the the drivers for your disks and filesystems, so you certainly need to configure these in.

Last edited by maroonbaboon; 10-20-2005 at 08:28 AM.
Old 10-20-2005, 01:47 PM   #5
Senior Member
Registered: Feb 2004
Location: Somerset, England
Distribution: Slackware 10.2, Slackware 10.0, Ubuntu 9.10
Posts: 1,938

Rep: Reputation: 55
A vanilla kernel just means one that hasn't been patched by your distro. For example both Red Hat and SuSE patch the kernel to do things specific to their distro. Any kernel you compile yourself (without patches) is a vanilla kernel no matter how many drivers and modules you choose to include.
Old 10-20-2005, 06:22 PM   #6
Registered: Feb 2003
Location: 1st hop-NYC/NewJersey shore,north....2nd hop-upstate....3rd hop-texas...4th hop-southdakota(sturgis)...5th hop-san diego.....6th hop-atlantic ocean! Final hop-resting in dreamland dreamwalking and meeting new people from past' night.
Distribution: Siduction, the only way to do Debian Unstable
Posts: 506

Rep: Reputation: Disabled
Try booting to your old kernel and then cd to /usr/src/linux
edit the Makefile and change version type to for example,you can use anything.If useing grub this allows choices for kernel boot and you wont overwrite your working kernel.
"make oldconfig" will copy your config from the kernel you booted to
then make xconfig to add/remove anything you want

If you do not have another working kernel to boot from,just boot a live cd and from root terminal chroot into your existing hdd enviroment and recompile the kernel.You may want to have a look in /usr/src for any old headers and find a conf file from the previous working kernel and copy it over or use as a guide and edit manually.

good luck,
Its tedious at first but after a few times of recompileing it becomes second nature.

vanilla sources are the basic debian kernel source files.
Old 10-21-2005, 09:33 AM   #7
LQ Newbie
Registered: Oct 2005
Location: Italy
Distribution: Ubuntu
Posts: 7

Original Poster
Rep: Reputation: 0
Originally posted by ironwalker
vanilla sources are the basic debian kernel source files.
what do you mean ? that,having an ubuntu or debian distr, i can avoid to compile a new kernel if the only thing i want is to have a vanilla kernel
running on my desktop?

Anyway, i succeeded in compiling: my error was stupid: i built my initrd image typing:
'mkinitrd -o initrd.img-' instead of 'mkinitrd -o initrd.img-'
if the version parameter is omitted, mkinitrd automatically take the running kernel's one as the parameter.
i apologize sayng that 'mkinitrd -h' does not talk about the optional version parameter at all.

Anyway tring to boot the new kernel with my Debian root (well i have both a 2.6 kernel Ubuntu and a 2.4 kernel debian distribution)
filesystem i had another kernel panic:

umount: devfs: not mounted
mount: unknown file system type 'devfs'
pivot_root no such file or directory
/sbin/init cannot open dev/console
Kernel panic not syncing: kill init

it should be due to the difference between the two kernels: 2.4 uses devfs and 2.6 udev.
Old 10-21-2005, 06:42 PM   #8
Senior Member
Registered: Aug 2003
Location: Sydney
Distribution: debian
Posts: 1,495

Rep: Reputation: 48
I think it is more likely that the initial ramdisk (initrd) does not contain the right drivers to access your hardware. If you are compiling a kernel to run on a particular machine I don't see much point in using initrd. Just make sure the kernel contains all drivers necessary to access the root filesystem (i.e. built-in, not as separate modules).

For the rationale behind initrd see e.g.


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 On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Compiling kernel = kernel panic Tons of Fun Debian 5 07-02-2005 02:59 PM
Kernel panic after compiling - Hoarx MarioT Ubuntu 1 06-08-2005 06:14 AM
Kernel panic after compiling 2.4.29 ? gnirtS Debian 8 03-15-2005 11:08 AM
Kernel panic after compiling 2.4.26 alantang Linux - General 4 02-01-2005 03:51 PM
Compiling Pentium4 Support Gives Kernel Panic activematrix Linux - Hardware 12 05-17-2003 08:12 AM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 07:09 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration