View previous topic :: View next topic |
Author |
Message |
XenoTerraCide Veteran
Joined: 18 Jan 2004 Posts: 1418 Location: MI, USA
|
Posted: Sun Nov 27, 2005 7:27 pm Post subject: What does the 32-bit chroot actually do?[solved] |
|
|
K here's the long and the short of ME. I've been running a 32-bit Gentoo system on an athlon-XP desktop for a while. I just bought an amd athlon 64 laptop. I'm planning on running a native 64 system. at least for now. I think I may need to do this 32-bit chroot thing at some point. I have how-to. but I'm not sure I understand exactly what I'm doing and what the implications of doing it is. I do understand what it's for. oh and say I want to install openoffice. is openoffice-bin a precompiled binary? and can someone point me to somewhere where I can learn to compile a 32bit firefox on this, sorry it's a lot of stuff I have to learn that I haven't yet. and I'd like a fully working system. so any other tips would help too.
Last edited by XenoTerraCide on Sun Nov 27, 2005 8:58 pm; edited 1 time in total |
|
Back to top |
|
|
Headrush Watchman
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Sun Nov 27, 2005 7:43 pm Post subject: |
|
|
There are no side effects of using a 32bit chroot.
Basically all a chroot is, is a new / location. Using that feature, we can make new directories that hold 32 bit binaries, libraries, etc.
Once in the chroot, the system cannot see directories outside of the chroot.
When in the 32bit chroot, you don't have to do anything special to compile 32 bit apps. If you follow the instructions/tutorials, your /etc/make.conf in the chroot will have applicable settings for a 32 bit CPU. You just emerge as normal.
Compiling any of the -bin packages, (firefox, openoffice), in a 32bit chroot is useless. Since the 64bit environment can run 32 bit binaries, you can run then there and they are the exact same. If you want to compile either of those from source, then you would have to do it in the 32 bit chroot.
I've found that with firefox-bin, openoffice-bin, and mplayer-bin, I don't have a need for a chroot anymore and have recently removed them. |
|
Back to top |
|
|
xanas3712 Guru
Joined: 15 Oct 2004 Posts: 455
|
Posted: Sun Nov 27, 2005 7:49 pm Post subject: |
|
|
openoffice-bin is the binary. I would suggest just downloading firefox to get the 32 bit version rather than compiling it. It works fine that way and I can't see that any performance benefit in firefox is really gained from self compiling anyway. I'm using 64 bit 1.07 but downloaded the 32 bit rc2 of Firefox 1.5. It works well.
I had some problems with the 64 bit install a year ago and so started with a 32 bit install myself, which I'm not using at all now except as a chroot environment. It works very well for what you need it for. It basically will run applications requring x86-32 assembly (like emulators) and other such things.
I use a little script that does the following to get into my chroot environment
#!/bin/sh
mount -o bind /proc /mnt/gen32/proc
mount -o bind /dev /mnt/gen32/dev
mount -o bind /home /mnt/gen32/home
mount -o bind /mnt/cdrom /mnt/gen32/mnt/cdrom
mount -o bind /tmp /mnt/gen32/tmp
mount -o bind /boot /mnt/gen32/boot
mount -o bind / /mnt/gen32/mnt/gen64
xhost local:localhost
linux32 chroot /mnt/gen32 /bin/bash |
|
Back to top |
|
|
XenoTerraCide Veteran
Joined: 18 Jan 2004 Posts: 1418 Location: MI, USA
|
Posted: Sun Nov 27, 2005 8:02 pm Post subject: |
|
|
ah ok. I guess the Open Office question really should be what's the difference between emerging openoffice and emerging openoffice-bin. |
|
Back to top |
|
|
Headrush Watchman
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Sun Nov 27, 2005 8:14 pm Post subject: |
|
|
XenoTerraCide wrote: | ah ok. I guess the Open Office question really should be what's the difference between emerging openoffice and emerging openoffice-bin. |
Depends on where you are compiling it, in 64 bit or 32 bit environment.
In the 64 environment, compiling openoffice will try to compile a 64 bit openoffice from source. (This may or not work, see other threads)
In the 64 environment, emerging openoffice-bin will install a 32 bit version that was precompiled but works perfectly in the 64 bit environment.
In the 32 bit chroot, compiling openoffice will compile a 32 bit openoffice from source.
In the 32 bit chroot, emerging openoffice-bin will install a precompiled 32 bit version. You won't notice any difference between the two, except that it takes a while to compile from sources.
So bottom line, emerge openoffice-bin in the 64 bit environment. |
|
Back to top |
|
|
XenoTerraCide Veteran
Joined: 18 Jan 2004 Posts: 1418 Location: MI, USA
|
Posted: Sun Nov 27, 2005 8:55 pm Post subject: |
|
|
K thx. |
|
Back to top |
|
|
fidel Guru
Joined: 16 Jul 2004 Posts: 407 Location: CH
|
Posted: Tue Nov 29, 2005 7:15 pm Post subject: |
|
|
Hi there! I am very new to chroot!... I found out that I am not able to linux32 chroot without root permissions... Therefore I always do:
Code: | # sudo linux32 chroot /gentoo32 /bin/bash
|
Is there any way to chroot without root permissions? The problem is that all files in my chroot-home directory are write protected and belong to root and not to me as the user...
The other thing that makes the use of my system with my chroot environment quite uneasy is the fact that I just can't manage to change into my chroot environment with a single command... Well, I would like to be able to run the 32bit Openoffice by some command instead of chrooting on the console and env-update && source /etc/profile and start the app with oowriter2 etc. etc.
Is there any way to, let's say create a quick-start icon in my 64-bit system for an application in my 32-bit chroot environment?
Thanks in advance!
greets
fidel |
|
Back to top |
|
|
whig l33t
Joined: 27 Nov 2004 Posts: 973 Location: New Zealand
|
Posted: Wed Nov 30, 2005 4:18 am Post subject: |
|
|
I use sudo to let my user account access the 32 bit chroot. In one way this launches tabby (a program I wrote) and I can spawn all the 32 bit apps I like. For a look see http://www.rillion.net/tabby/index.html |
|
Back to top |
|
|
whig l33t
Joined: 27 Nov 2004 Posts: 973 Location: New Zealand
|
Posted: Wed Nov 30, 2005 4:21 am Post subject: |
|
|
PS here's a line from my /etc/sudoers
Code: | graeme ALL = NOPASSWD: /usr/local/bin/graeme-tabby |
|
|
Back to top |
|
|
Headrush Watchman
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Wed Nov 30, 2005 4:50 am Post subject: |
|
|
Or use dchroot to all non-root users in a chroot.
You'll have to unmask it as it is ~x86 and ~amd64 but worked great when I used a 32 bit chroot.
I was even able to make menu entries and icons to start programs in the 32 bit chroot using dchroot. (no command line typing needed) |
|
Back to top |
|
|
fidel Guru
Joined: 16 Jul 2004 Posts: 407 Location: CH
|
Posted: Wed Nov 30, 2005 9:06 am Post subject: |
|
|
Thanks a lot! Great thing!.. just, dumb me doesn't really understand how to use dchroot.. ..
Since I want to chroot into a 32bit environment, how can I achieve to linux32 dchroot /gentoo32 /bin/bash..?? With this command I get:
Code: | $linux32 dchroot /gentoo32 /bin/bash
(gentoo32) /gentoo32 /bin/bash
/bin/bash: /gentoo32: No such file or directory
dchroot: Child exited non-zero.
dchroot: Operation failed.
|
The same thing happens when I enter this command without linux32. Also the same thing when I enter
Code: | $ dchroot gentoo32
(gentoo32) gentoo32
/bin/bash: gentoo32: No such file or directory
dchroot: Child exited non-zero.
dchroot: Operation failed. |
In my /etc/dchroot.conf:
Could someone help?... |
|
Back to top |
|
|
fidel Guru
Joined: 16 Jul 2004 Posts: 407 Location: CH
|
Posted: Wed Nov 30, 2005 10:48 am Post subject: |
|
|
really sorry to ask again!... I just don't get it to work! With tabby I see myself confronted with the same issues as before. I cannot have one command run an app in my 32bit chroot: If I want to add a new app in tabby, I need the same command line option to add an app... I need to change into my 32bit chroot first and can run a program THEN. I cannot enter a command line and let the program start from that command line...
Hard to explain!... well this doesn't work:
Code: | #sudo linux32 chroot /gentoo32 /bin/bash; env-update && source /etc/profile; firefox |
it just cannot work! The command lets me do the chroot, but the other commands get executed when i exit the chroot... Can I pass a command to my chroot environment from my 64bit environment?.... Or is there another way to achieve this?.. (there must be one, otherwise you wouldn't tell me about tabby and dchroot )
thanks for any help! |
|
Back to top |
|
|
fidel Guru
Joined: 16 Jul 2004 Posts: 407 Location: CH
|
Posted: Wed Nov 30, 2005 3:26 pm Post subject: |
|
|
Dumb stupid me!...
sorry! of course I need to run tabby in my 32bit chroot environment!...
hmmmm!!... Really nice tool! Helps a lot! And really easy to configure!.. Concerning not needing to run chroot as root, I give up! Sad but oh well, I can live with chmod me:users every newly created file and so on.
Just wondering:
Quote: | Headrush:
I was even able to make menu entries and icons to start programs in the 32 bit chroot using dchroot. (no command line typing needed) |
... how?
Thanks guys!
greets
fidel |
|
Back to top |
|
|
Headrush Watchman
Joined: 06 Nov 2003 Posts: 5597 Location: Bizarro World
|
Posted: Wed Nov 30, 2005 4:44 pm Post subject: |
|
|
fidel wrote: | Dumb stupid me!...
sorry! of course I need to run tabby in my 32bit chroot environment!...
hmmmm!!... Really nice tool! Helps a lot! And really easy to configure!.. Concerning not needing to run chroot as root, I give up! Sad but oh well, I can live with chmod me:users every newly created file and so on.
Just wondering:
Quote: | Headrush:
I was even able to make menu entries and icons to start programs in the 32 bit chroot using dchroot. (no command line typing needed) |
... how?
Thanks guys!
greets
fidel |
Check out how here https://forums.gentoo.org/viewtopic-t-341377-highlight-dchroot.html |
|
Back to top |
|
|
fidel Guru
Joined: 16 Jul 2004 Posts: 407 Location: CH
|
Posted: Wed Nov 30, 2005 5:38 pm Post subject: |
|
|
GREAT!!! THANKS!!!! (...really didn't see this thread!... ) |
|
Back to top |
|
|
bakaohki Tux's lil' helper
Joined: 14 Jul 2005 Posts: 129 Location: Hungary
|
Posted: Sat Aug 19, 2006 8:38 pm Post subject: |
|
|
I made a modified do_chroot.sh file, so one can use "./" in the parameters. It might be a bit complicated since I'm new to sed and friends...
Code: |
#/bin/bash
ACTDIR="`pwd | sed -e "s/\//\\\\\\SLASH@#/g" | sed -e "s/SLASH@#/\//g"`"
ARGS=`echo $* | sed -e "s/\(\.\/\)\(.*\)/$ACTDIR\/\2/"`
linux32 dchroot 32run.sh $ARGS
|
|
|
Back to top |
|
|
|