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


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-21-2021, 06:09 PM   #1
vtel57
Senior Member
 
Registered: Jul 2006
Location: USA
Distribution: Slackware64 - 14.2 w/ Xfce
Posts: 1,631

Rep: Reputation: 489Reputation: 489Reputation: 489Reputation: 489Reputation: 489
Question Manual or Slackpkg Kernel Upgrade?


I'm just curious here...

I've been running Slackware for nearly 20 years as my primary OS. During that time I've almost always used the generic kernels w/ initrd, and manually perform kernel upgrades.

In my most recent installation of Slackware64 - 14.2, I decided to just stick with the default huge kernel. I've gotten lazy, plus I really don't have anything going on these days that requires the initrd method of booting.

So, a kernel upgrade notice just came up today, and I decided to let Slackpkg do the upgrade for me (again, laziness). All went fine and dandy, of course. However, I've always noticed that little comment in /etc/slackpkg/blacklist that says,

Code:
# Automated upgrade of kernel packages aren't a good idea (and you need to
# run "lilo" after upgrade). If you think the same, uncomment the lines
 # below
So, that all being said... how do you folks upgrade your kernels? Automation or manually?

Thanks in advance for your input.

~Eric
 
Old 07-21-2021, 06:36 PM   #2
hitest
Guru
 
Registered: Mar 2004
Location: Canada
Distribution: Void, Slackware, Debian
Posts: 7,350

Rep: Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750Reputation: 3750
Cool

Quote:
Originally Posted by vtel57 View Post
So, that all being said... how do you folks upgrade your kernels? Automation or manually?
In the past I rolled my kernels manually (Eric has a great guide). These days I automatically upgrade my Slackware units (one unit uses LILO and a newer box uses GRUB). The slackpkg utility works well for me.
 
1 members found this post helpful.
Old 07-21-2021, 06:37 PM   #3
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
I should have actually made this a Poll, huh? Darn... didn't even think about that.

AH! I could add the poll after the fact.



.

Last edited by vtel57; 07-21-2021 at 06:42 PM. Reason: Added poll.
 
1 members found this post helpful.
Old 07-21-2021, 07:20 PM   #4
Chuck56
Member
 
Registered: Dec 2006
Location: Colorado, USA
Distribution: Slackware
Posts: 930

Rep: Reputation: 479Reputation: 479Reputation: 479Reputation: 479Reputation: 479
I selected Other. Scripted kernel install (not upgrade) with multiple kernels available to run.
 
1 members found this post helpful.
Old 07-21-2021, 07:23 PM   #5
Spinlock
Member
 
Registered: Jan 2006
Location: Missouri
Distribution: Slackware -current, Slackware64 -current, Slackware 12.2
Posts: 191

Rep: Reputation: 49
/etc/slackpkg/blacklist has had that verbiage changed:

Code:
# Automated upgrade of kernel packages may not be wanted in some situations;
# uncomment the lines below if that fits your circumstances:
I built a fixboot.sh script that I run after each kernel upgrade, which keeps my elilo install sailing along. Heck, I'm about to put it in rc.local.shutdown, which I should have probably done years ago.

Git repo here for those interested
 
Old 07-21-2021, 07:29 PM   #6
slacker1337
Member
 
Registered: Jun 2012
Location: Connecticut, USA
Distribution: Slackware
Posts: 148

Rep: Reputation: 40
I go the slackpkg route as well. I cooked up a script that runs at shutdown that checks the running kernel against the version in /var/log/packages, then it does all the magic.

That said, I only ever had issues with automatic upgrades through slackpkg if I did something stupid.
 
1 members found this post helpful.
Old 07-21-2021, 10:12 PM   #7
pghvlaans
Member
 
Registered: Jan 2021
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 461

Rep: Reputation: 368Reputation: 368Reputation: 368Reputation: 368
It's a little bit of both for me. I threw together an overall upgrade script that uses sed to comment and uncomment the kernel entries so slackpkg downloads the packages but doesn't upgrade the kernels. It uses installpkg to do the actual installation part.
 
Old 07-22-2021, 12:24 AM   #8
twy
Member
 
Registered: Jun 2004
Distribution: Slackware64
Posts: 99

Rep: Reputation: Disabled
I let slackpkg install kernel-firmware and kernel-headers only, no other kernel packages.

I download and install the kernel from kernel.org. I usually run the kernel version that is in slackware, which is now 4.4.276. My .config is from the modular slackware kernel, but I then edit it to include only the devices that I actually have. The process is like...

cd /usr/src
tar xvf ~/downloads/linux-4.4.276.tar.xz
cd linux-4.4.276
cp -a ../linux-4.4.261/.config .
make oldconfig
make -j6 bzImage
make -j6 modules
make modules_install
cp -a arch/x86/boot/bzImage /boot/vmlinuz-4.4.276
cp -a System.map /boot/System.map-4.4.276
cd /boot/
rm System.map
ln -s System.map-4.4.276 System.map
mkinitrd -F -c -k 4.4.276 -s /boot/initrd-tree-4.4.276 -o /boot/initrd.gz-4.4.276

Then, I edit boot entries in /etc/lilo.conf to use the new kernel and keep old kernel as another backup boot option. Finally, run:

lilo

Before rebooting, I uninstall the nvidia driver:

cd <to where nvidia driver is>
./NVIDIA-Linux-x86_64-340.108.run --uninstall

After reboot, reinstall the nvidia driver:

./NVIDIA-Linux-x86_64-340.108.run

I keep copies of /usr/lib/libEGL.la and /usr/lib64/libEGL.la and restore them after the above, because something happens to them.

I use linux device mapper raid (/dev/mapper md-raid), logical volume manager (lvm), and cryptsetup (luks) to setup my root (/) device. Therefore, I have to use initial root disk (initrd) on /dev/ram0 to bring up my actual system root disk (/ = /dev/mapper/cvg1-root) [luks en(c)rypted volume group vg1, logical volumes root and swap]. A raid1 disk is for /boot (raid1\ext4) and a raid6 disk for the rest of / (raid6\luks\lvm\ext4). My /etc/mkinitrd.conf is like this:

# mkinitrd.conf.sample
# See "man mkinitrd.conf" for details on the syntax of this file
#
#SOURCE_TREE="/boot/initrd-tree"
#CLEAR_TREE="0"
#OUTPUT_IMAGE="/boot/initrd.gz"
#KERNEL_VERSION="$(uname -r)"
#KEYMAP="us"
#MODULE_LIST="ext4"
LUKSDEV="/dev/md1"
#LUKSKEY="LABEL=TRAVELSTICK:/keys/alienbob.luks"
ROOTDEV="/dev/cvg1/root"
ROOTFS="ext4"
#RESUMEDEV="/dev/sda2"
RAID="1"
LVM="1"
UDEV="1"
#MODCONF="0"
## load microcode, starting with linux 4.4.110
## to mitigate MELTDOWN and SPECTRE bugs
MICROCODE_ARCH="/boot/intel-ucode.cpio"
#WAIT="1"

I installed the intel microcode package from slackbuilds.org. This is needed to enable the cpu vulnerabilities mitigations (/sys/devices/system/cpu/vulnerabilities/*). The mkinitrd prepends intel-ucode.cpio to the initrd.gz so that the microcode is loaded before anything else happens. Upgrading the microcode package should be done before running mkinitrd.

I use lilo like this:

# LILO global section

append=" vt.default_utf8=1 "
boot = /dev/md0
lba32
raid-extra-boot = mbr-only
compact
message = /boot/boot_message.txt
prompt
timeout = 1200

change-rules
reset

vga = normal

# End LILO global section
# Linux bootable partition config begins

## default kernel
# 4.4.276
image = /boot/vmlinuz-4.4.276
# addappend = " spec_store_bypass_disable=on "
root = /dev/ram0
initrd = /boot/initrd.gz-4.4.276
label = 4.4.276
read-only

## backup kernel
# 4.4.261
image = /boot/vmlinuz-4.4.261
# addappend = " spec_store_bypass_disable=on "
root = /dev/ram0
initrd = /boot/initrd.gz-4.4.261
label = 4.4.261b
read-only

## slackware kernel
# 4.4.276
image = /boot/vmlinuz-4.4.276
# addappend = " spec_store_bypass_disable=on "
root = /dev/ram0
initrd = /boot/initrd.gz-4.4.276
label = 4.4.276s
read-only
# End lilo config

Upgrading the kernel takes some work for me, but it is routine. By doing it this way, setting it up myself, at least I know how it works and can probably fix it if there is a problem. The expected problem is an occasional disk failure.

Last edited by twy; 07-22-2021 at 12:28 AM. Reason: typos
 
5 members found this post helpful.
Old 07-22-2021, 12:32 AM   #9
andrew.46
Senior Member
 
Registered: Oct 2007
Distribution: Slackware
Posts: 1,365

Rep: Reputation: 493Reputation: 493Reputation: 493Reputation: 493Reputation: 493
I manually do kernel upgrades and also 'roll my own' for my default kernel. Mind you I am retired and I only run one system so I have time for such things .
 
2 members found this post helpful.
Old 07-22-2021, 12:55 AM   #10
cycojesus
Member
 
Registered: Dec 2005
Location: Lyon, France
Distribution: Slackware-current
Posts: 116

Rep: Reputation: 79
Automated script (running headless on servers too) to upgrade&co everything + rebuilt initrd at the end of the process. Hasn't failed me in many years now. Always running latest kernel, not even keeping the previous one as a backup, no need. Worst case I'll boot up an install disk and fix from there but I think last failure was hardware and the one before was when still using lilo and kernel-huge got too big. Moved to EFI and kernel-generic.
 
1 members found this post helpful.
Old 07-22-2021, 01:23 AM   #11
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,077

Rep: Reputation: Disabled
Neither manual nor slackpkg, the attached scrip called when running "slapt-get --upgrade":
  • installs the new generic kernel (no huge kernel provided),
  • removes the not currently running installed kernels if shipped in Slint (not the custom ones),
  • makes an initrd for each generic kernel which does not have one, including a LUKS key if need be to unlock an encrypted target drive,
  • updates the grub config file.
Attached Files
File Type: txt wrapupgradepkg.txt (7.5 KB, 29 views)

Last edited by Didier Spaier; 07-22-2021 at 01:24 AM.
 
2 members found this post helpful.
Old 07-22-2021, 03:05 AM   #12
brianL
LQ 5k Club
 
Registered: Jan 2006
Location: Oldham, Lancs, England
Distribution: Slackware64 15; SlackwareARM-current (aarch64); Debian 12
Posts: 8,302
Blog Entries: 61

Rep: Reputation: Disabled
Always used slackpkg, for every kernel update on 14.2 and current (when I was running it). No problems, easy.
Code:
brian@slackdesk:~$ uname -r
4.4.276
 
1 members found this post helpful.
Old 07-22-2021, 03:54 AM   #13
SCerovec
Senior Member
 
Registered: Oct 2006
Location: Cp6uja
Distribution: Slackware on x86 and arm
Posts: 2,479
Blog Entries: 2

Rep: Reputation: 983Reputation: 983Reputation: 983Reputation: 983Reputation: 983Reputation: 983Reputation: 983Reputation: 983
My wrap up after an new kernel is installed

Once i move to elilo or other boot loaders i might add more to the script

patches are welcome meanwhile (no promises of inclusion before audit tho)
 
1 members found this post helpful.
Old 07-22-2021, 04:41 AM   #14
TheRealGrogan
Member
 
Registered: Oct 2010
Location: Ontario, Canada
Distribution: Slackware, LFS, Manjaro (for gaming)
Posts: 570

Rep: Reputation: 413Reputation: 413Reputation: 413Reputation: 413Reputation: 413
Manually, the old fashioned way :-)
 
2 members found this post helpful.
Old 07-22-2021, 04:57 AM   #15
GazL
LQ Veteran
 
Registered: May 2008
Posts: 6,918

Rep: Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035Reputation: 5035
Another 'other' here.

I review *.new files manually, but the rest is handled by scripts, including kernel, initrd, and /boot/efi/ (elilo) updates.
 
  


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 05:11 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