Erros ao atualizar o Ubuntu 20.04 para 22.04 – muitos níveis de links simbólicos

Erros ao atualizar o Ubuntu 20.04 para 22.04 – muitos níveis de links simbólicos

Vi vários erros durante a atualização, então reiniciei. Agora, se eu tentar inicializar o kernel mais recente, o sistema simplesmente trava. Inicializei no modo de recuperação de um kernel antigo e tentei remover todos os pacotes da nvidia, pois me lembro de alguns dos erros mencionados na nvidia, mas isso não pareceu funcionar.

Agora posso inicializar 5.4.0-125-generic(o mais instalado atualmente é 5.15.0-46-generic), mas parece que um pacote antigo (linux-image-extra-4.4.0-47-generic) está causando erros:

$ apt -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages were automatically installed and are no longer required:
  [...lots of packages...]
Use 'apt autoremove' to remove them.
The following packages will be REMOVED:
  linux-image-extra-4.4.0-47-generic
0 upgraded, 0 newly installed, 1 to remove and 3 not upgraded.
4 not fully installed or removed.
After this operation, 162 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 718568 files and directories currently installed.)
Removing linux-image-extra-4.4.0-47-generic (4.4.0-47.68) ...
run-parts: executing /etc/kernel/postinst.d/dkms 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
 * dkms: running auto installation service for kernel 4.4.0-47-generic                                        
Error! Your kernel headers for kernel 4.4.0-47-generic cannot be found.
Please install the linux-headers-4.4.0-47-generic package or use the --kernelsourcedir option to tell DKMS where it's located.
                                                                                                       [ OK ]
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
update-initramfs: Generating /boot/initrd.img-4.4.0-47-generic
cp: failed to access '/var/tmp/mkinitramfs_Gr84ph//usr/sbin/reiserfsck': Too many levels of symbolic links
modinfo: ERROR: could not get modinfo from 'crc32': No such file or directory
ln: failed to create symbolic link '/var/tmp/mkinitramfs_Gr84ph/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_Gr84ph//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.4.0-47-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-extra-4.4.0-47-generic (--remove):
 installed linux-image-extra-4.4.0-47-generic package post-removal script subprocess returned error exit status 1
dpkg: too many errors, stopping
Errors were encountered while processing:
 linux-image-extra-4.4.0-47-generic
Processing was halted because there were too many errors.
E: Sub-process /usr/bin/dpkg returned an error code (1)

Quando tento instalar linux-headers-4.4.0-47-genericusando o apt, recebo:

Package linux-headers-4.4.0-47-generic is not available, but is referred to by another package.

Então baixei isso linux-headers-4.4.0-47do Launchpad e instalei, mas ainda estou recebendo os Too many levels of symbolic linkserros. Eu também não consigo correr update-initramfs.

# update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-5.4.0-125-generic
cp: failed to access '/var/tmp/mkinitramfs_6mJRpW//usr/sbin/reiserfsck': Too many levels of symbolic links
ln: failed to create symbolic link '/var/tmp/mkinitramfs_6mJRpW/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_6mJRpW//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-125-generic with 1.

E aqui está o resultado dedpkg --configure -a

Setting up initramfs-tools (0.140ubuntu13) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-5.15.0-46-generic (5.15.0-46.49) ...
Setting up usrmerge (25ubuntu2) ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.

FATAL ERROR:
Both /lib/libASEP11.so and /usr/lib/libASEP11.so exist.

You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.

dpkg: error processing package usrmerge (--configure):
 installed usrmerge package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.140ubuntu13) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-125-generic
cp: failed to access '/var/tmp/mkinitramfs_1kW62F//usr/sbin/reiserfsck': Too many levels of symbolic links
ln: failed to create symbolic link '/var/tmp/mkinitramfs_1kW62F/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_1kW62F//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-125-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.15.0-46-generic (5.15.0-46.49) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.15.0-46-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.15.0-46-generic
cp: failed to access '/var/tmp/mkinitramfs_n2elsy//usr/sbin/reiserfsck': Too many levels of symbolic links
ln: failed to create symbolic link '/var/tmp/mkinitramfs_n2elsy/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_n2elsy//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.15.0-46-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.15.0-46-generic (--configure):
 installed linux-image-5.15.0-46-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 usrmerge
 initramfs-tools
 linux-image-5.15.0-46-generic

Responder1

Eu parecia ter consertado.

Primeiro, pensei em forçar a remoção de linux-image-extra-4.4.0-47-generic, o que parece estar de alguma forma no cerne do problema. eu encontreiessa questãoe executou o seguinte:

mv /var/lib/dpkg/info/linux-image-extra-4.4.0-47-generic.* /tmp
dpkg --remove --force-remove-reinstreq linux-image-extra-4.4.0-47-generic

Tentei então fazer um apt -f install, mas ainda havia pacotes criando erros:

Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
3 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up initramfs-tools (0.140ubuntu13) ...
update-initramfs: deferring update (trigger activated)
Setting up linux-image-5.15.0-46-generic (5.15.0-46.49) ...
Setting up usrmerge (25ubuntu2) ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.

FATAL ERROR:
Both /lib/libASEP11.so and /usr/lib/libASEP11.so exist.

You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.

dpkg: error processing package usrmerge (--configure):
 installed usrmerge package post-installation script subprocess returned error exit status 1
Processing triggers for initramfs-tools (0.140ubuntu13) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-125-generic
cp: failed to access '/var/tmp/mkinitramfs_cvAKA2//usr/sbin/reiserfsck': Too many levels of symbolic links
ln: failed to create symbolic link '/var/tmp/mkinitramfs_cvAKA2/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_cvAKA2//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.4.0-125-generic with 1.
dpkg: error processing package initramfs-tools (--configure):
 installed initramfs-tools package post-installation script subprocess returned error exit status 1
Processing triggers for linux-image-5.15.0-46-generic (5.15.0-46.49) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.15.0-46-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.15.0-46-generic
cp: failed to access '/var/tmp/mkinitramfs_eni8Bm//usr/sbin/reiserfsck': Too many levels of symbolic links
ln: failed to create symbolic link '/var/tmp/mkinitramfs_eni8Bm/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_eni8Bm//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-5.15.0-46-generic with 1.
run-parts: /etc/kernel/postinst.d/initramfs-tools exited with return code 1
dpkg: error processing package linux-image-5.15.0-46-generic (--configure):
 installed linux-image-5.15.0-46-generic package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 usrmerge
 initramfs-tools
 linux-image-5.15.0-46-generic

Tentei então remover esses pacotes e reinstalar initramfs-toolse usrmerge:

apt remove initramfs-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  brltty brltty-x11 cryptsetup-initramfs initramfs-tools linux-image-4.4.0-47-generic
0 upgraded, 0 newly installed, 5 to remove and 10 not upgraded.
3 not fully installed or removed.
After this operation, 64.6 MB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 745215 files and directories currently installed.)
Removing linux-image-4.4.0-47-generic (4.4.0-47.68) ...
Examining /etc/kernel/prerm.d.
run-parts: executing /etc/kernel/prerm.d/dkms 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
dkms: removing: virtualbox 6.1.34 (4.4.0-47-generic) (x86_64)
Module virtualbox-6.1.34 for kernel 4.4.0-47-generic (x86_64).
Before uninstall, this module version was ACTIVE on this kernel.

vboxdrv.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.4.0-47-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

vboxnetadp.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.4.0-47-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.


vboxnetflt.ko:
 - Uninstallation
   - Deleting from: /lib/modules/4.4.0-47-generic/updates/dkms/
 - Original module
   - No original module was found for this module on this kernel.
   - Use the dkms install command to reinstall any previous module version.

depmod...
Examining /etc/kernel/postrm.d .
run-parts: executing /etc/kernel/postrm.d/initramfs-tools 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
update-initramfs: Deleting /boot/initrd.img-4.4.0-47-generic
run-parts: executing /etc/kernel/postrm.d/zz-update-grub 4.4.0-47-generic /boot/vmlinuz-4.4.0-47-generic
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found linux image: /boot/vmlinuz-5.4.0-125-generic
Found initrd image: /boot/initrd.img-5.4.0-125-generic
Found linux image: /boot/vmlinuz-5.4.0-121-generic
Found initrd image: /boot/initrd.img-5.4.0-121-generic
Found linux image: /boot/vmlinuz-5.4.0-113-generic
Found initrd image: /boot/initrd.img-5.4.0-113-generic
Found linux image: /boot/vmlinuz-5.4.0-110-generic
Found initrd image: /boot/initrd.img-5.4.0-110-generic
Found linux image: /boot/vmlinuz-5.4.0-105-generic
Found initrd image: /boot/initrd.img-5.4.0-105-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
The link /vmlinuz is a damaged link
Removing symbolic link vmlinuz 
 you may need to re-run your boot loader[grub]
The link /vmlinuz.old is a damaged link
Removing symbolic link vmlinuz.old 
 you may need to re-run your boot loader[grub]
The link /initrd.img is a damaged link
Removing symbolic link initrd.img 
 you may need to re-run your boot loader[grub]
The link /initrd.img.old is a damaged link
Removing symbolic link initrd.img.old 
 you may need to re-run your boot loader[grub]
Removing cryptsetup-initramfs (2:2.4.3-1ubuntu1.1) ...
update-initramfs: deferring update (trigger activated)
Removing brltty-x11 (6.4-4ubuntu3) ...
Removing brltty (6.4-4ubuntu3) ...
Removing initramfs-tools (0.140ubuntu13) ...
Setting up linux-image-5.15.0-46-generic (5.15.0-46.49) ...
Setting up usrmerge (25ubuntu2) ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.

FATAL ERROR:
Both /lib/libASEP11.so and /usr/lib/libASEP11.so exist.

You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.

dpkg: error processing package usrmerge (--configure):
 installed usrmerge package post-installation script subprocess returned error exit status 1
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for linux-image-5.15.0-46-generic (5.15.0-46.49) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.15.0-46-generic
   ...done.
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found linux image: /boot/vmlinuz-5.4.0-125-generic
Found initrd image: /boot/initrd.img-5.4.0-125-generic
Found linux image: /boot/vmlinuz-5.4.0-121-generic
Found initrd image: /boot/initrd.img-5.4.0-121-generic
Found linux image: /boot/vmlinuz-5.4.0-113-generic
Found initrd image: /boot/initrd.img-5.4.0-113-generic
Found linux image: /boot/vmlinuz-5.4.0-110-generic
Found initrd image: /boot/initrd.img-5.4.0-110-generic
Found linux image: /boot/vmlinuz-5.4.0-105-generic
Found initrd image: /boot/initrd.img-5.4.0-105-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done
Errors were encountered while processing:
 usrmerge
E: Sub-process /usr/bin/dpkg returned an error code (1)
# apt remove usrmerge
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following packages will be REMOVED:
  usrmerge
0 upgraded, 0 newly installed, 1 to remove and 10 not upgraded.
1 not fully installed or removed.
After this operation, 205 kB disk space will be freed.
Do you want to continue? [Y/n] y
(Reading database ... 743948 files and directories currently installed.)
Removing usrmerge (25ubuntu2) ...

Então, finalmente, apt -f installnão estava produzindo nenhum erro:

root@local:~# apt -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.

Então tentei reinstalar o usrmerge:

# apt install usrmerge 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  usrmerge
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 54.7 kB of archives.
After this operation, 205 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 usrmerge all 25ubuntu2 [54.7 kB]
Fetched 54.7 kB in 1s (66.4 kB/s) 
Selecting previously unselected package usrmerge.
(Reading database ... 743946 files and directories currently installed.)
Preparing to unpack .../usrmerge_25ubuntu2_all.deb ...
Unpacking usrmerge (25ubuntu2) ...
Setting up usrmerge (25ubuntu2) ...
Smartmatch is experimental at /usr/lib/usrmerge/convert-usrmerge line 172.

FATAL ERROR:
Both /lib/libASEP11.so and /usr/lib/libASEP11.so exist.

You can try correcting the errors reported and running again
/usr/lib/usrmerge/convert-usrmerge until it will complete without errors.
Do not install or update other Debian packages until the program
has been run successfully.

dpkg: error processing package usrmerge (--configure):
 installed usrmerge package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
 usrmerge
E: Sub-process /usr/bin/dpkg returned an error code (1)

A execução /usr/lib/usrmerge/convert-usrmergeainda dava o mesmo erro, então movi o mais antigo dos dois arquivos conflitantes para/tmp

root@local:~# ls -l /lib/libASEP11.so 
lrwxrwxrwx 1 root root 32 Apr 30  2021 /lib/libASEP11.so -> /usr/lib/x86-athena/libASEP11.so
root@local:~# ls -l /usr/lib/libASEP11.so
-rw-r--r-- 1 root root 6559107 Jan 28  2020 /usr/lib/libASEP11.so
root@local:~# ls /usr/lib/x86-athena/libASEP11.so -l
-rwxrwxrwx 1 root root 15145705 Sep  8  2019 /usr/lib/x86-athena/libASEP11.so
root@local:~# mv /lib/libASEP11.so /tmp/lib-libASEP11.so~

Então consegui reinstalar esses dois pacotes:

root@local:~# apt install usrmerge 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
usrmerge is already the newest version (25ubuntu2).
0 upgraded, 0 newly installed, 0 to remove and 5 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Do you want to continue? [Y/n] y
Setting up usrmerge (25ubuntu2) ...
root@local:~# apt install initramfs-tools
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
The following NEW packages will be installed:
  initramfs-tools
0 upgraded, 1 newly installed, 0 to remove and 5 not upgraded.
Need to get 9,036 B of archives.
After this operation, 151 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy/main amd64 initramfs-tools all 0.140ubuntu13 [9,036 B]
Fetched 9,036 B in 0s (25.2 kB/s)          
Selecting previously unselected package initramfs-tools.
(Reading database ... 743972 files and directories currently installed.)
Preparing to unpack .../initramfs-tools_0.140ubuntu13_all.deb ...
Unpacking initramfs-tools (0.140ubuntu13) ...
Setting up initramfs-tools (0.140ubuntu13) ...
update-initramfs: deferring update (trigger activated)
Processing triggers for man-db (2.10.2-1) ...
Processing triggers for initramfs-tools (0.140ubuntu13) ...
update-initramfs: Generating /boot/initrd.img-5.4.0-125-generic

No entanto, quando inicializei no kernel 5.15.0-46, recebi a mensagem Kernel Panic - not syncing: VFS: Unable to mount root fs. Portanto, inicializei em um kernel mais antigo e o reinstalei:

root@local:~# apt reinstall linux-image-5.15.0-46-generic linux-modules-extra-5.15.0-46-generic linux-headers-5.15.0-46-generic linux-modules-5.15.0-46-generic 
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 4 reinstalled, 0 to remove and 6 not upgraded.
Need to get 101 MB of archives.
After this operation, 0 B of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-headers-5.15.0-46-generic amd64 5.15.0-46.49 [2,836 kB]
Get:2 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-image-5.15.0-46-generic amd64 5.15.0-46.49 [11.4 MB]
Get:3 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-modules-5.15.0-46-generic amd64 5.15.0-46.49 [22.7 MB]
Get:4 http://archive.ubuntu.com/ubuntu jammy-updates/main amd64 linux-modules-extra-5.15.0-46-generic amd64 5.15.0-46.49 [63.9 MB]
Fetched 101 MB in 8s (13.0 MB/s)                                                                                                                                                                                 
(Reading database ... 743984 files and directories currently installed.)
Preparing to unpack .../linux-headers-5.15.0-46-generic_5.15.0-46.49_amd64.deb ...
Unpacking linux-headers-5.15.0-46-generic (5.15.0-46.49) over (5.15.0-46.49) ...
Preparing to unpack .../linux-image-5.15.0-46-generic_5.15.0-46.49_amd64.deb ...
Unpacking linux-image-5.15.0-46-generic (5.15.0-46.49) over (5.15.0-46.49) ...
Preparing to unpack .../linux-modules-5.15.0-46-generic_5.15.0-46.49_amd64.deb ...
Unpacking linux-modules-5.15.0-46-generic (5.15.0-46.49) over (5.15.0-46.49) ...
Preparing to unpack .../linux-modules-extra-5.15.0-46-generic_5.15.0-46.49_amd64.deb ...
Unpacking linux-modules-extra-5.15.0-46-generic (5.15.0-46.49) over (5.15.0-46.49) ...
Setting up linux-headers-5.15.0-46-generic (5.15.0-46.49) ...
/etc/kernel/header_postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.15.0-46-generic
   ...done.
Setting up linux-image-5.15.0-46-generic (5.15.0-46.49) ...
Setting up linux-modules-5.15.0-46-generic (5.15.0-46.49) ...
Setting up linux-modules-extra-5.15.0-46-generic (5.15.0-46.49) ...
Processing triggers for linux-image-5.15.0-46-generic (5.15.0-46.49) ...
/etc/kernel/postinst.d/dkms:
 * dkms: running auto installation service for kernel 5.15.0-46-generic
   ...done.
/etc/kernel/postinst.d/initramfs-tools:
update-initramfs: Generating /boot/initrd.img-5.15.0-46-generic
/etc/kernel/postinst.d/zz-update-grub:
Sourcing file `/etc/default/grub'
Sourcing file `/etc/default/grub.d/init-select.cfg'
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.15.0-46-generic
Found initrd image: /boot/initrd.img-5.15.0-46-generic
Found linux image: /boot/vmlinuz-5.4.0-125-generic
Found initrd image: /boot/initrd.img-5.4.0-125-generic
Found linux image: /boot/vmlinuz-5.4.0-121-generic
Found initrd image: /boot/initrd.img-5.4.0-121-generic
Found linux image: /boot/vmlinuz-5.4.0-113-generic
Found initrd image: /boot/initrd.img-5.4.0-113-generic
Found linux image: /boot/vmlinuz-5.4.0-110-generic
Found initrd image: /boot/initrd.img-5.4.0-110-generic
Found linux image: /boot/vmlinuz-5.4.0-105-generic
Found initrd image: /boot/initrd.img-5.4.0-105-generic
Found memtest86+ image: /boot/memtest86+.elf
Found memtest86+ image: /boot/memtest86+.bin
Warning: os-prober will not be executed to detect other bootable partitions.
Systems on them will not be added to the GRUB boot configuration.
Check GRUB_DISABLE_OS_PROBER documentation entry.
done

Agora tudo parece estar funcionando.

Responder2

Interessante. Notei erros e o processo de instalação me disse que erafeitomas encontrou erros. Portanto, antes de reiniciar, decidi investigar de perto.

Percebi que o novo kernel não pôde ser criado e estava pensando em rodar:

$ sudo update-initramfs -c -k 5.15.0-72-generic
update-initramfs: Generating /boot/initrd.img-4.15.0-211-generic
cp: failed to access '/var/tmp/mkinitramfs_JmyAEB//usr/sbin/reiserfsck': Too many levels of symbolic links
ln: failed to create symbolic link '/var/tmp/mkinitramfs_JmyAEB/sbin/reiserfsck': File exists
cp: failed to access '/var/tmp/mkinitramfs_JmyAEB//usr/sbin/reiserfsck': Too many levels of symbolic links
E: /usr/share/initramfs-tools/hooks/reiserfsprogs failed with return 1.
update-initramfs: failed for /boot/initrd.img-4.15.0-211-generic with 1.

mas, como podemos ver, aconteceram os mesmos erros de “muitos links simbólicos”. Foi assim que encontrei esta página. (Você pode encontrar a versão exata do kernel, a 5.15.0-72-genericparte, usando ls /boot.)

Ao tentar executar novamente a configuração, tive um erro semelhante, exceto que meu erro fatal foi sobre mtp-probe:

(Observação: quando o processo de instalação parou, apareceu um aviso dizendo que estava "pronto", mas foram encontrados erros. Tive que bater ENTERuma vez para sair apt-getpara que o bloqueio fosse liberado e eu pudesse rodar apt-getem outro console).

$ sudo apt-get install -f
[...]
FATAL ERROR:
Both /lib/udev/mtp-probe and /usr/lib/udev/mtp-probe exist.
[...]

Assim como Mike, movi o arquivo mais antigo /tmpantes de tentar novamente:

$ ls -l /lib/udev/mtp-probe  /usr/lib/udev/mtp-probe
-rwxr-xr-x 1 root root 14488 Mar 24  2022 /lib/udev/mtp-probe
-rwxr-xr-x 1 root root 31272 Feb 28  2020 /usr/lib/udev/mtp-probe
$ sudo mv /usr/lib/udev/mtp-probe /tmp

Depois de remover o primeiro arquivo, outro gerou um erro:

FATAL ERROR:
Both /lib/udev/rules.d/69-libmtp.rules and /usr/lib/udev/rules.d/69-libmtp.rules exist.

Desta vez, o kernel foi construído após o próximo apt-get install -f. No entanto, ainda havia erros na ligação com o MPI.

[...]
Setting up openmpi-bin (4.1.2-2ubuntu1) ...
update-alternatives: error: /var/lib/dpkg/alternatives/mpi corrupt: slave link same as main link /usr/bin/mpicc
dpkg: error processing package openmpi-bin (--configure):
[...]

Então vamos fazer isso mais uma vez... só que desta vez, olhando os arquivos, eles tinham quase a mesma data

$ ls -l /var/lib/dpkg/alternatives/mpi /usr/bin/mpicc
lrwxrwxrwx 1 root root   23 May 18 00:03 /usr/bin/mpicc -> /etc/alternatives/mpicc
rw-r--r-- 1 root root 2041 May 18 00:03 /var/lib/dpkg/alternatives/mpi

$ ls -l /etc/alternatives/mpicc
lrwxrwxrwx 1 root root 22 May 18 00:03 /etc/alternatives/mpicc -> /usr/bin/mpicc.openmpi

$ ls -l /usr/bin/mpicc.openmpi
lrwxrwxrwx 1 root root 12 Mar  4  2022 /usr/bin/mpicc.openmpi -> opal_wrapper

$ ls -l /usr/bin/opal_wrapper
-rwxr-xr-x 1 root root 26944 Mar  4  2022 /usr/bin/opal_wrapper

Isso não fazia muito sentido. Então olhei o conteúdo /var/lib/dpkg/alternatives/mpie reconheci um arquivo com o qual tive problemas antes. Aconteceu que eu tinhaesta páginafalando sobre isso. Temos que ocultar esse arquivo alternativo assim:

$ sudo mv /var/lib/dpkg/alternatives/mpi /var/lib/dpkg/alternatives/mpi.hide

O próximo apt-get install -fterminou sem erros e recebi uma mensagem dizendo que o kernel em execução está errado/inesperado (20.04 um...) e então me ofereceu para reiniciar os daemons. O de sempre. Então eu sinto que funcionou no final.

Por precaução, executei apt-getmais uma vez e alguns pacotes ainda não estavam totalmente instalados:

 sudo apt-get dist-upgrade

Por enquanto, porém, não executei o autoremovecomando. Dessa forma, posso manter um kernel antigo, por precaução, embora eu certamente espere que ele não seja necessário nunca mais!

Hora de reiniciar...

Ele reiniciou! :-)
Agora vamos consertar o Gnome, pois todas as minhas extensões são incompatíveis...

informação relacionada