I uninstalled all my old kernels and left just the new kernel linux-image-5.8.0-36-generic installed. Consequently I unintentionally deleted some kernel modules by deleting the old kernels. For example, the Network controller as well as the Ethernet controller have no kernel modules. I tried sudo apt install linux generic which would solve the problem of the missing modules. However, there is no way to get this done without internet connection, so first I would need the kernel modules for my network or ethernet controller and I don't know how to find the right ones.


Having 20.04 and same kernel version, i checked it for you.
Here is the exact package version : linux-generic
But this may not be what is missing on your system as it is not installed on mine...
Your system is probably missing linux-modules-xxxxxxxx

user@host:~$ dpkg -l | grep linux-modules
ii  linux-modules-5.4.0-42-generic             5.4.0-42.46                         amd64        Linux kernel extra modules for version 5.4.0 on 64 bit x86 SMP
ii  linux-modules-5.8.0-36-generic             5.8.0-36.40~20.04.1                 amd64        Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP
ii  linux-modules-extra-5.8.0-36-generic       5.8.0-36.40~20.04.1                 amd64        Linux kernel extra modules for version 5.8.0 on 64 bit x86 SMP

Find the official download links:
For the last one, you should also get the dependencies : crda and linux-image-5.8.0-36-generic

Also find how to install packages from Ubuntu installation media offline :

About my system :
user@host:~$ uname -a
Linux T410 5.8.0-36-generic #40~20.04.1-Ubuntu SMP Wed Jan 6 10:15:55 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

user@host:~$ apt-cache policy linux-generic
  Installed: (none)
  Version table: 500
        500 http://fr.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages 500
        500 http://fr.archive.ubuntu.com/ubuntu focal/main amd64 

And, here is how i remove old kernels:

dpkg --list | grep 'linux-image' | awk '{ print $2 }' | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p' | xargs apt-get -y purge
dpkg --list | grep 'linux-headers' | awk '{ print $2 }' | sort -V | sed -n '/'"$(uname -r | sed "s/\([0-9.-]*\)-\([^0-9]\+\)/\1/")"'/q;p' | xargs apt-get -y purge

Hope this would help, please let me know :)
  • Many thanks for your help! My system was missing the linux-modules-5.8.0-36-generic and linux-modules-extra-5.8.0-36-generic. It was enough to copy the .deb files from my USB Stick to another directory and download them offline directly from there, so for this no apt-cdrom is needed. – Supernova Jan 13 at 11:10

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.