If this is your first visit, be sure to
check out the Forum Rules by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Problems using chroot into bt rc2 (Probably just me...)

Had a problem the other day. For some reason I couldn't install an app with removing some packages and lost X. Being that I'm impatient I thought it might be easier to re-install bt4 than try and trouble shoot why I have no desktop. Anyway, I didn't realize when I re-installed I overwrote my drivers. One of which (I really need for internet) I have to get from debian. But only seems to work if I briefly edit my apt sources.list. Alone dpkg -i just throws erros. But since I have no internet I thought I'd pop out a debian livecd(where my card is automatically detected) and use chroot to get a shell in bt and get the driver in question.

My problem:
So I used "chroot /mnt/bt" and things seemed to be working great until I tried to actuall install with apt-get:

Re: Problems using chroot into bt rc2 (Probably just me...)

Perhaps consider looking at the gentoo installation handbook. When chrooting during gentoo installation, you have some mounting to do like /dev and /proc as well as updating your environment variables. I'm not sure how different the process with BT might be, but it should be relatively similar.

In order to download source code quickly it is recommended to select a fast mirror. Portage will look in your make.conf file for the GENTOO_MIRRORS variable and use the mirrors listed therein. You can surf to our mirror list and search for a mirror (or mirrors) close to you (as those are most frequently the fastest ones), but we provide a nice tool called mirrorselect which provides you with a nice interface to select the mirrors you want.

Code Listing 1.1: Using mirrorselect for the GENTOO_MIRRORS variable
# mirrorselect -i -o >> /mnt/gentoo/etc/make.conf
A second important setting is the SYNC setting in make.conf. This variable contains the rsync server you want to use when updating your Portage tree (the collection of ebuilds, scripts containing all the information Portage needs to download and install software). Although you can manually enter a SYNC server for yourself, mirrorselect can ease that operation for you:

Note: If you want to manually set a SYNC server in make.conf, you should check out the community mirrors list for the mirrors closest to you. We recommend choosing a rotation, such as rsync.us.gentoo.org, rather than choosing a single mirror. This helps spread out the load and provides a failsafe in case a specific mirror is offline.
Copy DNS Info

One thing still remains to be done before we enter the new environment and that is copying over the DNS information in /etc/resolv.conf. You need to do this to ensure that networking still works even after entering the new environment. /etc/resolv.conf contains the nameservers for your network.

Now that all partitions are initialized and the base environment installed, it is time to enter our new installation environment by chrooting into it. This means that we change from the current installation environment (Installation CD or other installation medium) to your installation system (namely the initialized partitions).

This chrooting is done in three steps. First we will change the root from / (on the installation medium) to /mnt/gentoo (on your partitions) using chroot. Then we will create a new environment using env-update, which essentially creates environment variables. Finally, we load those variables into memory using source.

Code Listing 1.5: Chrooting into the new environment
# chroot /mnt/gentoo /bin/bash
# env-update
>> Regenerating /etc/ld.so.cache...
# source /etc/profile
# export PS1="(chroot) $PS1"
Congratulations! You are now inside your own Gentoo Linux environment. Of course it is far from finished, which is why the installation still has some sections left :-)

Bear in mind I'm using the gentoo example simply because I know it works and have done it many times. Copying the DNS info shouldnt be needed in your scenario I think, and mirrorselect is not relevant to backtrack. I'm hazarding a guess that only the directory structures will likely be different. The other commands should really all be core linux stuff.