If you want the official Ubuntu stock kernel (not a mainline kernel) from an unsupported version, see below.
For differences between Mainline and Stock kernels see https://askubuntu.com/a/91374/555474
I had to install an even older kernel (22.214.171.124-generic) for stock modules to work with a custom kernel. No hardware was working, so I had to download manually.
Here is how to obtain the discontinued kernels manually from http://old-releases.ubuntu.com/ubuntu/
Essentially you will need the kernel's headers for your processor, common (all) headers, and the kernel image for your processor.
In the steps below, replace
x.x.xx-xx with your kernel version and
amd64 with your processor type. Note this is for the generic kernel and not using extra features such as PAE.
Go to http://old-releases.ubuntu.com/ubuntu/pool/main/l/linux/ (I believe this lists most if not all the old kernel packages)
- In the page CTRL+F find
headers-x.x.xx-xx-generic and download the
In the page CTRL+F find
image-x.x.xx-xx-generic and download the
Put all of these packages in a folder alone, and from that folder (
cd into it) run
sudo dpkg -i *.deb