Install zram kernel module without linux-firmware

Asked by Serg

I am using Ubuntu on a virtual machine thus I do not need all the stuff physical machines require (amd64-microcode firmware-sof-signed intel-microcode libdbus-glib-1-2 libevdev2 libimobiledevice6 libplist3 libupower-glib3 libusbmuxd6 linux-firmware thermald upower usbmuxd wireless-regdb), but I need zram for a swapping purposes. Is it possible to achieve zram kernel module installation without all this bloat?

Question information

Language:
English Edit question
Status:
Answered
For:
Ubuntu linux Edit question
Assignee:
No assignee Edit question
Last query:
Last reply:
Revision history for this message
Manfred Hampl (m-hampl) said :
#1

for diagnostic purposes, what is the output of the commands

uname -a
lsb_release -crid
apt --simulate remove amd64-microcode firmware-sof-signed intel-microcode libdbus-glib-1-2 libevdev2 libimobiledevice6 libplist3 libupower-glib3 libusbmuxd6 linux-firmware thermald upower usbmuxd wireless-regdb

Revision history for this message
Serg (g00g1) said :
#2

Linux monitoring 5.15.0-72-generic #79-Ubuntu SMP Wed Apr 19 08:22:18 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Distributor ID: Ubuntu
Description: Ubuntu 22.04.2 LTS
Release: 22.04
Codename: jammy
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
Package 'amd64-microcode' is not installed, so not removed
Package 'libdbus-glib-1-2' is not installed, so not removed
Package 'libevdev2' is not installed, so not removed
Package 'libimobiledevice6' is not installed, so not removed
Package 'libplist3' is not installed, so not removed
Package 'libupower-glib3' is not installed, so not removed
Package 'libusbmuxd6' is not installed, so not removed
Package 'upower' is not installed, so not removed
Package 'usbmuxd' is not installed, so not removed
Package 'intel-microcode' is not installed, so not removed
Package 'linux-firmware' is not installed, so not removed
Package 'thermald' is not installed, so not removed
Package 'wireless-regdb' is not installed, so not removed
Package 'firmware-sof-signed' is not installed, so not removed
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

Revision history for this message
Manfred Hampl (m-hampl) said :
#3

The packages that you mentioned (amd64-microcode firmware-sof-signed ...) are not installed, so what is the issue here?
What do you want to install, that needs these packages as dependency?

Revision history for this message
Serg (g00g1) said :
#4

I need to install linux-modules-extra in a way that it gets automatically updated each time new kernel installed. But I could not do that without installing dependencies that I do not need.

linux-modules-extra is needed to use zram on my VPS.

Revision history for this message
Manfred Hampl (m-hampl) said (last edit ):
#5

Ok, now I understand.

I do not think that there is an easy way to accomplish that. What you would need is an "unversioned" package with a dependency on the linux-modules-extra-(version) package, but that seems not to exist.

The command
apt redepends linux-modules-extra-5.15.0-72-generic
shows only "linux-image-generic" as a strict dependency (the other ones are just "suggests" and contain the version number), but linux-image-generic has also a strict dependency on the packages amd64-microcode, intel-microcode and linux-firmware (which you want to avoid).

I see two possibilities, if you insist on having that:

1. You can create a bug report for requesting the creation of such a meta package in linux-meta, linux-meta-hwe-*, etc. (I have no idea, whether such request will be accepted or if that will immediately be denied by the developers).

2. I know that someone solved a problem of avoiding a package that is a strict dependecy of another package by creating a "fake" package with the target name, empty contents and version number higher than anything else (in your case that would be a package named something like linux-firmware_99999999._all.deb).

What is the problem with the additional packages being installed? Do you have capacity problems (disk space or download limits)?
Can you switch over to a manual process to look for new kernel versions regularly (e.g. once a week) and manually install them including the ...modules-extra... package?

Can you help with this problem?

Provide an answer of your own, or ask Serg for more information if necessary.

To post a message you must log in.