Pacman ate my distro [Raspberry PI4] - Can't `ssh` in, `su` or `sudo`

I’m using a Raspberry Pi 4 at home as my home server and nas. I log in via SSH and I don’t run a UI.

I was doing a routine upgrade via sudo pacman -Syu and it failed miserably and broke my whole installation.

I don’t have a recent backup of the SD card, unfortunately.

TL;DR:

  • I can’t log into the box any more.
  • I still have an active SSH session (for now, until it disconnects) and there I can’t su or sudo.

Here’s a copy of the buffer:

[adam@drizzle ~]$ sudo pacman -Syu
[sudo] password for adam:
:: Synchronising package databases...
 core                                                                                                 268.5 KiB  1017 KiB/s 00:00 [##############################################################################] 100%
 extra                                                                                                  2.5 MiB  5.31 MiB/s 00:00 [##############################################################################] 100%
 community                                                                                              6.6 MiB  9.87 MiB/s 00:01 [##############################################################################] 100%
:: Some packages should be upgraded first...
resolving dependencies...
looking for conflicting packages...

Packages (3) uboot-tools-2022.04-1  manjaro-keyring-20220514-1  manjaro-system-20220528-1

Total Download Size:   0.34 MiB
Total Installed Size:  1.34 MiB
Net Upgrade Size:      1.21 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 uboot-tools-2022.04-1-aarch64                                                                        275.4 KiB  2.59 MiB/s 00:00 [##############################################################################] 100%
 manjaro-system-20220528-1-any                                                                          8.8 KiB  81.9 KiB/s 00:00 [##############################################################################] 100%
 manjaro-keyring-20220514-1-any                                                                        67.3 KiB   525 KiB/s 00:00 [##############################################################################] 100%
 Total (3/3)                                                                                          351.5 KiB  2.32 MiB/s 00:00 [##############################################################################] 100%
(3/3) checking keys in keyring                                                                                                    [##############################################################################] 100%
(3/3) checking package integrity                                                                                                  [##############################################################################] 100%
(3/3) loading package files                                                                                                       [##############################################################################] 100%
(3/3) checking for file conflicts                                                                                                 [##############################################################################] 100%
(3/3) checking available disk space                                                                                               [##############################################################################] 100%
:: Processing package changes...
(1/3) installing uboot-tools                                                                                                      [##############################################################################] 100%
==> Delete wrongly disabled keys
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  33  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  33  signed:  96  trust: 0-, 0q, 0n, 33m, 0f, 0u
gpg: depth: 2  valid:  90  signed:  33  trust: 90-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-07-10
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  32  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  32  signed:  96  trust: 0-, 0q, 0n, 32m, 0f, 0u
gpg: depth: 2  valid:  90  signed:  33  trust: 90-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-07-10
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  31  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  31  signed:  96  trust: 0-, 0q, 0n, 31m, 0f, 0u
gpg: depth: 2  valid:  90  signed:  33  trust: 90-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-07-10
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  30  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  30  signed:  96  trust: 0-, 0q, 0n, 30m, 0f, 0u
gpg: depth: 2  valid:  90  signed:  33  trust: 90-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-07-10
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  29  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  29  signed:  96  trust: 0-, 0q, 0n, 29m, 0f, 0u
gpg: depth: 2  valid:  90  signed:  33  trust: 90-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-07-10
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  28  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  28  signed:  96  trust: 0-, 0q, 0n, 28m, 0f, 0u
gpg: depth: 2  valid:  90  signed:  33  trust: 90-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-07-10
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  27  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  27  signed:  96  trust: 0-, 0q, 0n, 27m, 0f, 0u
gpg: depth: 2  valid:  90  signed:  33  trust: 90-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-07-10
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  26  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  26  signed:  96  trust: 0-, 0q, 0n, 26m, 0f, 0u
gpg: depth: 2  valid:  90  signed:  33  trust: 90-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-07-10
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  25  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  25  signed:  96  trust: 0-, 0q, 0n, 25m, 0f, 0u
gpg: depth: 2  valid:  90  signed:  33  trust: 90-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-07-10
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  24  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  24  signed:  96  trust: 0-, 0q, 0n, 24m, 0f, 0u
gpg: depth: 2  valid:  90  signed:  33  trust: 90-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-07-10
(2/3) upgrading manjaro-keyring                                                                                                   [##############################################################################] 100%
==> Appending keys from manjaro.gpg...
==> Locally signing trusted keys in keyring...
  -> Locally signed 10 keys.
==> Importing owner trust values...
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
gpg: setting ownertrust to 4
==> Disabling revoked keys in keyring...
  -> Disabled 2 keys.
==> Updating trust database...
gpg: marginals needed: 3  completes needed: 1  trust model: pgp
gpg: depth: 0  valid:   1  signed:  33  trust: 0-, 0q, 0n, 0m, 0f, 1u
gpg: depth: 1  valid:  33  signed:  98  trust: 0-, 0q, 0n, 33m, 0f, 0u
gpg: depth: 2  valid:  90  signed:  33  trust: 90-, 0q, 0n, 0m, 0f, 0u
gpg: next trustdb check due at 2022-07-10
(3/3) upgrading manjaro-system                                                                                                    [##############################################################################] 100%
==> Removing the Calamares autostart file...
==> Enabling periodic trimming of filesystems...
    Starting initial filesystem trimming in background...
:: Running post-transaction hooks...
(1/2) Reloading device manager configuration...
(2/2) Arming ConditionNeedsUpdate...

:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (115) archlinux-appstream-data-20220512-1  curl-7.83.1-1  dav1d-1.0.0-1  device-mapper-2.03.16-1  f2fs-tools-1.15.0-1  ffmpeg-2:5.0-7  firefox-100.0.2-1  fuse-common-3.11.0-1  fuse3-3.11.0-1  gd-2.3.3-4
               git-2.36.1-1  gmp-6.2.1-2  gnupg-2.2.35-2  gnutls-3.7.5-1  graphite-1:1.3.14-2  gtk-update-icon-cache-1:4.6.4-1  gtk3-1:3.24.34-1  harfbuzz-4.3.0-1  hwdata-0.359-1  iptables-1:1.8.8-1  kauth-5.94.0-1
               kcoreaddons-5.94.0-1  kitemmodels-5.94.0-1  kvantum-1.0.2-1  kwindowsystem-5.94.0-1  libasyncns-1:0.8+r3+g68cd5af-1  libavif-0.10.1-1  libbpf-0.8.0-1  libice-1.0.10-4  libjpeg-turbo-2.1.3-2
               libldap-2.6.2-1  libnotify-0.7.12-1  libpciaccess-0.16-3  librsvg-2:2.54.3-1  libsm-1.2.3-3  libunistring-1.0-1  libxau-1.0.9-4  libxcb-1.15-1  libxcomposite-0.4.5-4  libxdamage-1.1.5-4
               libxdmcp-1.1.3-4  libxext-1.3.4-4  libxinerama-1.1.4-4  libxkbcommon-1.4.1-1  libxkbcommon-x11-1.4.1-1  libxkbfile-1.1.0-3  libxml2-2.9.14-1  libxmu-1.1.3-3  libxpm-3.5.13-3  libxrandr-1.5.2-4
               libxrender-0.9.10-5  libxshmfence-1.3-3  libxss-1.2.3-4  libxtst-1.2.3-5  libxv-1.0.11-5  libxxf86vm-1.1.4-5  libyuv-r2322+3aebf69d-1.1  linux-api-headers-5.17.5-2  linux-firmware-20220509.b19cbdc-1
               linux-firmware-whence-20220509.b19cbdc-1  linux-rpi4-5.15.43-1  linux-rpi4-headers-5.15.43-1  llvm-libs-13.0.1-4  luajit-2.1.0.beta3.r407.g4ef96cff-1  lvm2-2.03.16-1  mesa-22.0.4-1
               mobile-broadband-provider-info-20220511-1  mtdev-1.1.6-2  noto-fonts-20220502-2  openjpeg2-2.5.0-1  pamac-cli-10.4.0-2  pamac-gtk-10.4.0-2  papirus-icon-theme-20220508-1  pixman-0.40.0-2
               psmisc-23.5-1  qt5-base-5.15.4+kde+r144-1  qt5-script-5.15.9-2  qt5-svg-5.15.4+kde+r10-1  qt5-translations-5.15.4+kde+r2-1  qt5-x11extras-5.15.4+kde+r0-1  raspberrypi-bootloader-20220527-1
               raspberrypi-bootloader-x-20220527-1  rav1e-0.4.1-2  rpi4-post-install-20220522-1  samba-4.16.1-3  sdl2-2.0.22-2  smbclient-4.16.1-3  smplayer-22.2.0-2  sound-theme-freedesktop-0.8-5  sqlite-3.38.5-1
               syncthing-1.20.1-1  systemd-251-1  systemd-libs-251-1  systemd-sysvcompat-251-1  unrar-1:6.1.7-1  vulkan-headers-1:1.3.213-1  vulkan-icd-loader-1.3.213-1  xbitmaps-1.1.2-3  xcb-proto-1.15-1
               xcb-util-0.4.0-4  xcb-util-cursor-0.1.3-4  xcb-util-image-0.4.0-4  xcb-util-keysyms-0.4.0-4  xcb-util-renderutil-0.3.9-4  xcb-util-wm-0.4.1-4  xdg-utils-1.1.3+21+g1a58bc2-1
               xfce4-taskmanager-1.5.2.207.gfa7c8dd-1  xfce4-terminal-1.0.4-1  xfsprogs-5.16.0-1  xorg-server-21.1.3-7  xorg-server-common-21.1.3-7  xorg-xkill-1.0.5-3  xorg-xmodmap-1.0.10-3  xorg-xset-1.2.4-3
               xterm-372-2

Total Download Size:    379.27 MiB
Total Installed Size:  1732.84 MiB
Net Upgrade Size:        33.83 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 noto-fonts-20220502-2-any                                                                             25.1 MiB  4.78 MiB/s 00:05 [##############################################################################] 100%
 linux-rpi4-5.15.43-1-aarch64                                                                          26.8 MiB  5.00 MiB/s 00:05 [##############################################################################] 100%
 firefox-100.0.2-1-aarch64                                                                             47.1 MiB  6.51 MiB/s 00:07 [##############################################################################] 100%
 linux-firmware-20220509.b19cbdc-1-any                                                                 77.3 MiB  8.66 MiB/s 00:09 [##############################################################################] 100%
 papirus-icon-theme-20220508-1-any                                                                     24.4 MiB   844 KiB/s 00:30 [##############################################################################] 100%
 qt5-base-5.15.4+kde+r144-1-aarch64                                                                    12.3 MiB   604 KiB/s 00:21 [##############################################################################] 100%
 mesa-22.0.4-1-aarch64                                                                                 14.4 MiB   179 KiB/s 01:23 [##############################################################################] 100%
 archlinux-appstream-data-20220512-1-any                                                               18.2 MiB   160 KiB/s 01:57 [##############################################################################] 100%
 ffmpeg-2:5.0-7-aarch64                                                                                 9.0 MiB  6.92 MiB/s 00:01 [##############################################################################] 100%
 linux-rpi4-headers-5.15.43-1-aarch64                                                                  12.1 MiB   132 KiB/s 01:34 [##############################################################################] 100%
 llvm-libs-13.0.1-4-aarch64                                                                            22.0 MiB   190 KiB/s 01:58 [##############################################################################] 100%
 Total ( 11/115)                                                                                      379.3 MiB  3.06 MiB/s 02:04 [##############################################################################] 100%
error: failed retrieving file 'ffmpeg-2:5.0-7-aarch64.pkg.tar.xz' from mirror.cyberhost.uk : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds
error: failed retrieving file 'mesa-22.0.4-1-aarch64.pkg.tar.xz.sig' from mirror.cyberhost.uk : Operation too slow. Less than 1 bytes/sec transferred the last 10 seconds
error: failed retrieving file 'ffmpeg-2:5.0-7-aarch64.pkg.tar.xz' from mirror.netcologne.de : SSL connection timeout
warning: failed to retrieve some files
error: failed to commit transaction (unexpected error)
Errors occurred, no packages were upgraded.
[adam@drizzle ~]$ sudo pacman -Syu
[sudo] password for adam:
:: Synchronising package databases...
 core is up to date
 extra is up to date
 community is up to date
:: Starting full system upgrade...
resolving dependencies...
looking for conflicting packages...

Packages (115) archlinux-appstream-data-20220512-1  curl-7.83.1-1  dav1d-1.0.0-1  device-mapper-2.03.16-1  f2fs-tools-1.15.0-1  ffmpeg-2:5.0-7  firefox-100.0.2-1  fuse-common-3.11.0-1  fuse3-3.11.0-1  gd-2.3.3-4
               git-2.36.1-1  gmp-6.2.1-2  gnupg-2.2.35-2  gnutls-3.7.5-1  graphite-1:1.3.14-2  gtk-update-icon-cache-1:4.6.4-1  gtk3-1:3.24.34-1  harfbuzz-4.3.0-1  hwdata-0.359-1  iptables-1:1.8.8-1  kauth-5.94.0-1
               kcoreaddons-5.94.0-1  kitemmodels-5.94.0-1  kvantum-1.0.2-1  kwindowsystem-5.94.0-1  libasyncns-1:0.8+r3+g68cd5af-1  libavif-0.10.1-1  libbpf-0.8.0-1  libice-1.0.10-4  libjpeg-turbo-2.1.3-2
               libldap-2.6.2-1  libnotify-0.7.12-1  libpciaccess-0.16-3  librsvg-2:2.54.3-1  libsm-1.2.3-3  libunistring-1.0-1  libxau-1.0.9-4  libxcb-1.15-1  libxcomposite-0.4.5-4  libxdamage-1.1.5-4
               libxdmcp-1.1.3-4  libxext-1.3.4-4  libxinerama-1.1.4-4  libxkbcommon-1.4.1-1  libxkbcommon-x11-1.4.1-1  libxkbfile-1.1.0-3  libxml2-2.9.14-1  libxmu-1.1.3-3  libxpm-3.5.13-3  libxrandr-1.5.2-4
               libxrender-0.9.10-5  libxshmfence-1.3-3  libxss-1.2.3-4  libxtst-1.2.3-5  libxv-1.0.11-5  libxxf86vm-1.1.4-5  libyuv-r2322+3aebf69d-1.1  linux-api-headers-5.17.5-2  linux-firmware-20220509.b19cbdc-1
               linux-firmware-whence-20220509.b19cbdc-1  linux-rpi4-5.15.43-1  linux-rpi4-headers-5.15.43-1  llvm-libs-13.0.1-4  luajit-2.1.0.beta3.r407.g4ef96cff-1  lvm2-2.03.16-1  mesa-22.0.4-1
               mobile-broadband-provider-info-20220511-1  mtdev-1.1.6-2  noto-fonts-20220502-2  openjpeg2-2.5.0-1  pamac-cli-10.4.0-2  pamac-gtk-10.4.0-2  papirus-icon-theme-20220508-1  pixman-0.40.0-2
               psmisc-23.5-1  qt5-base-5.15.4+kde+r144-1  qt5-script-5.15.9-2  qt5-svg-5.15.4+kde+r10-1  qt5-translations-5.15.4+kde+r2-1  qt5-x11extras-5.15.4+kde+r0-1  raspberrypi-bootloader-20220527-1
               raspberrypi-bootloader-x-20220527-1  rav1e-0.4.1-2  rpi4-post-install-20220522-1  samba-4.16.1-3  sdl2-2.0.22-2  smbclient-4.16.1-3  smplayer-22.2.0-2  sound-theme-freedesktop-0.8-5  sqlite-3.38.5-1
               syncthing-1.20.1-1  systemd-251-1  systemd-libs-251-1  systemd-sysvcompat-251-1  unrar-1:6.1.7-1  vulkan-headers-1:1.3.213-1  vulkan-icd-loader-1.3.213-1  xbitmaps-1.1.2-3  xcb-proto-1.15-1
               xcb-util-0.4.0-4  xcb-util-cursor-0.1.3-4  xcb-util-image-0.4.0-4  xcb-util-keysyms-0.4.0-4  xcb-util-renderutil-0.3.9-4  xcb-util-wm-0.4.1-4  xdg-utils-1.1.3+21+g1a58bc2-1
               xfce4-taskmanager-1.5.2.207.gfa7c8dd-1  xfce4-terminal-1.0.4-1  xfsprogs-5.16.0-1  xorg-server-21.1.3-7  xorg-server-common-21.1.3-7  xorg-xkill-1.0.5-3  xorg-xmodmap-1.0.10-3  xorg-xset-1.2.4-3
               xterm-372-2

Total Download Size:     90.58 MiB
Total Installed Size:  1732.84 MiB
Net Upgrade Size:        33.83 MiB

:: Proceed with installation? [Y/n]
:: Retrieving packages...
 mesa-22.0.4-1-aarch64 is up to date
 systemd-251-1-aarch64                                                                                  6.2 MiB  6.74 MiB/s 00:01 [##############################################################################] 100%
 syncthing-1.20.1-1-aarch64                                                                             6.4 MiB  5.66 MiB/s 00:01 [##############################################################################] 100%
 gtk3-1:3.24.34-1-aarch64                                                                               7.1 MiB  5.14 MiB/s 00:01 [##############################################################################] 100%
 samba-4.16.1-3-aarch64                                                                                 7.2 MiB  3.93 MiB/s 00:02 [##############################################################################] 100%
 raspberrypi-bootloader-x-20220527-1-any                                                                3.8 MiB  5.46 MiB/s 00:01 [##############################################################################] 100%
 smbclient-4.16.1-3-aarch64                                                                             5.8 MiB  5.53 MiB/s 00:01 [##############################################################################] 100%
 git-2.36.1-1-aarch64                                                                                   5.9 MiB  4.98 MiB/s 00:01 [##############################################################################] 100%
 smplayer-22.2.0-2-aarch64                                                                              3.2 MiB  6.36 MiB/s 00:01 [##############################################################################] 100%
 raspberrypi-bootloader-20220527-1-any                                                                  8.5 MiB  3.30 MiB/s 00:03 [##############################################################################] 100%
 librsvg-2:2.54.3-1-aarch64                                                                             2.8 MiB  12.4 MiB/s 00:00 [##############################################################################] 100%
 gnupg-2.2.35-2-aarch64                                                                                 2.2 MiB  7.97 MiB/s 00:00 [##############################################################################] 100%
 gnutls-3.7.5-1-aarch64                                                                                 2.6 MiB  6.08 MiB/s 00:00 [##############################################################################] 100%
 sqlite-3.38.5-1-aarch64                                                                             1603.0 KiB  4.45 MiB/s 00:00 [##############################################################################] 100%
 qt5-translations-5.15.4+kde+r2-1-any                                                                1785.9 KiB  4.40 MiB/s 00:00 [##############################################################################] 100%
 lvm2-2.03.16-1-aarch64                                                                              1426.7 KiB  4.98 MiB/s 00:00 [##############################################################################] 100%
 kcoreaddons-5.94.0-1-aarch64                                                                        1316.6 KiB  9.45 MiB/s 00:00 [##############################################################################] 100%
 libxml2-2.9.14-1-aarch64                                                                            1217.1 KiB  8.49 MiB/s 00:00 [##############################################################################] 100%
 kvantum-1.0.2-1-aarch64                                                                             1247.9 KiB  6.48 MiB/s 00:00 [##############################################################################] 100%
 xorg-server-21.1.3-7-aarch64                                                                        1200.2 KiB  5.98 MiB/s 00:00 [##############################################################################] 100%
 linux-api-headers-5.17.5-2-any                                                                      1127.6 KiB  5.29 MiB/s 00:00 [##############################################################################] 100%
 curl-7.83.1-1-aarch64                                                                               1089.8 KiB  7.19 MiB/s 00:00 [##############################################################################] 100%
 xfsprogs-5.16.0-1-aarch64                                                                           1011.5 KiB  7.72 MiB/s 00:00 [##############################################################################] 100%
 libxcb-1.15-1-aarch64                                                                                977.7 KiB  6.82 MiB/s 00:00 [##############################################################################] 100%
 rav1e-0.4.1-2-aarch64                                                                                976.1 KiB  7.69 MiB/s 00:00 [##############################################################################] 100%
 vulkan-headers-1:1.3.213-1-any                                                                       944.1 KiB  5.12 MiB/s 00:00 [##############################################################################] 100%
 openjpeg2-2.5.0-1-aarch64                                                                            933.1 KiB  6.70 MiB/s 00:00 [##############################################################################] 100%
 harfbuzz-4.3.0-1-aarch64                                                                             908.9 KiB  7.16 MiB/s 00:00 [##############################################################################] 100%
 kwindowsystem-5.94.0-1-aarch64                                                                       763.2 KiB  7.45 MiB/s 00:00 [##############################################################################] 100%
 qt5-script-5.15.9-2-aarch64                                                                          753.4 KiB  3.83 MiB/s 00:00 [##############################################################################] 100%
 sdl2-2.0.22-2-aarch64                                                                                750.5 KiB  4.58 MiB/s 00:00 [##############################################################################] 100%
 systemd-libs-251-1-aarch64                                                                           538.5 KiB  8.22 MiB/s 00:00 [##############################################################################] 100%
 kitemmodels-5.94.0-1-aarch64                                                                         633.6 KiB  5.16 MiB/s 00:00 [##############################################################################] 100%
 libunistring-1.0-1-aarch64                                                                           535.4 KiB  5.03 MiB/s 00:00 [##############################################################################] 100%
 hwdata-0.359-1-any                                                                                   439.4 KiB  4.29 MiB/s 00:00 [##############################################################################] 100%
 iptables-1:1.8.8-1-aarch64                                                                           404.4 KiB  3.09 MiB/s 00:00 [##############################################################################] 100%
 xterm-372-2-aarch64                                                                                  386.3 KiB  5.55 MiB/s 00:00 [##############################################################################] 100%
 xfce4-terminal-1.0.4-1-aarch64                                                                       389.7 KiB  2.88 MiB/s 00:00 [##############################################################################] 100%
 libjpeg-turbo-2.1.3-2-aarch64                                                                        326.7 KiB  3.80 MiB/s 00:00 [##############################################################################] 100%
 gmp-6.2.1-2-aarch64                                                                                  367.4 KiB  3.74 MiB/s 00:00 [##############################################################################] 100%
 sound-theme-freedesktop-0.8-5-any                                                                    368.6 KiB  3.33 MiB/s 00:00 [##############################################################################] 100%
 dav1d-1.0.0-1-aarch64                                                                                303.2 KiB  5.69 MiB/s 00:00 [##############################################################################] 100%
 kauth-5.94.0-1-aarch64                                                                               311.7 KiB  3.46 MiB/s 00:00 [##############################################################################] 100%
 luajit-2.1.0.beta3.r407.g4ef96cff-1-aarch64                                                          282.7 KiB  3.83 MiB/s 00:00 [##############################################################################] 100%
 libldap-2.6.2-1-aarch64                                                                              262.9 KiB  2.92 MiB/s 00:00 [##############################################################################] 100%
 device-mapper-2.03.16-1-aarch64                                                                      264.3 KiB  2.15 MiB/s 00:00 [##############################################################################] 100%
 libbpf-0.8.0-1-aarch64                                                                               222.1 KiB  3.01 MiB/s 00:00 [##############################################################################] 100%
 pamac-gtk-10.4.0-2-aarch64                                                                           221.4 KiB  1909 KiB/s 00:00 [##############################################################################] 100%
 graphite-1:1.3.14-2-aarch64                                                                          209.6 KiB  1807 KiB/s 00:00 [##############################################################################] 100%
 libyuv-r2322+3aebf69d-1.1-aarch64                                                                    187.5 KiB  1736 KiB/s 00:00 [##############################################################################] 100%
 f2fs-tools-1.15.0-1-aarch64                                                                          188.3 KiB  1002 KiB/s 00:00 [##############################################################################] 100%
 psmisc-23.5-1-aarch64                                                                                182.0 KiB  3.42 MiB/s 00:00 [##############################################################################] 100%
 libxkbcommon-1.4.1-1-aarch64                                                                         179.2 KiB  2.19 MiB/s 00:00 [##############################################################################] 100%
 gd-2.3.3-4-aarch64                                                                                   140.3 KiB  1754 KiB/s 00:00 [##############################################################################] 100%
 qt5-svg-5.15.4+kde+r10-1-aarch64                                                                     136.1 KiB  2.08 MiB/s 00:00 [##############################################################################] 100%
 pixman-0.40.0-2-aarch64                                                                              139.7 KiB  1838 KiB/s 00:00 [##############################################################################] 100%
 unrar-1:6.1.7-1-aarch64                                                                              128.9 KiB  2.42 MiB/s 00:00 [##############################################################################] 100%
 fuse3-3.11.0-1-aarch64                                                                               110.1 KiB  1620 KiB/s 00:00 [##############################################################################] 100%
 xcb-proto-1.15-1-any                                                                                 108.9 KiB  1702 KiB/s 00:00 [##############################################################################] 100%
 vulkan-icd-loader-1.3.213-1-aarch64                                                                  108.4 KiB  1594 KiB/s 00:00 [##############################################################################] 100%
 libavif-0.10.1-1-aarch64                                                                             103.4 KiB  1361 KiB/s 00:00 [##############################################################################] 100%
 xfce4-taskmanager-1.5.2.207.gfa7c8dd-1-aarch64                                                       100.5 KiB  2.45 MiB/s 00:00 [##############################################################################] 100%
 libxext-1.3.4-4-aarch64                                                                              102.4 KiB  2.08 MiB/s 00:00 [##############################################################################] 100%
 libice-1.0.10-4-aarch64                                                                               72.5 KiB  1649 KiB/s 00:00 [##############################################################################] 100%
 pamac-cli-10.4.0-2-aarch64                                                                            83.5 KiB  1739 KiB/s 00:00 [##############################################################################] 100%
 libxmu-1.1.3-3-aarch64                                                                                71.4 KiB   777 KiB/s 00:00 [##############################################################################] 100%
 mobile-broadband-provider-info-20220511-1-any                                                         60.4 KiB  1677 KiB/s 00:00 [##############################################################################] 100%
 libxkbfile-1.1.0-3-aarch64                                                                            68.0 KiB  1545 KiB/s 00:00 [##############################################################################] 100%
 xdg-utils-1.1.3+21+g1a58bc2-1-any                                                                     55.6 KiB  1263 KiB/s 00:00 [##############################################################################] 100%
 libxpm-3.5.13-3-aarch64                                                                               49.8 KiB  1244 KiB/s 00:00 [##############################################################################] 100%
 libnotify-0.7.12-1-aarch64                                                                            50.9 KiB   910 KiB/s 00:00 [##############################################################################] 100%
 libsm-1.2.3-3-aarch64                                                                                 42.7 KiB  1185 KiB/s 00:00 [##############################################################################] 100%
 libxv-1.0.11-5-aarch64                                                                                34.6 KiB   961 KiB/s 00:00 [##############################################################################] 100%
 libxtst-1.2.3-5-aarch64                                                                               28.2 KiB  1006 KiB/s 00:00 [##############################################################################] 100%
 xcb-util-wm-0.4.1-4-aarch64                                                                           31.1 KiB   299 KiB/s 00:00 [##############################################################################] 100%
 linux-firmware-whence-20220509.b19cbdc-1-any                                                          27.5 KiB   255 KiB/s 00:00 [##############################################################################] 100%
 xbitmaps-1.1.2-3-any                                                                                  25.1 KiB   898 KiB/s 00:00 [##############################################################################] 100%
 libxdmcp-1.1.3-4-aarch64                                                                              25.7 KiB   803 KiB/s 00:00 [##############################################################################] 100%
 xorg-server-common-21.1.3-7-aarch64                                                                   26.7 KiB   740 KiB/s 00:00 [##############################################################################] 100%
 libxrandr-1.5.2-4-aarch64                                                                             24.9 KiB   889 KiB/s 00:00 [##############################################################################] 100%
 libxrender-0.9.10-5-aarch64                                                                           23.1 KiB   720 KiB/s 00:00 [##############################################################################] 100%
 libxkbcommon-x11-1.4.1-1-aarch64                                                                      22.6 KiB  1132 KiB/s 00:00 [##############################################################################] 100%
 xorg-xmodmap-1.0.10-3-aarch64                                                                         21.5 KiB  1073 KiB/s 00:00 [##############################################################################] 100%
 libpciaccess-0.16-3-aarch64                                                                           19.8 KiB   826 KiB/s 00:00 [##############################################################################] 100%
 xorg-xset-1.2.4-3-aarch64                                                                             18.1 KiB   645 KiB/s 00:00 [##############################################################################] 100%
 xcb-util-image-0.4.0-4-aarch64                                                                        16.6 KiB   319 KiB/s 00:00 [##############################################################################] 100%
 mtdev-1.1.6-2-aarch64                                                                                 16.0 KiB   570 KiB/s 00:00 [##############################################################################] 100%
 gtk-update-icon-cache-1:4.6.4-1-aarch64                                                               15.8 KiB   328 KiB/s 00:00 [##############################################################################] 100%
 libxxf86vm-1.1.4-5-aarch64                                                                            14.9 KiB   531 KiB/s 00:00 [##############################################################################] 100%
 libasyncns-1:0.8+r3+g68cd5af-1-aarch64                                                                15.6 KiB   354 KiB/s 00:00 [##############################################################################] 100%
 qt5-x11extras-5.15.4+kde+r0-1-aarch64                                                                 13.9 KiB   581 KiB/s 00:00 [##############################################################################] 100%
 libxss-1.2.3-4-aarch64                                                                                13.6 KiB   565 KiB/s 00:00 [##############################################################################] 100%
 xcb-util-0.4.0-4-aarch64                                                                              11.4 KiB   285 KiB/s 00:00 [##############################################################################] 100%
 libxcomposite-0.4.5-4-aarch64                                                                         11.0 KiB   457 KiB/s 00:00 [##############################################################################] 100%
 xcb-util-cursor-0.1.3-4-aarch64                                                                       11.0 KiB   229 KiB/s 00:00 [##############################################################################] 100%
 libxau-1.0.9-4-aarch64                                                                                10.6 KiB   378 KiB/s 00:00 [##############################################################################] 100%
 libxinerama-1.1.4-4-aarch64                                                                            9.6 KiB   299 KiB/s 00:00 [##############################################################################] 100%
 xcb-util-renderutil-0.3.9-4-aarch64                                                                    9.1 KiB   326 KiB/s 00:00 [##############################################################################] 100%
 xorg-xkill-1.0.5-3-aarch64                                                                             8.8 KiB   441 KiB/s 00:00 [##############################################################################] 100%
 xcb-util-keysyms-0.4.0-4-aarch64                                                                       7.8 KiB   218 KiB/s 00:00 [##############################################################################] 100%
 libxdamage-1.1.5-4-aarch64                                                                             6.8 KiB   243 KiB/s 00:00 [##############################################################################] 100%
 libxshmfence-1.3-3-aarch64                                                                             5.6 KiB   155 KiB/s 00:00 [##############################################################################] 100%
 systemd-sysvcompat-251-1-aarch64                                                                       5.6 KiB   155 KiB/s 00:00 [##############################################################################] 100%
 rpi4-post-install-20220522-1-any                                                                       3.5 KiB  88.0 KiB/s 00:00 [##############################################################################] 100%
 fuse-common-3.11.0-1-aarch64                                                                           2.7 KiB  94.7 KiB/s 00:00 [##############################################################################] 100%
 Total (105/105)                                                                                       90.6 MiB  16.4 MiB/s 00:06 [##############################################################################] 100%
(115/115) checking keys in keyring                                                                                                [##############################################################################] 100%
(115/115) checking package integrity                                                                                              [##############################################################################] 100%
(115/115) loading package files                                                                                                   [##############################################################################] 100%
(115/115) checking for file conflicts                                                                                             [##############################################################################] 100%
(115/115) checking available disk space                                                                                           [##############################################################################] 100%
:: Processing package changes...
(  1/115) upgrading archlinux-appstream-data                                                                                      [##############################################################################] 100%
(  2/115) upgrading linux-api-headers                                                                                             [##############################################################################] 100%
(  3/115) upgrading libldap                                                                                                       [##############################################################################] 100%
(  4/115) upgrading systemd-libs                                                                                                  [##############################################################################] 100%
(  5/115) upgrading gmp                                                                                                           [##############################################################################] 100%
(  6/115) upgrading libunistring                                                                                                  [##############################################################################] 100%
(  7/115) upgrading curl                                                                                                          [##############################################################################] 100%
(  8/115) upgrading dav1d                                                                                                         [##############################################################################] 100%
(  9/115) upgrading device-mapper                                                                                                 [##############################################################################] 100%
( 10/115) upgrading f2fs-tools                                                                                                    [##############################################################################] 100%
( 11/115) upgrading gnutls                                                                                                        [##############################################################################] 100%
New optional dependencies for gnutls
    tpm2-tss: support for TPM2 wrapped keys [installed]
    zstd: for compression support [installed]
( 12/115) upgrading graphite                                                                                                      [##############################################################################] 100%
( 13/115) upgrading harfbuzz                                                                                                      [##############################################################################] 100%
( 14/115) upgrading libxml2                                                                                                       [##############################################################################] 100%
( 15/115) upgrading xcb-proto                                                                                                     [##############################################################################] 100%
( 16/115) upgrading libxdmcp                                                                                                      [##############################################################################] 100%
( 17/115) upgrading libxau                                                                                                        [##############################################################################] 100%
( 18/115) upgrading libxcb                                                                                                        [##############################################################################] 100%
( 19/115) upgrading libxext                                                                                                       [##############################################################################] 100%
( 20/115) upgrading libxrender                                                                                                    [##############################################################################] 100%
( 21/115) upgrading pixman                                                                                                        [##############################################################################] 100%
( 22/115) upgrading libjpeg-turbo                                                                                                 [##############################################################################] 100%
( 23/115) upgrading librsvg                                                                                                       [##############################################################################] 100%
( 24/115) upgrading libxv                                                                                                         [##############################################################################] 100%
( 25/115) upgrading openjpeg2                                                                                                     [##############################################################################] 100%
( 26/115) upgrading libxdamage                                                                                                    [##############################################################################] 100%
( 27/115) upgrading libxxf86vm                                                                                                    [##############################################################################] 100%
( 28/115) upgrading libxshmfence                                                                                                  [##############################################################################] 100%
( 29/115) upgrading llvm-libs                                                                                                     [##############################################################################] 100%
( 30/115) upgrading vulkan-icd-loader                                                                                             [##############################################################################] 100%
( 31/115) upgrading libpciaccess                                                                                                  [##############################################################################] 100%
( 32/115) upgrading mesa                                                                                                          [##############################################################################] 100%
( 33/115) upgrading sdl2                                                                                                          [##############################################################################] 100%
( 34/115) upgrading libasyncns                                                                                                    [##############################################################################] 100%
( 35/115) upgrading libice                                                                                                        [##############################################################################] 100%
( 36/115) upgrading libsm                                                                                                         [##############################################################################] 100%
( 37/115) upgrading hwdata                                                                                                        [##############################################################################] 100%
( 38/115) upgrading iptables                                                                                                      [##############################################################################] 100%
( 39/115) upgrading systemd                                                                                                       [##############################################################################] 100%
( 40/115) upgrading ffmpeg                                                                                                     [############################################################################] 100%
( 41/115) upgrading libxinerama                                                                                                [############################################################################] 100%
( 42/115) upgrading libxrandr                                                                                                  [############################################################################] 100%
( 43/115) upgrading libxcomposite                                                                                              [############################################################################] 100%
( 44/115) upgrading libxkbcommon                                                                                               [############################################################################] 100%
( 45/115) upgrading gtk-update-icon-cache                                                                                      [############################################################################] 100%
( 46/115) upgrading libxtst                                                                                                    [############################################################################] 100%
( 47/115) upgrading sqlite                                                                                                     [############################################################################] 100%
( 48/115) upgrading gtk3                                                                                                       [############################################################################] 100%
( 49/115) upgrading noto-fonts                                                                                                 [############################################################################] 100%
( 50/115) upgrading firefox                                                                                                    [############################################################################] 100%
( 51/115) upgrading fuse-common                                                                                                [############################################################################] 100%
( 52/115) upgrading fuse3                                                                                                      [############################################################################] 100%
( 53/115) upgrading libxpm                                                                                                     [############################################################################] 100%
( 54/115) installing rav1e                                                                                                     [############################################################################] 100%
( 55/115) installing libyuv                                                                                                    [############################################################################] 100%
( 56/115) installing libavif                                                                                                   [############################################################################] 100%
( 57/115) upgrading gd                                                                                                         [############################################################################] 100%
( 58/115) upgrading git                                                                                                        [############################################################################] 100%
( 59/115) upgrading gnupg                                                                                                      [############################################################################] 100%
( 60/115) upgrading xcb-util-keysyms                                                                                           [############################################################################] 100%
( 61/115) upgrading xcb-util-renderutil                                                                                        [############################################################################] 100%
( 62/115) upgrading libxmu                                                                                                     [############################################################################] 100%
( 63/115) upgrading xorg-xset                                                                                                  [############################################################################] 100%
( 64/115) upgrading xdg-utils                                                                                                  [############################################################################] 100%
( 65/115) upgrading xcb-util-wm                                                                                                [############################################################################] 100%
( 66/115) upgrading xcb-util                                                                                                   [############################################################################] 100%
( 67/115) upgrading xcb-util-image                                                                                             [############################################################################] 100%
( 68/115) upgrading libxkbcommon-x11                                                                                           [############################################################################] 100%
( 69/115) upgrading qt5-translations                                                                                           [############################################################################] 100%
( 70/115) upgrading mtdev                                                                                                      [############################################################################] 100%
( 71/115) upgrading qt5-base                                                                                                   [############################################################################] 100%
( 72/115) upgrading kcoreaddons                                                                                                [############################################################################] 100%
( 73/115) upgrading kauth                                                                                                      [############################################################################] 100%
( 74/115) upgrading kitemmodels                                                                                                [############################################################################] 100%
( 75/115) upgrading qt5-svg                                                                                                    [############################################################################] 100%
( 76/115) upgrading qt5-x11extras                                                                                              [############################################################################] 100%
( 77/115) upgrading kwindowsystem                                                                                              [############################################################################] 100%
( 78/115) upgrading kvantum                                                                                                    [############################################################################] 100%
New optional dependencies for kvantum
    qt6-svg: Qt6 style [installed]
( 79/115) upgrading libbpf                                                                                                     [############################################################################] 100%
( 80/115) upgrading libnotify                                                                                                  [############################################################################] 100%
( 81/115) upgrading libxkbfile                                                                                                 [############################################################################] 100%
( 82/115) upgrading libxss                                                                                                     [############################################################################] 100%
( 83/115) upgrading linux-firmware-whence                                                                                      [############################################################################] 100%
( 84/115) upgrading linux-firmware                                                                                             [############################################################################] 100%
error: could not extract /usr/lib/firmware/amdgpu/navy_flounder_vcn.bin (Lzma library error: Corrupted input data)
error: problem occurred while upgrading linux-firmware
error: could not commit transaction
error: failed to commit transaction (transaction aborted)
Errors occurred, no packages were upgraded.
[adam@drizzle ~]$ sudo pacman -Syu
sudo: error in /etc/sudo.conf, line 0 while loading plugin "sudoers_policy"
sudo: unable to load /usr/lib/sudo/sudoers.so: /usr/lib/libldap.so.2: invalid ELF header
sudo: fatal error, unable to load plugins
[adam@drizzle ~]$ su
Password: 
Segmentation fault (core dumped)

I’m in a pickle. Any suggestions how to get the system back up and running? I have a lot of hours spent tuning the config set up there for fail2ban, nfs, ssh, syncthing and additional stuff. I really don’t want to start from scratch again :-).

Is there some way to create system snapshots so dodgy upgrades can’t corrupt the system in the future?

Thanks!

@Darksky any ideas what happened?

Looks like your problem started here and aborted the install process. I do not see any kernel wanting to install. Have you frozen the kernel updates? What comes to mind is arch-arm changed up the linux-firmware with some compressed firmware and at the same time some additional modules had to be enabled in the kernel to handle it.

1 Like

I downloaded the Raspberry PI 4 image about two weeks ago. This is the first OS I loaded on the PI since receiving the device through the mail and I didn’t upgrade the firmware on it.

This was the first time I attempted updating Manjaro.

I have not (knowingly) frozen any kernel updates.

If helpful, I should be able to provide select files from SD card or a whole tarball by mounting the SD card’s root file system on another device.

The only other thing I can think of other than a bad sdcard is excessive overclocking can cause data corruption.

Try changing user to root and update again. Or maybe insert sdcard into PC and try chrooting with systemd-nspawn.

Edit: Just saw ‘su’ doesn’t work either. :man_shrugging:

This definitely looks like corrupted sdcard.

Please dont tell me that you used the cheap sdcard provided in a bundle package along with rpi.

Most of the time its the sdcard dying when under load or extracting large data. Where linux-firmware is not very large but big enough to kill a counterfeit cheap sdcard.

1 Like

The SD card I have is a SanDisk Extreme Pro 128GB microSDXC - not the cheap one that came in the kit box.

Are there a few files that I can overwrite and get things rolling again? Should I reinstall and reconfigure all from scratch again?

I’ll mount the card on a PC and check if it’s any good. I found a blig mentioning badblocks. Is that a good recommendation in this case?

Going back to my previous question: Is there a way I could have avoided this? Different filesystem (would btrfs have helped?). Some checkpointing setting during updates? Is there a tool to continuously back up the system to an external drive in case I lose the OS again?

First, backup anything important and check sdcard with fsck.
Then try with systemd-nspawn, but then again if something is broken, then it will probably be broken in nspawn.
Next thing I’d try is reinstall ARM packages with pacman --sysroot, but then again, I don’t know how this works from x64 → ARM.
And as a last resort you can try overwriting files manually.

There are plenty. I use borg/borgmatic.