Open Anonymous2716 opened 2 years ago
I have this in my proot scripts on Android 10:
$ cat proot.sh
#!/bin/sh
unset LD_PRELOAD
proot -r deb_11 -0 -b /sys -b /proc -b /dev -b /system -b /apex --link2symlink -q qemu-i386 /bin/bash --login
try to add /system and /apex to your binded dirs?
I'm on android 9 so apex doesn't exist right? I added /system and that gave me error while loading /usr/bin/env: Exec format error
does that make it a proot issue ? I tried removing this /use/bin/env . then it gave me Error while loading /bin/ash: Exec format error.
Exec format error
means that something is run for the wrong architecture, indicating that either /usr/bin/env and /bin/ash are not run under qemu, or that they aren't x86_64 binaries
ash: ASCII text, with no line terminators
~/q/bin $ cat ash
/bin/busybox
~/q/bin $ file busybox
busybox: ELF 64-bit LSB pie executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib/ld-musl-x86_64.so.1, stripped
~/q/bin $
~/q/usr/bin $ file env
env: ASCII text, with no line terminators
~/q/usr/bin $ cat env
~/q/usr/bin $ cat env
/bin/busybox
~/q/usr/bin $
Am I doing anything wrong in the script should add something?
Fixed version should soon be available in apt repo as proot-5.1.107-54
After that initial command from initial post should work (after replacing bash
-> sh
, there's no bash
in alpine and trying doing so launches Termux bash
which doesn't work in such rootfs configuration)
Only thing remaining will be WARNING: linker: Warning: failed to find generated linker configuration from "/linkerconfig/ld.config.txt"
, copy that file to guest rootfs to get rid of that warning
I maybe figured out the actual issue. After binding /system qemu finds libc.so but ash or env were just text files . they should be symbolic links to busybox . I changed the /use/bin/env and /bin/ash with symbolic links and I was abole to login successfully . maybe it is the issue with extraction. I extracted with 7z from qcow2 image. Now I have to change all the text files with symbolic links . is there any other extractors ?
@michalbednarski I installed bash before extracting the rootfs. BTW my issue seems to be solved now. Thanks for the Info's.
Can I close this issue? Well I get more weird errors with qemu-aarch64.
Problem description
I extracted the rootfs of alpine-x86_64 after installing from iso with qemu. and here is the script I ran
And it got me the error above.
What steps will reproduce the bug?
Descriptions ^
What is the expected behavior?
No response
System information
termux-info: