How to update the kernel?
Hello Everyone,
Is there package for a new linux kernel i can install and kernel headers package? Is this all that is need to update the kernel? Any else the need to be done after? BTW: I'm on Slackware 14.1 64bit Multilib. |
Hello,
1) No package for a new kernel. Generally you'll have to build it yourself. 2) You don't have to change the kernel headers when you install a new kernel. 3) You will have to build and install the modules associated with the kernel. 4) Which new kernel do you want to install and why? 5) Read http://docs.slackware.com/howtos:sla...kernelbuilding first. PS URL fixed, thanks lems. |
Quote:
Regards, Matt |
Didier's link corrected (a `g' was missing):
http://docs.slackware.com/howtos:sla...kernelbuilding This document helped me, here are some notes I made based on the document above as well as LQ postings when I started to build my kernel: Get a kernel tarball*. Then: Code:
tar -C /usr/src -jxvf linux-kernel.tar.xz * There is a script getkernel that I wrote which is able to get the latest kernel of your kernel minor version, or the latest stable one. Then either copy the config from /boot or use: zcat /proc/config.gz > /usr/src/linux/.config Patrick releases configs for newer kernels as well, see the testing/ directory. Then: Code:
cd /usr/src/linux Code:
General Setup -> Local version Code:
make bzImage modules You can either run `nproc', or `grep cores /proc/cpuinfo' to get the correct number. Installing it (change the names/flavors [`generic', `smp'] according to your needs): Code:
make modules_install Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh /boot/new-vmlinuz-image Code:
initrd = /boot/initrd.gz Code:
lilo -v |
You could also use: slackware64-current kernel packages.
Building a kernel is a good exercise though. Besides what everybody else said, you can remove a lot of device drivers from the kernel if you know you'll never need them. Once you do it a couple times, it'll be easy. I just started using Linux this past year and have probably already compiled kernels 50 times, mainly just for fun and speed and optimization. Just be sure to build your filesystem into the kernel, so you don't need an initrd. Could someone explain why a generic kernel with no filesystems enabled is a good idea? |
Hello Everyone,
Ok thanks for the info guys. |
Late to the game, but I have a script that will compile kernels for you and even update LILO:
https://github.com/ryanpcmcquen/linu...re/kernelMe.sh Just read the top of the script on how to use it, basically you run the script and it prompts you to choose mainline, stable or longterm, then figures out what the latest one is by parsing kernel.org. Some hidden features include passing a kernel config file to it (like the ones Pat puts up on ftp), like so: Code:
KERNELCONFIG=/usr/src/config-huge-4.1.1.x64 sh kernelMe.sh And building a generic kernel (instead of the default HUGE): Code:
HUGE=n sh kernelMe.sh |
Quote:
Quote:
|
Quote:
|
Quote:
|
Most of you probably already know it but Alien Bob's page on building a custom kernel is especially good.... located H E R E Besides the lil' tidbits like how to get a display (ex: in a terminal) for root while logged in as User, Eric has the courage to risk post good technique, even if it draws hipster criticism like for running "make xconfig". Doing configs for kernels in this way is not just a mere convenience, it is a better learning experience and safer because all 3 items (category, specific, and help) all show all the time if nothing else just to relieve doubt but also explained and creates an association for where, what, and why.
|
I agree. I see no reason why one should not use xconfig when possible. It is far more convenient than config, especially when you decide you need to go back to a previous option, and the single-tree option makes it easier to have multiple branches open, but just use the arrow keys to navigate, versus menuconfig's single-layer view.
|
All times are GMT -5. The time now is 12:14 PM. |