Unable to chroot into system after failed update

Hello!

A botched update left my system unbootable. A little bit of forum browsing told me to do a live-boot and then using chroot and resume the update. Sadly, I run into a dead end pretty early on because manjaro-chroot -a was met with chroot: failed to run command `/bin/bash': Exec format error -message. A little bit of searching revealed that this error is supposedly caused by a missmatch of bitness, but both my system and the iso I’m live-booting (manjaro-xfce-25.0.10-251013-linux612.iso) are x86_64, so that’s not the case.

Any hint how to proceed would be appreciated. I apologize if I’m leaving out crucial informations, I’m pretty new to this.

You might receive faster and better help if you provide the necessary information:

inxi -czv8
3 Likes

Welcome to the forum! :vulcan_salute:

Please read the HowTo at the link below… :backhand_index_pointing_down:

Then perhaps these following links will help. :wink: :backhand_index_pointing_down:


Tips and Tricks

How to Request Support

Resources


Tip:

As a new member, you may want to subscribe to notifications for the Announcements > Stable Updates category. Every bundled update, whether it’s for Manjaro Testing or Manjaro Stable, always comes accompanied by a dedicated announcement thread.

  • The first post of the thread contains the changes with regard to the previous bundled update.

  • The second post of the thread details the potential problems, and how to deal with them.

  • The announcement thread also always contains a poll (in the first post), and a summary of past issues (in the second post), for those who’ve skipped an update — which is not advised with a rolling-release distribution, but it does happen. :wink:

3 Likes

Are you using ext4 or btrfs as your filesystem?

  • manjaro-chroot -a does not (yet) work with btrfs.

The link given by @Aragorn includes a description of how to enter a chroot environment manually. If your system is btrfs then you will need to pay attention to that information.

5 Likes

Speculation:

the error might mean that the bash executable in your system is “broken” by the “botched update”.
(and it may not be the only thing that is “damaged” in some way)

When you chroot, this one is the one that is used and needs to be there.

You could verify this in different ways.

Boot the ISO from USB.

First thing to do then is run a file system check.
Maybe that is all that is needed.

sudo fsck -v /dev/sdxY

depending on the result, proceed


Then mount it,
and look at this file (the bash executable)

  • compare it with what is supposed to be there - the package is likely in the cache
    /var/cache/pacman/pkg

If anything is different, replace with what is in the package from cache.

Easier to do than to describe how to do it step by step.
It would have been done by now if this was my system. :wink:

The absolute easiest would be to restore from backup or from a snapshot.

4 Likes

Thank you for the welcome and the links. I do tend to search before posting issues, but sometimes I suck at searching. :wink:

That turned out to be 100% correct. I had to reinstall pacman and replace all the corrupted system libraries. The system is bootable now and I can’t detect any obvious problems with it.

Thank you all for the help. :slightly_smiling_face:

1 Like

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