Bash input/output error when arch-chrooting into system

I accidentally bricked my system while updating today and I have been following this page to fix booting issues (I don’t see EndeavourOS as a boot option right now). It all goes well until I need to actually chroot into the system. I get the following error:

chroot: failed to run command '/bin/bash': Input/output error

I have looked for similar errors online and they all discuss hardware issues, but I’m doubtful this is the case since everything worked perfectly well until today and I have a dualboot with Windows working perfectly. Any idea what the problem might be?

Can you share the full series of commands you ran to chroot so we can see what might have gone wrong?

Here is what I did:

sudo mount /dev/nvme0n1p6 /mnt
sudo cat /mnt/etc/fstab
sudo mount /dev/nvme0n1p8 /mnt/efi
sudo arch-chroot /mnt

A friend of mine suggested I might have broken bash during the upgrade, and to rebuild bash on my system using the live environment’s pacman, but I also got an error here, namely:

(1/1) reinstalling bash
call to execv failed (Input/output error)
error: command failed to execute correctly
call to execv failed (Exec format error)
error: command failed to execute correctly

EDIT: Tried reinstalling base too, it gives me similar errors.

Ok, I might have found an important issue. I ran:

sudo pacman --sysroot /mnt -S $(pacman -Qeq)

and I found a conflict between mkinitcpio and kernel-install-for-dracut. I assume it’s this conflict that’s preventing me from booting into my linux system. Could anyone tell me which one EndeavourOS naturally uses?

dracut is what we use.

Although, that probably isnt your issue in this case

Have you tried checking your filesystem?

I see, thank you. What do you mean by checking your filesystem exactly?

Unless it is btrfs, run fsck on it.

After unmounting, I get:

/dev/nvme0n1p6: clean, 642010/4268032 files, 13983489/17051904 blocks

For the boot portion:

/dev/nvme0n1p8: 196 files, 6555/255612 clusters

Ok, well. I reinstalled the base packages (which include bash as far as I’m aware). I also reinstalled dependencies (and some weren’t found for some reason). I think it’s probably easier to just save my /home folder and reinstall EndeavourOS.

How are you reinstalling them?

I used:

sudo pacman --sysroot /mnt -S $(pacman --sysroot /mnt -Qeq)

To check the dependencies, I used:

sudo pacman --sysroot /mnt -S --asdeps $(pacman --sysroot /mnt -Qdq)

After this, I tried arch-chrooting again but to no avail. I got the same Input/output error.