内核降级失败

内核降级失败

我尝试在 ubuntu 16.04 LTS 上使用较旧的内核 3.x。但这似乎是一个挑战:1. 使用默认 gcc (gcc5):

include/linux/compiler-gcc.h:103:30: fatal error: linux/compiler-gcc5.h: No such file or directory
  1. 因此我安装了 gcc-4.8 并尝试:

    sudo make CC="gcc-4.8"

我得到:

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

我尝试了安装,但启动时失败:

Booting the kernel. <- no more prints

我使用 x86_64 和 vanilla kernels 3.11.1,但无法使用内核启动。实际上,内核启动时启动时没有日志。

我还没有找到很多关于这个错误或如何解决它的信息。

有人可以帮忙吗?

答案1

您可以使用 Ubuntu 发布的预编译版本,而不必编译内核。3.16内核链受支持,它可能适合您的需要。

在浏览器地址栏中粘贴此内容:http://kernel.ubuntu.com/~kernel-ppa/mainline/

  • 使用Ctrl+F进行搜索。
  • 用作3.16搜索字符串。
  • 点击PgDn键直到屏幕变为下面的图像。

内核 3.16 索引.png

请注意,3.16.60Ubuntu Kernel Farm 于 2018 年 11 月 6 日刚刚编译了它。单击3.16.60链接,将出现以下屏幕:

内核3.16.60下载.png

点击AMD64下的链接下载:

  • Linux 标头-3.16.60-031660_3.16.60-031660.201810220732_all.deb
  • Linux 标头-3.16.60-031660-generic_3.16.60-031660.201810220732_amd64.deb
  • Linux 映像-3.16.60-031660-generic_3.16.60-031660.201810220732_amd64.deb

更改为您的下载目录:

cd ~/Downloads

继续重复命令,直到所有三个文件都以正确的大小下载:

$ 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

安装内核文件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

哦哦存在依赖性问题。安装缺少的模块:

$ 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

缺少的模块已安装,内核3.16.60安装将从中断处继续。


启动3.16.60对我来说没问题,但是我丢失了:

  • NVMe M.2 SSD Gen 3.0 x 4 暂停/恢复的内核功能。
  • 内核功能将笔记本电脑显示亮度设置为最后的设置。
  • nVidia 显示驱动程序功能。
  • 不再支持 Thunderbolt Type C DPI 至 HDMI 转换器。
  • 需要 Grub 覆盖来避免登录循环。Ctrl++Alt需要F1访问控制台。

答案2

由于包依赖关系,我遇到了以下错误。

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

如果内核是新构建的内核,则无法获取所有软件包。这就是您收到此错误的原因。

解决步骤:

  1. 首先,您使用相应的源文件更改 /etc/sources.list 的内容;您只需在 google 中搜索类似 sources.list 的文件。
  2. sudo apt-get update
  3. 安装依赖项示例:sudo apt-get install module-init-tools

相关内容