Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
To chroot or not to chroot... that is the question....?
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
chesterhemmer
n00b
n00b


Joined: 24 Oct 2015
Posts: 2

PostPosted: Sat Oct 24, 2015 9:12 pm    Post subject: To chroot or not to chroot... that is the question....? Reply with quote

Hello,

First-time gentoo-er here. I'm running through the installation instructions in the handbook, and I keep coming across commands that give errors because something doesn't exist inside "/mnt/gentoo", which seems like a weird place to look since the command is run inside the chroot environment. There have been quite a few errors like that, which makes me think maybe the install procedure is not meant to be run in the chrooted environment.(?) The problem is that the instructions in the handbook say (at step 17.4) to enter the chroot, and explicitly say that "[from] this point, all actions performed are immediately on the new Gentoo Linux environment." The instructions never say to exit the chroot environment except for at the end when you're ready to reboot.

Some of the problems I've come across related to this issue are (this is using a stage 3 tarball from 2015/9/24):
Code:

* "eselect profile set N" (I chose 8) gives error:
    ln: failed to create symbolic link '/mnt/gentoo/etc/portage/make.profile': No such file or directory
    !!! Error: couldn't set new /mnt/gentoo/etc/portage/make.profile symlink
    exiting
    * had to create link myself at /etc/portage/make.profile
    * had to create a dir (inside chroot) at /mnt/gentoo/etc/portage in order for "eselect profile set" command to work; otherwise "eselect profile list" will not show the selected profile (asterisk indicator will be missing).
* emerge --config sys-libs/timezone-data
    Error:  No packages found
    * exit code of 0 though
    * see https://forums.gentoo.org/viewtopic-t-997826-start-0-postdays-0-postorder-asc-highlight-.html?sid=03877681341f816370ea947970626aea
    * able to work around by doing straight "emerge sys-libs/timezone-data" first, then copying (in chroot) /etc/timezone to /mnt/gentoo/etc/timezone, and re-running config step.
* locale.gen:  red starred text:  Sorry, but ROOT support is incomplete at this time.  (exit code 0)
* eselect locale list:  this is looking (in chroot) in /mnt/gentoo/usr/bin/locale.  Fixed by linking to correct chroot location.
    * had to copy (in chroot) /mnt/gentoo/etc/env.d/02locale to /etc/env.d/02locale

Any advice from experienced gentoo-ers? Should I be in chroot during the installation, or not?

Thanks in advance. :)
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 44043
Location: 56N 3W

PostPosted: Sat Oct 24, 2015 9:27 pm    Post subject: Reply with quote

chesterhemmer,

Welcome to Gentoo.

Yes you should be in the chroot. During the install, the chroot is your embryonic Gentoo.
It needs another Linux system to provide a kernel, services and a few tools.
The contents of the chroot are stage3 tarball and your portage tree.
Once you have both you chroot into /mnt/gentoo so that your new install can build the rest of itself as you choose.
When you are in the chroot, /mnt/gentoo is no longer visable from the inside as its not provided is the stage3. Its become /

From the outside of the chroot any /mnt/gentoo (from the inside) would be /mnt/gentoo/mnt/gentoo.

It sounds like your stage3 was unpacked to the wrong place, you don't have a portage snapshot, so /usr/portage (in the chroot) is empty, or your chroot failed.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
chesterhemmer
n00b
n00b


Joined: 24 Oct 2015
Posts: 2

PostPosted: Sun Oct 25, 2015 1:12 am    Post subject: Reply with quote

Hi and thanks for the reply.

I figured it out, actually. I screwed up the chroot environment by sourcing a script that does "export ROOT=/mnt/gentoo". I wrote this convenience script for setting PS1 and other environment stuff between reboots, and the ROOT var was making its way into the chroot. So, I believe that some install scripts or other make system logic was reading that and trying to install to /mnt/gentoo/etc/... instead of /etc/.... By removing that ROOT var, things are installing much more smoothly, without errors.

Thanks...
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum