LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Blogs > Lysander666
User Name
Password

Notices


Rate this Entry

Kernel upgrade instructions for Slackware

Posted 12-02-2018 at 08:51 AM by Lysander666
Updated 08-27-2019 at 05:09 AM by Lysander666

v.0.2

N.B. This blog post is a work in progress. All readers are invited to suggest improvements if needs be.

This post is something I've been meaning to do for a while, it's a simplified instruction set on kernel upgrades for Slackware stable and current branch.

I should, first and foremost, point out that this post is a supplement to the instructions over at Slackdocs and assumes you will have read the relevant documentation on kernel upgrades.

This post should function to make subsequent kernel upgrades easier. This post is a result of various pieces of advice given over time by knowledgeable LQ forum members. This post applies to both stable and -current Slackware branches.

Different experienced users may have other methods. This is my own tried and tested version.

1 – download the new stable kernel from:

https://mirrors.slackware.com/slackw...ches/packages/ [for 64bit]
https://mirrors.slackware.com/slackw...ches/packages/ [for 32bit]

The kernel folder will be the one titled linux-4.4.xxx.

You will need to download these types of kernel packages [.txz]:

kernel-firmware
kernel-generic
kernel-headers
kernel-huge
kernel-modules
kernel-source

For -current, download firmware, generic, huge and modules from the a/ set, headers from the d/ set and source from the k/ set:

https://mirrors.slackware.com/slackw...t/slackware64/

NB: for 32bit it's worth using the smp modules where available. The official documentation notes

Quote:
Most systems should run the SMP kernel (if they can) regardless of the number of cores the CPU has.
My 32bit system runs an old Intel Atom and has no problems with the smp kernels.

2. install each manually and separately like this and in this order:

installpkg for source, modules, huge, generic
upgradepkg for headers and firmware

3. if you want to use the generic kernel, go to /etc/lilo.conf and use the mkinit instruction there to generate a new init.rd but replace the old kernel number with the new kernel number.

if in doubt use the generator as root:

Code:
/usr/share/mkinitrd/mkinitrd_command_generator.sh
but when it gives the instruction output replace the old kernel number with new.

NOTE: if doing this for a machine with persistent naming, remember to put the UUID in the instruction output vis a vis point 3 here

https://www.linuxquestions.org/quest...ackware-37799/

Note: If using UUIDs in fstab, a generic kernel music be used.

if you want to use the huge kernel, skip this step and go to step 5.

4. run the instruction.

5. in /etc/lilo.conf change the line of the image [this should be below the commented mkinit instruction] to that of the new kernel number for both huge and generic. Check the end of this post for an example lilo.conf

6. rerun lilo with

Code:
#lilo -v
and CHECK that the verbose output shows the new kernel number. If it doesn’t, recheck the initrd and lilo.conf. Do not reboot unless all looks good. Always re-run lilo after saving any changes to lilo.conf

7. if all looks good, reboot.

8. Remove the old kernel from the system by checking for old kernel packages with

Code:
ls /var/log/packages/kernel-*
and removing each old kernel package individually with removepkg

9. reboot

-------------

Microcode:

Intel microcode can be downloaded and installed from here:

https://slackbuilds.org/repository/1...tel-microcode/

This will create the file /boot/intel-ucode.cpio which must be loaded at boot time.

It can be added to the generic kernel by using

Code:
-P /boot/intel-ucode.cpio
at the end of the mkinitrd instruction in step 3.

If using the huge kernel, the line

Code:
initrd = /boot/intel-ucode.cpio
should be added into the huge kernel stanza in lilo.conf like in this example

Code:
image = /boot/vmlinuz-huge-4.4.144
  initrd = /boot/intel-ucode.cpio
  root = /dev/sdc3
  label = Huge
  read-only
--------------------------

Example lilo.conf stanzas


Code:
# Linux bootable partition config begins
image = /boot/vmlinuz-generic-4.4.186
  initrd = /boot/initrd-4.4.186-m.gz
  root = /dev/disk/by-uuid/ff624ae7-b3d4-4ef5-887a-8d505669bfd0
  label = Gen-4.4.186-m
  read-only
# Linux bootable partition config ends


# Linux bootable partition config begins
image = /boot/vmlinuz-huge-4.4.186
initrd = /boot/intel-ucode.cpio
# root = /dev/sdc1
  root = /dev/disk/by-uuid/ff624ae7-b3d4-4ef5-887a-8d505669bfd0
  label = Huge-4.4.186-m
  read-only
# Linux bootable partition config ends

# old backup huge kernel
# Linux bootable partition config begins
image = /boot/vmlinuz-huge-4.4.153
initrd = /boot/intel-ucode.cpio
# root = /dev/sdc1
  root = /dev/disk/by-uuid/ff624ae7-b3d4-4ef5-887a-8d505669bfd0
  label = Huge-4.4.153-m
  read-only
# Linux bootable partition config ends

# for memtest
image = /boot/memtest86+.bin
    label = memtest86+
Posted in Uncategorized
Views 1040 Comments 0
« Prev     Main     Next »
Total Comments 0

Comments

 

  



All times are GMT -5. The time now is 10:16 AM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration