Manjaro-chroot -a fails when I try to recover my system

Hello,

my troubles started when I could not update the whole system in one go, as there were some dependencies which made the update fail. Thus I’ve been updating individual packets (and groups of packets) in the order of dependencies and this worked for a while. Sometimes it requested me to reboot the system and at one of these reboots it could not boot anymore (there were 3 errors, but I did not memorize the names). I think this happened when Ihad updated some nvidia things.

This was not the first time updates broke my system, therefore I knew I can recover it with a manjaro “live-usb” stick. But this time, when I try to “manjaro-chroot -a” it fails:

   ~  manjaro-chroot -a                                                ✔ 
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
grub-probe: error: cannot find a GRUB drive for /dev/sda1.  Check your device.map.
==> Mounting (ManjaroLinux) [/dev/nvme0n1p8]
 --> mount: [/mnt]
 --> mount: [/mnt/boot/efi]
/bin/bash: symbol lookup error: /bin/bash: undefined symbol: rl_print_keybinding
 --> umount: [/mnt/boot/efi]
 --> umount: [/mnt]

I’ve not been very successful googling for that. Found one Arch forum thread about rl_print_keybinding which I think is a different issue and one manjaro thread with failing chroot due to glibc and it suggests to use pacstrap, which would install a new system from scratch, but I think that’s not what I’m after.

Does anyone know what the “undefined symbol rl_print_keybinding” is and maybe how to resolve the issue?

What file system is your root?

The -a/automatic option doesn’t work with btrfs, and maybe odd setups.

Mount it first, then use the command.

An example if sda2 was my ext4 root.

sudo mount /dev/sda2 /mnt
sudo manjaro-chroot /mnt /bin/bash
mount /boot/efi

btrfs would be the same, you would just mount it with -o subvol=@


Just noticed..

You have Manjaro on the 8th partition?

1 Like

I followed your steps, but I get the same error

sudo mount /dev/nvme0n1p8 /mnt                                                                                           
sudo manjaro-chroot /mnt /bin/bash                                                                                       
/bin/bash: symbol lookup error: /bin/bash: undefined symbol: rl_print_keybinding

I think that’s correct,

nvme0n1     259:0    0 953.9G  0 disk 
├─nvme0n1p1 259:1    0   260M  0 part 
├─nvme0n1p2 259:2    0    16M  0 part 
├─nvme0n1p3 259:3    0 442.4G  0 part 
├─nvme0n1p4 259:4    0   750M  0 part 
├─nvme0n1p5 259:5    0    22G  0 part 
├─nvme0n1p6 259:6    0   200M  0 part 
├─nvme0n1p7 259:7    0   301M  0 part 
└─nvme0n1p8 259:8    0   488G  0 part 

The laptop came with windows, I partitioned the drive kinda 50:50, there are some EFI and backup partitions from windows :person_shrugging: , I’ve never used windows after the initial setup.

edit:

Reading Re: '/bin/sh: undefined symbol: rl_print_keybinding' (possibly due to 'r

it seems that rl_print_keybinding might be something newly introduced, thus maybe I’ve updated some packet that relies on that, but had not set the dependency. Can I somehow update readline without chroot?

Seems like bash is broken (which would mean your system is utterly broken too and maybe a fresh install would be better but it’s your choice).
Try manual mounting, but with another shell if you have one. What happens if you type zsh? And then try again to chroot but from zsh.

1 Like

zsh seems to work, can I now simply

sudo pacman -Syyu

?

Always one y unless switching mirrors, switching branches, and couple other non-standard reasons.

But sure. It should work normally.


Do you have older than readline 8.3? I don’t, but I’m on testing branch..

pacman -Q bash readline
bash 5.3.9-1
readline 8.3.003-1
1 Like

I seem to have the same ```

pacman -Si readline                                                                                                    root@manjaroRepository      : coreName            : readlineVersion         : 8.3.003-1Description     : GNU readline libraryArchitecture    : x86_64URL             : https://tiswww.case.edu/php/chet/readline/rltop.htmlLicenses        : GPL-3.0-or-laterGroups          : NoneProvides        : libhistory.so=8-64  libreadline.so=8-64Depends On      : glibc  libncursesw.so=6-64  ncursesOptional Deps   : NoneConflicts With  : NoneReplaces        : NoneDownload Size   : 409.72 KiBInstalled Size  : 1532.64 KiBPackager        : Tobias Powalowski tpowa@archlinux.orgBuild Date      : Wed Dec 10 23:01:46 2025Validated By    : MD5 Sum  SHA-256 Sum  Signature```

pacman -Syyu failed for the same reason

(785/785) checking available disk space                                           [###############################################] 100%
:: Running pre-transaction hooks...
(1/2) Creating Timeshift snapshot before upgrade...
/bin/bash: symbol lookup error: /bin/bash: undefined symbol: rl_print_keybinding
error: command failed to execute correctly
error: failed to commit transaction (failed to run transaction hooks)
Errors occurred, no packages were upgraded.

That’s bizarre. Pacman requires bash so I’m not sure what to do easily here.

We can’t even downgrade.

We could extract and overwrite from the older /var/cache/pacman/pkg/bash-5.3.*.tar.zst, but it’s dangerous, and it may not even be the problem.

Does pacman.log tell you which ones got upgraded, and/or system logs when it failed?

1 Like

I am in uncharted territory here…maybe using pacman-static? Wonder if it has readline builtin…

1 Like

manjaro-chroot will not work for a system based on btrfs.

Depending on what you are trying to recover - most of it can be done without chrooting into the mountpoint.

pacman has some useful arguments which can be used to target the system behind the mountpoint.

Any configuration you may want to modify can be modified without chroot.

I requires some extra disicpline - but it can be done - I often forget to prefix with /mnt when I want edit edit e.g. mkinitcpio.conf - resulting in editing the rescue iso’s file system instead.

I clearly remember a very lengthy thread not so long ago where my memory was but to extreme test.

Totally broken system after December 2025 Stable Update

If you know which package(s) may be incomplete, then with the root mounted correct (btrfs or ext4)

Switch to root on the rescue system - assuming it is a Manjaro ISO.

Then ensure the database files are up-to-data on the ISO

pacman -Syy

The next command will use the mountpoint as system root and all actions will be inside the mountpoint

pacman -Syu --sysroot /mnt

To properly execute mkinitcpio and grub configuration update you need a working chroot

manjaro-chroot /mnt
mkinticpio -P
update-grub
1 Like

yeah, it’s bizarre. I think the bash is only called from the hook to make a snapshot, I could remove that hook, but I don’t know whether that’s suppose to work at all.

I pat my shoulders for having chosen ext4 back then, not btrfs. so mounting just to /mnt works and I can access all my files. (I’ve backed up the recent changes, so I could make a fresh install. But I like my setup and I’d hope I can just repair/recover the system somehow).

I am trying that right now, it just started.

Thank you 3 for your help so far, I really appreciate the community is as great as manjaro is :slight_smile:

What file system?
ext4 or BTRFS?

blkid
or
lsblk -f
should give more info

If bash is broken, try to use a different shell.

(… but pacman relies on bash internally, so what @Molski said would perhaps be an option
In that case it would be better to first download a fresh copy of bash instead of using the one from the cache)

manually chroot - do not use the -a option to manjaro-chroot
mount all needed partitions in the correct order to /mnt
(don’t forget the EFI partition)
then chroot like this:

manjaro-chroot /mnt /bin/zsh
or just:
manjaro-chroot /mnt
which will land you in sh instead of bash
(I don’t know whether /bin/sh and /bin/bash are actually the same …)

1 Like

The file system has been established to be ext4

1 Like

Yes. By inference.
manjaro-chroot would have failed with a different error had it been BTRFS - rather: it wouldn’t have worked at all

lsblk -f
would have been more clear than just
lsblk
output

ps:
ah, yes - he said it himself
I did miss that one.

Makes fixing the whole thing a bit easier - in my mind.

1 Like

I’ve ran again and again into rl_print_keybinding. Thus I gave up and just re-installed manjaro clean. Thank you everyone for putting in so much time and effort to help me! I will be back next time an update kills my system :sweat_smile:

Aww. I think it was fixable.

I was going for mid-upgraded.. But I guess it’s too late for that. :headstone:

Funny, I could have experienced the exact same problem as you, on btrfs, and rolled back in seconds. (And have a few other options to access or boot my root.) :smirking_face:

Oh well.
I’d have replaced bash
since it was the source of error

It’s much harder to describe how to do to someone that is not that familiar …
than it is to actually do it …