Skip to content
View in the app

A better way to browse. Learn more.

Armbian Community Forums

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

APT: Prevent <other-device> kernels from being installed

Featured Replies

To prevent APT from installing <other-device> kernels that will render an installation useless I did the following:

 

To see which kernel is running:

$ uname -r
6.11.2-current-rockchip-rk3588

 

To see which kernels are installed:

$ dpkg --get-selections 'linux-image*'
inux-image-current-rockchip-rk3588        install
linux-image-edge-rockchip-rk3588        install

 

Its clear to see that I need "rockchip-rk3588" kernels and not the other 1000+  :love: so wonderfully provides.

 

Now that I know which kernel is used and which are not, I will allow and block what I need:

$ sudo nano /etc/apt/preferences.d/kernel

 

The first entry allows the installation of any rockchip-rk3588 kernels that my device can use.

The second entry blocks the installation of any other kernel.

Package: linux-image-*-rockchip-rk3588
Pin: release *
Pin-Priority: 1000

Package: linux-image-*
Pin: release *
Pin-Priority: -1

 

To check if the policy is recognized run this command:

$ apt-cache policy
...
     linux-image-6.9.7+bpo-rt-arm64 -> 6.9.7-1~bpo12+1 with priority -1
     linux-image-6.1.0-11-cloud-arm64 -> 6.1.38-4 with priority -1
>    linux-image-edge-rockchip-rk3588 -> 24.11.0-trunk.249 with priority 1000
>    linux-image-edge-rockchip-rk3588 -> 24.11.0-trunk.238 with priority 1000
     linux-image-6.1.0-11-rt-arm64 -> 6.1.38-4 with priority -1
     linux-image-6.1.0-22-rt-arm64 -> 6.1.94-1 with priority -1
     linux-image-6.1.0-11-arm64 -> 6.1.38-4 with priority -1
     linux-image-6.10.6+bpo-arm64-dbg -> 6.10.6-1~bpo12+1 with priority -1
$

You can clearly see that all  kernels are disabled with priority -1 except those for the rockchip-rk3588

 

To test this simulate the installation:

$ sudo apt install --simulate linux-image-6.9.7+bpo-rt-arm64
[sudo] password for test: 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package linux-image-6.9.7+bpo-rt-arm64 is not available, but is referred to by another package.
This may mean that the package is missing, has been obsoleted, or
is only available from another source
However the following packages replace it:
  linux-image-6.9.7+bpo-rt-arm64-unsigned

E: Package 'linux-image-6.9.7+bpo-rt-arm64' has no installation candidate
$

 

Success :D

Edited by Dantes
forgot to add --simulate to test case

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.