在运行 do-release-upgrade
升级 ubuntu 的过程中出现下面的提示
Removing linux-image-4.15.0-166-generic
You are running a kernel (version 4.15.0-166-generic) and attempting to remove the same version.
This can make the system unbootable as it will remove /boot/vmlinuz-4.15.0-166-generic and all modules under the directory /lib/modules/4.15.0-166-generic. This can only be fixed with a copy of the kernel image and the corresponding modules.
It is highly recommended to abort the kernel removal unless you are prepared to fix the system after removal.
Abort kernel removal?
我选择了 Yes,请问会带来什么影响?
选择 Yes 后升级失败了
dpkg: error processing package linux-image-4.15.0-166-generic (--remove):
installed linux-image-4.15.0-166-generic package pre-removal script subprocess returned error exit status 1
Errors were encountered while processing:
linux-image-4.15.0-166-generic
Exception during pm.DoInstall(): E:Sub-process /usr/bin/dpkg returned an error code (1)Could not install the upgrades
The upgrade has aborted. Your system could be in an unusable state. A
recovery will run now (dpkg --configure -a).Please report this bug in a browser at
http://bugs.launchpad.net/ubuntu/+source/ubuntu-release-upgrader/+filebug
and attach the files in /var/log/dist-upgrade/ to the bug report.
E:Sub-process /usr/bin/dpkg returned an error code (1)Upgrade incomplete
The upgrade has partially completed but there were errors during the
upgrade process.To continue please press [ENTER]
=== Command detached from window (Wed May 25 14:23:05 2022) ===
=== Command terminated with exit status 1 (Wed May 25 14:23:15 2022) ===
按 r 重新唤起升级过程,在 Removing linux-image-4.15.0-166-generic
时选 No
后成功完成升级