How to fix interrupted ubuntu-upgrade (from 18.04 to 20.04)?
I tried to upgrade my system from ubuntu 18.04 to 20.04 (running on a HP Zbook 15u) but the upgrade got interrupted. Now I am not able to start Ubuntu properly. Do you know how to fix the broken installation?
Here are more details:
- I used the Software Updater to upgrade from 18.04 to 20.04 LTS. During the “installing upgrades”-phase, the system shut down (first the screen froze, then it went black.
CRTL + ALT + F1
didn't do anything, so the only option I had, was to restart the system). - I tried to boot in recovery mode (Grub shows three different kernels:
Ubuntu, with Linux 5.4.0-77-generic
Ubuntu, with Linux 4.15.0-147-generic
Ubuntu, with Linux 4.15.0-135-generic
The following happens:
- with 5.4.0 I get a Kernel panic
- with both 4.15.0-versions I can enter the safe mode
- in safe mode (with both 4.15.0-kernels)
- I ran
dpkg
, but got an error - commands like
apt-get update --fix-missing
prompt me to run dpkg manually, so I did:
- I dropped to
root
and randpkg —configure -a
(as suggested in various other posts). However, that doesn’t fix anything and I get the following output
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
Please let me know if I need to provide additional information!
I followed the recommendation of user535733 to solve the problem. Thus, I created a bootable USB with Ubuntu 20.04, booted from it in Try Out-Mode and did a back up of my data. Then I reinstalled Ubuntu 20.04 from the USB. Worked out great so far.
Thereby, I followed the following instructions:
- How to create a bootable Ubuntu 20.04-version on a Windows10-machine
- Ubuntu 20.04-installation from USB