2

I am running Ubuntu 14.04.2, 64 bit host system. Using debootstrap, I installed a minimal Ubuntu 14.04.2, 32 bit system in trusty32 directory. This is what my schroot configuration look like:

[trusty_i386]
description=Ubuntu 14.04 Trusty for i386
directory=/home/dipanjan/trusty32
personality=linux32
root-users=dipanjan
type=directory
users=dipanjan

I logged in to the 32-bit jail once using chroot, next time using schroot. Astonishingly, the output of uname -m differs. In chroot session, x86_64 (host system architecture) is returned while in schroot session, i686 (guest system architecture) is returned. Can someone explain this discrepancy?

$ sudo chroot trusty32/
(trusty_i386)root@dipanjan-OptiPlex-960:/# uname -m
x86_64
(trusty_i386)root@dipanjan-OptiPlex-960:/# exit
exit
$ schroot -c trusty_i386
(trusty_i386)dipanjan@dipanjan-OptiPlex-960:~$ uname -m
i686
(trusty_i386)dipanjan@dipanjan-OptiPlex-960:~$ exit
logout
2

chroot doesn't change processes' personality by default, so within the chroot you still see the host's (kernel) architecture, x86_64.

On the other hand you've set up your trusty_i386 schroot with a linux32 personality, so schroot runs that when setting the chroot up — and linux32 (which links to setarch) changes the current personality to report a 32-bit kernel architecture, i686.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.