You are not logged in.

#1 2019-08-29 13:24:09

klapauzius
Member
Registered: 2019-07-22
Posts: 46

[Solved] How to install three or more kernels

tl;dr

don't install end-of-life kernels - you won't get security updates

Dear fellows, there is a regression in the drm/intel driver, why I would like to use the 5.1.16-arch1-1-ARCH kernel instead of the 5.2.x-arch1-1-ARCH kernel for now.

My installation originally provides two kernels

sudo su
cd /boot/
ls -al
drwxr-xr-x  6 root root 4,0K ----------- .
drwxr-xr-x 18 root root 4,0K ----------- ..
-rwxr-xr-x  1 root root  31K ----------- amd-ucode.img
drwxr-xr-x  5 root root 4,0K ----------- EFI
-rwxr-xr-x  1 root root  35M ----------- initramfs-linux-fallback.img
-rwxr-xr-x  1 root root  16M ----------- initramfs-linux.img
-rwxr-xr-x  1 root root  36M ----------- initramfs-linux-lts-fallback.img
-rwxr-xr-x  1 root root  17M ----------- initramfs-linux-lts.img
-rwxr-xr-x  1 root root 2,5M ----------- intel-ucode.img
drwxr-xr-x  3 root root 4,0K ----------- loader
drwxr-xr-x  2 root root 4,0K ----------- memtest86+
drwxr-xr-x  2 root root 4,0K ----------- syslinux
-rwxr-xr-x  1 root root 6,0M ----------- vmlinuz-linux
-rwxr-xr-x  1 root root 5,6M ----------- vmlinuz-linux-lts

So, I added a third kernel by trying a little hack/tweak...

cd /var/cache/pacman/pkg
pacman -U linux-5.1.16.arch1-1-x86_64.pkg.tar.xz (allow downgrade)
cd /boot
cp initramfs-linux.img initramfs-linux-5-1-16.img
cp initramfs-linux-fallback.img initramfs-linux-fallback-5-1-16.img
cp vmlinuz-linux vmlinuz-linux-5-1-16
pacman -Syu (allow restore)
cd /boot/loaders/entries
cp arch-linux.conf arch-linux-5-1-16.conf
nano arch-linux-5-1-16.conf (to correct entries)
cd /lib/modules
cp -r 5.2.10-arch1-1-ARCH 5.1.16-arch1-1-ARCH
cp -r extramodules-ARCH extramodules-5.1
cd 5.1.16-arch1-1-ARCH
rm extramodules
ln -s ../extramodules-5.1 extramodules
cd ../extramodules-5.1
nano version (to correct entry)
cd /etc/mkinitcpio.d
cp linux.preset linux-5-1-16.preset
nano linux-5-1-16.preset (to correct entries)
mkinitcpio -k 5.1.16-arch1-1-ARCH -g /boot/initramfs-linux-5-1-16.img 
(mkinitcpio -P would have worked also I suppose)

It worked most of the way. Unfortunatly I have troubles loading the extramodules, which I need for my work.

systemctl status systemd-modules-load.service
* systemd-modules-load.service - Load Kernel Modules
   Loaded: loaded (/usr/lib/systemd/system/systemd-modules-load.service; static; vendor preset: disabled)
   Active: failed (Result: exit-code) since ----------- ----------- CEST; ----------- ago
     Docs: man:systemd-modules-load.service(8)
           man:modules-load.d(5)
  Process: 4020 ExecStart=/usr/lib/systemd/systemd-modules-load (code=exited, status=1/FAILURE)
 Main PID: 4020 (code=exited, status=1/FAILURE)

----------- ----------- systemd[1]: Starting Load Kernel Modules...
----------- ----------- systemd-modules-load[4020]: Failed to insert module 'acpi_call': Exec format error
----------- ----------- systemd-modules-load[4020]: Failed to insert module 'vboxdrv': Exec format error
----------- ----------- systemd-modules-load[4020]: Failed to insert module 'vboxpci': Exec format error
----------- ----------- systemd-modules-load[4020]: Failed to insert module 'vboxnetadp': Exec format error
----------- ----------- systemd-modules-load[4020]: Failed to insert module 'vboxnetflt': Exec format error
----------- ----------- systemd[1]: systemd-modules-load.service: Main process exited, code=exited, status=1/FAILURE
----------- ----------- systemd[1]: systemd-modules-load.service: Failed with result 'exit-code'.
----------- ----------- systemd[1]: Failed to start Load Kernel Modules.

As you might have noticed I am using an EFI setup with systemd-boot.

However, any idea what went wrong? Since this was kind of a dirty hack, do you know how to do this more elegantly?

edit one: forgot two command lines, added them in the second code-block
edit two: forgot another step, I tweaked a preset in /etc/mkinitcpio.d also
edit three: added tl;dr

Last edited by klapauzius (2019-08-29 15:03:13)

Offline

#2 2019-08-29 13:33:13

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,234

Re: [Solved] How to install three or more kernels

To continue with the dirty hack, you'd have to downgrade the relevant modules as well and copy them over too.

To more properly do this would be to simply use the DKMS variants of out of tree modules, to even more properly do this would be to create a properly adjusted kernel package by using the ABS to patch your own package/version: https://wiki.archlinux.org/index.php/Ke … ild_System

FWIW have you checked whether your regression still occurs on latest 5.2 kernels? I have recent memory of one issue that was mitigatable by setting i915.enable_psr=0 and properly fixed in 5.2.8 there should not be (at least not widely reported) any other regressions.

Last edited by V1del (2019-08-29 13:38:25)

Offline

#3 2019-08-29 13:46:32

klapauzius
Member
Registered: 2019-07-22
Posts: 46

Re: [Solved] How to install three or more kernels

Hi V1del, thx for the quick reply.

I wasn't aware of the mitigation and will give it a try instantly. Also, I'm going to correct the dirty hack as hinted by you, read the provided link and read about DKMS ( https://wiki.archlinux.org/index.php/Dy … le_Support ) tonight or tomorrow night.

Offline

#4 2019-08-29 14:26:19

klapauzius
Member
Registered: 2019-07-22
Posts: 46

Re: [Solved] How to install three or more kernels

The regression I'm fighting with is not about flickering https://wiki.archlinux.org/index.php/in … flickering, but about not being able to use 4k via display port with the 5.2.x-kernel https://bbs.archlinux.org/viewtopic.php?id=247904. Nevertheless I appended i915.enable_psr=0 to the boot options, although without success. However, DKMS support and keeping the 5.1.16 kernel seems promising to me.

Last edited by klapauzius (2019-08-29 14:27:34)

Offline

#5 2019-08-29 14:32:14

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 25,234

Re: [Solved] How to install three or more kernels

The regression I was thinking of also didn't lead to flickering but a flat out crash of the driver in earlier 5.2 versions.  But yes it doesn't inherently look related to your issue, though you might want to report that so it can be fixed in future kernels (it should generally - granted you don't rely on a specific newer functionality - be safer to stick to LTS kernels as you will at least get security fixes, rather than an end of life kernel that happens to work)

Offline

#6 2019-08-29 14:37:36

klapauzius
Member
Registered: 2019-07-22
Posts: 46

Re: [Solved] How to install three or more kernels

I tried to do a git bisect with the mainline kernel (via aur), and hoped to be able to file a bug report, but I simply don't have enough spare time to pull this off to the end.

Offline

#7 2019-08-29 14:39:14

klapauzius
Member
Registered: 2019-07-22
Posts: 46

Re: [Solved] How to install three or more kernels

V1del wrote:

be safer to stick to LTS kernels as you will at least get security fixes, rather than an end of life kernel that happens to work

Where you're right, you're right.

edit/PS: DKMS / linux-headers worked like a charm, thx again for the hint

Last edited by klapauzius (2019-08-31 12:42:17)

Offline

Board footer

Powered by FluxBB