SlackwareThis Forum is for the discussion of Slackware Linux.
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.
Hello. Believe it or not, I've never done a kernel update on Slackware (other than complete re-installs). I did a "slackpkg upgrade-all" today to see what was out of date and noticed a number of kernel related packages. Before I do the update, I want to make sure I don't break anything. Note, I'm running Slackware 12.2.
First, will doing the update of the kernel packages also update the running kernel? Will I need to re-run lilo to find the new one?
There are some packages I have installed that I know have kernel modules (eg. the ATI drivers for one). Am I correct that after I install the new kernel packages I will need to re-build any packages that built kernel modules?
I know some of the packages this applies to. How can I find out which ones I don't know about. I know about lsmod to see what modules are loaded. How do I find out what package is responsible for a module?
If you use slackpkg, it will offer to run lilo when it's finished updating. If you are running the generic kernel, you'll need to make a new initrd. Yes, you will need to rebuild any kernel modules you've installed. I had to do that for the atl2 module on my laptop.
If you use slackpkg to upgrade the kernel make sure you check /etc/slackpkg/blacklist and verify that all the kernel lines are commented out with "#".
If you are using the generic kernel then check your /etc/lilo.conf and make sure "image = /boot/vmlinuz" or "image = /boot/vmlinuz-generic-smp-2.6.26.31-smp". vmlinuz is a symlink to the generic-smp kernel anyway.
If you are using the generic kernel then make sure you have your "mkinitrd..." command ready to go. "cd /boot" then run your command to create the new init tree. While still in /boot you could run "lilo" (again).
Before you reboot you could save the output from lsmod to a text file to compare later with the new kernel running. If your ATI driver was compiled before you'll need to get ready to do it again. Might as well boot init 3 and do it right away before trying to start X11.
Kernel upgrade is not as scary as it seems. I cannot remember the last time I had to do a full installation of slackware. I even do the upgrade remotely sometimes. The process I follow is:
1. go to runlevel 3 (This is only to remove my video driver. Not required on my servers)
2. remove nvidia driver (this is the only kernel specific module I have. You may have remove others)
3. upgrade all
4. upgrade config files if required
5. mkinitrd with new kernel
6. lilo
7. update inittab to runlevel 3
8. reboot
9. reinstall nvidia driver
10. telinit 4
11. set inittab back to runlevel 4
I don't know of an easy way to find kernel specific modules if you don't keep track of non-standard packages that you install. You can check if anything remains in /lib/modules for the old kernel after it is removed. It's not a big deal if you missed anything. You will realize when you try to use the app/driver, at which time you can recompile for the new kernel. I still forget to remove the nvidia driver from time to time (a mixture of late night and alcohol can cause that) and the cisco vpn before I discover vpnc.
Thanks. This is helpful so far. Guess I'll need to read the man page for mkinitrd. I know all of the non-standard packages installed. Most were from Slackbuilds. I still have to package files that I built. Will re-installing them be enough to re-compile the kernel modules (where needed) or do I need to re-build the install packages?
Besides my ATI drivers, I know there is a VirtualBox module, and modules from my compile of madwifi. I compiled madwifi because I have had trouble with compatibility on my card, but may see if that is still an issue.
There are some specific modules I'm curious about.
Before I do the update, I want to make sure I don't break anything. Note, I'm running Slackware 12.2.
Be aware that in going from Slackware 12.2 to -current you will upgrade glibc. This could affect the operation of any programs that you have compiled.
I would strongly recommend that you use slackpkg to do the update. Slackpkg is smart enough to order the update so that pkgtools ( and associated utilities) and glibc are upgraded before upgrading other packages.
A couple of gotchas with slackpkg:
1) It does not report on the appearance of *.new files under /usr. You will need to run 'find . "*.new" -print' from /usr to to pickup the new man.conf and vimrc.conf files.
2) It does not report on the new /etc/passwd, /etc/group, /etc/shadow, /etc/gshadow files. There have been some additions and alterations to these files which you will need to change manually.
All good points but the OP never mentioned upgrading to from 12.2 to -current. There are recent kernel patches for 12.2 without upgrading to -current.
Right, the upgrade would take me to 2.6.27.31 like brianL said.
It had not occurred to me until now that this wouldn't take me to -current. Now I'm curious how you get to current. Sounds like I'll be searching the forum.
Thanks for the replies. The Slackware community is amazing.
It had not occurred to me until now that this wouldn't take me to -current. Now I'm curious how you get to current. Sounds like I'll be searching the forum.
Found the necessary information on that one. The forum search is my friend.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.