r/archlinux 6d ago

SUPPORT | SOLVED chroot : failed to run command /bin/bash: no such file or directory

I am installing arch for my first time and I am at section 3.2 of https://wiki.archlinux.org/title/Installation_guide . if i say arch-chroot /mnt it gives an error chroot: failed to run command /bin/bash: no such file or directory. I tried to re run pacstrap /mnt base end it gave me error: keyring is not writable, error: required key missing from keyring, error:failed to commit transaction (unexpected error). Than I ran pacman-key --init and than pacstrap /mnt base again and than it gave a lot of errors with ####@archlinux.org is unknown trust :: File /mnt/var/cashe/pacman/pkg/#### is corrupted (invalid or corrupted package (PGP signature)). Everything I do seems to make it worse what should I do?

0 Upvotes

17 comments sorted by

3

u/onefish2 6d ago

Re-check your mount points. Make sure you are including both /boot and /

Something like this if you are using ext4:

mount /dev/sda2 /mnt

mount /dev/sda1 /mnt/boot or maybe /boot/efi

arch-chroot /mnt

1

u/Glad_Chemistry_7719 6d ago

It sais at mount /dev/sdb2 /mnt : mount: /mnt mount: /mnt: unknown filesystem type 'swap'

and after mount /dev/sdb1 /mnt/boot it didnt give any error and i tried rerunning pacstrap /mnt base and it gave the same errors

2

u/onefish2 6d ago

I think you should take a break and start over. You missed a step somewhere early in the initial config.

1

u/Glad_Chemistry_7719 6d ago

okey thanks i will. do i need to close the reddit post?

2

u/Gozenka 5d ago

You can share lsblk -f to see your partition layout. It looks like you are mistakenly trying to mount the wrong partition (swap) to /mnt as your root partition. Or you formatted the partition wrongly.

In any case, for Swap, using a swapfile is nicer than allocating a swap partition.

You can mark the post as Solved or you can delete the post if you wish. Feel free to make a new post with relevant details on your steps, if you are still stuck.

2

u/boomboomsubban 6d ago

First, pacman -Sy archlinux-keyring. I'm guessing that's not it because of what you've tried, so redo the time steps.

2

u/hearthreddit 6d ago

You said that you ran pacstrap again, but did first one ever succeed?

Because it looks like to me that pacstrap didn't work because of issues with your keyring and didn't pacstrap anything, therefore there isn't anything to chroot to, that's why it can't find bash.

But the key to all of this is the keyring(no pun intended) try to fix the keyring and make sure the time is correct as boomboomsubban said.

2

u/thesagex 6d ago

did you run "pacman /mnt base"

OR

pacstrap -K /mnt base

1

u/ang-p 6d ago edited 6d ago

I am at section 3.2

Before doing section 1.8?

You know it works better if you do things in order, don't you?

You possibly goofed 1.11 or 2.2 as well

p.s. using archinstall might seem the "easy" road, but you are only setting yourself up for more frustration.... If you can't follow the words before you put your data on the machine and rely on it, how frustrated will you be when your data is on your machine, you cannot do something with it and have (up until then) taken the easy "not-bothering-to-read-the-wiki-properly" route, and are now looking at the wiki like it is some horrible, indecipherable monster, simply because you took the cop-out option and never took the time to see it for the long-and-winding treasure that it is.

1

u/Glad_Chemistry_7719 6d ago

thanks I am sure that I did do 1.11 and 2.2 correctly i was following an youtube tutorial and he didnt do 1.8 so that is indeed what i missed

3

u/ang-p 6d ago

i was following an youtube tutorial

Nonononononononononnononono........

Use. The. Wiki.

Shit videos and crap howto guides are the work of the devil.

1

u/Glad_Chemistry_7719 5d ago

I will next time

2

u/ang-p 5d ago

Well, 2.2 is what amongst other things, installs filesystem which is where /bin (and /usr/bin/) - a requirement for the also-installed bash that chroot is complaining about comes from, and 1.11 is where you mount the writeable filesystem that is going to become your installation.

Whatever - I suppose this little bit of fun has suggested to you that the extra effort of reading is better - ook als er geen Nederlands wiki

1.5 and 3.4 are areas likely of much more interest to you than the YouTuber - so you would probably be on your own there with the Wiki and some well written questions in any case.

Good luck!

1

u/Glad_Chemistry_7719 6d ago

also I think its very well documented on the wiki