我试图从 20.10 升级到 21.04。我完全更新了系统(无需重新启动),然后运行do-release-upgrade
:
Checking for a new Ubuntu release
Get:1 Upgrade tool signature [819 B]
Get:2 Upgrade tool [1.276 kB]
Fetched 1.276 kB in 0s (0 B/s)
authenticate 'hirsute.tar.gz' against 'hirsute.tar.gz.gpg'
extracting 'hirsute.tar.gz'
Reading cache
Checking package manager
Reading package lists... Done
Building dependency tree
Reading state information... Done
Get:1 http://at.archive.ubuntu.com/ubuntu hirsute InRelease [269 kB]
...
最后 /boot 上没有足够的空间来继续:
Calculating the changes
Not enough free disk space
The upgrade has aborted. The upgrade needs a total of 151 M free
space on disk '/boot'. Please free at least an additional 8.464 k of
disk space on '/boot'. You can remove old kernels using 'sudo apt
autoremove' and you could also set COMPRESS=xz in
/etc/initramfs-tools/initramfs.conf to reduce the size of your
initramfs.
Restoring original system state
Aborting
Reading package lists... Done
Building dependency tree
Reading state information... Done
我的/boot
很小(237M);Ubuntu 的安装程序 5 年前就是这样创建的。只剩下当前内核,我已经在使用它COMPRESS=xz
作为 initramfs,所以我不得不删除它memtest86+
以腾出一些空间。然后我重新运行do-release-upgrade
:
root@hostname:/boot # do-release-upgrade
Checking for a new Ubuntu release
Please install all available updates for your release before upgrading.
root@hostname:/boot # apt update
Get:1 http://at.archive.ubuntu.com/ubuntu hirsute InRelease [269 kB]
Get:2 http://at.archive.ubuntu.com/ubuntu hirsute-updates InRelease [109 kB]
Get:3 http://at.archive.ubuntu.com/ubuntu hirsute-backports InRelease [90,7 kB]
Get:4 http://security.ubuntu.com/ubuntu hirsute-security InRelease [101 kB]
Get:5 http://at.archive.ubuntu.com/ubuntu hirsute-updates/main amd64 Packages [238 kB]
Get:6 http://at.archive.ubuntu.com/ubuntu hirsute-updates/main i386 Packages [124 kB]
Get:7 http://at.archive.ubuntu.com/ubuntu hirsute-updates/main amd64 c-n-f Metadata [4.744 B]
Fetched 936 kB in 1s (1.066 kB/s)
Reading package lists... Done
Building dependency tree
Reading state information... Done
2633 packages can be upgraded. Run 'apt list --upgradable' to see them.
这不可能。这 2633 个软件包肯定来自 21.04,而且更新程序没有恢复以前的系统状态。
我该如何继续?我认为只让 apt 升级所有这些软件包并希望获得最佳效果是不安全的...