LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 08-24-2016, 05:33 AM   #1
FTIO
Member
 
Registered: Mar 2015
Location: Las Vegas, NV
Distribution: Slackware 15.0 x64, Slackware Live 15.0 x64
Posts: 618

Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
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.
 
Old 08-24-2016, 05:41 AM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,098

Rep: Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175Reputation: 4175
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
Code:
lilo

Last edited by ponce; 08-24-2016 at 05:45 AM.
 
Old 08-24-2016, 05:48 AM   #3
suppy
Member
 
Registered: Mar 2012
Location: Sweden
Distribution: Slackware
Posts: 83

Rep: Reputation: 60
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.
 
Old 08-24-2016, 05:53 AM   #4
zk1234
4MLinux Maintainer
 
Registered: Oct 2010
Location: Poland
Distribution: 4MLinux, Slackware
Posts: 1,254

Rep: Reputation: 220Reputation: 220Reputation: 220
If it used to work without initrd, then it still should do (*).
You can also prepare a rescue (boot-able) USB with your old kernel (just in case).

.
(*) Unless some functions needed to access your HDD have been moved from the kernel to its loadable modules, but I doubt it.

Last edited by zk1234; 08-24-2016 at 05:54 AM.
 
Old 08-24-2016, 07:00 AM   #5
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
FITO --

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:
Code:
upgradepkg patches/packages/kernel-firmware-20160823git-noarch-1_slack14.2.txz
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:
Code:
upgradepkg patches/packages/kernel-headers-4.4.19-x86-1_slack14.2.txz
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 :) )
 
Old 08-24-2016, 08:18 AM   #6
bassmadrigal
LQ Guru
 
Registered: Nov 2003
Location: West Jordan, UT, USA
Distribution: Slackware
Posts: 8,792

Rep: Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656Reputation: 6656
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.
 
1 members found this post helpful.
Old 08-24-2016, 09:12 AM   #7
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Debian, Slackware
Posts: 7,342

Rep: Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746Reputation: 3746
Quote:
Originally Posted by bassmadrigal View Post
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.
Yes. I upgraded to the new kernel in Slackware 14.2 using slackpkg. The slackpkg utility will prompt you to run lilo at the end of the process.
 
1 members found this post helpful.
Old 08-24-2016, 09:35 AM   #8
FTIO
Member
 
Registered: Mar 2015
Location: Las Vegas, NV
Distribution: Slackware 15.0 x64, Slackware Live 15.0 x64
Posts: 618

Original Poster
Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
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.
 
2 members found this post helpful.
Old 08-24-2016, 09:53 AM   #9
kjhambrick
Senior Member
 
Registered: Jul 2005
Location: Round Rock, TX
Distribution: Slackware64 15.0 + Multilib
Posts: 2,159

Rep: Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512Reputation: 1512
Thanks for the reminder FITO !

I just now pounded-out the quicky fix in /etc/sysctl.conf too ( I had forgotten all about it until you reminded me )

-- kjh
Code:
#
# B60824 - no longer necessary with 4.4.19+
# net.ipv4.tcp_challenge_ack_limit = 999999999

Last edited by kjhambrick; 08-24-2016 at 09:54 AM. Reason: more
 
1 members found this post helpful.
Old 08-24-2016, 10:14 AM   #10
FTIO
Member
 
Registered: Mar 2015
Location: Las Vegas, NV
Distribution: Slackware 15.0 x64, Slackware Live 15.0 x64
Posts: 618

Original Poster
Rep: Reputation: 361Reputation: 361Reputation: 361Reputation: 361
Quote:
Originally Posted by kjhambrick View Post
Thanks for the reminder FITO !

I just now pounded-out the quicky fix in /etc/sysctl.conf too ( I had forgotten all about it until you reminded me )

-- kjh
Code:
#
# B60824 - no longer necessary with 4.4.19+
# net.ipv4.tcp_challenge_ack_limit = 999999999
I'm actually useful once in a very great while, heh.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
upgrading kernel question FloridaRoadie Debian 15 12-02-2010 12:25 PM
RHEL5: Kernel Upgrading Question spaceballs Red Hat 1 10-20-2009 01:48 AM
Question about upgrading to 2.6.x kernel cothrige Slackware 3 03-18-2006 10:00 PM
Kernel Upgrading Question hsimah Slackware 3 03-11-2006 02:15 AM
Question about upgrading kernel fireforge Linux - Software 2 03-19-2002 02:18 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 12:17 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration