10-11-2018, 07:32 PM
I have tried to emulate a chroot for x86_64 architecture and it gave me inconsistent results, random successes and fails:
Finally I got it to work, by forbidding to run on the last 2 cores:
And it is stable.
A bit more of information:
Code:
jinks /disco2/chroot/amd64 # chroot . /bin/bash
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
root@jinks / # exit
exit
jinks /disco2/chroot/amd64 # chroot . /bin/bash
Instrucción ilegal
jinks /disco2/chroot/amd64 # chroot . /bin/bash
qemu: uncaught target signal 11 (Segmentation fault) - core dumped
Violación de segmento
jinks /disco2/chroot/amd64 # chroot . /bin/bash
root@jinks / # ls
Instrucción ilegal
jinks /disco2/chroot/amd64 # bin dev home lib32 media opt root sbin tmp var
boot etc lib lib64 mnt proc run sys usr
jinks /disco2/chroot/amd64 #
Finally I got it to work, by forbidding to run on the last 2 cores:
Code:
jinks /disco2/chroot/amd64 # schedtool -a 0xf -e chroot . /bin/bash
jinks / # ls
bin dev home lib32 media opt root sbin tmp var
boot etc lib lib64 mnt proc run sys usr
jinks / # exit
exit
jinks /disco2/chroot/amd64 #
And it is stable.
A bit more of information:
Code:
# uname -a; qemu-x86_64 --version; gcc --version
Linux jinks 4.4.154 #8 SMP Fri Oct 12 00:42:01 CEST 2018 aarch64 GNU/Linux
qemu-x86_64 version 2.12.1
Copyright (c) 2003-2017 Fabrice Bellard and the QEMU Project developers
gcc (Gentoo 7.3.0-r3 p1.4) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc. ...