Scheduled Maintenance: We are aware of an issue with Google, AOL, and Yahoo services as email providers which are blocking new registrations. We are trying to fix the issue and we have several internal and external support tickets in process to resolve the issue. Please see: viewtopic.php?t=158230

 

 

 

[solved]Bullseye how can I keep my custom kernel

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
LateToTheGame
Posts: 14
Joined: 2019-03-03 23:16

[solved]Bullseye how can I keep my custom kernel

#1 Post by LateToTheGame »

I am running Bullseye. I had to modify the kernel module psmouse.ko to work with my touchpad. Being new at this, I couldn't figure out how to get the module to load automatically, so I recompiled the entire kernel. Everything works well, however I'm not sure when my next update/upgrade is going to replace the kernel. I'd like to "hold" my current kernel. After some searching, I think the following will work, but I want to check with some people that actually know what they are doing.

My compiled kernel

Code: Select all

john@pink:~$ uname -r
5.4.8
A list of installed packages starting with "linux-"

Code: Select all

john@pink:~$ dpkg -l | grep linux-
ii  binutils-x86-64-linux-gnu             2.33.1-6                             amd64        GNU binary utilities, for x86-64-linux-gnu target
ii  firmware-linux-free                   20200122-1                           all          Binary firmware for various drivers in the Linux kernel
ii  linux-base                            4.6                                  all          Linux image base package
ii  linux-compiler-gcc-9-x86              5.4.19-1                             amd64        Compiler for Linux on x86 (meta-package)
ii  linux-config-5.4:amd64                5.4.19-1                             amd64        Debian kernel configurations for Linux 5.4
ii  linux-headers-5.4.0-2-all-amd64       5.4.8-1                              amd64        All header files for Linux 5.4 (meta-package)
ii  linux-headers-5.4.0-2-amd64           5.4.8-1                              amd64        Header files for Linux 5.4.0-2-amd64
ii  linux-headers-5.4.0-2-cloud-amd64     5.4.8-1                              amd64        Header files for Linux 5.4.0-2-cloud-amd64
ii  linux-headers-5.4.0-2-common          5.4.8-1                              all          Common header files for Linux 5.4.0-2
ii  linux-headers-5.4.0-2-common-rt       5.4.8-1                              all          Common header files for Linux 5.4.0-2-rt
ii  linux-headers-5.4.0-2-rt-amd64        5.4.8-1                              amd64        Header files for Linux 5.4.0-2-rt-amd64
ii  linux-image-5.4.0-2-amd64             5.4.8-1                              amd64        Linux 5.4 for 64-bit PCs (signed)
ii  linux-image-5.4.8                     5.4.8-1                              amd64        Linux kernel, version 5.4.8
ii  linux-image-amd64                     5.4.8-1                              amd64        Linux for 64-bit PCs (meta-package)
ii  linux-kbuild-5.4                      5.4.19-1                             amd64        Kbuild infrastructure for Linux 5.4
ii  linux-libc-dev:amd64                  5.4.19-1                             amd64        Linux support headers for userspace development
ii  linux-source                          5.4.19-1                             all          Linux kernel source (meta-package)
ii  linux-source-5.4                      5.4.19-1                             all          Linux kernel source for version 5.4 with Debian patches
ii  util-linux-locales                    2.34-0.1                             all          locales files for util-linux
And this is what I think may work:

Code: Select all

sudo apt-mark hold linux-image-amd64
Any advice, corrections or help will be greatly appreciated! Thanks!!
Last edited by LateToTheGame on 2020-03-04 22:31, edited 2 times in total.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Bullseye Kernel Hold, how can I keep my custom kernel

#2 Post by Deb-fan »

Can set modules you want to auto-load in the /etc/modules file. Just add 1 per line and you don't need the .ko part. Just a FYI, someone can also black list modules they want to prevent from loading in /etc/modprobe.d files. Should/could already be some example .conf files there which make how to use this self explanatory. :)

Oops, just to anal, which installed kernel that boots can be choisen in /etc/default/grub file. Rather than trying to type it out on this phone keyboard just Google it. Be sure to always run the "sudo update-grub" command in terminal after editing that file. It says that prominently in the file itself though too.
Most powerful FREE tech-support tool on the planet * HERE. *

LateToTheGame
Posts: 14
Joined: 2019-03-03 23:16

Re: Bullseye Kernel Hold, how can I keep my custom kernel

#3 Post by LateToTheGame »

Okay, I guess if I can't figure out how to get APT how to leave the kernel alone, I'll just build that module and insert it as you suggest. When I build the module without building the kernel I see a message that it is tainted and the original module loads instead. If what you suggests works like modprobe I should be okay. Thanks.

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Bullseye Kernel Hold, how can I keep my custom kernel

#4 Post by Deb-fan »

Apt-mark can do it, dpkg can too. Kind of misunderstood your situation, thought the module you were needing to load was already available in stock kernels. The tainted thing yeah, see that all the time w compiled kernels. Never taken it as cause for real concern though. Welcome dude ... that other stuff is good to know anyway. :)

PS, if enabled, don't know if is or not in stock kernels etc. Someone can force load modules, though when see that word, force, seems something often better explored fully, likely avoided unless called for, blah blah. Still stuck on mobile and ya'll are lucky. I can type wall after wall and wave upon wave of text, while droning on about gnu/nix. Rumor has it I once made an anonymous nixer poke out they own eyeballs, just so they wouldn't have to see another of my forum posts!
Most powerful FREE tech-support tool on the planet * HERE. *

LateToTheGame
Posts: 14
Joined: 2019-03-03 23:16

Re: Bullseye Kernel Hold, how can I keep my custom kernel

#5 Post by LateToTheGame »

Thanks again for your reply. I'm going to try the apt-mark command. Worst case is it doesn't work and my trackpad goes back to being broken. If so, I'll learn how to get that in tree module to load without recompiling the entire kernel.

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: Bullseye Kernel Hold, how can I keep my custom kernel

#6 Post by stevepusser »

Remove the linux-image-amd64 and linux-headers-amd64 metapackages, and your kernel and headers will stop being updated. Those metapackages always depend on the latest kernel and header packages in the repo.
MX Linux packager and developer

Deb-fan
Posts: 1047
Joined: 2012-08-14 12:27
Been thanked: 4 times

Re: Bullseye Kernel Hold, how can I keep my custom kernel

#7 Post by Deb-fan »

Yeppers removing packages are a sure fired way to ensure they never get updated too o course. Keeping a stock kernel around is just good juju imo anyway. Am sure there's plenty of other relevant stuff or other approaches which could be pertinent here, comes to gnu/nix when isn't that the case, lol. Still +1 Stevep. :)

Much signal to noise goodness was maintained in this puppy. Now watch it sink into the cyberspace abyss, where only 29 people will ever see it again. :p
DAMMIT Edit: Apt-pinning also works for this kind of thing. Hesitate even bringing it up now with the don't break Debian crowd constantly harping about it. Even if it works great. Also trying some newer kernels/firmware from backports (or wherever) could help in particular if it's newerish hardware.
Most powerful FREE tech-support tool on the planet * HERE. *

LateToTheGame
Posts: 14
Joined: 2019-03-03 23:16

Re: Bullseye Kernel Hold, how can I keep my custom kernel

#8 Post by LateToTheGame »

That's a clever solution. I'll try that!

User avatar
stevepusser
Posts: 12930
Joined: 2009-10-06 05:53
Has thanked: 41 times
Been thanked: 71 times

Re: [solved]Bullseye how can I keep my custom kernel

#9 Post by stevepusser »

My preferences would be to make that source code change into a Debian patch and just keep adding it to rebuilds of the newer Debian kernels. Staying on one kernel will inevitably lead to security vulnerabilities. If the rebuilds are tough on your hardware, they can be done on the OBS: https://build.opensuse.org/package/show ... source-5.4

Debian has a built-in system to convert changes in source code into a patch, with "dpkg-source --commit" in the debianize source code root directory.
MX Linux packager and developer

Post Reply