Page 1 of 10 123 ... LastLast
Results 1 to 10 of 250

Thread: 32-Bit Chroot How-To

Hybrid View

  1. #1
    Join Date
    Mar 2005
    Location
    Los Angeles, CA
    Beans
    28

    Lightbulb HOWTO: 32-Bit Chroot on 64-Bit Installs

    Most of this comes from http://digital-conquest.ath.cx/wiki/...h_debbootstrap but I wanted to put together a cleaned up version that worked for me here (There are typos and inaccuracies on the wiki page).

    Step 1:

    • sudo apt-get install dchroot debootstrap
    • sudo mkdir /chroot/
    • sudo gedit /etc/dchroot.conf
      • Add this line: hoary /chroot
    • sudo debootstrap --arch i386 hoary /chroot/ http://archive.ubuntu.com/ubuntu
    • sudo chroot /chroot/
    • dpkg-reconfigure locales

    Step 2:
    In another terminal window (or by existing chroot):

    (We do this step because gedit has yet to be installed in the chroot environment)

    Step 3:
    In your chrooted environment (chroot /chroot):
    • apt-get update ; apt-get upgrade

    Step 4:
    In another terminal window (or by existing chroot):
    • sudo cp /etc/passwd /chroot/etc/
    • sudo cp /etc/shadow /chroot/etc/
    • sudo cp /etc/group /chroot/etc/
    • sudo cp /etc/sudoers /chroot/etc/
    • sudo cp /etc/hosts /chroot/etc/
    • sudo gedit /etc/fstab
    • Add the following lines:
      • /home /chroot/home none bind 0 0
      • /tmp /chroot/tmp none bind 0 0
      • /dev /chroot/dev none bind 0 0
      • /proc /chroot/proc proc defaults 0 0
      • /media/cdrom0 /chroot/media/cdrom0 none bind 0 0
      • /usr/share/fonts /chroot/usr/share/fonts none bind 0 0
    • sudo mkdir /chroot/media/cdrom0
    • sudo mount -a
    • sudo gedit /usr/local/bin/do_dchroot
    • Add the following:
      • #!/bin/sh
      • /usr/bin/dchroot -d "`echo $0 | sed 's|^.*/||'` $*"
    • sudo chmod 755 /usr/local/bin/do_dchroot

    Step 5:
    In a new terminal:
    • dchroot -d
    • sudo apt-get install synaptic
    • sudo ln -s /usr/sbin/synaptic /usr/sbin/synaptic32
    • exit
    • sudo ln -s /usr/local/bin/do_dchroot /usr/local/bin/synaptic32
    • sudo synaptic32
    At this point you should have a 32 bit environment setup with synaptic setup. When you run synaptic32 from your main environment it will chroot execute it and all installations will be made to your 32 bit environment. If you want to be able to easily launch 32 bit chroot apps from your 64 bit environment symlink the app name to /usr/local/bin/do_dchroot. If you're using this as desktop system you'll probably want to use synaptic to install x, gnome, ubuntu specific themes, etc.

    Please let me know of any errors, enhancements, or corrections
    Last edited by Crad; May 13th, 2005 at 10:12 PM. Reason: Updated to include making a directory for cdrom0

  2. #2
    Join Date
    Mar 2005
    Location
    Los Angeles, CA
    Beans
    28

    Re: 32-Bit Chroot How-To

    To get Firefox setup with Flash I did the following:

    • Ran sudo synaptic32 (as noted in the above thread
    • Installed mozilla-firefox
    • dchroot -d
    • sudo ln -s /usr/lib/libesd.so.0 /usr/lib/libesd.so.1
    • sudo ln -s /usr/bin/firefox /usr/bin/firefox32
    • exit
    • sudo ln -s /usr/local/bin/do_dchroot /usr/local/bin/firefox32
    • Made sure all instances of firefox are closed (you can not run both 32 and 64 bit firefoxes at the same time afaik... it just spawns a new 64 bit thread when you launch the old.
    • firefox32
    • Visited a site with flash on it and ran the automated firefox flash install.


    As of right now sound is not working. If I figure out how to get the sound stuff working across the chroot, I'll post it here.
    Last edited by Crad; April 13th, 2005 at 08:49 PM. Reason: Updated with symlink per minuo's suggestion

  3. #3
    Join Date
    Mar 2005
    Beans
    947
    Distro
    Ubuntu 12.04 Precise Pangolin

    Re: 32-Bit Chroot How-To

    To get sound working, you need to mount --bind /dev /chroot/dev (or the equivalent fstab line).

    In my case, I also had to add my username to the right group to have permission to write to /dev/dsp; but that was because I was using my old Mandrake system as the chroot, and it used a different number for the audio group. For an Ubuntu chroot, you should be set already.

    In another thread, someone said it was also necessary to modprobe ioctl32 before starting the chroot. I've not found that to be the case here, but perhaps that's because my chroot is using OSS. (?)

  4. #4
    Join Date
    Mar 2005
    Location
    San Francisco, US
    Beans
    139
    Distro
    Hardy Heron (Ubuntu Development)

    Re: 32-Bit Chroot How-To

    Quote Originally Posted by Crad
    To get Firefox setup with Flash I did the following:

    • Ran synaptic32 (as noted in the above thread
    • Installed mozilla-firefox
    • dchroot -d
    • ln -s /usr/bin/firefox /usr/bin/firefox32
    • exit
    • ln -s /usr/local/bin/do_dchroot /usr/local/bin/firefox32
    • Made sure all instances of firefox are closed (you can not run both 32 and 64 bit firefoxes at the same time afaik... it just spawns a new 64 bit thread when you launch the old.
    • firefox32
    • Visited a site with flash on it and ran the automated firefox flash install.


    As of right now sound is not working. If I figure out how to get the sound stuff working across the chroot, I'll post it here.

    I tried this, and I have verified that I have the 32bit version of firefox running, but I get the following message:

    LoadPlugin: failed to initialize shared library /home/mthaddon/.mozilla/plugins/libflashplayer.so [libXmu.so.6: cannot open shared object file: No such file or directory]

    I've checked that the file exists:

    ls -l /home/mthaddon/.mozilla/plugins/libflashplayer.so
    -rwxr-xr-x 1 mthaddon mthaddon 2096844 2004-05-20 07:34 /home/mthaddon/.mozilla/plugins/libflashplayer.so

    Any idea what's happening here?


    ---------------------------------

    Resolution:

    Found out I needed to install libxmu6 - fixed the problem. Now have 32bit firefox version running nicely.

    Thanks, Tom
    Last edited by mthaddon; April 13th, 2005 at 01:58 AM.
    Dell Inspiron 1420n running Hardy i386.

  5. #5
    Join Date
    Apr 2005
    Location
    Humble, TX
    Beans
    20
    Distro
    Ubuntu 6.10 Edgy

    Re: 32-Bit Chroot How-To

    Quote Originally Posted by mthaddon
    ...
    LoadPlugin: failed to initialize shared library /home/mthaddon/.mozilla/plugins/libflashplayer.so [libXmu.so.6: cannot open shared object file: No such file or directory]
    ...
    Resolution:

    Found out I needed to install libxmu6 - fixed the problem. Now have 32bit firefox version running nicely.
    Tom thank you for posting this! I had just setup the chroot environment on my machine yesterday afternoon and was having the exact same problem.

    Regards,
    --gordon

  6. #6
    Join Date
    Apr 2005
    Beans
    1

    Re: 32-Bit Chroot How-To

    Hey I found this thread hoping to answer my questions, but havn't quite got it. Now I'm wondering if you can answer them for me.

    I'm trying to set up a webserver, in which my mates can host their own websites. So I want to setup a user for them, so they can logon remotely via ssh, and have their website hosted in their home directory. But want I don't want them to be able to access the rest of the system. Even though I know they can't do anything because they wont have root permissions, I just want them to be able to access their home folder, and just their home folder. I thought I could do this my chrooting their user, can anyone expand on this, help me out, or point me in the right direction? Thanks in advance for any hints and tips.

  7. #7
    Join Date
    Oct 2005
    Beans
    1

    Re: 32-Bit Chroot How-To

    Thanks for the howto Have one problem tho. When trying to run a 32bit app from within the 64bit environment, i get this error:

    vox@Hagalaz:~$ vlc32
    (breezy) cho /usr/local/bin/vlc32 | sed 's|^.*/||'
    bash: cho: command not found

    but if i run it from within the 32bit enviro, it works fine. What've i done wrong?

    ***Edit***

    Gah ok. this was an issue with the joe editor. I'll go crawl back under my rock now..
    Last edited by vox; October 10th, 2005 at 06:25 PM.

  8. #8
    Join Date
    Feb 2005
    Location
    3rd planet out from Sol.
    Beans
    23
    Distro
    Hardy Heron (Ubuntu Development)

    Re: 32-Bit Chroot How-To

    Quote Originally Posted by Crad
    To get Firefox setup with Flash I did the following:

    • ...some other stuff about chroots...
    • sudo ln -s /usr/lib/libesd.so.0 /usr/lib/libesd.so.1
    • ...more clipped stuff regarding chroots...
    Thanks! You are awesome. I have been looking for that nugget of knowledge. I have not had sound working in my Hoary Firefox and Flashplayer at all until now. I had given up on it for a while, even. I am just running Hoary 32bit for now but have an AMD64 and was poking in here for tips on 32bit app support before I dive in.

    I get sound in Firefox now! What a nice surprise!

    Peace,
    Tim

  9. #9
    Join Date
    Apr 2005
    Location
    Ciudad Juárez
    Beans
    13
    Distro
    Ubuntu 6.10 Edgy

    Re: 32-Bit Chroot How-To

    First of all: THANK YOU! It's really very helpfull and thanks to you I can now view flash animations on my Ubuntu64.

    My only remark is that I can have both version of Firefox working at the same time: it won't work if I make a Gnome launcher, but if I launch firefox32 from the shell, a new window of firefox32 appears, even if firefox64 is already runing

    My next problem is for the sound... But I have already problems on my 64bits system, so I'm not sure I have any chance to have it to work in the chroot... Nobody spoke of OSS... Did somebody already try with it?
    Last edited by Ephack; April 23rd, 2005 at 10:54 PM.

  10. #10
    Join Date
    Apr 2005
    Location
    Galatina, LE - Italy
    Beans
    15
    Distro
    Kubuntu 7.04 Feisty Fawn

    Re: 32-Bit Chroot How-To

    Hi to all,

    this is my first message in the Ubuntu Forums after my registration.
    I've a suggestion for this excellent HOWTO.
    I think that it may be useful to add the following line in the /etc/fstab

    /usr/share/fonts /chroot/usr/share/fonts none bind 0 0

    so that fonts from the 64 bit environment become available to the 32 bit chrooted environment. My 32 bit Firefox won't list all the fonts on my system before.
    I hope this can be useful to someone.
    Bye

Page 1 of 10 123 ... LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •