User: Password:
Subscribe / Log in / New account

How to set up 32-bit support on Debian

How to set up 32-bit support on Debian

Posted Jun 17, 2004 2:53 UTC (Thu) by ewen (subscriber, #4772)
In reply to: How to set up 32-bit support on Debian by BrucePerens
Parent article: The 64-bit question

Except that from within the chroot you can't access files that are outside the chroot (this being the raison d'etre of a chroot). So your 32-bit-program-in-chroot can't access, eg, your home directory. You can work around this by, eg, nfs mounting the relevant directories inside the chroot (or permanently locating them inside the chroot and symlinking from the outside in) but it can get to be non-trivial to maintain.

What might work better is a custom which recognised 32-bit binaries and changed all their references to /lib, /usr/lib, etc to be references to /lib32, /usr/lib32, etc (in some cases just setting the library path for them may be sufficient).

Then all that would be needed is a dpkg modification (or a wrapper) that could intercept i386 library packages (ie 32-bit ones) as they were installed and put them into /lib32, /usr/lib32, etc. Plus perhaps some apt magic to allow installing both amd64 and i386 architecture packages on the same system.

FWIW, given Debian's release schedule -- roughly every 2 years or so now -- I suspect the problem will go away by itself before there's another (sarge+1) Debian release. So probably all that is needed is a simple-as-possible work around for use in Sarge.


(Log in to post comments)

How to set up 32-bit support on Debian

Posted Jun 17, 2004 3:22 UTC (Thu) by busterb (subscriber, #560) [Link]

How about mount /home /32/home -obind; mount /proc /32/proc -obind ?
The bind option functions like a transparent symlink. Gentoo used to
recommend this during installation, which occurs in a chrooted
environment. You can do the same thing with other file systems or just
plain directories, like /var, /etc and /dev.

How to set up 32-bit support on Debian

Posted Jun 17, 2004 10:49 UTC (Thu) by stuart (subscriber, #623) [Link]

I read Bruce's post as wanting to remove the need to chroot an instead make smarter -- i.e. for a 32 bit binary pick the 32 bit libraries. This makes all your stated problems go away.


How to set up 32-bit support on Debian

Posted Jun 17, 2004 21:06 UTC (Thu) by ewen (subscriber, #4772) [Link]

On re-reading Bruce's post I see that you are right -- he was suggesting that should be doing library-path-modification (prepending /32). I was confusing it with other posts on this topic (eg, Debian mailing lists) where people were suggesting just running it in a chroot.

Bruce's approach (constant string prepended) is probably an easier hack than my approach (make ..../lib/... into .../lib32/...), and provides a more direct way to update the libraries (chroot /32; apt-get update && apt-get upgrade).

So it seems quite feasible.


Copyright © 2018, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds