Yet Another Booting after interrupted update problem

Hello!
After having an update crash in the middle and forcing a reboot, my Manjaro installation is refusing to boot. I’m getting the messages seen at the imgur photo manjaro-boot-fails-OV6bqJQ

So far I’ve tried booting into a live USB, doing manjaro-chroot -a and pacman-mirrors -f && pacman -Syyu. pacman reported that everything was up to date, nothing to do.

I can add 3 to the grub boot line, which does get me to a CLI login screen, but not much works from there, including that sudo seems to have no effect and dbus is not running.

Any help is definitely appreciated!

Thanks.

Just running ‘update’ again wont necessarily fix anything.

This is the basic guide.

Which I thought provided some more steps than that … but it seems the only addition is ‘update-grub’, which may or may not even be present on newer systems.

It would also make sense to rebuild initramfs, so I will rehash the steps after chroot here;

pacman-mirrors -f
pacman -Syu
mkinitcpio -P
grub-mkconfig -o /boot/grub/grub.cfg

The final line is equal to ‘update-grub’.

I might suggest also checking /var/log/pacman.log to see where/when the interruption actually occurred.

(becuase you may have to cleanly reinstall certain packages)

3 Likes

Thanks for the reply and the help!

I forgot to mention that I did try update-grub before as suggested in the post that you linked to.

I ran the steps you suggested and I got a bunch of errors from ldconfig saying “File /usr/lib/ is empty, not checked” but otherwise it finished without a problem.

And now when I try to boot the bootloader can’t decrypt my harddrive, though the live USB still can.

EDIT - Oh, and I did look at the pacman log but the transaction that I thought was running when the computer crashed appears to have completed mostly successfully, though I don’t see a “Transaction completed” line at the end of it.

Thats the kind of thing you will need to investigate and handle. Line by line.

You can check for the package owning each of those files with

pacman -Qo /path/to/file

To do a full check my suggestion is probably something like

sudo pacman -Qkk | grep -v '0 altered files' > packagecheck

Now that will still print a bunch of stuff not extremely useful to you.

So I would also ignore the lines that have to do with time/permission/etc mismatches
(most if not all of these will be a non-issue)

grep -v mismatch packagecheck

Which will probably still include not so necessary to this specific situation packages.

We can choose to include them in the following steps, or whittle the list even further by looking for ‘mtree’ lines, which are likely all packages related to your issue.

grep mtree packagecheck

However you do it you will want to formulate a list and reinstall those packages.

I will assume ‘firefox’ for convenience.

I would suggest clearing your cache first.
You could opt to remove the offenders explicitly using either a tool or just rm;

paccache -rvk0 firefox

OR

sudo rm /var/cache/pacman/pkg/firefox*

OR you can just clear the cache as a whole

sudo pacman -Sc

But once the cache of the problem package(s) is removed then reinstall the package(s).

sudo pacman -Syu firefox

Do note you can write all packages on that line.

Ok, I ran the pacman -Qkk line and ended up with a big file. grep mtree | wc -l on that file gives me 172. When I try to run pacman -Syu on any of those packages, though, I get a line for each file in the package saying it already exists in the filesystem, then “Errors occurred, no packages were upgraded.”

I was expecting that.

The reason I didnt write a step for it was that I wanted to target the path as closely as possible.

Because while it will work, we generally try to avoid (still using ff example)

sudo pacman -Syu firefox --overwrite '*'

And would rather use

sudo pacman -Syu firefox --overwrite '/path/to/some/file'

Or at the very least

sudo pacman -Syu firefox --overwrite '/more/general/path/*'

With your large list it may be difficult to use something that is not very broad though.