[SOLVED] Question about upgrading new security kernel...
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.
Distribution: Slackware 15.0 x64, Slackware Live 15.0 x64
Posts: 618
Rep:
Question about upgrading new security kernel...
Okay, I got the security upgrades for 14.2 today. The kernel upgrade has me a little worried.
It says to
Quote:
Be sure to upgrade your initrd after upgrading the kernel packages.
If you use lilo to boot your machine, be sure lilo.conf points to the correct
kernel and initrd and run lilo as root to update the bootloader.
Since all I ever do is install Slackware the most simple way possible by choosing all the stock choices (huge kernel, etc), I've never had to do anything with/to 'initrd'. Nor ever had to make sure lilo was pointing to the correct kernel.
How exactly do I go about doing this? If I simply do an 'upgradepkg' with the new kernel stuff, won't that simply overwrite/replace the old kernel and the initrd and lilo will simply see that as the kernel it should work with as always?
I mean, how/what does one change in lilo and initrd when, for example my lilo on my sda drive says:
Code:
# Linux bootable partition config begins
image=/boot/vmlinuz
root=/dev/sda1
label=Slack-main
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
# Other Slackware bootable partition config begins
other=/dev/sdb1
label=Slackware14.2
table=/dev/sdb
and the lilo on sdb has:
Code:
# Linux bootable partition config begins
image = /boot/vmlinuz
root = /dev/sdb1
label = Slackware14.2
read-only # Partitions should be mounted read-only for checking
# Linux bootable partition config ends
Thanks for any help with this and please, keep it really simple, heh.
if you choose to use the huge kernel for your installation of slackware 14.2, when you're running slackware 14.2 on /deb/sdb, just check if /boot/vmlinuz is a symlink pointing to it
Code:
ls -la /boot/vmlinuz
if it does you shouldn't need any initrd, just run lilo again
If /boot/vmlinuz points to the kernel image you want to use, all you need to do is rerun /sbin/lilo, which will install the kernel in question for lilo's bootloader to use.
The bootloader doesn't have access to the filesystem in the same way that a running system does, so failure to do this will lead to it trying to use the old location on disk where your old kernel was, and that's very likely to be overwritten. But even if not, it won't be able to load modules properly, as those will be for your new kernel.
As zk1234 said, you don't need an initrd for 4.4.19 huge if you didn't need one for 4.4.14 huge.
I'll add this: if you download patches to a local repository and you use the good-ole, manual, standard Slackware Package Management Scripts ( installpkg, upgradepkg, removepkg ).
My Slackware64 local repository is in /home/dld/slackware/ and the 64-bit patches are in /home/dld/slackware/slackware-14.2-64
Use installpkg for these kernel Packages ( I am on Slackware64 14.2. YMWV if you run 32-bit )
Code:
cd /home/dld/slackware/slackware-14.2-64 ### note that this is MY repository -- YMMV
installpkg patches/packages/kernel-generic-4.4.19-x86_64-1_slack14.2.txz
installpkg patches/packages/kernel-huge-4.4.19-x86_64-1_slack14.2.txz
installpkg patches/packages/kernel-modules-4.4.19-x86_64-1_slack14.2.txz
installpkg patches/packages/kernel-source-4.4.19-noarch-1_slack14.2.txz
Then you can upgradepkg the kernel-firmware package:
I am not sure what to recommend for the kernel-headers since there is no new glibc package for Slackware 14.2 ( as guanx said, we DO need a repackaged glibc for 14.2 to fix libm.so as was done in -Current ) but if you decide you do want the new kernel-headers:
Since you're running huge ( me too ), update /etc/lilo.conf and add a 'block' for 4.4.19 and fix your 4.4.14 block.
One thing you WILL want to change is your existing block in /etc/lilo.conf for 4.4.14:
Code:
# Linux bootable partition config begins
image=/boot/vmlinuz ### change this
root=/dev/sda1
label=Slack-main ### change this
read-only # Partitions should be mounted read-only for checking
To something like this ( labels are YOUR choice but be careful with the length of the labels -- there is a limit ):
Code:
<<snip>>
#
# change image=/boot/vmlinuz and label=Slack-main for your OLD 4.4.14 kernel
#
image = /boot/vmlinuz-huge-4.4.19
root = /dev/sda3
label = Slack4419
read-only
image = /boot/vmlinuz-huge-4.4.14
root = /dev/sda3
label = Slack4414
read-only
<<snip>>
Finally, after lilo.conf is fixed, rerun lilo AND WATCH FOR ERRORS.
Code:
lilo -v
If there are any errors ( other than maybe: Warning: LBA32 addressing assumed ) !!! STOP AND FIX ERRORS !!!
By running installpkg on the new kernel files and by keeping a safe copy of 4.4.14 in lilo.conf, you'll always be able to boot your working 4.4.14 kernel if 4.4.19 fails.
HTH and Have Fun !
-- kjh
Last edited by kjhambrick; 08-24-2016 at 07:17 AM.
Reason: typo ( :) call me the typo king :) )
As a another addition to these fine comments, if you use slackpkg to update, I'm pretty sure it will prompt you to reinstall lilo at the end. As others have stated, if you aren't using an initrd, you shouldn't need to make one with this update.
Distribution: Slackware 15.0 x64, Slackware Live 15.0 x64
Posts: 618
Original Poster
Rep:
Thanks everyone, your help worked perfectly without a hiccup.
I simply did...
Code:
cd /home/me/upgrades
upgradepkg *.txz
<when that was all done>lilo
*BEFORE* I rebooted though, just to be on the safe side I changed init to 3 (instead of 4), changed the 'quicky' fix of the sysctl.d thing found in another threadby removing that .conf file, and thus when I booted back up I would be at the non-X login and could re-install my nVidia. Then rebooted once more and all's well.
Thanks again to all the quick help and great advice.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.