Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
repair my old gentoo,but chroot alway say /bin/bash failed
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
youxiaojie
n00b
n00b


Joined: 25 Jan 2025
Posts: 11

PostPosted: Wed Jan 29, 2025 7:21 pm    Post subject: repair my old gentoo,but chroot alway say /bin/bash failed Reply with quote

I mount my grub broken gentoo to live cd,but chroot /mnt/gentoo /bin/bash failed. alway failed to run command /bin/bash. no such file or directory.
I try /usr/bin/bash,the same.

however the first time I install gentoo sames all right.
why?and how I can deal.it?

even when I mount it to my installed gentoo on another pc. the same

thanks!
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


Joined: 10 Sep 2021
Posts: 1481
Location: Richmond Hill, Canada

PostPosted: Wed Jan 29, 2025 7:29 pm    Post subject: Reply with quote

check /mnt/gentoo/bin/bash, does it exist?

Code:
 namei /mnt/gentoo/bin/bash
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54824
Location: 56N 3W

PostPosted: Wed Jan 29, 2025 7:56 pm    Post subject: Reply with quote

youxiaojie,

That error can be triggered by a missing dynamic linker or one of the libraries that bask needs. From an arm64 system.

Code:
~ # lddtree /bin/bash
/bin/bash (interpreter => /lib/ld-linux-aarch64.so.1)
    libreadline.so.8 => /usr/lib64/libreadline.so.8
        libtinfow.so.6 => /lib64/libtinfow.so.6
    libtinfo.so.6 => /lib64/libtinfo.so.6
    libc.so.6 => /lib64/libc.so.6
    ld-linux-aarch64.so.1 => /lib/ld-linux-aarch64.so.1

_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
youxiaojie
n00b
n00b


Joined: 25 Jan 2025
Posts: 11

PostPosted: Wed Jan 29, 2025 8:03 pm    Post subject: Reply with quote

pingtoo wrote:
check /mnt/gentoo/bin/bash, does it exist?

Code:
 namei /mnt/gentoo/bin/bash

sure
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 2004

PostPosted: Wed Jan 29, 2025 8:39 pm    Post subject: Reply with quote

Ensure that the mounted device does not have the options noexec, user, or users attached to it. (Check with mount command)
Back to top
View user's profile Send private message
youxiaojie
n00b
n00b


Joined: 25 Jan 2025
Posts: 11

PostPosted: Sun Feb 02, 2025 10:41 am    Post subject: Reply with quote

grknight wrote:
Ensure that the mounted device does not have the options noexec, user, or users attached to it. (Check with mount command)


GentooDesktop恭 mount
proc on /proctype procCrw, nosuid, nodeu, noexec,relatime)
sysfs on sys type sysfs rw, nosuid, nodeu, noexeC,relatine)
devtmpfs on /deu type deutnpfs (rw, nosuid, noexec,size=10240k,mr_ inodes-283124,modc-755)
devpts on /deu/pts type deupts (rw, nosuid, noexec,relatime,gid-5,mode-620,ptnoonode-809
tmpfs on /deu/shm type tmpfs (rw, nosuid, nodeu,noexec)
tmpfs on /run type tmpfs (rw, nosuid, nodeu,noexec,node=755)
/deursda3 on / type ext4 (rw,relatine)
securityfs on /sys/kernel/security type securityfs (rw,idC,relat
debugfs on /sys/kernel/debug type debugfs (rw, nosuid, nodeu,noexec,elaime)
configfs on /sys/kernel/config type conf igfs (rw, nosuid, nodeu,noexec,relatime)
pstore on /sys/fs/pstore type pstore (rw, nosuid, nodeu, noexec,relatime)
none on /sys/fs/cgroup type cgroup2 (rw, nosuid, nodeu, noexec,relatine,nsdelegate)
nqueue on/deu/nqueue type mqueue (rw, nosuid, nodeu, noexec,relatine)
binfnt misc on /proc/sys/fs/binfnt nisc type binfnt misc (rw,mosuid,nodcu,noexec.relatine)
tracefs on /sys/kernel/debug/tracing type tracefs (rw, nosuid,nodew,noexec.relatime)
/deu/sdb2 on /mnt type ext4 (rw, relatime)
/deu/sdb1 on /mnt/boot type ext4 (rw,relatime)
GentooDesktop 广楼

this is ocr so some error
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54824
Location: 56N 3W

PostPosted: Sun Feb 02, 2025 12:27 pm    Post subject: Reply with quote

youxiaojie,

OCR errors fixed
Code:
/dev/sdb2 on /mnt type ext4 (rw, relatime)
/dev/sdb1 on /mnt/boot type ext4 (rw,relatime)


If that is you gentoo, that can be made to work.
The handbook uses /mnt/gentoo, not /mnt, so you will need to adjust the other instructions to suit..

You are also missing /prog, /sys and /dev mounted again inside your Gentoo.
The chroot requires those. That's in the handbook too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
pietinger
Moderator
Moderator


Joined: 17 Oct 2006
Posts: 5373
Location: Bavaria

PostPosted: Sun Feb 02, 2025 4:38 pm    Post subject: Reply with quote

NeddySeagoon wrote:
You are also missing /prog, /sys and /dev mounted again inside your Gentoo.
The chroot requires those. That's in the handbook too.

@youxiaojie,

See also: https://wiki.gentoo.org/wiki/User:Pietinger/New_at_Gentoo#Pause_during_Installation

Attention: You can use the "arch-chroot" command only if you boot with our GentooCD. If you boot with another distributionLiveCD you have to do instead:
https://wiki.gentoo.org/wiki/Handbook:AMD64/Installation/Base#Mounting_the_necessary_filesystems
_________________
https://wiki.gentoo.org/wiki/User:Pietinger
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum