Ubuntu Forums ubuntu.com - launchpad.net - ubuntu help  

Go Back   Ubuntu Forums > The Ubuntu Forum Community > Other Community Discussions > Tutorials & Tips
Register Reset Password Forum Help Forum Council Search Today's Posts Mark Forums Read

Tutorials & Tips
The place to find Ubuntu related Tips & Tricks.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old April 7th, 2005   #1
Crad
5 Cups of Ubuntu
 
Crad's Avatar
 
Join Date: Mar 2005
Location: Los Angeles, CA
Beans: 28
Send a message via ICQ to Crad Send a message via AIM to Crad Send a message via MSN to Crad
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).

Quote:
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 05:12 PM.. Reason: Updated to include making a directory for cdrom0
Crad is offline   Reply With Quote
 

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -4. The time now is 04:08 AM.


vBulletin ©2000 - 2010, Jelsoft Enterprises Ltd. Ubuntu Logo, Ubuntu and Canonical © Canonical Ltd. Tango Icons © Tango Desktop Project. lingonberry