2

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.

1 Answer 1

2

Having 20.04 and same kernel version, i checked it for you.
Here is the exact package version : linux-generic 5.4.0.60.63
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:
https://packages.ubuntu.com/focal/linux-modules-5.4.0-42-generic
https://packages.ubuntu.com/focal/linux-modules-5.8.0-36-generic
https://packages.ubuntu.com/focal/linux-modules-extra-5.8.0-36-generic
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 :
https://askubuntu.com/a/1048260/77093


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
linux-generic:
  Installed: (none)
  Candidate: 5.4.0.60.63
  Version table:
     5.4.0.60.63 500
        500 http://fr.archive.ubuntu.com/ubuntu focal-updates/main amd64 Packages
        500 http://security.ubuntu.com/ubuntu focal-security/main amd64 Packages
     5.4.0.26.32 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 :)
1
  • 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, 2021 at 11:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .