Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Error in installation at: ls -l /usr/src/linux
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
alocacoc
n00b
n00b


Joined: 25 Aug 2012
Posts: 15

PostPosted: Sat Aug 25, 2012 9:10 am    Post subject: Error in installation at: ls -l /usr/src/linux Reply with quote

Hello,
I'm new in Gentoo and got a Problem with the Gentoo Linux installation.

I did the following steps after booting from the LiveCD:

net-setup eth0
ifconfig
ping -c 5 www.google.com
<network works>

<Harddisk is sdb>

fdisk /dev/sdb
n
p
1
<default>
+32MB
a
1
n
p
2
<default>
+512M
t
2
82
n
p
3
<default>
<default>
w

mkfs.ext2 /dev/sdb1
mkfs.ext4 /dev/sdb3
mkswap /dev/sdb2
swapon /dev/sdb2

mount /dev/sdb3 /mnt/gentoo
mkdir /mnt/gentoo/boot
mount /dev/sdb1 /mnt/gentoo/boot

date 082509112012

cd /mnt/gentoo
links http://www.gentoo.org/main/en/mirrors.xml

<choose mirror>
releases
amd64
autobuilds
stage3-amd64-20120621.tar.bz2
d
q
tar xvjpf stage3-*.tar.bz2

<I'm still in /mnt/gentoo>

links http://www.gentoo.org/main/en/mirrors.xml

<choose mirror>
snapshots
portage-latest.tar.bz2
d
q

tar xvjf mnt/gentoo/portage-latest.tar.bz2 -C /mnt/gentoo/usr

nano -w /mnt/gentoo/etc/make.conf

<I edit>
CFLAGS="-march=native -O2 -pipe"
MAKEOPTS="J4"
<PC got 4 cores>
<save>

cp -L /etc/resolv.conf /mnt/gentoo/etc/
mount -t proc none /mnt/gentoo/proc
mount --rbind /dev /mnt/gentoo/dev
chroot /mnt/gentoo /bin/bash
env-update
source /etc/profile
export PS1="(chroot) $PS1"

<I'm now in '(chroot) livecd / # '>

emerge --sync

nano -w /etc/locale.gen
<choose 4: 2xus and 2xde>
<save>

locale-gen <this doesn't work>

ls /usr/share/zoneinfo/Europe/Berlin
cp /usr/share/zoneinfo/Europe/Berlin /etc/localtime

emerge gentoo-sources

ls -l /usr/src/linux <Fehler: ls:_cannot access /usr/src/linux: No such file or directory, and this is correct, I checked, the directory doesn't exist>

emerge pciutils

lspci <doesn't work>
lsmod <works>

cd /usr/src/linux <doesn't work, because the dir isn't there, I cannot start 'make menuconfig'>



What did I forget to do? Shouldn't 'emerge gentoo-sources' make the dir availible?

Another question: my network card got the driver: r8169. Which setting I got to enable in 'make menuconfig' that the driver will get loaded at startup?

Thank you for your help.


Last edited by alocacoc on Sat Aug 25, 2012 2:37 pm; edited 1 time in total
Back to top
View user's profile Send private message
John R. Graham
Administrator
Administrator


Joined: 08 Mar 2005
Posts: 7835
Location: Somewhere over Atlanta, Georgia

PostPosted: Sat Aug 25, 2012 12:40 pm    Post subject: Reply with quote

I believe it should, actually. The /usr/src/linux symlink probably doesn't exist (because you don't have the symlink USE flag set) or else you missed an error message when emerging gentoo-sources. Look in /usr/src to see if you have a kernel source directory, which will include the kernel version. If so, then just do this:
Code:
cd /usr/src
ln -s that-exact-directory-name linux
Report back if you have any issues. :wink:

Regarding the network driver question, once you get into "make menuconfig", just hit "/" and type the name of the driver (in this case "r8169") and you'll be presented with a map to the configuration item to set. You can either make the driver built-in or make it load as a module. Even if you chopose the module route, loading it at boot time should now be automatic.

- John
_________________
This space intentionally left blank.
Back to top
View user's profile Send private message
alocacoc
n00b
n00b


Joined: 25 Aug 2012
Posts: 15

PostPosted: Mon Aug 27, 2012 9:58 am    Post subject: Reply with quote

I'm back after installing for a few days. So the error was the line "MAKEOPTS="J4" in make.conf. Not sure why, but this line causes the emerge not to work properly. It shouldn't actually but it did. After I removed this line, emerge worked properly, added it back, it didn't work again. I also added "emerge --oneshot portage", but this wasn't the errors cause.

Thanks for the help.
Back to top
View user's profile Send private message
gorkypl
Guru
Guru


Joined: 04 Oct 2010
Posts: 444
Location: Kraków, PL

PostPosted: Mon Aug 27, 2012 10:28 am    Post subject: Reply with quote

It should have been "-j4', with lowercase 'j'.
_________________
BTW, TWM FTW!
Back to top
View user's profile Send private message
Randy Andy
Veteran
Veteran


Joined: 19 Jun 2007
Posts: 1053
Location: /dev/koelsch

PostPosted: Mon Aug 27, 2012 12:59 pm    Post subject: Reply with quote

gorkypl and alocacoc.

Additional one double quote to much if your wrote here precisely the same as into your make.conf:
Quote:
"MAKEOPTS="J4"

This confuses the sequence of all the following Lines too and could have the strange side effects you've seen.

Regarding the missing of the self creation of the symlink which should point to the kernel sources John mentioned.

I guess this version of the handbook seems a little unprecise regarding this. AFAIK in older versions its creation was mentioned.

Handbook should contain at least these three possibilities.

1.) creation by hand via ln -s that-exact-directory-name linux
2.) If the USE-Flag symlink has been set before gentoo-sources was merged, this symlink has been created by portage
3.) emerge eselect package, and check the symlink via eselect kernel list, set it via eselect kernel set [No.]

Furthermore much success for your installation from my side.

Andy.
_________________
If you want to see a Distro done right, compile it yourself!
Back to top
View user's profile Send private message
alocacoc
n00b
n00b


Joined: 25 Aug 2012
Posts: 15

PostPosted: Tue Aug 28, 2012 8:56 am    Post subject: Reply with quote

No, it was:

MAKEOPTS="J4"

like written in the first post.

I had to add MAKEOPTS="-j4".

Thank you all for your help,
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