Announcement

Collapse
No announcement yet.

For 32 bit apps where a chroot just wont do... (chroot cdrom workaround)

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    For 32 bit apps where a chroot just wont do... (chroot cdrom workaround)

    Hello,

    I want to say first off that being the first time ive ever used a debian based system, i like kubuntu's install system and overall polish. one of the things i didnt agree with is the way that you have to have a 32 bit chroot in order to run alot of the apps that dont run under 64 bit.

    the chroot solution works well, but with lack of clean cdrom support, it cripples the use of anything that requires removable media support significantly. (ie. Cedega for example) pulling a page from 64 bit fedora, i think i have managed to setup a way to get 32 bit apps running successfully without the need to use dchroot.

    Fedora uses a setup that combines 32 bit libraries alongside their 64 bit ones making it possible to run 32 bit applications without the need of a chroot. however, the trouble came from having to build things from source and having the build process incorrectly select the libs and headers needed to do so. this is where a chroot environment is great because building things in 32 bit never runs into issues regarding linking the incorrect libraries and causing the build to fail.

    Procedure:

    i would recomend for new users of linux to first read some of the man page for ldconfig, knowing what it does and how it works at least to a minimal degree will give you an understanding of what this does.

    By default (k)ubuntu doesnt have an ld.so.conf file in /etc. its not really necessary for this particular version of linux as a native 64 bit pure system stores its libraries in standard areas (/usr/lib and /lib) ld.so.conf is used to tell ldconfig to look in directories that are non-standard.

    1. Setup a 32 bit chroot. (this procedure is defined at: http://ubuntuforums.org/showthread.p...ghlight=chroot)

    2. after this has been done, you will need to create an ld.so.conf file in /etc:

    type the following in a terminal:
    sudo (your favorite text editor) /etc/ld.so.conf

    the format of ld.so.conf is very simple. basically you just enter the paths that you want ldconfig to search in:

    /(name of your chroot folder/lib
    /(name of your chroot folder)/usr/lib

    you can add in /usr/local/lib as well, since alot of source-built software defaults to this folder, though this isnt necessary for binaries, as binaries from deb files will use /usr/lib and /lib.

    after this is done and saved, enter the following into a terminal:
    sudo ldconfig -v

    why the -v flag? itll let you see what ldconfig is looking for, look at the paths to make sure that your chroot pathname shows up. that means that everything is as it should be.

    at this point, as long as the chroot has the nessesary libs to operate the app in a chroot, you should be able to install 32 bit apps using your 64 bit root using the --force-architechture flag with dpkg. your dependencies must be met by both the 32 and 64 bit environment. this should work under most situations.  this setup will for a fact work to run cedega without using the chroot. though i havent tested it with other 32 bit apps, feedback on this setup is appreciated.
     
Working...
X