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.
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)
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?
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.
/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.
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.
Distribution: Slackware64 {15.0,-current}, FreeBSD, stuff on QEMU
Posts: 461
Rep:
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.
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.
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
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 .
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.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.