I have a 32-bit PXE environment and I want to chroot to a CentOS x64 root filesystem. Of course that doesn't work. Any tricks or hacks that would allow me to do that? Currently I get the error: chroot: /bin/bash: Exec format error What if I updated my PXE environment to 64-bit. Could I then chroot to a 32-bit? I use PXE to quickly troubleshoot both 32-bit and 64-bit arch. Thanks. -Scott -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.centos.org/pipermail/centos/attachments/20101020/7fd85f3f/attachment-0002.html>
On 10/20/10 19:23, Scott Johnson wrote:> I have a 32-bit PXE environment and I want to chroot to a CentOS x64 root filesystem. Of course that doesn't work. Any tricks or hacks that would allow me to do that? Currently I get the error: > > chroot: /bin/bash: Exec format error > > What if I updated my PXE environment to 64-bit. Could I then chroot to a 32-bit? > I use PXE to quickly troubleshoot both 32-bit and 64-bit arch. > > Thanks. > -Scott >Booting an x86-64 kernel with the proper config options set to enable execution of 32 bit binaries should allow you to do that. I think. Glenn
On 10/20/2010 10:23 AM, Scott Johnson wrote:> What if I updated my PXE environment to 64-bit. Could I then chroot to > a 32-bit? > I use PXE to quickly troubleshoot both 32-bit and 64-bit arch.I'm pretty sure that you can run 64 bit executables only when you're running a 64 bit kernel. If you install and run a 64 bit kernel in your system without changing anything else, you should be able to chroot to a 64 bit environment.
Seemingly Similar Threads
- Puppet updating from relative directories or chroot
- Chroot Install
- missing chdir before chroot in guestfsd
- Re: [PATCH] daemon: always provide stdin when running chroot commands (RHBZ#1280029)
- [supermin 1/2] chroot: Fix corner case introduced with dpkg-divert support