# Install pppoe in networkless environment. SOLVED

## brave_heart

Hi, all

I struggled several days to install 2006.1 in networkless. For it have no network support currently, I wander if there are any way to install pppoe for my adsl. I mean can I download pppoe via other PC and then copy&install to Gentoo?

Thanks,  :Very Happy: Last edited by brave_heart on Mon Jul 02, 2007 8:45 am; edited 1 time in total

----------

## didymos

Download the version you want from one of the gentoo repositories, and stick it into /usr/portage/distfiles.  After that, it should emerge fine.  You'll want net-dialup/ppp.  You no longer need the rp-pppoe package.

----------

## brave_heart

Thanks for your reply.

Do you mean that I need to copy my liveCD .iso file to /usr/portage/distfiles and then emerge net-dialup/ppp?

----------

## didymos

Ok, how far into the installation have you gotten?  I kind of got the impression that you had already gotten the system to the point where it was bootable. If that isn't the case, and you have dsl, then why are you trying a networkless install? The only reason to do a networkless install is if you have no way to connect to the internet on that machine.  You've got dsl, so just use the standard handbook for your arch, which will include instructions for getting the network up during installation:

http://www.gentoo.org/doc/en/handbook/index.xml

----------

## brave_heart

I install 2006.1 liveCD in home, which has totally 20 cheap hours adsl one month(I'm sorry).

1. so I choose networkless installation

2. currently, after installation, I think there should be a way to install pppoe to let me to setup the adsl connection.

Thank you for your kindly help.  :Very Happy: 

----------

## didymos

OK, so you have installed Gentoo and it boots, right? You then go to one of the gentoo repositories, listed here:

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

For example, this one:

http://gentoo.osuosl.org/distfiles/

Next you download the files needed by the ppp ebuild:

ppp-2.4.4-patches-20061124.tar.gz  

ppp-2.4.4.tar.gz 

Put those files in /usr/portage distfiles on the Gentoo machine. Then, emerge ppp.  That's the bare minimum.  You may need to download other stuff, depending on what USE flags are set and what you have installed already.  I've never used the LiveCD, so I don't know what's included.  ppp may very well already be on the CD.  Was there an option to install ppp and stuff like that in the installer?

----------

## brave_heart

Thank you, friend.

I found the required file from your url. I just wander how many staff I need to install.

What include in my 2006.1liveCD listed below:

1.docs(folder)

2.isolinux(folder)

3.snapshots(folder)

4.Getting_Online.txt

5.images.squashfs

6.livecd

7.README.txt

portage included in the snapshots folders. Please teach where is the ppp related file.

Thank you once again.  :Very Happy: 

----------

## didymos

I'll have to download a LiveCD and check it out.  I've been meaning to for awhile anyway.

----------

## brave_heart

Thank you, didymos, my goodman.

I've found ppp from liveCD(/snapshots/portage/net-dialup) and copied to /usr/portage/distfiles,  then emerge seems successfully.

I can't try adsl in office currently and shortly I'll try it in home.

Thank you so much for your kindly help!  :Very Happy: 

----------

## brave_heart

I try it in home, the ppp installation process seems successfully expect some package missing info shows.

I'll check it later time.

----------

## brave_heart

Hi, didymos

I install ppp successfully on an laptop and will try it home today. Could you please teach how to use ppp to setup adsl?

I once use pppoe to setup the adsl(such as "adsl-setup, adsl-start, adsl-stop, adsl-status").

Thanks a lot,

----------

## brave_heart

Hey, didymos, are u still there?  :Very Happy: 

I tried to install ppp once again(for formal installation seems not function), pop following error info:

```

localhost ~ # emerge ppp

Calculating dependencies... done!

>>> Emerging (1 of 2) sys-kernel/gentoo-sources-2.6.17-r5 to /

>>> Downloading http://distfiles.gentoo.org/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  http://distfiles.gentoo.org/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving distfiles.gentoo.org... failed: Temporary failure in name resolution.

>>> Downloading http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving distro.ibiblio.org... failed: Temporary failure in name resolution.

>>> Downloading http://cudlug.cudenver.edu/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  http://cudlug.cudenver.edu/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving cudlug.cudenver.edu... failed: Temporary failure in name resolution.

>>> Downloading ftp://ftp.oregonstate.edu/pub/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  ftp://ftp.oregonstate.edu/pub/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving ftp.oregonstate.edu... failed: Temporary failure in name resolution.

>>> Downloading ftp://lug.mtu.edu/gentoo/source/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  ftp://lug.mtu.edu/gentoo/source/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving lug.mtu.edu... failed: Temporary failure in name resolution.

>>> Downloading ftp://ftp.rez-gif.supelec.fr/pub/Linux/distrib/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  ftp://ftp.rez-gif.supelec.fr/pub/Linux/distrib/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving ftp.rez-gif.supelec.fr... failed: Temporary failure in name resolution.

>>> Downloading ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  ftp://ftp.gtlib.cc.gatech.edu/pub/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving ftp.gtlib.cc.gatech.edu... failed: Temporary failure in name resolution.

>>> Downloading http://ftp.gentoo.or.kr/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  http://ftp.gentoo.or.kr/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving ftp.gentoo.or.kr... failed: Temporary failure in name resolution.

>>> Downloading http://open-systems.ufl.edu/mirrors/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  http://open-systems.ufl.edu/mirrors/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving open-systems.ufl.edu... failed: Temporary failure in name resolution.

>>> Downloading http://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  http://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving ftp.snt.utwente.nl... failed: Temporary failure in name resolution.

>>> Downloading ftp://ftp.tu-clausthal.de/pub/linux/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  ftp://ftp.tu-clausthal.de/pub/linux/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving ftp.tu-clausthal.de... failed: Temporary failure in name resolution.

>>> Downloading http://gentoo.oregonstate.edu/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  http://gentoo.oregonstate.edu/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving gentoo.oregonstate.edu... failed: Temporary failure in name resolution.

>>> Downloading http://gentoo.mirrors.pair.com/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  http://gentoo.mirrors.pair.com/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving gentoo.mirrors.pair.com... failed: Temporary failure in name resolution.

>>> Downloading http://mirrors.tds.net/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  http://mirrors.tds.net/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving mirrors.tds.net... failed: Temporary failure in name resolution.

>>> Downloading http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  http://distro.ibiblio.org/pub/linux/distributions/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving distro.ibiblio.org... failed: Temporary failure in name resolution.

>>> Downloading ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  ftp://cudlug.cudenver.edu/pub/mirrors/distributions/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving cudlug.cudenver.edu... failed: Temporary failure in name resolution.

>>> Downloading ftp://gentoo.mirrored.ca/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  ftp://gentoo.mirrored.ca/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving gentoo.mirrored.ca... failed: Temporary failure in name resolution.

>>> Downloading http://gentoo.mirrored.ca/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  http://gentoo.mirrored.ca/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving gentoo.mirrored.ca... failed: Temporary failure in name resolution.

>>> Downloading ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

--04:04:49--  ftp://ftp.snt.utwente.nl/pub/os/linux/gentoo/distfiles/genpatches-2.6.17-6.base.tar.bz2

           => `/usr/portage/distfiles/genpatches-2.6.17-6.base.tar.bz2'

Resolving ftp.snt.utwente.nl... failed: Temporary failure in name resolution.

!!! Couldn't download genpatches-2.6.17-6.base.tar.bz2. Aborting.

localhost ~ #

```

However, I've put 

genpatches-2.6.17-6.base.tar.bz2

ppp-2.4.4-patches-20061124.tar.gz 

ppp-2.4.4.tar.gz

in /usr/portage/profiles/

I don't know why it still can't find genpatches-2.6.17-6.base.tar.bz2?

Please help, thank you once again.

----------

## didymos

You need to put those files in /usr/portage/distfiles.  Are you trying to update the kernel as well?  genpatches is part of gentoo-sources.  For reference, here's the standard way to set up DSL using pppoe:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=3#doc_chap4

That's pretty much identical to what I have.  I've added a couple extra options and used some slightly different settings than the listing, but none of it is necessary to get it working. If your ISP doesn't have automatic DNS assignment, you may have to set the nameservers yourself, but other than that, that config should work.

----------

## brave_heart

Hey, didymos, thank you for your reply&your correction of /etc/portage/distfiles  and sorry for late reply.  :Very Happy: 

I've installed ppp successfully(seems) in my office and I'll try it later home.

Hope it works well this time.

----------

## brave_heart

didymos, my friend. I think I'm almost there with your help.  :Very Happy: 

I configured as the handbook says:

 *Quote:*   

> 
> 
> 3.d. ADSL with PPPoE/PPPoA
> 
> First we need to install the ADSL software. 
> ...

 

However, I got wrong below:

```

localhost ~ # less /mnt/d/1.txt

localhost ~ # less /mnt/d/1.txt

localhost ~ # nano /etc/conf.d/net

localhost ~ # adsl-setup

bash: adsl-setup: command not found

localhost ~ # ifconfig

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

localhost ~ # /etc/init.d/net.eth0 restart

 * Caching service dependencies ...

/etc/conf.d/net: line 9: syntax error near unexpected token `('

/etc/conf.d/net: line 9: `config_eth0=( null ) (Specify your ethernet interface)'

/etc/conf.d/net: line 9: syntax error near unexpected token `('

/etc/conf.d/net: line 9: `config_eth0=( null ) (Specify your ethernet interface)'

/etc/conf.d/net: line 9: syntax error near unexpected token `('

/etc/conf.d/net: line 9: `config_eth0=( null ) (Specify your ethernet interface)'                                      [ ok ]/etc/conf.d/net: line 9: syntax error near unexpected token `('

/etc/conf.d/net: line 9: `config_eth0=( null ) (Specify your ethernet interface)'

 * Starting eth0

 *   You are using a depreciated configuration syntax for eth0

 *   You are advised to read /etc/conf.d/net.example and upgrade it accordingly

 *   Bringing up eth0

 *     dhcp

 *       Running dhcpcd ...

Error, terminating on signal 2                                                                                         [ ok ] *       eth0 received address

 * ERROR:  net.eth0 caught an interrupt

localhost ~ # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:16:41:14:C0:64

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:7 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:4158 (4.0 Kb)

          Interrupt:16

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

localhost ~ # ping www.google.com

ping: unknown host www.google.com

localhost ~ #

```

----------

## didymos

For eth0 you actually want this:

```

config_eth0=( "null" )

```

I think that counts as a documentation bug. Also, you don't want to run /etc/init.d/net.eth0; you want to run /etc/init.d/net.ppp0.  The eth0 interface will take care of itself.

----------

## brave_heart

I changed /etc/conf.d/net as below:

```

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

iface_eth0="dhcp"

dhcpcd_eth0=""

config_eth0="dhcp"

#config_eth0=( null ) (Specify your ethernet interface)

config_ppp0=( "ppp" )

link_ppp0="eth0" (Specify your ethernet interface)

plugins_ppp0=( "pppoe" )

username_ppp0='100000481735'

password_ppp0='720604'

pppd_ppp0=(

       "noauth"

       "demand"

       "defaultroute"

       "usepeerdns"

       "holdoff 3"

       "child-timeout 60"

       "lcp-echo-interval 15"

       "lcp-echo-failure 3"

       noaccomp noccp nobsdcomp nodeflate nopcomp novj novjccomp

)

depend_ppp0() {

    need net.eth0

}

```

got following result:

```

localhost ~ # /etc/init.d/net.ppp0 start

/etc/conf.d/net: line 11: syntax error near unexpected token `('

/etc/conf.d/net: line 11: `link_ppp0="eth0" (Specify your ethernet interface)'

 * Starting ppp0

 *   Bringing up ppp0

 *     ppp

 *       link_ppp0 has not been set in /etc/conf.d/net                    [ !! ]

localhost ~ #

```

----------

## didymos

Make these changes:

```

config_eth0=( "null" )

config_ppp0=( "ppp" )

link_ppp0="eth0" 

plugins_ppp0=( "pppoe" )

username_ppp0='100000481735'

password_ppp0='720604'

pppd_ppp0=(

       "noauth"

       "demand"

       "defaultroute"

       "default-asyncmap"

       "ipcp-accept-remote"

       "ipcp-accept-local"

       "usepeerdns"

       "holdoff 3"

       "child-timeout 60"

       "lcp-echo-interval 15"

       "lcp-echo-failure 3"

       "mru 1492"

       "mtu 1492"

       "lock"

)

depend_ppp0() {

    need net.eth0

}

```

These:

 *Quote:*   

> (Specify your ethernet interface)

 

were screwing things up.  The shell thought they were part of the script, but couldn't make sense of them.

You can skip all the "noaccomp, etc." nonsense.  None of that works with PPPoE anyway. Even if you were to explicitly set accomp,deflate,etc., they'd just be ignored.  It might be different with PPPoA, but that's academic. The mru and mtu should definitely be added, due to the way the PPPoE protocol works.  Standard MTU/MRU is 1500, but PPPoE uses an 8-byte header, so 1500 - 8 = 1492.  Otherwise, you'll get a hell of a lot of packet fragmentation.  I think what the networking guide has done is provided a minimal PPPoE/PPPoA neutral config.  It should probably go into more detail though.  You may want to get rid of the "demand" option.  Basically, it disconnects you if you don't use the link after a while.  I prefer to just leave it connected, and I add the "persist" option so that if the ISP or something else causes a disconnect, pppd doesn't quit, it just quietly keeps attempting to reconnect.  The "holdoff" option sets the waiting period between re-connection attempts. You can set the "debug" option if you have trouble connecting.  The messages and errors from your ISP will go into the system log. There's a whole hell of a lot of other options, and the man page for pppd gives pretty good descriptions of all of them, but you probably have no use for them.  I know I don't.  You may be interested in "maxfail", though.  You can set a max on connection attempts, after which pppd just quits.

----------

## brave_heart

Will it cause any trouble with my dhcp connection as it delete settings of dhcp?  :Very Happy: 

----------

## brave_heart

This time my /etc/conf.d/net:

```

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /etc/conf.d/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

#iface_eth0="dhcp"

#dhcpcd_eth0=""

#config_eth0="dhcp"

config_eth0=( "null" )

config_ppp0=( "ppp" )

link_ppp0="eth0"

plugins_ppp0=( "pppoe" )

username_ppp0='100000481735'

password_ppp0='720604'

pppd_ppp0=(

       "noauth"

       "defaultroute"

       "default-asyncmap"

       "ipcp-accept-remote"

       "ipcp-accept-local"

       "usepeerdns"

       "holdoff 3"

       "child-timeout 60"

       "lcp-echo-interval 15"

       "lcp-echo-failure 3"

       "mru 1492"

       "mtu 1492"

       "lock"

)

depend_ppp0() {

    need net.eth0

}

```

Result:

```

localhost ~ # nano /etc/conf.d/net

localhost ~ # /etc/init.d/net.eth0 restart

 * Caching service dependencies ...                                       [ ok ]

 * Stopping eth0

 *   Bringing down eth0

 *     Shutting down eth0 ...                                             [ ok ]

 * Starting eth0

 *   Bringing up eth0                                                     [ ok ]

localhost ~ # ifconfig

eth0      Link encap:Ethernet  HWaddr 00:16:41:14:C0:64

          UP BROADCAST NOTRAILERS RUNNING MULTICAST  MTU:1500  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:1000

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

          Interrupt:16

lo        Link encap:Local Loopback

          inet addr:127.0.0.1  Mask:255.0.0.0

          UP LOOPBACK RUNNING  MTU:16436  Metric:1

          RX packets:0 errors:0 dropped:0 overruns:0 frame:0

          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0

          collisions:0 txqueuelen:0

          RX bytes:0 (0.0 b)  TX bytes:0 (0.0 b)

localhost ~ # ping www.google.com

ping: unknown host www.google.com

```

----------

## didymos

Oh, so you do use DHCP then?  What is assigning addresses on your network?  A router?

It should be alright if you just change:

```

config_eth0=( "null" )

```

to:

```

config_eth0= ( "dhcp" )

dhcpcd_eth0="" 

dhcp_eth0=""

```

You may need to set some options in dhcpcd_eth0 and dhcp_eth0.  For example, if you just want an address for the interface and nothing else you'd have this:

```

dhcp_eth0="release nodns nontp nonis"

```

If you want dns and all that, then leave it blank.  Also, try testing pppoe with /etc/init.d/net.ppp0 instead of starting eth0 directly.

----------

## brave_heart

didymos, my dear friend, I finally solve this problem with your very very kindly help!

Truelly thank you once again!  :Very Happy: 

Accually, I need set adsl connection home and dhcp connection in office, that's my situation!

----------

