Z's space


32-bit chroot under Slackware64

Filed under: Computing — by zhuqy @ 13:59
Tags: ,

From http://www.bluewhite64.com/e107_plugins/forum/forum_viewtopic.php?565, you could just replace all reference to BlueWhite64 to Slackware64 ^_^:

Running 32bits programs inside a chroot on BlueWhite64.
OBS: The IA 32 Emulation must be enabled on the Kernel

1- Create the chroot directory:

# mkdir -p /chroot/slack32

2- Install Slackware base + libs in the chroot:
* from slack CD1 we must install packages from categories a, ap, l and x;

# installpkg -root /chroot/slack32 /mnt/cdrom/slackware/{a,ap,l,x}/*.tgz

* from slack CD2 we must install packages for KDE;

# installpkg -root /chroot/slack32 /mnt/cdrom/slackware/kde/*.tgz

3- Mount with “-o bind” some BW64 directories. To make this easier, add the following lines to BW64’s file /etc/fstab:

# Slackware IA32 Emulation
proc /chroot/slack32/proc proc noauto,defaults 0 0
/home /chroot/slack32/home none noauto,bind 0 0
/tmp /chroot/slack32/tmp none noauto,bind 0 0

in the file /etc/rc.d/rc.local add the following commands:

/bin/mount /chroot/slack32/proc
/bin/mount /chroot/slack32/home
/bin/mount /chroot/slack32/tmp

Right now you can mount those directories:

mount /chroot/slack32/proc
mount /chroot/slack32/home
mount /chroot/slack32/tmp

4- Change to the chroot and run ‘ldconfig’:

# chroot /chroot/slack32
# ldconfig
# exit

5- copy or create symlinks for some config files inside the chroot:

# cp /etc/{group,passwd,shadow,resolv.conf} /chroot/slack32/etc/

6- Running commands directly:
Regular users should be able to run the chroot with sudo. Add the following line to /etc/sudoers:

user ALL=(ALL) NOPASSWD: /bin/chroot

* running firefox in chroot as a regular user (you need to install the 32bit firefox):

$ sudo chroot /chroot/slack32/ su – user -c “DISPLAY=:0 firefox”

(by DagMoller)


Leave a Comment »

No comments yet.

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at WordPress.com.

%d bloggers like this: