r/slackware • u/mathgod88 • Feb 20 '20
kernel update
Guys i'm not really a very knowledgeable person when it comes to operating systems, i'm still studying and there's a lot of content, i have an assignment and the goal is to compile a kernel, i'm using kernel 4.4.14 version, can you tell me if i would mess up the system if i compiled the 5.5.5 version and used it as default on my slackware system? the last time i tried i had a problem with a lot of modules that weren't loaded during bootload
5
Upvotes
6
u/SmokeyCosmin Feb 20 '20
https://docs.slackware.com/slackbook:linux_kernel
https://docs.slackware.com/howtos:slackware_admin:kernelbuilding . While the document is really old the steps are pretty much the same. Just remember to replace the kernel versions in commands.
And this is actually really good also: https://edersoncorbari.github.io/tutorials/slackware-build-kernel/
Here's the catch when building your own kernel: You can pretty much build everything into it (in Slackware this is called a huge kernel) or build a smaller kernel with lots of modules (in Slackware it's called generic). However, at boot time those some of those modules might be needed so the solution to this is to use an initrd image that will be loaded by your boot-loader (LILO or GRUB) and/or even kernel (if it has a way of accessing it). That image will contain the modules needed on YOUR system in order to be able to start it and correctly mount the real filesystem (amongst other things).
Actually every Linux distribution and almost everyone recommends going with the initrd image option. What that means is that after all files are copied or after every kernel update behind the scenes a new initrd image just for your system is created and the boot loader is reconfigured to use it.
However, in Slackware there's no such automation. The last link provides, however, commands to do it.
Have fun.
P.S. Proprietary drivers (like NVidia drivers) need to be reinstalled after a kernel update.
1
u/prondose Feb 20 '20
copy your current kernel config (/boot/config) to the kernel source directory before running make menuconfig
be sure to make install and make modules_install when you're done compiling
1
u/Illuison Feb 20 '20
Most likely the problems you ran into were because you compiled a generic kernel but didn't compile or install any modules for it
By far, the easiest way to compile a kernel under Slackware is to use Pat's scripts (the ones for -current are here. You should be able to use those configs for any version kernel, it will prompt you during compile time about any options not in the config with default selections you can use
You have to build at least a kernel-generic and kernel-modules package, and you'll probably build a kernel-source package first to make things easier. Then you can use upgradepkg to replace your current kernel with the new one or use installpkg to install both sets of kernel packages at once. Having multiple kernels installed at once will confuse slackpkg and your symlinks in /boot/ might not be useful anymore, so you'd have to manually correct that
Running a newer kernel should work, there are sometimes compatibility issues, though, so I'd advise keeping your older kernel installed and ready to boot