Linux - KernelThis forum is for all discussion relating to the Linux kernel.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Now, I want to upgrade my linux kernel by source code named linux-2.6.20.tar.gz,i according to the README to install it,the step such as make menuconfig,make ,make install and so on,and no errors have happened,but the kernel upgrade failed,and use cmd uname -r ,the kernel remains 2.6.18 which before upgraded,who can tell me how to upgrade kernel through the source code,thank you!
All the instructions are in the README file. Extract the source code, run 'make menuconfig' (or some other method of configuring), do the changes you need to, run 'make' to compile the code. After this copy the kernel/needed files to your /boot and configure your bootloader to include them in the boot list. Then either set the new kernel as the default one or select it from your bootloader next time you reboot. Do not remove any older kernels before you've tested that this new kernel works fully; if it doesn't, it's good to have at least one older, working kernel so that you are able to boot.
The files you need to copy to /boot depend on what you've compiled into the kernel. For example if you use ext3 filesystem and support for it is not built into the kernel, you'll need more than just bzImage.
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304
Rep:
Which bootloader are you using? Grub or lilo?
If the new kernel is already in the /boot directory, then it's just a bootloader configuration problem. /etc/lilo.conf is for lilo.
Thank b0uncer and whansard very much!Thanks for your help!
Yes,I can upgrade the kernel from 2.6.18 to 2.6.20,but when i want to upgrade the kernel to 2.6.21.5,and the same method like 2.6.18_to_2.6.20,no errors have happened,but i reboot it and i saw the information like 'Kernel panic - not syncing : Attempted to kill init! ',why did this happen?what is the reason for this?and what can i do to solve this problem?Thank you!
That's true. One common is filesystem support; for example if the filesystem is in ext3 format but kernel has only modular support for ext3, it may not be able to load it before root filesystem is mounted, which leads to a dead end. For this problem the solution is to use initrd, which provides the capability to load a RAM disk by the boot loader, to which it can then mount the filesystem and keep going. That's just one example.
I suggest you look at the configuration of (one of) your working kernel(s) and compare that to the configuration of your new kernel which doesn't boot. If you have or can extract the .config files (maybe trough /proc, if it's enabled in the old kernels) for the older kernels too, you can 'diff' them and then start inspecting closer the things that differ (mainly those that are missing from the new kernel). If the solution isn't obvious after that or you're unsure, you can try the things one by one until you find out what it is about.
OK,Thank you very much!
but now problem is : where is the 'make menuconfig' file? i try my best to find the file but no reason,please tell me ,Thank you !
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304
Rep:
Quote:
Originally Posted by bj_googler
OK,Thank you very much!
but now problem is : where is the 'make menuconfig' file? i try my best to find the file but no reason,please tell me ,Thank you !
That isn't a file. you type 'make menuconfig' in the top directory of the kernel source to get run a kernel configuration utility. make gconfig and make xconfig are others you can only run in X
To whansard :first,thank you for your help!
yes,i know the 'make menuconfig' is a command,and i want to know after input 'make menuconfig'and exit the face of the menuconfig,where is my config files which i select in the menuconfig,if i get it and i can copy it to my new kernel upgrade,then the new kernel have the same configure like old's,maybe the errors will be disappeared,good luck!
Distribution: RH 6.2, Gen2, Knoppix,arch, bodhi, studio, suse, mint
Posts: 3,304
Rep:
ok. the setup is saved to .config. the leading period makes it a hidden file. ls -al will show them. If you copy a config to a different kernel, you should first run 'make oldconfig', and oldconfig will have you put in values for the things that are different or nonexistant in the newer kernel.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.