compiling kernel 2.6.13.3: 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 kernel.org version 2.6.13.3, 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/2.6.13.3/modules.dep: 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.2.6.13.3.tar 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-2.6.13.3 i updated my grub's menu.lst and that's all! of course the /lib/modules/2.6.13.3/modules.dep file exists! thank you for your attenction! |
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? |
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 |
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. |
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.
|
Try booting to your old kernel and then cd to /usr/src/linux
edit the Makefile and change version type to 2.6.13.3-a 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. |
Quote:
running on my desktop? Anyway, i succeeded in compiling: my error was stupid: i built my initrd image typing: 'mkinitrd -o initrd.img-2.6.13.3' instead of 'mkinitrd -o initrd.img-2.6.13.3 2.6.13.3' 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. |
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. http://www.tldp.org/LDP/Linux-Filesy...ml/initrd.html |
All times are GMT -5. The time now is 08:23 PM. |