如何修复中断的 ubuntu-upgrade(从 18.04 到 20.04)?

如何修复中断的 ubuntu-upgrade(从 18.04 到 20.04)?

我尝试将系统从 ubuntu 18.04 升级到 20.04(在 HP Zbook 15u 上运行),但升级中断了。现在我无法正常启动 Ubuntu。你知道如何修复损坏的安装吗?

以下是更多详细信息:

  1. 我使用软件更新程序从 18.04 升级到 20.04 LTS。在“安装升级”阶段,系统关闭(首先屏幕冻结,然后变黑。CRTL + ALT + F1什么也没做,所以我唯一的选择就是重新启动系统)。
  2. 我尝试在恢复模式下启动(Grub 显示三个不同的内核:
  • Ubuntu, with Linux 5.4.0-77-generic
  • Ubuntu, with Linux 4.15.0-147-generic
  • Ubuntu, with Linux 4.15.0-135-generic

发生以下情况:

  • 使用 5.4.0 我得到了内核崩溃
  • 使用 4.15.0 版本我都可以进入安全模式
  1. 处于安全模式(使用 4.15.0 内核)
  • 我运行了dpkg,但出现了错误
  • 诸如此类的命令apt-get update --fix-missing提示我手动运行 dpkg,所以我这样做了:
  1. 我放下root并运行dpkg —configure -a(按照其他帖子的建议)。然而,这并没有解决任何问题,我得到了以下输出
Failed to create symlink to vmlinuz-4.15.0-147-generic: Operation not permitted at /usr/bin/linux-update-symlinks line 64.
dpkg: error processing package linux-image-5.4.0-77-generic (--configure): installed linux-image-5.4.0-77-gneneric package post-installation script subprocess return error code exit status 1
dpkg: dependency problems prevent configuration of linux-image-generic: however: package linux-mage-5.4.0-77-generic is not configured yet.

dpkg: error processing package linux-image-generic (--configure): dependency problems - leaving unconfigured
dpkg: dependency problems prevent configuration of linux-generic: linux-generic depends on linux-image-generic (= 5.4.0.77.80); however: package linux-image-generic is not configured yet.

dpkg: error processing package linux-generic (--configure): dependency problems - leaving unconfigured
Setting up liux-firmware (1.187.15)...
ln: failed to create hard link '/boot/initrd.img-4.15.0-147-generic.dpkg-bak' => '/boot/initrd.mg-4.15.0-147-generic': Operation not permitted
update-initramfs: Generating /boot/initrd.img-4.15.0-147-generic
Error 24: write error: cannot write compressed block
E: mkinitramfs failure cpio 141 lz4 -9 -1 24
update-initramfs: failed for /boot/initrd.img-4.150-147-generic with 1.
dpkg: error processing package linux-firmware (--configure):
installed linux-firmware package post-installation script subprocess returned error exit status 1
Setting up friendly-recovery (0.2.41ubuntu0-
.20.04.1) ...
Sourcing file `/etc/default/grub`
Sourcing file `/etc/default/grub.d/40_oem-add-missing-default.cfg``
Sourcing file `/etc/default/grub.d/50_oem-kernel-cmdline.cfg`
Sourcing file `/etc/default/grub.d/51_oem-grub-recovery-title.cfg`
Sourcing file `/etc/default/grub.d/init-select.cfg`
Generating grub configuration file ...
Warning: Setting GRUB_TIMEOUT to a non-yero value when GRUB_HIDDEN_TIMEOUT is set is no longer supported.
Found linux image: /boot/vmlinuz-5.4.0-77-generic
Found linux image: /boot/vmlinuz-4.15.0-147-generic
Found initrd image: /boot/initrd.img-4.15.0-147-generic
Found linux image: /boot/vmlinuz-4.15.0-135-generic
Found initrd image: /boot/initrd.img-4.15.0-135-generic
Found memtest86+ image: /memtest86+.elf
Found memtest86+ image: /memtest86+.bin
done

如果我需要提供更多信息,请告诉我!

答案1

我听从了用户535733解决问题。因此,我创建了一个带有 Ubuntu 20.04 的可启动 USB,在 Try Out-Mode 下从它启动并备份了我的数据。然后我从 USB 重新安装了 Ubuntu 20.04。到目前为止效果很好。

因此,我遵循了以下说明:

相关内容