如果升级停滞在 15%,我该怎么办?我该如何安全恢复?

如果升级停滞在 15%,我该怎么办?我该如何安全恢复?

我终于将笔记本电脑从 18.04 LTS 升级到了 20.04 LTS,但它似乎停滞了Progress: 15%。我当时正在做其他事情,并定期检查它,但最初几次我的笔记本电脑变黑时它继续升级。

这次它已经停滞了几个小时,我想是时候放弃了,但我不确定如何安全地做到这一点。

屏幕上最新的内容是这样的:

Reloading AppArmor profiles 
Skipping profile in /etc/apparmor.d/disable: usr.bin.firefox
Skipping profile in /etc/apparmor.d/disable: usr.sbin.rsyslogd
Setting up openssl (1.1.1f-1ubuntu2.1) ...
Installing new version of config file /etc/ssl/openssl.cnf ...
Setting up ca-certificates (20210119~20.04.1) ...
Updating certificates in /etc/ssl/certs...
0 added, 0 removed; done.
Setting up libbsd0:amd64 (0.10.0-1) ...
Setting up libedit2:amd64 (3.1-20191231-1) ...
Setting up libcbor0.6:amd64 (0.6.0-0ubuntu1) ...
Setting up libfido2-1:amd64 (1.3.1-1ubuntu2) ...
Setting up libkrb5support0:amd64 (1.17-6ubuntu4.1) ...
Setting up libk5crypto3:amd64 (1.17-6ubuntu4.1) ...
Setting up libkeyutils1:amd64 (1.6-6ubuntu1) ...
Setting up libkrb5-3:amd64 (1.17-6ubuntu4.1) ...
Setting up libgssapi-krb5-2:amd64 (1.17-6ubuntu4.1) ...
Setting up openssh-client (1:8.2p1-4ubuntu0.1) ...
Installing new version of config file /etc/ssh/ssh_config ...
Removing obsolete conffile /etc/ssh/moduli ...
Setting up liblzo2-2:amd64 (2.10-2) ...
Setting up squashfs-tools (1:4.4-1) ...
Setting up libkmod2:amd64 (27-1ubuntu2) ...
Setting up udev (245.4-4ubuntu3.4) ...
Installing new version of config file /etc/init.d/udev ...
Installing new version of config file /etc/udev/udev.conf ...
update-initramfs: deferring update (trigger activated)
Setting up snapd (2.48+20.04) ...
snapd.failure.service is a disabled or a static unit, not starting it.
snapd.snap-repair.service is a disabled or a static unit, not starting it.

我如何安全地退出我启动的升级do-release-upgrade

我看到对较早的类似问题的答复,但我不想假设 2012 年有效的方法今天仍然有效。

一些人问如果升级停滞在 15%,我该怎么办?如何安全恢复?是另一个问题。它是不同的。我使用 启动了升级do-release-upgrade,而不是从 GUI 启动的。

听起来我可能需要终止它,启动到恢复模式,然后从那里重新开始,如果它没有任何进展的话。

答案1

do-release-upgrade进程正在 Screen 会话内运行,因此您可以按R重新启动它。

我尝试了几次,最终都以正常升级结束。

为确保万无一失,升级后请使用通常推荐的命令:

sudo apt-get update
sudo apt-get install -f
sudo dpkg --configure -a
sudo apt-get dist-upgrade

相关内容