0

I had upgraded my Ubuntu 16.04 installation to 18.04 in 2020, but never checked the Linux kernel being used - it is still 3.13.0-57-generic! Now I need a newer Linux kernel because the iptables complain about the missing tables as there are no 3.13.xx modules any more in /lib/modules (only 4.x and 5.x)!

How can I ask Ubuntu to use a newer Linux kernel? (I'm a Linux beginner).

Output of "sudo apt-get update" is:

Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://ppa.launchpad.net/certbot/certbot/ubuntu bionic InRelease
Hit:3 https://repos.insights.digitalocean.com/apt/do-agent main InRelease
Hit:4 https://deb.nodesource.com/node_6.x bionic InRelease
Hit:5 http://ppa.launchpad.net/ondrej/nginx/ubuntu bionic InRelease
Hit:6 http://mirrors.digitalocean.com/ubuntu bionic InRelease
Hit:7 http://ppa.launchpad.net/ondrej/php/ubuntu bionic InRelease
Hit:8 https://repos-droplet.digitalocean.com/apt/droplet-agent main InRelease
Hit:9 http://ppa.launchpad.net/teejee2008/ppa/ubuntu bionic InRelease
Hit:10 http://mirrors.digitalocean.com/ubuntu bionic-updates InRelease
Hit:11 http://mirrors.digitalocean.com/ubuntu bionic-backports InRelease
Get:12 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [1,198 kB]
Get:13 http://security.ubuntu.com/ubuntu bionic-security/universe i386 Packages [1,018 kB]
Fetched 2,305 kB in 1s (1,660 kB/s)
Reading package lists... Done
matthiku
  • 103

1 Answers1

1

You should probably just boot into your new kernel. In case of UEFI system, try entering the grub menu by pressing escape key, when you see the manufacturer logo, before the Ubuntu logo shows up. In case of BIOS system, do the same with shift key, quickly press and hold it. In grub menu, choose "Advanced options for Ubuntu". A new list will show up that should contain your new kernel(probably 5.xx.xx). Choose it to boot into new kernel to check everything's fine. If you don't find your new kernel, something unexpected could have happened during installation. Run
sudo apt-get update && sudo apt-get dist-upgrade
to resume any failed process. then
sudo apt-get clean && sudo reboot
to clean up and reboot, for new stuff to take effect. If you didn't boot into your new kernel again, maybe you need to change your default kernel(Skip this part if you did boot into new kernel). After making sure of its healthy installation(seeing the new kernel version in grub menu, under "Advanced options for Ubuntu") follow this answer ,which is a clear and reliable one, to change your default kernel. Don't forget backing up your original grub file, as mentioned in this answer. In case of any errors after manipulating your grub file, simply delete the edited one and rename the other:
sudo rm /etc/default/grub && sudo mv etc/default/grub.bak etc/default/grub
Use this command carefully. Ensure that you have already copied the original grub file. Be careful not to leave your computer with hands empty of any grub file.