# Network problem

## executor111

I have just installed gentoo using Handbook, and i have problem conecting to the net. The network works when im using LiveCD , but when i put command

```
 chroot /mnt/gentoo /bin /bash
```

 i can't use my network anymore.

I have set up my network using LiveCD with command

```
pppoe-setup

pppoe-start
```

When i reboot my sistem i get message TIMED OUT when it try to connect.

Im using eth0 for my adsl connection. And im trying to run command

```
emerge rp-pppoe
```

 but i can't since i can't connect to the intenet.

Please help.

----------

## rojanu

If I understand correctly you are tryig to install gentoo.  You are able to access the net when using livecd but not in chrooted environment.

can you do ifconfig and post the results and try to ping an IP address 64.233.183.99

if you want to emerge rp-pppoe and do net-setup

in livecd do

```
cd /mnt/gentoo/usr/portage/distfiles

wget ftp://mirror.datapipe.net/gentoo/distfiles/rp-pppoe-3.8.tar.gz

chroot /mnt/gentoo /bin/bash

env-update && source /etc/profile

emerge rp-pppoe

```

that should do it

----------

## executor111

No i have installed gentoo, and it works fine except of internet.

When i do ifconfig everything looks fine to me. I don't nov how to copy-paste so i have only one line here

```
UP POINTOPOINT RUNNING NOARP MULTICAST MTU1492
```

I have try what have u sed 

```
emerge rp-pppoe
```

But it's still the same. I get this message on the end:

```
failed:Temporary failure in name resolution
```

so what should i do now?

----------

## rojanu

Did you do, when installing

```
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
```

it seems to be a DNS problem did you tried to ping the ip address

do 

```
ping -c 4 64.233.183.99
```

 and see if it pings

----------

## executor111

Yes it pings that ip address. 

But emerge rp-pppoe stil does not work.

i did not do that when installing and 

when i try now 

```
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
```

it says : /etc/resolv.conf No such file or directory.

But when i go to to etc and put ls command, i can see this file there light blue, but i can't copy it.

Why is that?

----------

## rojanu

Ok. All you got to do is

boot from livecd, mount your partitions and do 

```
cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf
```

 and then unmount partitions then boot normally.

Should work straight away

----------

## executor111

I did that and it didnt work.

When i reboot i get this message:

```
starting ADSL for eth0

TIMED OUT 

/usr/sbin/pppoe-start: line 196: 8847 Terminated         $CONNECT<(echo"$CONTREAD") >/dev/null 2> &1

ERROR: Problem starting needed service net.eth0

netmount was not started
```

My /etc/conf.d/net   looks like this

```
dns_domain_lo="homenetwork"

config_eth0=( "192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" )

routes_eth0=( "default gw 192.168.0.1" )

config_eth0=( "dhcp" )

dhcp_eth0="nodns nontp nonis"

config_eth0=( "adsl" )

adsl_user_eth0="my-adsl-username"
```

but as i said i didnt run  emerge rp-pppoe

and when i erased some line in /etc/conf.d/net:

```

dns_domain_lo="homenetwork"

config_eth0=( "192.168.0.2 netmask 255.255.255.0 brd 192.168.0.255" )

routes_eth0=( "default gw 192.168.0.1" )

config_eth0=( "dhcp" )

dhcp_eth0="nodns nontp nonis"
```

i get this message:

```
network interface eth0does not exist

Please verify hardware or kernel module (driver)

ERROR: Problem starting needed service net.eth0
```

What should i put in to my /etc/conf.d/net? 

I have ADSL with dynamic IP.

Please help.

----------

## executor111

Anyone

----------

## rojanu

Well in your config you specified a manual IP address then you told it to use DHCP and nodns!

Are you sure you know what you are doing?

----------

## executor111

could u tell me what should i put in my /etc/conf.d/net?

I now it's not right what i have now in. That's all i now.

I have try to do like it says in /etc/conf.d/net.example, but then i need to run

emerge rp-pppoe, and im unable to do that since i can't connect to network when i enter my installation environment by chrooting into it with code :chroot /mnt/gentoo /bin /bash.

And there is my problem.

----------

## rojanu

 *executor111 wrote:*   

>  im unable to do that since i can't connect to network when i enter my installation environment by chrooting into it with code :chroot /mnt/gentoo /bin /bash

 I don't understand, you are saying that you have installed gentoo.

If you have installed gentoo, Why are you chrooting.  Are you sure you have followed the installation handbook?

----------

## executor111

Yes i did, and the network did not work, so i try with boot cd to repair my network setup.

And i don't now what to do next. Maybe i just use ubunto  :Crying or Very sad: 

----------

## rojanu

Still you did not answer the question, Why are you chrooting?

Can you tell me what happens when you boot into gentoo,

Step by step if possible?

----------

## executor111

Here is what i have done:

```
 modprobe 8139too

/etc/init.d/pcmcia start

passwd

New password:

Re-enter password:

/etc/init.d/sshd start

pppoe-setup

pppoe-start

fdisk /dev/hda 
```

then i have created my partitions and:

```
mke2fs /dev/hda5

mke2fs -j /dev/hda7

mkswap /dev/hda2

swapon /dev/hda2

# mount /dev/hda3 /mnt/gentoo

# mkdir /mnt/gentoo/boot

# mount /dev/hda1 /mnt/gentoo/boot

# cd /mnt/gentoo

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

# tar xvjpf stage3-*.tar.bz2

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

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

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

CHOST="i686-pc-linux-gnu"

CFLAGS="-march=athlon-tbird -O2 -pipe -fomit-frame-pointer"

CXXFLAGS="${CFLAGS}"

MAKEOPTS="-j2"

# mirrorselect -i -o >> /mnt/gentoo/etc/make.conf

# mirrorselect -i -r -o >> /mnt/gentoo/etc/make.conf

# cp -L /etc/resolv.conf /mnt/gentoo/etc/resolv.conf

# mount -t proc none /mnt/gentoo/proc

# mount -o bind /dev /mnt/gentoo/dev

# chroot /mnt/gentoo /bin/bash

# env-update

>> Regenerating /etc/ld.so.cache...

# source /etc/profile

# export PS1="(chroot) $PS1"
```

my /etc/conf.d/net looks like this:

```
dns_domain_lo="homenetwork"

config_eth0=( "adsl" )

adsl_user_eth0="username" 
```

i have run:

```
emerge net-dialup/rp-pppoe

emerge sys-apps/net-tools

rc-update add net.eth0 default
```

and then when i run command pppoe-start it says TIMED OUT.

pppoe-status: Link is down(cant read pppoe PID file /var/run/-pppoe.pid.pppoe)

What is wrong?

----------

## rojanu

so you still haven't installed gentoo but you are on the livecd and you don't have internet when you are in the chrooted environment. 

Am I right?

----------

## executor111

I did reinstall, because i did not do some things right. And now im in chrooted environment and i dont have internet. You are right. And now it stops when i try emerge lilo.

----------

## executor111

How should my /etc/conf.d/net looks like?

----------

## rojanu

Well it is very confusing,  If you have internet in the livecd, you should have it when you chroot from live cd into your gentoo installation. And at this stage your net conf file really is not needed and it does not make any difference at all.

So I am still confused what kind of environment are you using. what I suggest would be if you have installed you kernel and configured it. Just reboot into your new gentoo install and we will take it from there.

----------

## executor111

I would like to reinstall. Start all over again. I will inform you when im so far.

Or when i hit upon some problem.

----------

## executor111

OK I have reinstall. Everything works just fine. So i try with command:

```
 emerge kde
```

 ( that was stupid thing )

and i wait for about two days. 

Then i start 

```
echo "exec startkde" > ~/.xinitrc
```

and startx

and i get following error:with user:

```
xinit: Permisson denied (errno13) no server "X" in PATH
```

with root:

```
xinit: no such file or directory_(errno2): no server "X" in PATH
```

So whats wrong now?

----------

## FcukThisGame

did you run these commands as root?

----------

## FcukThisGame

I'd suggest you try running the command as root first. 

and most likely you will run into errors trying to get X running correctly. I've had about every problem in the book so I can probably help you with those.

----------

## executor111

Yes, i did run this commands as root. Same problem.

Did i forget something?

----------

## FcukThisGame

try these commands:

```
cd /etc/X11

cp xorg.conf xorg.conf.backup

xorgconfig # and follow the steps... 

cp ~/xorg.conf xorg.conf

rm ~/.xinitrc

startx
```

and post your errors.

can you also post the xorg.conf that it generates for you, and the contents of /var/log/Xorg.0.log to pastebin.com and link to them here?

----------

## amar_

Or just boot Ubuntu or some livecd with X copy xorg.conf from it then just put it in Gentoo's /etc/X11  :Smile: .BTW when I was doing installation I only have to pppoe-setup/start on live session and when I chrooted I had internet normaly..Weird.. do

----------

## executor111

I have started all over again with xorg-x11.

I put these commands:

```
# emerge xorg-x11

# etc-update

# revdep-rebuild
```

 i did not specify INPUT_DEVICES and VIDEO_CARDS.

Then when i put command:

```
# [[ -e ~/usr-x11r6-packages ]] && emerge
```

I must get sign $ in front instead of # as it says in   this handbook, but i get # and list of options for emerge. Im little confused now.

----------

## executor111

Now when i run 

```
startx
```

I get thise error:

(EE) Failed to load module "nv" (module does not exist, 0)

(EE) No drivers available

Fatal server error:

no screens found

----------

## FcukThisGame

emerge nvidia-drivers and change 'Driver' in xorg.conf under section device to nvidia

----------

## rojanu

executor111 your main problem is you not reading handbooks properly and expecting us to solve everything  for you.  You should pay more attention.

You are saying that you did not put anything into DEVICES and expect a graphic driver to be there for you.

----------

## executor111

Yes i try that way too, but i change that. 

Im not reading handbooks properly because i don't  understand the half things that are written there and because there is more diferent handbooks.

But i  appreciate yours help.

----------

## kpep01

Back on December 29, executor 111 wrote:

 *Quote:*   

> network interface eth0does not exist 
> 
> Please verify hardware or kernel module (driver) 
> 
> ERROR: Problem starting needed service net.eth0

 

This error message exists when you haven't properly compiled you ethernet card into the kernel.

If you haven't solved that bit of your problem yet, I hope that helps.

----------

