[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

32-bit system, 64-bit chroot?



I would like to configure a 32-bit base system, use a amd64-k8 kernel
such as the kernel-image-2.6.8-10-amd64-k8-smp kernel, and set up a
64-bit chroot on the machine.  This mostly works.  But I am missing
something.  I am trying to follow the ia32 chroot howto in reverse to
install an amd64 chroot.

On a freshly installed i686 sarge system I have installed the
kernel-image-2.6.8-10-amd64-k8-smp kernel.  'uname -m' reports x86-64.
I then installed an amd64 chroot at /emul/amd64-linux.  In the chroot
everything is working fine and I can run 64-bit executables.

I would like to be able to run 64-bit executables on the 32-bit system
outside of the chroot similarly but in reverse to the way one can run
32-bit executables on a 64-bit system using the /emul layer.  But this
is not working.  I am sure I am missing something silly and trivial.

I included the following as additional entries in /etc/ld.so.conf.

  /emul/amd64-linux/lib
  /emul/amd64-linux/usr/lib
  /emul/amd64-linux/usr/X11R6/lib

I installed this symlink:

  /lib/ld-linux-x86-64.so.2 -> /emul/amd64-linux/lib/ld-linux-x86-64.so.2

I ran 'ldconfig' to update the cache.

I can run 64-bit exectuables with ld.so.  This works:

  /lib/ld-linux-x86-64.so.2 /emul/amd64-linux/bin/ls --help

But running 64-bit executables directly fails.  This appears to not
recognize the binary file format.  I get a bash error saying no such
file or directory.

  /emul/amd64-linux/bin/ls --help
  -bash: /emul/amd64-linux/bin/ls: No such file or directory

I tried installed amd64-libs to do an A-B comparison.  But that fails
to function with a missing libacl.so.1 library.  I don't get the no
such file or directory error however so it is working better.

As a wild guess I tried changing all amd64 paths to x86_64.  But that
had no affect.  That is, /emul/x86_64-linux for the emulation layer
did not work any differently than /emul/amd64-linux.  Neither did
/emul/x86-64-linux.

Does anyone see the mistake I have made here?

Thanks
Bob

Attachment: signature.asc
Description: Digital signature


Reply to: