GNU bug report logs -
#50151
Coreutils, aarch64 and chroot
Previous Next
Reported by: Frans de Boer <frans <at> fransdb.nl>
Date: Sat, 21 Aug 2021 16:36:03 UTC
Severity: normal
Tags: notabug
Done: Assaf Gordon <assafgordon <at> gmail.com>
Bug is archived. No further changes may be made.
Full log
Message #23 received at 50151 <at> debbugs.gnu.org (full text, mbox):
tag 50151 notabug
close 50151
stop
On 2021-08-25 12:54 p.m., Frans de Boer wrote:
> On 8/25/21 10:16 AM, Assaf Gordon wrote:
>> qemu-aarch64 -strace -L /newroot \
>> /newroot/usr/sbin/chroot /newroot /usr/bin/env --version 2&1 \
>> | tee log.txt
>>
> @assaf: your suggestions no. 1 and 2, had the predicted results. Thus,
> suggestion no. 3 failed because of suggestion no.2. I followed then
> suggestion 4 and attached the strace output to this message. It seems
> that chroot is working as expected, only env seems to fail with an error.
Not exactly:
The 'chroot' system-call *seems* to succeed,
followed by a failed "execve(2)" system call to execute another binary.
That "execve" system fails - so it is not 'env' per-se,
it is any program that will try to execute another aarch64 binary.
Learning that, searching for "qemu-user", "chroot" and "architecture"
leads to several web pages detailing similar errors (and few suggested
solutions):
https://wiki.gentoo.org/wiki/Crossdev_qemu-static-user-chroot
https://newbedev.com/how-can-i-chroot-into-a-filesystem-with-a-different-architechture
https://ownyourbits.com/2018/06/13/transparently-running-binaries-from-any-architecture-in-linux-with-qemu-and-binfmt_misc/
> I hope you have some clue of what is going wrong.
With the above information, we can conclude this is not a bug
in coreutils - it is a limitation of the linux+qemu-user setup.
So I'm closing this item and marking it as "not a bug",
but discussion can continue by replying to this thread.
regards,
- assaf
This bug report was last modified 3 years and 270 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.