Linux - GeneralThis 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.
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.
Most distributions document the procedure to optimally integrate with their configuration and package management system. You can check the docs for your distribution, or post what distribution and release you're using and someone will likely hunt it down for you. There are also generic instructions for kernel installation, but be aware that using them on most modern desktop distributions can cause various issues.
I was more interested in generic instructions, which I can apply to any distribution.
As I said above,
Quote:
There are also generic instructions for kernel installation, but be aware that using them on most modern desktop distributions can cause various issues.
Using the generic instructions will cause you problems. The kernel and related packages will not be added / tracked by the package management system. This can cause the kernel to be downgraded on the next boot. The boot partition will need to be manually managed. Any kernel modules built by akmods will not be automatically built. Backing out a kernel will be a manual process. You will lose any patches specific to your distribution, which may cause other problems. You will not be able to report any problems to your distribution.
You should upgrade packages and kernels using your distro's package manager as it is optimized for that distro and it's packages.
For example if you upgrade to a newer kernel manually, the nvidia or ati driver won't be compatible with the newer kernel and would cause video problems. You would need to upgrade the video drivers for the new kernel as well.
However, if you want to take a crack of compiling a kernel for practice try crux linux in a virtualbox. See my sig below for link
*** If this is your first time compiling a kernel be prepare to fail a few times. Compiling a kernel is not difficult, however configuring the .config is no picnic and a difference between a successful boot or a KERNEL PANIC ***
Thanks for your responses. I realize it is not a simple task and I have decided to leave it to experts. I will be updating thru my distro's updating facility.
Have you considered trying arch linux it is a rolling release distro and focus to be bleeding edge on the latest software. Not sure what is the latest kernel version is on arch though as I am using crux linux.
The OP could also try Linux From Scratch, which would allow him to build not only the kernel but the whole OS from source . I've built a custom kernel several times on Slackware. Since Slack stays fairly vanilla, it's pretty easy to replace their kernel with a stock one (or at least it used to be; I switched to Arch some time ago). If you plan to rebuild the kernel on something like Fedora or SuSE, I'd suggest using the distro's kernel configuration file and doing a "make oldconfig" to preserve as much of the distro's old kernel configuration as possible. It's entirely possible to make your own kernel RPMs/DEBs, so your new kernel will be tracked by the package manager, but building a custom kernel isn't for the faint of heart (though it can be fun). In general, most critical fixes will be backported into the distro-supplied kernels, so there's fairly little reason to build your own, except as a learning experience, most of the time.
I use make oldconfig and make silentoldconfig where appropriate.
make silentoldconfig works the same way as oldconfig, It configures the .config using an existing kernel's config file but it does not print/prompt anything to the screen, unless it needs to ask a question about a new configuration option. Usually, I accept the default option if I don't understand what the new feature does.
The thing I notice is crux linux doesn't use an initrd image nor there is a mkinitrd command to create one. So I had to compile in some modules into the kernel like the filesystem the root partition is on and some hard disk controllers modules like SCSI, SATA and ATA stuff.
LFS and Gentoo have their niche of linux users, but it takes to long to build as you need to compile everything. I don't have that patience
It would be great if all distros followed one universal way of installing a newer kernel, but has you say, distros have their own procedures when it comes to upgrading the 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.