LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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


View Poll Results: Manual or Slackpkg Kernel Upgrades?
Manually 42 42.42%
Slackpkg 42 42.42%
Other (because everyone always request an "other" on polls) 15 15.15%
Voters: 99. You may not vote on this poll

Reply
  Search this Thread
Old 07-24-2021, 12:52 PM   #46
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

On all my systems that I use lilo on (13.0 - 14.2 64 and 32 bit), I always do it manually with

Code:
upgradepkg *.txz
in the directory with the new kernel stuff and then
Code:
lilo
.

It just seemed, to me, so simple.

Now that I've been trying out 'current' and for some reason my new hardware just isn't letting me use lilo anymore, I haven't been able to figure out how to do kernel upgrades/security fixes, if I *must* make a new initrd, or anything like that for kernels and using elilo. I really am not a fan of 'things automagic' (though upgradepkg/installpkg etc is just that, I guess, heh), but looks like I may have to go this slackpkg way.
 
Old 07-24-2021, 03:46 PM   #47
truepatriot76
Member
 
Registered: Apr 2014
Location: California, USA
Distribution: slackware64-current
Posts: 232

Rep: Reputation: 195Reputation: 195
I'm a huge fan of slackpkg and slackpkgplus. Especially with the kernel updates coming so frequently in current. I have no need to roll my own, Pat's generic works fine for me.
 
1 members found this post helpful.
Old 07-24-2021, 03:53 PM   #48
lovemeslk
Member
 
Registered: Feb 2020
Location: Rantoul IL
Distribution: Slackware
Posts: 350

Rep: Reputation: 72
I use slackpkg Last time I did a manual build was for slackware64-14.2 I needed the 5.10.4 features.
As for current I have a script that upgrades the system makes the intrid.img and builds my nvidia driver before I reboot.
I use grub for my machines so updating the boot loader not a big deal. On my VM machines I use lilo same thing
the slackpkg reminds you to use lilo on kernel upgrades.
the intrid.gz image is a big deal on your modern hardware. This is why geninitrid was added to current.
 
Old 07-24-2021, 03:53 PM   #49
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,833
Blog Entries: 17

Rep: Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640
Quote:
Originally Posted by vtel57 View Post
So, that all being said... how do you folks upgrade your kernels? Automation or manually?
Manually. And I have my own kind of routines with minimal config files for each PC. Might seem unecessary when you can just include modules and not use them, BUT it also drastically decrease compile times and make the whole process alot better.

So, due to "special needs", I would say that I ALWAYS upgrade Kernels manually, not just in Slackware. And when the process is like that, there is no other choice than to continue the whole process manually. And due to some of my inclusions in the Kernel (that are normally excluded from defaults), I really don't have another choice than manual.
 
Old 07-24-2021, 04:02 PM   #50
zeebra
Senior Member
 
Registered: Dec 2011
Distribution: Slackware
Posts: 1,833
Blog Entries: 17

Rep: Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640Reputation: 640
Quote:
Originally Posted by TheRealGrogan View Post
Manually, the old fashioned way :-)
Yay!
 
Old 07-24-2021, 04:10 PM   #51
Franklin
Senior Member
 
Registered: Oct 2002
Distribution: Slackware
Posts: 1,348

Rep: Reputation: 217Reputation: 217Reputation: 217
I used to roll my own at one point quite some time ago, but decided it wasn't needed other than for learning purposes - for my very basic needs at any rate.

When the stable release was more recent, I would run generic and and update my build from /patches/packages and be happy.

As I'm running -current lately, I use the Huge kernel and update whenever -current is updated. I use lilo and run it after a kernel upgrade. Not gonna make a new initrd every time -current kernel is updated. Once 15 drops I will go back to generic.

I have never used slackpkg so I can't comment on it one way or another. Some people seem to have problems with it, but I can't tell if it's user error or something about slackpkg. I suspect user error, but I really would not know.

I have a local copy of the -current tree that I update using rsync and then use pkgtool to upgrade my system. (upgradepkg --install-new *.t?z)

Works for my simple needs. Have never had a problem that wasn't due to my own errors.
 
Old 07-24-2021, 06:41 PM   #52
TheTKS
Member
 
Registered: Sep 2017
Location: Ontario, Canada
Distribution: Slackware, X/ubuntu, OpenBSD, OpenWRT
Posts: 361

Rep: Reputation: 243Reputation: 243Reputation: 243
I use a combination of manual and slackpkg, so while I voted manual, I should have voted other.

In short:
# installpkg: source, modules, huge, generic
# slackpkg upgrade: headers, firmware

This turned into a longer post than I expected, so I'm splitting this into two posts, preamble first, then the steps I take.

In the post following this one are the steps I go through to upgrade kernel packages, on both Slackware64 14.2 and -current. (SlackwareARM on my Raspberry Pi4 has some differences, using Sarpi project packages, a topic for a different thread.)

Some steps will be particular to my setup. I keep only one version of the kernel installed, but both generic and huge of that version number.

For the first several months I used Slackware64 14.2, I used the huge kernel, and slackpkg upgrade-all for kernel upgrades.

I never ran into a problem, but then saw the recommendation not to upgrade kernels that way.

I also switched from running huge kernel to generic.

I use slackpkg with blacklist and slackpkg+ with greylist
/etc/slackpkg/blacklist
Code:
kernel-generic
kernel-huge
kernel-modules
kernel-source
/etc/slackpkg/greylist
Code:
kernel-firmware
kernel-headers
This allows slackpkg to display these two unselected when running # slackpkg upgrade-all

References I read to develop my list of steps are at the end of my following post.

TKS

Last edited by TheTKS; 07-25-2021 at 05:57 AM. Reason: Many
 
1 members found this post helpful.
Old 07-24-2021, 06:41 PM   #53
TheTKS
Member
 
Registered: Sep 2017
Location: Ontario, Canada
Distribution: Slackware, X/ubuntu, OpenBSD, OpenWRT
Posts: 361

Rep: Reputation: 243Reputation: 243Reputation: 243
My steps to upgrade Slackware kernel packages. I use only Slackware's. I've never rolled my own.

[ Note: before I upgrade kernel packages, I upgrade all other packages with slackpkg, making sure to deal with all needed conf files changes before moving to the next step - also a topic for another thread ]

Download and verify kernel-source, kernel-modules, kernel-huge, kernel-generic. Fake mirror example:
Code:
$ wget https://your.mirror.here/k/kernel-source-5.13.4-noarch-1.txz.asc https://your.mirror.here/k/kernel-source-5.13.4-noarch-1.txz https://your.mirror.herea/kernel-modules-5.13.4-x86_64-1.txz.asc https://your.mirror.herea/kernel-modules-5.13.4-x86_64-1.txz https://your.mirror.here/a/kernel-huge-5.13.4-x86_64-1.txz.asc https://your.mirror.here/a/kernel-huge-5.13.4-x86_64-1.txz https://your.mirror.here/a/kernel-generic-5.13.4-x86_64-1.txz.asc https://your.mirror.here/a/kernel-generic-5.13.4-x86_64-1.txz

I switch to a true login shell
Code:
$ su -l

Verify kernel-source, kernel-modules, kernel-huge, kernel-generic. Example:
Code:
# gpg --verify kernel-source-5.13.4-noarch-1.txz.asc kernel-source-5.13.4-noarch-1.txz
and so on for the modules, huge and generic


Install (not upgrade) in order of source, modules, huge, and generic. Example:
Code:
# installpkg kernel-source-5.13.4-noarch-1.txz kernel-modules-5.13.4-x86_64-1.txz kernel-huge-5.13.4-x86_64-1.txz kernel-generic-5.13.4-x86_64-1.txz

Upgrade in order of headers and firmware. Example:
Code:
# slackpkg upgrade-all
[ Example: choose kernel-headers-5.13.4-x86-1.txz ]

Code:
# slackpkg upgrade-all
[ Example: choose kernel-firmware-20210719_168452e-noarch-1.txz ]


Run mkinitrd generator script
Code:
# /usr/share/mkinitrd/mkinitrd_command_generator.sh
Take the output of that, change the kernel version to the newly installed one, and run that

My example output, abbreviated (will show current kernel):
Code:
mkinitrd -c -k 5.13.3 -f ext4 -r /dev/sda# -m xhci-pci:...:crc32c_generic:ext4 -u -o /boot/initrd.gz
Copy that to the command line, change the kernel version to the newly installed one, and run that. My example, abbreviated:
Code:
# mkinitrd -c -k 5.13.4 -f ext4 -r /dev/sda# -m xhci-pci:...:crc32c_generic:ext4 -u -o /boot/initrd.gz
Last line of output: "Be sure to run lilo again if you use it." I use grub, and on my multi-boot computer, I let Xubuntu's grub control booting. Slackware's main entry is for /boot/vmlinuz; after the above actions, it is a symlink to the newly installed generic kernel as example vmlinuz -> vmlinuz-generic-5.13.4.


At this point, I have 4 kernels of two versions installed. Example: 5.13.4 generic and huge, and 5.13.3 generic and huge.


Reboot (if you pick the default Slackware grub entry, it will reboot into the new kernel.)


Once Slackware is back up running the new kernel, I check a few things to make sure it is working to my satisfaction. If it is, I remove old kernel packages.

Example:
Code:
.../var/log/packages# ls -l kern*
-rw-r--r-- 1 root root   99988 Jul 24 10:10 kernel-firmware-20210719_168452e-noarch-1
-rw-r--r-- 1 root root     972 Jul 20 18:39 kernel-generic-5.13.3-x86_64-1
-rw-r--r-- 1 root root     972 Jul 24 09:55 kernel-generic-5.13.4-x86_64-1
-rw-r--r-- 1 root root   30577 Jul 24 10:07 kernel-headers-5.13.4-x86-1
-rw-r--r-- 1 root root     968 Jul 20 18:39 kernel-huge-5.13.3-x86_64-1
-rw-r--r-- 1 root root     968 Jul 24 09:55 kernel-huge-5.13.4-x86_64-1
-rw-r--r-- 1 root root  319275 Jul 20 18:39 kernel-modules-5.13.3-x86_64-1
-rw-r--r-- 1 root root  319328 Jul 24 09:55 kernel-modules-5.13.4-x86_64-1
-rw-r--r-- 1 root root 4808942 Jul 20 18:38 kernel-source-5.13.3-noarch-1
-rw-r--r-- 1 root root 4809082 Jul 24 09:55 kernel-source-5.13.4-noarch-1

.../var/log/packages# removepkg *5.13.3*
...

.../var/log/packages# ls -l kern*
-rw-r--r-- 1 root root   99988 Jul 24 10:10 kernel-firmware-20210719_168452e-noarch-1
-rw-r--r-- 1 root root     972 Jul 24 09:55 kernel-generic-5.13.4-x86_64-1
-rw-r--r-- 1 root root   30577 Jul 24 10:07 kernel-headers-5.13.4-x86-1
-rw-r--r-- 1 root root     968 Jul 24 09:55 kernel-huge-5.13.4-x86_64-1
-rw-r--r-- 1 root root  319328 Jul 24 09:55 kernel-modules-5.13.4-x86_64-1
-rw-r--r-- 1 root root 4809082 Jul 24 09:55 kernel-source-5.13.4-noarch-1
The huge kernel is probably redundant, but I keep it around in case it comes in handy.

References
- SlackDocs
https://docs.slackware.com/slackware:beginners_guide
You should read it all, but at minimum for this topic, the sections "slackpkg", "Installing updates using slackpkg", and if switching to a generic kernel, "Switch to a generic kernel"

- man pages for slackpkg, installpkg, upgradepkg, removepkg

- SlackBuilds.org HowTo and FAQ
https://slackbuilds.org/howto/
Step 4 - Execute the SlackBuild Script (as root)
https://slackbuilds.org/faq/
11. Do I have to run the script as root?

- Lysander666's LQ blog on kernel upgrades
https://www.linuxquestions.org/quest...ackware-37876/

- Many LQ posts on kernels and kernel upgrading

If anyone has suggestions for a faster way to do this (aside from scripting some of this), or see a step I could leave out, or see anything important I might have missed, please speak up!

References postscript
Soon to be topical for some of us, read the SlackDocs section, "Upgrading Slackware to a New Release"
https://docs.slackware.com/howtos:sl...:systemupgrade

TKS

Last edited by TheTKS; 07-24-2021 at 07:13 PM. Reason: Many
 
2 members found this post helpful.
Old 07-25-2021, 05:47 AM   #54
chrisretusn
Senior Member
 
Registered: Dec 2005
Location: Philippines
Distribution: Slackware64-current
Posts: 2,976

Rep: Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553Reputation: 1553
Hi old friend!

I'm one of those Other folks. I do both.

On my Slackware VirtualBox machines I use slackpkg. Four of these machines are clean installs. A fifth machine has third party packages installed. With this machine I use slackpkg with slackpkg+ to keep it updated. All of these machines boot to kernel-huge.

For my hardware machines. I use the manual method. They all have two kernels installed unless there is a testing kernel, then there will be three of them installed on most of them. These computers use kernel-generic. I have kernel-generic, kernel-huge, kernel-modules and kernel-source in the blacklist. My slackpkg.conf gives testing priority over slackware. I let slackpkg w/slackpkg+ handle the kernel-firmware and kernel-headers. Kernel-huge is never installed.

With two kernels installed (stock, working)
The basic steps are:
1. Remove the oldest kernel
2. Install the new kernel.
3. Set vmlinuz-generic-stock symlink to the new kernel
4. Set vmlinuz-generic-working symlink to the currently running kernel.
5. Run mkinitrd -F -k x.x.x (with -s and -o options for working kernel)
6. Run lilo

Last edited by chrisretusn; 07-25-2021 at 05:50 AM.
 
2 members found this post helpful.
Old 07-25-2021, 10:59 AM   #55
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

Original Poster
Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
@chrisretusn said, "Hi old friend!"

Hey there Master Chief... long time no seeum. Hope all is well in your world and you're staying safe and healthy!

I'm still buzzin' around Diaspora, by the way. The Cabin is pretty dead these days. I'm also still at Scot's on a daily basis. Catch up with you!

~Eric
 
Old 07-26-2021, 04:08 PM   #56
Cristiano Urban
Member
 
Registered: Jul 2013
Location: Gonars (UD), Italy
Distribution: Slackware 14.2 x86_64
Posts: 76

Rep: Reputation: 10
Hi,
a few years ago I wrote this 'homemade' script to overcome my laziness
Maybe it can be improved, but it worked fine for me.

One thing I would like to add is a small integration to detect and manage EFI partitions (elilo in place of lilo).
I only used hardware with legacy BIOS setup until now.
 
1 members found this post helpful.
  


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
Weird slackpkg upgrade message during a slackpkg upgrade-all process. frtorres Slackware 8 02-13-2021 11:36 AM
SARPI on Pi3 - Ran slackpkg update & slackpkg upgrade-all and now won't boot, can't find init petejc Slackware - ARM 11 03-25-2020 04:30 AM
[SOLVED] Slackpkg upgrade-all returns 'no packages to upgrade' after slackpkg-update has downloaded files san2ban Slackware 8 11-01-2019 05:44 AM
man -t manual | ps2pdf - > manual.pdf error Amdx2_x64 Linux - General 2 07-01-2011 03:22 AM
Slackpkg: missing something in /usr/libexec/slackpkg/functions.d/dialog-functions.sh michelino Slackware 4 03-20-2007 12:22 PM

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

All times are GMT -5. The time now is 12:44 AM.

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