无法从 chroot 重新安装内核

无法从 chroot 重新安装内核

我不小心删除了 /boot 的内容。

我试过

apt-get purge linux-generic linux-image-generic
apt-get install linux-generic linux-image-generic

Building dependency tree       
Reading state information... Done
The following NEW packages will be installed:
  linux-generic linux-image-generic
0 upgraded, 2 newly installed, 0 to remove and 2 not upgraded.
Need to get 0 B/4044 B of archives.
After this operation, 24.6 kB of additional disk space will be used.
Selecting previously unselected package linux-image-generic.
(Reading database ... 225808 files and directories currently installed.)
Preparing to unpack .../linux-image-generic_4.4.0.59.62_amd64.deb ...
Unpacking linux-image-generic (4.4.0.59.62) ...
Selecting previously unselected package linux-generic.
Preparing to unpack .../linux-generic_4.4.0.59.62_amd64.deb ...
Unpacking linux-generic (4.4.0.59.62) ...
Setting up linux-image-generic (4.4.0.59.62) ...
Setting up linux-generic (4.4.0.59.62) ...

来自 chroot。没有错误或警告,但 /boot 仅包含 initrd.img 和 grub(我确实设法使用 apt 安装了它们):

ls /boot
grub  initrd.img-4.4.0-31-generic  initrd.img-4.4.0-59-generic  initrd.img-4.4.0-59-generic.old-dkms

没有 vmlinuz!

为什么 apt 没有安装内核?

哪里可以得到内核?

编辑

快速查看后发现,linux-image-generic_4.4.0.59.62_amd64.deb 不包含内核。只有版权和 changelog.gz

哪个包包含内核?

答案1

内核包已安装 - 您已损坏它。请重新安装。

sudo apt install --reinstall linux-image-4.4.0-59-generic linux-image-extra-4.4.0-59-generic.

注意名称的区别:

“linux-image”和“linux-image-extra”包是实际的内核映像。

“linux-image-generic”包仅仅是一个引用当前内核镜像包的元包...因此更新有效。

相关内容