View previous topic :: View next topic |
Author |
Message |
gentoogentile n00b
Joined: 12 Sep 2013 Posts: 6
|
Posted: Thu Sep 12, 2013 10:09 pm Post subject: Stuck on the handbook |
|
|
Pardon a total Gentoo newb and relative Linux newbie.
I'm following the handbook and building a Gentoo environment. This stuff is fun! But now I am stuck on Section 6.a. I seem to have a problem here, and I'm not sure what it is. It seems to point to further troubles and if there is an easy fix, that's great. I'm hoping somebody here can help me out.
So, what happens: 6.a states: # source /etc/profile
However, when I enter source /etc/profile, the system tells me there is no such file or directory. I can see this is true by attempting to navigate to /etc/profile by using cd /etc/profile.
I attempted to skip this step though I am getting stuck on another one. I'll get on to that if I may resolve this issue.
Thanks in advance for any help! |
|
Back to top |
|
|
creaker l33t
Joined: 14 Jul 2012 Posts: 651
|
Posted: Thu Sep 12, 2013 10:44 pm Post subject: |
|
|
/etc/profile is not a directory, so you can't navigate to /etc/profile with "cd" command.
It is a file that contains commands that should be executed.
Did you checked for file existence? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54258 Location: 56N 3W
|
Posted: Thu Sep 12, 2013 10:49 pm Post subject: |
|
|
gentoogentile,
Welcome to Gentoo.
/etc/profile is a symbolic link to a directory in the portage tree.
You won't be able to source the profile until you have set one with a command like that will tell you how to use eselect profile.
A profile should have been set in the combination of stage3 and portage tree you downloaded. If you don't yet have a portage tree, your /etc/profile symlink will point to something that isn't there. Its not an error.
Try eselect profile to set a profile, if you have no available profiles, you are missing your portage snapshot. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
creaker l33t
Joined: 14 Jul 2012 Posts: 651
|
Posted: Thu Sep 12, 2013 10:57 pm Post subject: |
|
|
NeddySeagoon
Can you explain, please, why I have this file as a set of commands (just a script text file), not as symlink to some directory in the portage tree?
And what about
In bash, the "source" command reads in bash statements from a file, and executes them as if they appeared immediately in the file the "source" command is in? |
|
Back to top |
|
|
Hu Moderator
Joined: 06 Mar 2007 Posts: 21639
|
Posted: Fri Sep 13, 2013 12:13 am Post subject: |
|
|
I believe NeddySeagoon answered with regard to /etc/make.profile, not /etc/profile. The former is related to Portage configuration. The latter is part of the system-wide shell configuration. |
|
Back to top |
|
|
tryn Guru
Joined: 21 Dec 2002 Posts: 325 Location: 39.885° N. -88.913° W.
|
Posted: Fri Sep 13, 2013 2:40 am Post subject: |
|
|
gentoogentile
From this link
This is from section 6.a the last part of it.
# chroot /mnt/gentoo /bin/bash
# source /etc/profile
# export PS1="(chroot) $PS1"
If you have worked down from the beginning the above should work.
If not try again from the top.
You should be root at this time and these commands should work. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54258 Location: 56N 3W
|
Posted: Sat Sep 14, 2013 10:11 am Post subject: |
|
|
creaker,
I misread the OP and answered the question I thought I saw. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
gentoogentile n00b
Joined: 12 Sep 2013 Posts: 6
|
Posted: Mon Sep 16, 2013 2:13 pm Post subject: |
|
|
I've been away all weekend but today I will attempt what you folks have recommended when I get a chance. Thanks for the tips! |
|
Back to top |
|
|
gentoogentile n00b
Joined: 12 Sep 2013 Posts: 6
|
Posted: Wed Sep 18, 2013 7:51 pm Post subject: |
|
|
NeddySeagoon,
Quote: | /etc/profile is a symbolic link to a directory in the portage tree.
You won't be able to source the profile until you have set one with a command like
Code:
eselect profile
that will tell you how to use eselect profile. |
I entered eselect profile and got: -bash: eselect: command not found
Did you provide the wrong advice? I'm not sure how to read this thread at this point.
Tryn,
I have started this build all over, from the top, and I’m getting the same error.
“bash: /etc/profile: No such file or directory”
Creaker: how would I check for file existence? I thought I made it clear I attempted to check for the file when I said Quote: | I can see this is true by attempting to navigate to /etc/profile by using cd /etc/profile. | . By this I meant that I navigated to /etc and I see nothing in there named profile. |
|
Back to top |
|
|
creaker l33t
Joined: 14 Jul 2012 Posts: 651
|
Posted: Thu Sep 19, 2013 6:49 am Post subject: |
|
|
You should have this file as part of stage3 tarball (already included in tarball)
Three possible reasons of missing /etc/profile:
1. You did not correctly chrooted into your unpacked gentoo system and you are still in the live media environment in which there may be no file named "profile" in /etc directory.
2. You have downloaded broken stage3 tarball.
3. Some errors occurs during unpacking stage3 (once in the past I had same issue, tar just interrupts unpacking without any error message).
I would suggest you to restart installation from re-creating your partition and re-downloading stage3. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54258 Location: 56N 3W
|
Posted: Thu Sep 19, 2013 11:28 am Post subject: |
|
|
gentoogentile,
Profiles are stored in /usr/portage/profiles/
If you don't have that, you either don't have a portage snapshot, have installed the portage tree in the wrong place, or are not in the chroot or some combination of that list.
Code: | $ ls /usr/portage/profiles/
ChangeLog arch eapi-5-files package.mask uclibc
ChangeLog-2007 arch.list embedded prefix updates
ChangeLog-2008 base features profiles.desc use.desc
ChangeLog-2009 categories hardened releases use.local.desc
ChangeLog-2010 default info_pkgs repo_name
ChangeLog-2011 desc info_vars targets
ChangeLog-2012 eapi license_groups thirdpartymirrors |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
gentoogentile n00b
Joined: 12 Sep 2013 Posts: 6
|
Posted: Thu Sep 19, 2013 6:50 pm Post subject: |
|
|
Quote: | If you don't have that, you either don't have a portage snapshot, have installed the portage tree in the wrong place, or are not in the chroot or some combination of that list. |
That doesn't help very much. I am following the instructions in the handbook explicitly. I have rebuilt this machine 4 times now, and I get stuck in the exact spot every time. I would suggest at this point there is a serious issue with the handbook or the current stage-3. Has anyone actually tried a build recently? Can someone please actually help me? |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54258 Location: 56N 3W
|
Posted: Thu Sep 19, 2013 7:05 pm Post subject: |
|
|
gentoogentile,
I guess things are going wrong at 6.b. Configuring Portage
Do not reinstall - its likely what you have done so far is good.
Boot the CD of your choice. Following the handbook, do steps
4.f. Mounting (Code Listing 6.1: Mounting partitions)
6.a. Chrooting
Code Listing 1.3: Copy over DNS information
Code Listing 1.4: Mounting /proc and /dev
Code Listing 1.5: Chrooting into the new environment
You are now back in your Gentoo install as if you had never left.
If any of the above steps fail, stop and report the step that failed, the command you gave, the error message and what you thought should happen.
If you want to ping me on IRC in #gentoo on irc.freenode.net, I will be around for about the next 2 hours _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
gentoogentile n00b
Joined: 12 Sep 2013 Posts: 6
|
Posted: Thu Sep 19, 2013 7:49 pm Post subject: |
|
|
OK. Thank you for responding, I do appreciate your efforts. As I said before, I am on 6.a.
Here are the steps I am able to accomplish to the problem.
livecd gentoo # mount -t proc none /nt/gentoo/etc/
livecd gentoo # mount --rbind /sys /mnt/gentoo/sys
livecd gentoo # mount --rbind /dev /mnt/gentoo/dev
livecd gentoo # chroot /mnt/gentoo /bin/bash
bash-4.2# source /etc/profile
bash: /etc/profile: No such file or directory
Same error every time. I have tried different mirrors for the tarball and like I said, I've rebuilt this four times. It seems to me that the current stage-3 just doesn't have what it needs. But I do not know. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54258 Location: 56N 3W
|
Posted: Thu Sep 19, 2013 8:01 pm Post subject: |
|
|
gentoogentile,
It looks like something is broken in the stage3. Please report a bug to bugs.gentoo.org
Make the file as Code: | -rw-r--r-- 1 root root 2218 Jul 3 2011 /etc/profile |
with the following content.
Code: | # /etc/profile: login shell setup
#
# That this file is used by any Bourne-shell derivative to setup the
# environment for login shells.
#
# Load environment settings from profile.env, which is created by
# env-update from the files in /etc/env.d
if [ -e /etc/profile.env ] ; then
. /etc/profile.env
fi
# You should override these in your ~/.bashrc (or equivalent) for per-user
# settings. For system defaults, you can add a new file in /etc/profile.d/.
export EDITOR=${EDITOR:-/bin/nano}
export PAGER=${PAGER:-/usr/bin/less}
# 077 would be more secure, but 022 is generally quite realistic
umask 022
# Set up PATH depending on whether we're root or a normal user.
# There's no real reason to exclude sbin paths from the normal user,
# but it can make tab-completion easier when they aren't in the
# user's PATH to pollute the executable namespace.
#
# It is intentional in the following line to use || instead of -o.
# This way the evaluation can be short-circuited and calling whoami is
# avoided.
if [ "$EUID" = "0" ] || [ "$USER" = "root" ] ; then
PATH="/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:${ROOTPATH}"
else
PATH="/usr/local/bin:/usr/bin:/bin:${PATH}"
fi
export PATH
unset ROOTPATH
if [ -n "${BASH_VERSION}" ] ; then
# Newer bash ebuilds include /etc/bash/bashrc which will setup PS1
# including color. We leave out color here because not all
# terminals support it.
if [ -f /etc/bash/bashrc ] ; then
# Bash login shells run only /etc/profile
# Bash non-login shells run only /etc/bash/bashrc
# Since we want to run /etc/bash/bashrc regardless, we source it
# from here. It is unfortunate that there is no way to do
# this *after* the user's .bash_profile runs (without putting
# it in the user's dot-files), but it shouldn't make any
# difference.
. /etc/bash/bashrc
else
PS1='\u@\h \w \$ '
fi
else
# Setup a bland default prompt. Since this prompt should be useable
# on color and non-color terminals, as well as shells that don't
# understand sequences such as \h, don't put anything special in it.
PS1="${USER:-$(whoami 2>/dev/null)}@$(uname -n 2>/dev/null) \$ "
fi
for sh in /etc/profile.d/*.sh ; do
[ -r "$sh" ] && . "$sh"
done
unset sh |
_________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
creaker l33t
Joined: 14 Jul 2012 Posts: 651
|
Posted: Thu Sep 19, 2013 8:44 pm Post subject: |
|
|
gentoogentile wrote: |
livecd gentoo # mount -t proc none /nt/gentoo/etc/
|
Mounted at wrong place.
Should be:
mount -t proc none /mnt/gentoo/proc/
Quote: | It seems to me that the current stage-3 just doesn't have what it needs |
Just download it (no matter under linux or windows) and look into archive: does /etc/profile exists in the archive. If yes, use this archive, do not download it at installation time. Put it in / of your installation and untar. |
|
Back to top |
|
|
Clad in Sky l33t
Joined: 04 May 2007 Posts: 887 Location: Germany
|
Posted: Fri Sep 20, 2013 6:13 am Post subject: |
|
|
If you're using the amd64 handbook (I just assume you do), everything should be OK.
So you probably got some corrupted tarball.
Usually following the handbook is a sure fire way to get Gentoo installed. _________________ Kali Ma
Now it's autumn of the aeons
Dance with your sword
Now it's time for the harvest |
|
Back to top |
|
|
gentoogentile n00b
Joined: 12 Sep 2013 Posts: 6
|
Posted: Fri Sep 20, 2013 6:25 pm Post subject: |
|
|
Quote: | gentoogentile wrote:
livecd gentoo # mount -t proc none /nt/gentoo/etc/
Mounted at wrong place.
Should be:
mount -t proc none /mnt/gentoo/proc/
Quote:
It seems to me that the current stage-3 just doesn't have what it needs
Just download it (no matter under linux or windows) and look into archive: does /etc/profile exists in the archive. If yes, use this archive, do not download it at installation time. Put it in / of your installation and untar. |
That was a typo on my part, unique only to this thread. I did not in fact enter mount -t proc none /nt/gentoo/etc/. I used what you wrote.
Clad in Sky: I'm not using the amd64 handbook as I'm not using AMD architecture. That's some assumption.
Like I said, I downloaded the tarball 4 separate times, from 4 separate mirrors, for 4 different builds.
Neddy,
Quote: | livecd etc #mkdir profile
mkdir: cannot create directory 'profile': Operation not permitted |
I'm tempted to add the file to the tar in Windows and mount a drive to get the tarball from but I consider it cheating :p |
|
Back to top |
|
|
creaker l33t
Joined: 14 Jul 2012 Posts: 651
|
Posted: Fri Sep 20, 2013 7:55 pm Post subject: |
|
|
Quote: | livecd etc #mkdir profile
mkdir: cannot create directory 'profile': Operation not permitted |
Did you tried to create directory on live CD?
You should create it when you switched into installation evironment (by chroot).
May be you trying to untar stage3 to liveCD also?
Code: | I'm tempted to add the file to the tar in Windows |
do not add anything. It will be incorrect file with wrong permissions, codepage, and with wrong string-terminator.
Just open it with archiver like 7zip or WinRAR and look into archive content. in root level you can found etc directory. Open it (just in place, inside archive) and check for "profile" file in this directory.
I'm pretty sure all the archives you have downloaded are fine. |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54258 Location: 56N 3W
|
Posted: Fri Sep 20, 2013 8:13 pm Post subject: |
|
|
gentoogentile,
In your chroot, open the file /root/.bash_history and post the last 20 lines or so.
This will show the last commands exectuted inside the chroot.
What is the exact name of the stage3 tarball you downloaded. If you can give us that, we can fetch it too and look inside it, or even install it in a virtual machine. That will help us to help you. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
tryn Guru
Joined: 21 Dec 2002 Posts: 325 Location: 39.885° N. -88.913° W.
|
Posted: Fri Sep 20, 2013 11:21 pm Post subject: |
|
|
gentoogentile
I have what may be a stupid question.
I did this one time myself.
Are you using the same terminal for all of your work?
When I first started building my first Gentoo program I messed up and used two different terminals. One to get into the chroot environment
and then I opened a new one and became root in it. This was a bad mistake and not something you want to do.
But if you did this it could explain the problem you are having. |
|
Back to top |
|
|
Clad in Sky l33t
Joined: 04 May 2007 Posts: 887 Location: Germany
|
Posted: Sat Sep 21, 2013 7:34 am Post subject: |
|
|
gentoogentile wrote: |
Clad in Sky: I'm not using the amd64 handbook as I'm not using AMD architecture. That's some assumption.
|
It might help if you told which handbook you're using, then, so I or anyone else can check for mistakes in it. I just assumed you used the AMD64 handbook because it's the most common architecture if you're building Gentoo on a PC. You didn't say what you're building Gentoo on, so excuse me that I was mistaken. _________________ Kali Ma
Now it's autumn of the aeons
Dance with your sword
Now it's time for the harvest |
|
Back to top |
|
|
NeddySeagoon Administrator
Joined: 05 Jul 2003 Posts: 54258 Location: 56N 3W
|
Posted: Sat Sep 21, 2013 5:33 pm Post subject: |
|
|
Team,
Until the chroot steps the handbooks are all much of a muchness.
Fetching an ia64 tarball for a PC would be pretty painful but not until chroot time. _________________ Regards,
NeddySeagoon
Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail. |
|
Back to top |
|
|
Ant P. Watchman
Joined: 18 Apr 2009 Posts: 6920
|
Posted: Sat Sep 21, 2013 5:52 pm Post subject: |
|
|
Clad in Sky wrote: | gentoogentile wrote: |
Clad in Sky: I'm not using the amd64 handbook as I'm not using AMD architecture. That's some assumption.
|
It might help if you told which handbook you're using, then, so I or anyone else can check for mistakes in it. I just assumed you used the AMD64 handbook because it's the most common architecture if you're building Gentoo on a PC. You didn't say what you're building Gentoo on, so excuse me that I was mistaken. |
It is kind of a stretch, there's quite a lot of PC hardware out there that's still x86-only. Even my netbook made in 2009 doesn't have 64 bit support. |
|
Back to top |
|
|
tryn Guru
Joined: 21 Dec 2002 Posts: 325 Location: 39.885° N. -88.913° W.
|
Posted: Mon Sep 23, 2013 1:55 am Post subject: |
|
|
gentoogentile
You say that your not using Quote: | I'm not using the amd64 handbook as I'm not using AMD architecture. That's some assumption |
So can you say what manual your using from this link.
It seems like we should know what type of architecture you are trying to build.
This might not solve your problem but it might give you more help from some of the users on the forum. |
|
Back to top |
|
|
|