0

I try to use older kernel 3.x with ubuntu 16.04 LTS. But It seems to be a challenge: 1. on using the default gcc (gcc5):

include/linux/compiler-gcc.h:103:30: fatal error: linux/compiler-gcc5.h: No such file or directory
  1. So I installed gcc-4.8 and tried:

    sudo make CC="gcc-4.8"

and I get:

update-initramfs: Generating /boot/initrd.img-3.11.1-amd64 E: intel-microcode: unsupported kernel version!

I tried anyway the install, but it fails at boot:

Booting the kernel. <- no more prints

I use x86_64 and vanilla kernels 3.11.1, yet it fails to boot with kernel. Actually there are no logs in startup on kernel start.

I haven't find a lot of information about this error, or how to solve it.

Can anyone help?

  • Probably not solvable. The kernel version is too old and can't possibly work in 16.04. Why do you think you need it? Maybe there's a better solution. – user880592 Nov 12 '18 at 21:55
  • I have a need to use a commercial library (.so) in board which says that it supported on up to 3.11.x, (I actually tried to use the library with later version and it failed) – ransh Nov 12 '18 at 21:59
  • Unfortunately there's no currently supported Ubuntu release with that kernel version. Even the about to expire 14,04 originally come with 3.13. – user880592 Nov 12 '18 at 22:05
  • fyi: Ubuntu 12.04 ESM uses (or used) 3.2; but it's off-topic here (so if you must have it, it may be an option for you to look up if you're willing to go that route..) – guiverc Nov 12 '18 at 23:41
2

Rather than compiling a kernel, you can use a pre-compiled version released by Ubuntu. 3.16 kernel chain is supported and it might suit your needs.

In your browser address bar paste this: http://kernel.ubuntu.com/~kernel-ppa/mainline/.

  • Use Ctrl+F to bring up search.
  • Use 3.16 as a search string.
  • Tap PgDn key until the screen changes to the image below.

kernel 3.16 index.png

Notice how 3.16.60 was just compiled on November 6, 2018 by the Ubuntu Kernel Farm. Click on 3.16.60 link and this screen appears:

kernel 3.16.60 download.png

Click the links under AMD64 to download:

  • linux-headers-3.16.60-031660_3.16.60-031660.201810220732_all.deb
  • linux-headers-3.16.60-031660-generic_3.16.60-031660.201810220732_amd64.deb
  • linux-image-3.16.60-031660-generic_3.16.60-031660.201810220732_amd64.deb

Change to your downloads directory:

cd ~/Downloads

Keep repeating command until all three files are downloaded with right size:

$ ll *.deb
-rw-rw-r-- 1 rick rick  9064576 Nov 12 16:40 linux-headers-3.16.60-031660_3.16.60-031660.201810220732_all.deb
-rw-rw-r-- 1 rick rick   693010 Nov 12 16:39 linux-headers-3.16.60-031660-generic_3.16.60-031660.201810220732_amd64.deb
-rw-rw-r-- 1 rick rick 54562272 Nov 12 16:40 linux-image-3.16.60-031660-generic_3.16.60-031660.201810220732_amd64.deb

Install the kernel files for 3.16.60:

sudo dpkg -i *.deb
Selecting previously unselected package linux-headers-3.16.60-031660.
(... SNIP ...)
dpkg: dependency problems prevent configuration of linux-image-3.16.60-031660-generic:
 linux-image-3.16.60-031660-generic depends on module-init-tools (>= 3.3-pre11-4ubuntu3); however:
  Package module-init-tools is not installed.

dpkg: error processing package linux-image-3.16.60-031660-generic (--install):
 dependency problems - leaving unconfigured
Errors were encountered while processing:
 linux-image-3.16.60-031660-generic

OH OH There is a dependency problem. Install missing module:

$ sudo apt install module-init-tools
Reading package lists... Done
Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  module-init-tools
0 upgraded, 1 newly installed, 0 to remove and 15 not upgraded.
1 not fully installed or removed.
Need to get 2,372 B of archives.
After this operation, 18.4 kB of additional disk space will be used.
Get:1 http://ca.archive.ubuntu.com/ubuntu xenial-updates/universe amd64 module-init-tools all 22-1ubuntu5.1 [2,372 B]
Fetched 2,372 B in 0s (7,745 B/s)             
Selecting previously unselected package module-init-tools.
(Reading database ... 346572 files and directories currently installed.)
Preparing to unpack .../module-init-tools_22-1ubuntu5.1_all.deb ...
Unpacking module-init-tools (22-1ubuntu5.1) ...
Setting up module-init-tools (22-1ubuntu5.1) ...
Setting up linux-image-3.16.60-031660-generic (3.16.60-031660.201810220732) ...
Running depmod.
update-initramfs: deferring update (hook will be called later)
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 3.16.60-031660-generic /boot/vmlinuz-3.16.60-031660-generic
run-parts: executing /etc/kernel/postinst.d/dkms 3.16.60-031660-generic /boot/vmlinuz-3.16.60-031660-generic
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 3.16.60-031660-generic /boot/vmlinuz-3.16.60-031660-generic
update-initramfs: Generating /boot/initrd.img-3.16.60-031660-generic
run-parts: executing /etc/kernel/postinst.d/pm-utils 3.16.60-031660-generic /boot/vmlinuz-3.16.60-031660-generic
run-parts: executing /etc/kernel/postinst.d/unattended-upgrades 3.16.60-031660-generic /boot/vmlinuz-3.16.60-031660-generic
run-parts: executing /etc/kernel/postinst.d/update-notifier 3.16.60-031660-generic /boot/vmlinuz-3.16.60-031660-generic
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 3.16.60-031660-generic /boot/vmlinuz-3.16.60-031660-generic
Generating grub configuration file ...
    (... SNIP ...)
done

AFTER missing module is installed, kernel 3.16.60 installation carries on where it left off.


Booting with 3.16.60 works OK for me but I loose:

  • Kernel features for NVMe M.2 SSD Gen 3.0 x 4 suspend / resume.
  • Kernel features to set laptop display brightness to last setting.
  • nVidia display driver features.
  • Support for Thunderbolt Type C DPI to HDMI converter is lost.
  • Grub overrides are needed to avoid login loop. Ctrl+Alt+F1 needed to access console.
| improve this answer | |
0

I faced the error below due to package dependencies.

module-init-tools (>= 3.3-pre11-4ubuntu3) but it is not going to be installed

If the kernel is new build kernel, then you can't get all packages. That's why you are getting this error.

Steps to solve:

  1. First you change the content of /etc/sources.list with respective sources file; you just search the file like sources.list in google.
  2. sudo apt-get update
  3. Install the dependency example: sudo apt-get install module-init-tools
| improve this answer | |

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.