View previous topic :: View next topic |
Author |
Message |
ronvenema Apprentice
Joined: 16 Jan 2005 Posts: 160 Location: Dewey, Az
|
Posted: Tue May 29, 2007 8:29 pm Post subject: Chroot from existing Linux system |
|
|
Hi all, I have 2007 base system installed but want to do my installs from a live system (pcLinux) so that I can do more than look at a scrolling screen for 2 days. Is there a way to work through a terminal from pclinux?
Thanks _________________ Frustration leads to knowledge. |
|
Back to top |
|
|
thorpe l33t
Joined: 09 May 2005 Posts: 618 Location: Sydney, Australia.
|
Posted: Tue May 29, 2007 10:23 pm Post subject: |
|
|
Quote: | Is there a way to work through a terminal from pclinux? |
Of course, just follow the handbook. This guide also helps as there is a slightly different method used to chroot.. _________________ Research before taking any advice from me. I'm still coming to grips with this myself. |
|
Back to top |
|
|
GivePeaceAChance Guru
Joined: 26 May 2007 Posts: 480
|
Posted: Wed May 30, 2007 1:43 am Post subject: |
|
|
http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=1&chap=6
A direct link to chrooting from the handbook. A good idea might be to make a shell script to automate the process to save yourself time. I've done this because I am having to emerge stuff in chroot since Gentoo on my system currently can't connect to the internet.
Best of luck! |
|
Back to top |
|
|
ronvenema Apprentice
Joined: 16 Jan 2005 Posts: 160 Location: Dewey, Az
|
Posted: Wed May 30, 2007 6:20 am Post subject: re: Chroot from existing Linux system |
|
|
Here's the procedure that I used:
mount -t proc none /mnt/gentoo/proc
ok
cd /mnt/gentoo
ok
chroot /mnt/gentoo /bin/bash
ok
env-update
ok
source /etc/profile
Permission Denied
TIA _________________ Frustration leads to knowledge. |
|
Back to top |
|
|
GivePeaceAChance Guru
Joined: 26 May 2007 Posts: 480
|
Posted: Wed May 30, 2007 7:06 am Post subject: |
|
|
So I'm assuming you were root before these commands were entered?
Try this:
log in as root, probably 'sudo su'
Then
Code: |
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
|
Do that exactly and what do you get? |
|
Back to top |
|
|
thorpe l33t
Joined: 09 May 2005 Posts: 618 Location: Sydney, Australia.
|
Posted: Wed May 30, 2007 3:50 pm Post subject: |
|
|
Dont just simply use...
Code: | chroot /mnt/gentoo /bin/bash |
either. You need to make sure the environment is clean.
Code: | env -i HOME=$HOME TERM=$TERM chroot /mnt/gentoo /bin/bash |
_________________ Research before taking any advice from me. I'm still coming to grips with this myself. |
|
Back to top |
|
|
ronvenema Apprentice
Joined: 16 Jan 2005 Posts: 160 Location: Dewey, Az
|
Posted: Wed May 30, 2007 6:29 pm Post subject: |
|
|
GivePeace, Thank you that seemed to do the trick. _________________ Frustration leads to knowledge. |
|
Back to top |
|
|
GivePeaceAChance Guru
Joined: 26 May 2007 Posts: 480
|
Posted: Wed May 30, 2007 7:43 pm Post subject: |
|
|
Just a tip that I've been told. Might want to add [SOLVED] to the first post's subject just so people know you don't need any more help on this topic. |
|
Back to top |
|
|
ronvenema Apprentice
Joined: 16 Jan 2005 Posts: 160 Location: Dewey, Az
|
Posted: Thu May 31, 2007 1:28 pm Post subject: |
|
|
I'm still having a problem. When I try to compile a program it picks up the environment of the host computer, ie: the qt libraries on the gentoo partition are located at /usr/qt/3. On the PcLinux partition they are located at /usr/lib /qt. The result is the compiling program not being able to find the qt libraries and ends with an error. This happens whether or not I issue the env-update command or not. Is there any way to resolve this? Here are the commands that I use when entering the genntoo partition:
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"
TIA _________________ Frustration leads to knowledge. |
|
Back to top |
|
|
thorpe l33t
Joined: 09 May 2005 Posts: 618 Location: Sydney, Australia.
|
Posted: Thu May 31, 2007 1:53 pm Post subject: |
|
|
Did you read my last reply? _________________ Research before taking any advice from me. I'm still coming to grips with this myself. |
|
Back to top |
|
|
ronvenema Apprentice
Joined: 16 Jan 2005 Posts: 160 Location: Dewey, Az
|
Posted: Thu May 31, 2007 3:04 pm Post subject: |
|
|
thorpe, when I issue the following commands I get an error:
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
env -i HOME=$HOME TERM=$TERM chroot /mnt/gentoo /bin/bash
env: chroot: No such file or directory
TIA _________________ Frustration leads to knowledge. |
|
Back to top |
|
|
ronvenema Apprentice
Joined: 16 Jan 2005 Posts: 160 Location: Dewey, Az
|
Posted: Thu May 31, 2007 3:19 pm Post subject: |
|
|
thorpe, figured it out you have to break it up into 2 commands:
chroot /mnt/gentoo /bin/bash
env -i HOME=$HOME TERM=$TERM
This then gives me the correct environment speciifally the correct location for the qt libraries. So the complete command setup would be:
mount -t proc none /mnt/gentoo/proc
mount -o bind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env -i HOME=$HOME TERM=$TERM
source /etc/profile
export PS1="(chroot) $PS1"
I'm continuing the build of kde-meta and so far no errors.
TIA _________________ Frustration leads to knowledge. |
|
Back to top |
|
|
thorpe l33t
Joined: 09 May 2005 Posts: 618 Location: Sydney, Australia.
|
Posted: Thu May 31, 2007 3:43 pm Post subject: |
|
|
Quote: | thorpe, when I issue the following commands I get an error |
You shouldn't. That line of code is taken directly from the alterntate install guide I linked to in my first reply. Its the same command I use everytime I install Gentoo as I always install from a working Linux. _________________ Research before taking any advice from me. I'm still coming to grips with this myself. |
|
Back to top |
|
|
|