# System crashed during update, how f'd am I

**URL:** <https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705>\
**Category:** Kernel, boot, graphics & hardware\
**Created:** [March 18, 2024, 2:50pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705 "2024-03-18T14:50:34Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![lew](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/l/8e7dd6/32.png) [@lew](https://forum.endeavouros.com/u/lew)\
**Post date:** [March 18, 2024, 2:50pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705/1 "2024-03-18T14:50:35Z")

</div>

tl;dr: Hard shutdown during update let to missing `/boot/vmlinuz-linux`, cannot install anything using `pacman` from live-USB. Is there any hope?

Earlier today I ran `yay -Syyu` and my laptop froze while applying the update (unfortunately I did not record when exactly). It completely stopped responding so after about 15 minutes I thought I had no choice except to do a hard shutdown.  
Now when I try to boot I am greeted by `file: /boot/vmlinuz-linux not found`.

A similar issue was [solved on the forum](https://forum.endeavouros.com/t/boot-vmlinuz-linux-not-found/37519) by arch-chrooting from a live-usb and reinstalling linux.

So I tried that, I’m dual booting with windows and the EOS partition is encrypted. So from the live-install I ran `udiskctl unlock -b /dev/PA` (where `PA` is that partition), and `mount /dev/mapper/... /mnt`.  
Then I used `cat /mnt/etc/fstab` to find out that my ESP should be mounted under `/boot/efi`, so I ran `mount /dev/PS /mnt/boot/efi` (where `PS` is the SYSTEM/FAT32` partition that I assume was my ESP).

Unfortunately when I `arch-chroot` into `/mnt` running `pacman` or `yay` does nothing. The exit code is `0` but there is not output.

I figured this means that `pacman` was also broken during the interrupted update. [From this thead on the arch forums](https://bbs.archlinux.org/viewtopic.php?id=200675) I got the idea to use `pacman --root`, but after looking at the man page I decided to try with `--sysroot`, to reinstall it.  
However, (running from the live system) this fails with

```sh
(1/1) checking keys in keyring
error: GPGME error: Invalid crypto engine
(1/1) checking package integrity
error: GPGME error: Invalid crypto engine`
error: pacman: missing required signatures

```

It then asks me if I want to remove the corrupted cached `.pkg.tar.zst` file, but regardless of my answer it then fails.

Ducking this I found [some reddit threads with similar problems](https://www.reddit.com/r/archlinux/comments/xwihld/need_help_with_pacman_and_gpgme_errors/), however I was unable to really try the solution since `pacman-key` also does nothing on the arch-chrooted system.

Installing anything else with `pacman --sysroot` fails in the same way, so I decided to [turn off signature checking in `/etc/pacman.conf`](https://archlinux.org/pacman/pacman.conf.5.html#SC) in the live system, but this had no effect on the error I get when trying to install something.

---

<div class="post-metadata">

**Author:** ![lew](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/l/8e7dd6/32.png) [@lew](https://forum.endeavouros.com/u/lew)\
**Post date:** [March 18, 2024, 2:57pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705/2 "2024-03-18T14:57:42Z")

</div>

As I was writing this I figured I might as well give `pacman --root /mnt` a shot too. This actually fails differently, namely when checking for conflicting files.  
I am tempted to use the `--overwrite` option, but I’m worried that this will mess things up even more. There are _a lot_ of conflicting files though, so moving them to backup seems somewhat impractical.  
How stupid would it be to try `--overwrite`.?

---

<div class="post-metadata">

**Author:** ![ricklinux](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/ricklinux/32/110798_2.png) [@ricklinux](https://forum.endeavouros.com/u/ricklinux)\
**Post date:** [March 18, 2024, 3:03pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705/3 "2024-03-18T15:03:01Z")

</div>

I think it would be best to use the live ISO and arch-chroot and then re-run the updates.

Edit: [https://discovery.endeavouros.com/?s=arch-chroot](https://discovery.endeavouros.com/?s=arch-chroot)

---

<div class="post-metadata">

**Author:** ![lew](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/l/8e7dd6/32.png) [@lew](https://forum.endeavouros.com/u/lew)\
**Post date:** [March 18, 2024, 3:15pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705/4 "2024-03-18T15:15:53Z")

</div>

That’s what I tried to describe doing in my post.

I can’t arch-chroot and then update because pacman does nothing.  
I can’t update from the live USB with `pacman --sysroot` because of `error: GPGME error: Invalid crypto engine`  
And I’m not sure if it’s smart to update from the live USB with `pacman --root --overwrite "*"`.

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [March 18, 2024, 3:22pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705/5 "2024-03-18T15:22:24Z")

</div>

For a very similar case, please read through the whole of this topic and hopefully with enough patience and perseverance, you will be able to recover your system like the OP of that thread did:

> [@Kernel panic during update / issues with pacman sysroot](https://forum.endeavouros.com/t/kernel-panic-during-update-issues-with-pacman-sysroot/52530):
>
> During my last update via yay (so pacman -Syu) I ran into a kernel panic, the last output was (56/56) upgrading yay :: Running post-transaction hooks... ( 1/16) Creating system user accounts... ( 2/16) Reloading system manager configuration... After a hard reboot I am getting (shortened a little where ...) Kernel panic - not syncing: Attempted to kill init! exitcode=0x00007f00 CPU: 2 PID: 1 Comm: systend Tainted: P Hardware name: ........................................... 5.7.9 arch1-1 #1 ad…

---

<div class="post-metadata">

**Author:** ![lew](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/l/8e7dd6/32.png) [@lew](https://forum.endeavouros.com/u/lew)\
**Post date:** [March 18, 2024, 3:25pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705/6 "2024-03-18T15:25:44Z")

</div>

Since I didn’t see any other options and pacman on the actual install is broken anyway, I decided to try running `pacman --root /mnt -S pacman` from the live-USB, which resulted in the following output.

```auto
...
(4/4) Checking which packages need to be rebuilt
pacman: error while leading shared libraries: /usr/lib/libbz2.so.1.0: file too short
pacman: error while leading shared libraries: /usr/lib/libbz2.so.1.0: file too short
pacman: error while leading shared libraries: /usr/lib/libbz2.so.1.0: file too short
pacman: error while leading shared libraries: /usr/lib/libbz2.so.1.0: file too short

```

When I now run `pacman` while arch-chrooted into the installed system I get that same error

```auto
pacman: error while leading shared libraries: /usr/lib/libbz2.so.1.0: file too short

```

---

<div class="post-metadata">

**Author:** ![lew](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/l/8e7dd6/32.png) [@lew](https://forum.endeavouros.com/u/lew)\
**Post date:** [March 18, 2024, 3:26pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705/7 "2024-03-18T15:26:37Z")

</div>

Thanks a lot, that looks similar to my problem. I’m pretty sure my initial update also froze at

```auto
( 2/16) Reloading system manager configuration...

```

---

<div class="post-metadata">

**Author:** ![lew](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/l/8e7dd6/32.png) [@lew](https://forum.endeavouros.com/u/lew)\
**Post date:** [March 18, 2024, 4:30pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705/8 "2024-03-18T16:30:33Z")

</div>

My system is back up and running and the issue seems to be resolved.

To summarise what I eventually did:  
I booted from a live-USB and mounted my root and efi partitions. Then I used the `pacman` install from the live USB to reinstall pacman on the laptop with `sudo pacman --root /mnt --overwrite "*" -S pacman`.  
At this point I was able to at least get some output from running `pacman` in the `chroot`-ed system, but it was just errors about libraries in `/usr/lib` being too short.  
Lucky after just reinstalling one of them `pacman` worked again and I was able to get a list of all the packages installed on my system with `pacman -Qqn`.  
I used that list to reinstall every package from the live-USB

```auto
cat /mnt/package_list | sudo pacman --root /mnt --overwrite "*" -S -

```

Thanks [pebcak](https://forum.endeavouros.com/u/pebcak) for that very helpful link and thanks [ricklinux](https://forum.endeavouros.com/u/ricklinux), your solution in said link also worked for me.

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [March 18, 2024, 4:34pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705/9 "2024-03-18T16:34:39Z")

</div>

Very nicely resolved! Glad that you got your system back up and running!

:enos: 👋🏾

---

<div class="post-metadata">

**Author:** ![lew](https://forum.endeavouros.com/letter_avatar_proxy/v4/letter/l/8e7dd6/32.png) [@lew](https://forum.endeavouros.com/u/lew)\
**Post date:** [March 18, 2024, 5:11pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705/10 "2024-03-18T17:11:14Z")

</div>

Thanks 🙂 It’s really amazing how good the arch toolbox is! I was all but certain that I’d have to reinstall the entire system and restore everything from backup.

---

<div class="post-metadata">

**Author:** ![pebcak](https://forum.endeavouros.com/user_avatar/forum.endeavouros.com/pebcak/32/100472_2.png) [@pebcak](https://forum.endeavouros.com/u/pebcak)\
**Post date:** [March 18, 2024, 5:16pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705/11 "2024-03-18T17:16:26Z")

</div>

Yes it is really amazing!

The tools and the ArchWiki, an unbeatable combination.

Truly impressive that a system so seemingly utterly broken as to warrant a a reinstallation can be rescued and function normally as if the breakage never had occurred.

---

<div class="post-metadata">

**Author:** ![system](https://forum.endeavouros.com/uploads/default/original/2X/9/9ea52f9fd5ef8e609e593c362d61a36295f48be8.png) [@system](https://forum.endeavouros.com/u/system)\
**Post date:** [March 20, 2024, 5:16pm UTC](https://forum.endeavouros.com/t/system-crashed-during-update-how-fd-am-i/52705/12 "2024-03-20T17:16:43Z")

</div>

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.
