Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
stage3-aarch64 file seems incompatible with apple silicon?
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
wowpetr
n00b
n00b


Joined: 12 May 2018
Posts: 15

PostPosted: Fri Mar 07, 2025 12:04 pm    Post subject: stage3-aarch64 file seems incompatible with apple silicon? Reply with quote

When I'm trying to chroot I get this error "chroot: failed to run command ‘/bin/bash’: Exec format error". It means that the binary being executed is made for a different architecture than the environment currently booted. I booted from Minimal installation CD image for aarch64. When I do file /bin/bash and file /mnt/gentoo/bin/bash I get exact the same output except for the pie executable type:
Code:

livecd /mnt/gentoo # file bin/bash
bin/bash: ELF 64-bit MSB pie executable, ARM aarch64 ...
livecd /mnt/gentoo # file /bin/bash
/bin/bash: ELF 64-bit LSB pie executable, ARM aarch64 ...


So what am I supposed to do?
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


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

PostPosted: Fri Mar 07, 2025 2:01 pm    Post subject: Reply with quote

You most likely installed wrong stage3 file.

By default the arm64 kernel were compiled for little-endian (LSB) so it will not able to support your /mnt/gentoo/bin/bash which is big-endian (MSB)

I think all ARM core by design is bi-endian but most common usage is set to little-endian.
Back to top
View user's profile Send private message
wowpetr
n00b
n00b


Joined: 12 May 2018
Posts: 15

PostPosted: Fri Mar 07, 2025 4:34 pm    Post subject: Reply with quote

pingtoo wrote:
You most likely installed wrong stage3 file.


Yes, I realised that 'be' in the name of stage file I used stands for big-endian (current-stage3-aarch64_be-systemd). The problem is there's no other stage3 file with the same name but without `be`. So I'm not sure what to do about it.
Back to top
View user's profile Send private message
pingtoo
Veteran
Veteran


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

PostPosted: Fri Mar 07, 2025 4:44 pm    Post subject: Reply with quote

No sure where you are looking, but I can see at download page, there are openrc and systemd for current.
Back to top
View user's profile Send private message
grknight
Retired Dev
Retired Dev


Joined: 20 Feb 2015
Posts: 2141

PostPosted: Fri Mar 07, 2025 4:59 pm    Post subject: Reply with quote

wowpetr wrote:
(current-stage3-aarch64_be-systemd). The problem is there's no other stage3 file with the same name but without `be`. So I'm not sure what to do about it.

There is current-stage3-arm64-systemd just one level up in the directory structure.
Back to top
View user's profile Send private message
wowpetr
n00b
n00b


Joined: 12 May 2018
Posts: 15

PostPosted: Fri Mar 07, 2025 5:29 pm    Post subject: Reply with quote

TYVM guys I checked that the files you mentioned indeed have been compiled as LSB binaries.
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