How to 32 bit chroot Mint x64

Write tutorials and howtos in here
There are more tutorials here http://community.linuxmint.com/tutorial/welcome
Forum rules
Do not start a support topic here please. Before you post please read this

How to 32 bit chroot Mint x64

Postby piratesmack on Sun Feb 22, 2009 7:06 am

I've been playing around with Mint x64 in virtualbox, and decided to try to set up a 32 bit chroot. By using a 32 bit chroot, you can run and compile most (all?) 32 bit software on a 64 bit OS

Things you'll need:
-An installation of Mint x64
-A Linux Mint 6 (32 bit) ISO:
http://ftp.heanet.ie/pub/linuxmint.com/ ... Mint-6.iso

Got everything? Good, let's get started

First, let's create some directories:
Code: Select all
sudo mkdir -p /chroot/mint32   # A place for Mint 32 bit to live in
sudo mkdir -p /mnt/cdrom       # A place to mount the Mint 32 bit ISO
sudo mkdir -p /mnt/squashfs   # A place to mount filesystem.squashfs


Next, let's mount the LinuxMint-6.iso:
Code: Select all
sudo mount -o loop LinuxMint-6.iso /mnt/cdrom


Now mount filesystem.squashfs:
Code: Select all
sudo mount -t squashfs /mnt/cdrom/casper/filesystem.squashfs /mnt/squashfs -o loop


Copy the files from filesystem.squashfs to /chroot/mint32:
Code: Select all
sudo rsync -avHx /mnt/squashfs/ /chroot/mint32/


Make some changes to /etc/fstab to make things easier:
Code: Select all
gksu gedit /etc/fstab

-Add these lines:
Code: Select all
# Mint32 chroot
proc /chroot/mint32/proc proc noauto,defaults 0 0
/home /chroot/mint32/home none noauto,bind 0 0
/tmp /chroot/mint32/tmp none noauto,bind  0 0

-Save and exit

Now mount them with:
Code: Select all
sudo mount /chroot/mint32/proc
sudo mount /chroot/mint32/home
sudo mount /chroot/mint32/tmp


Copy some files from your Mint x64 installation:
Code: Select all
sudo cp -a /etc/{group,sudoers,shadow,resolv.conf,passwd} /chroot/mint32/etc/
sudo cp -a /etc/apt/sources.list /chroot/mint32/etc/apt/sources.list


Finally, it's time to chroot:
Code: Select all
sudo chroot /chroot/mint32
ldconfig             # update shared library links
apt-get update    # update apt sources
su USERNAME # Switch from Root to user. (It can be dangerous to run certain software as root.)

- Congratulations, now you're done

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

A few other things:

How to install 32 bit software inside the chroot:
-Just run:
Code: Select all
gksu synaptic

-And install whatever you want
- Usually, you just type the name of the program to start it.

How to install .deb packages inside the chroot:
-Run
Code: Select all
sudo dpkg -i NAME-VERSION-i386.deb


Screenshot of i686 Firefox running in Linux Mint 6 x64:
Image
Last edited by piratesmack on Fri Jul 16, 2010 1:32 pm, edited 20 times in total.
piratesmack
Level 5
Level 5
 
Posts: 710
Joined: Mon May 26, 2008 3:08 pm

Linux Mint is funded by ads and donations.
 

Re: How to 32 bit chroot Mint x64

Postby Husse on Mon Feb 23, 2009 1:26 pm

Nice - we are getting questions about 32 bit apps in Mint 64 bit now
Image
Don't fix it if it ain't broken, don't break it if you can't fix it
Husse
Level 21
Level 21
 
Posts: 19714
Joined: Sun Feb 11, 2007 7:22 am
Location: Near Borås Sweden

Re: How to 32 bit chroot Mint x64

Postby piratesmack on Tue Feb 24, 2009 2:01 am

Something I forgot to mention:
You may have to install the (32 bit) restricted driver for your video card inside the chroot in order to get 3d acceleration
piratesmack
Level 5
Level 5
 
Posts: 710
Joined: Mon May 26, 2008 3:08 pm


Return to Tutorials / Howtos

Who is online

Users browsing this forum: No registered users and 8 guests