Tiny Core Linux

Tiny Core Base => TCB Q&A Forum => Topic started by: bencpeters on January 21, 2015, 02:08:37 PM

Title: chroot into 32bit environment from 64bit TC
Post by: bencpeters on January 21, 2015, 02:08:37 PM
Hi all,
I'm attempting to chroot into a 32 bit system from a 64 bit TC kernel (running docker on OS X). Unfortunately, I'm getting "Exec format error" whenever I try to run anything inside the environment. From reading online, this seems to be because TinyCore doesn't have 32 bit support built into the kernel?

I was wondering:

- Is this actually the cause of my issue?
- Is there any reasonably easy way to add this support into the kernel? (without re-compiling the whole kernel - this kernel was installed by Docker)

Thanks!
Title: Re: chroot into 32bit environment from 64bit TC
Post by: curaga on January 21, 2015, 04:15:11 PM
Our 64-bit kernels have always had 32-bit support enabled, so probably something else. Many users run with the 64-bit kernel and 32-bit userspace.
Title: Re: chroot into 32bit environment from 64bit TC
Post by: gerald_clark on January 21, 2015, 05:35:08 PM
You must chroot into a directory that has the 64 bit kernel modules and the 32 bit user space.
Title: Re: chroot into 32bit environment from 64bit TC
Post by: curaga on January 22, 2015, 03:43:43 AM
I don't think modules are needed if all needed ones get loaded before chrooting?
Title: Re: chroot into 32bit environment from 64bit TC
Post by: CentralWare on January 29, 2015, 01:09:37 PM
@ben: My understanding is that Pure64 does NOT have 32bit support, thus you'll want to make sure you picked up the kernel from version/x86/release/distribution_files/vmlinuz64 instead of from x86_64.  From there, you should, in theory, be able to run in 32bit user space but ONLY running 32bit extensions.  Again...  this is IF my understanding is valid.