Upgrade aborted & broken, need help trying to repair the damage

I’m approaching this problem from many angles and I’m stuck – need advice.

What happened? I ran ‘yay’ as I normally do. About 15 minutes into the upgrade, which I think included the new kernel, I had an emergency call and decided to CONTROL-BREAK the installation and then power down. Apparently that really broke things because the system was booting with errors like “ModemManager not found” etc.

Here’s the thing, this Manjaro installation is on a 128GB USB. In order to try to fix some of the corrupted files, I installed Manjaro ALSO on the main hard disk of the PC, which is what I’m using to write this. I am able to mount the broken 128GB Manjaro installation and copy missing/broken files over there.

The broken installation still won’t boot, BUT I can press Alt-F3 to get into emergency mode. Unfortunately, while in emergency mode, I can’t get access to the Internet to run pacman or pamac or yay. I tried using nmcli to connect but it doesn’t see my wifi device. I even tried booting into older kernels, but I still have to use emergency mode, and still ifconfig doesn’t show my wifi device.

The wifi device works fine when I boot from the main hard disk, which is what I’m using now to write this. I figure if I can get nmcli to connect to wifi, then I can run a package manager and hopefully that will sort out whatever was broken in the first place.

I’m able to move files between the USB and the HD no problem. I’m wondering if there’s a way to boot into the HD, and then run pacman, pamac or yay to repair the Manjaro installation on the USB.

FWIW at least I have all my files on the USB, but it’s really upsetting if I have to start over from scratch and reinstall and configure all my applications, etc. I would really like to get that USB to boot normally or at least get it to connect to the Internet. I suspect there are some problems in /usr/lib, like missing files, or the wrong files for the wrong kernel.

Emergecy mode really sucks because I can’t scroll back, and less and more do not work. I’m thinking maybe I need to find the hidden boot errors and fix them one at a time until the USB boots correctly. Any tips? Suggestions?

the moved files could be a problem… this could be easily fixed from chroot… so boot into manjaro live usb, connect to internet and chroot:
manjaro-chroot -a
rerun update again:
pacman-mirrors --fasttrack 5 && pacman -Syyu
any errors from this?

I’ll try it.

I don’t have manjaro-chroot “command not found” lol OK I see it in manjaro-tools

you trying it from your installation, told you to use manjaro live usb… however it should prompt you for installing the manjaro tools, so do that and try chrooting again - it should also work from your installation

I think manjaro-chroot was what I needed. Now I’m able to get in there with an Internet connection. Thanks!

so rerun the update again on the broken installation, and post any errors here

I’ll reply here if I get stuck again, or come up with some kind of a solution.

I spent several hours on this and the whole system is FUBAR from what I can tell. I couldn’t even install pacman-mirrors, had to use shiny-mirrors, although that wasn’t the real issue.

pacman -Syyu ran fine, as if the system was OK. Which it wasn’t. Unfortunately, it seems like Pacman is incapable of diagnosing or repairing itself and error reporting is not that good, in my opinion. For example, installing something fails with tons of verbosity but no error message, and then “debug” mode shows all kinds of irrelevant errors, and none of them appear in Google, other than the non-solution: “You probably aborted an upgrade, don’t do that.”

I wish there was some kind of tool to check everything under /usr for obvious problems and then do repairs.

I usually have great success with pamac when all else fails, but this time I couldn’t even get pamac to install.

Testing any changes takes forever because I have to reboot into grub, then select the broken install, wait for failure (wondering if I fixed something) then press alt-f3, try some ideas, test some things, give up, then boot into the working installation, try some more ideas, etc. And do that over and over again. I don’t have time for this. Going to start over. At least I can still access my old files.

pacman -Qk and pacman -Qkk were not really helpful (too much or too little info) and pacman itself seemed to be messed up for some packages and not others.

I guess the moral of the story, don’t press CONTROL-C during an upgrade, because sometimes it won’t fail gracefully and you won’t really know what’s broken. Then spend hours chasing down inconsequential errors that make no difference. LOL.

FWIW I don’t give up easily, but this time I have some other urgent priorities :slight_smile:

post the output from pacman when you try installing something… we need outputs

1 Like

Try to reinstsll all installed packages when chrooted:

$ pacman -Qq | pacman -Syu -
1 Like