You are not logged in.

#1 2007-12-09 10:13:38

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Tricky chroot problem

Alrighty, I have a 32-bit chroot within my 64-bit installation of Arch.  I dchroot -d firefox into firefox (installed on my 32-bit chroot).  Tonight, I just ran into a problem - I want firefox to launch a specified program when I click a link to download a file, and because firefox is running in it's own happy place, it doesn't even know my "real" programs on my main 64-bit installation even exists.

I followed this guide exactly to set my 32-bit chroot up.
http://wiki.archlinux.org/index.php/Arc … bit_system

What should I do?

Offline

#2 2007-12-09 10:21:55

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: Tricky chroot problem

Everything you want 32bit-Firefox to launch has to exist in the 32bit-chroot, pretty simple.

(I think that's about the last thread I'm to answer for today, you're over-quota wink


1000

Offline

#3 2007-12-09 10:38:54

synthead
Member
Registered: 2006-05-09
Posts: 1,337

Re: Tricky chroot problem

hahaha, yeah.  It all started with the 3rd gen iPod Nano I got for my girlfriend tonight ... getting that to run in linux?  Pain in the ass ... but made me realize a whole bunch of stuff I need to do also.

There has got to be a way to get it to launch a 64-bit app though ... I know there's a way ... I think ... I hate to run all this 32-bit stuff.  The only reason why I went to a 32-bit chroot was because nspluginwrapper wasn't doing it for me (lots of segfaults) and the occasional Wine emulation (bin32-wine also wasn't cuttin it for me).

Anyway, I'll keep googling it.

Last edited by synthead (2007-12-09 10:39:13)

Offline

#4 2008-03-26 09:56:11

alcafar
Member
From: Italy
Registered: 2008-03-23
Posts: 47

Re: Tricky chroot problem

synthead wrote:

There has got to be a way to get it to launch a 64-bit app though ... I know there's a way ... I think ... I hate to run all this 32-bit stuff.

I installed Arch two days ago, 64 bit with chroot at 32 bit, and I found your post having the same question in mind.
I thought of a possible solution, but before trying it I'd like to know what more expert people think (I didn't even know of the existence of the
chroot command since two days ago). So please don't try it unless you know what you do!

The basic idea is chrooting from the 32 bit environment to the original 64 bit one.
To do so, the 32 bit environment (located in /opt/arch32 if you did exactly like the wiki) should see the 64 bit root /. So we should add a mount line and an umount line to the script /etc/rc.d/arch32:

#!/bin/bash

. /etc/rc.conf
. /etc/rc.d/functions

case $1 in
    start)
        stat_busy "Starting Arch32 chroot"
        mount --bind /proc /opt/arch32/proc
        mount --bind /proc/bus/usb /opt/arch32/proc/bus/usb
        mount --bind /dev /opt/arch32/dev
        mount --bind /dev/pts /opt/arch32/dev/pts
        mount --bind /dev/shm /opt/arch32/dev/shm
        mount --bind /sys /opt/arch32/sys
        mount --bind /tmp /opt/arch32/tmp
        mount --bind /home /opt/arch32/home
        mount --bind / /opt/arch32/opt/arch64 #ADDED LINE
        add_daemon arch32
        stat_done
        ;;
    stop)
        stat_busy "Stopping Arch32 chroot"
        umount /opt/arch32/proc/bus/usb
        umount /opt/arch32/proc
        umount /opt/arch32/dev/pts
        umount /opt/arch32/dev/shm
        umount /opt/arch32/dev
        umount /opt/arch32/sys
        umount /opt/arch32/tmp
        umount /opt/arch32/home
        umount /opt/arch32/opt/arch64 # ADDED LINE
        rm_daemon arch32
        stat_done
        ;;
    restart)
        $0 stop
        sleep 1
        $0 start
        ;;
    *)
        echo "usage: $0 {start|stop|restart}"
esac
exit 0

Now I think (better: I wonder if) when you are in the 32 bit environment you can do "chroot /opt/arch64" and run 64 bit applications. If it works, it shouldn't be a problem to install dchroot in the 32 bit environment and put some scripts in /usr/bin (@ 32 bit) to run easily 64 bit applications.

I have not the time to try this thing now, and I'm not sure it won't mess up my system, so I'm waiting for an expert to say if it will work, or for a brave guy to try it.

Please give me feedback!

Offline

#5 2008-03-26 12:42:06

alcafar
Member
From: Italy
Registered: 2008-03-23
Posts: 47

Re: Tricky chroot problem

No feedback => I posted a new thread under Arch64.
http://bbs.archlinux.org/viewtopic.php? … 41#p346841
Seems to work but I miss one thing...

Last edited by alcafar (2008-03-26 16:22:06)

Offline

Board footer

Powered by FluxBB