Fixing: Ubuntu lost network after kernel upgrade
Source: Dev.to

Commands to Fix Network Issues
First, check your kernel version with uname -r (e.g., 6.14.0-37-generic). Then replace the version number in the commands below:
# Check the network interfaces and IP addresses
ifconfig
# Check the kernel version
uname -r
# Update package lists and upgrade system
sudo apt update
sudo apt upgrade
# Install kernel extra modules for the version discovered above
# Replace 6.14.0-37-generic with your actual kernel version
sudo apt install linux-modules-extra-6.14.0-37-generic
# Rebuild the initramfs to include the new kernel modules
sudo update-initramfs -u
# Install recommended proprietary drivers (primarily for NVIDIA graphics)
sudo ubuntu-drivers autoinstall
# Reboot to apply changes
sudo reboot
Understanding the Problem and Solution
When Ubuntu automatically upgrades to a new kernel (as part of regular system updates), the network drivers may not be properly included in the new kernel’s boot filesystem. This is especially common on Ubuntu 24.04 after kernel upgrades, particularly on systems with hardware that requires additional kernel modules.
Why This Happens
- Kernel modules are version‑specific – each kernel version needs its own set of driver modules.
- Initramfs may be incomplete – the initial RAM filesystem loaded during boot might lack necessary network drivers.
- Extra modules package missing – the
linux-modules-extrapackage for the new kernel may not have been installed automatically.
How the Solution Works
- Installing kernel extra modules –
linux-modules-extra--genericprovides additional modules, including many network drivers that are not part of the base kernel package. - Rebuilding the initramfs –
update-initramfs -urepacks the initramfs so it contains all required modules, ensuring they are available early in the boot process. - Installing proprietary drivers –
ubuntu-drivers autoinstallmainly handles graphics drivers (e.g., NVIDIA) but can also reinstall other proprietary drivers that might have been lost. - Rebooting – loads the new kernel with the corrected initramfs, restoring network connectivity.
After reboot, verify the network with ifconfig or ip a.