Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

PPP Failing to start on Boot up!

1,120 views
Skip to first unread message

Crowbar

unread,
May 16, 2012, 6:11:38 AM5/16/12
to
Hi All,

I am relatively new to Linux, but I have gradually been getting up to
speed. I have been fighting with trying to get the PPP link to start
up when linux boots.

I am using a Debian 2.6 build. I am connecting to another machine via
PPP over my serial link ttys0.

My current set up works when I am logged in. I have configured the
interfaces file (/etc/network) to have a ppp0 interface that points to
a peers file that scripts up the required settings for the serial
interface. That script file also points to the chat file, that allows
the ppp hand shaking take place (Who is the client and who is the
server).

Using this current configuration I can simply run the command ifup
ppp0, which starts the ppp interface and starts talking no problem.
What I was hoping to do, is have the same config to start up
automatically, so even if I am not looged in, this process occurs.

I thought it would be a simple case of changing the ppp0 interface
specified in /etc/network/interfaces to say "auto". When I changed
this config and rebooted my machine, you can see in the boot screen it
says serial connection established and then the hand shaking starts
and then times out and goes to the login screen. Once you log in I can
do an ifup ppp0 and the connection is established as normal. I used
the dmesg command, and I could not see anything out of the ordinary to
say that the serial ports were not working or that ppp was not
running. :-(

After talking to one of my friends, he mentioned I should take a look
at the rc3.d directory, as this is where the programs are called in at
the start up process. I found that pppd was not in there, so I added
it and gave it priority of S03, same as my NTP server and I did
another reboot. I was faced with the same issue as before. I have
trawled the web and I cant seem to find an answer. Any advice guys?

Crowbar

unread,
May 17, 2012, 6:29:25 AM5/17/12
to
Is anybody out there? :-)

Just confirmed on my debian buildt the serial interfaces are not
working, until after logging in. I have added the setserial to rc3.d
and created a symbolic link back to the original file in the init.d. I
have also changed the priority level to S01 to try and get the serial
to set early. After a reboot that still didnt work. Anyone out there
got an ideas?

The Natural Philosopher

unread,
May 17, 2012, 7:23:57 AM5/17/12
to
that shouldnt be the case, as often you log in over a serial interface.


I have added the setserial to rc3.d
> and created a symbolic link back to the original file in the init.d. I
> have also changed the priority level to S01 to try and get the serial
> to set early. After a reboot that still didnt work. Anyone out there
> got an ideas?
>

few people use PPP over serial these days. I had a similar issue driving
a 3G phone dongle and stumbled my way to sucess, but I cant remember how
I did it. It never worked anyway because nowhere I took the laptop had a
3G signal!



--
To people who know nothing, anything is possible.
To people who know too much, it is a sad fact
that they know how little is really possible -
and how hard it is to achieve it.

Pascal Hambourg

unread,
May 17, 2012, 8:18:22 AM5/17/12
to
Hello,

Crowbar a écrit :
>>
>> I am relatively new to Linux, but I have gradually been getting up to
>> speed. I have been fighting with trying to get the PPP link to start
>> up when linux boots.
>>
>> I am using a Debian 2.6 build. I am connecting to another machine via
>> PPP over my serial link ttys0.

Do you mean ttyS0 ?
Is it a direct serial link or through a modem and dial-up line ?

>> My current set up works when I am logged in. I have configured the
>> interfaces file (/etc/network) to have a ppp0 interface that points to
>> a peers file that scripts up the required settings for the serial
>> interface. That script file also points to the chat file, that allows
>> the ppp hand shaking take place (Who is the client and who is the
>> server).
>>
>> Using this current configuration I can simply run the command ifup
>> ppp0, which starts the ppp interface and starts talking no problem.
>> What I was hoping to do, is have the same config to start up
>> automatically, so even if I am not looged in, this process occurs.
>>
>> I thought it would be a simple case of changing the ppp0 interface
>> specified in /etc/network/interfaces to say "auto".

Indeed.
It works for me, with a v90 dial-up modem on POTS line.

>> When I changed
>> this config and rebooted my machine, you can see in the boot screen it
>> says serial connection established and then the hand shaking starts

Huh ?
Here nothing is printed on the boot screen when the PPP connection
starts. Just the sound of the modem.

>> and then times out and goes to the login screen. Once you log in I can
>> do an ifup ppp0 and the connection is established as normal. I used
>> the dmesg command, and I could not see anything out of the ordinary to
>> say that the serial ports were not working or that ppp was not
>> running. :-(
>>
>> After talking to one of my friends, he mentioned I should take a look
>> at the rc3.d directory, as this is where the programs are called in at
>> the start up process.

Your friend seems to be misinformed. The default runlevel in Debian is
2, not 3. Besides, currently the network initscript (which reads
/etc/network/interfaces) is run during the runelevel "S" (/etc/rcS.d/),
before entering the final runlevel.

Adding something like this in /etc/network/interfaces :
auto ppp-link
iface ppp-link inet ppp
provider ppp-link-options

is all that I needed to do to start the PPP connection at boot.

> Just confirmed on my debian buildt the serial interfaces are not
> working, until after logging in. I have added the setserial to rc3.d
> and created a symbolic link back to the original file in the init.d. I
> have also changed the priority level to S01 to try and get the serial
> to set early. After a reboot that still didnt work. Anyone out there
> got an ideas?

The setserial initscripts are run in the runlevel "S", too. Actually
there are two of them : etc-setserial which reads /etc/setserial.conf if
it exists, and setserial otherwise. Maybe your problem is that the
latter is run after the network initscript. Note that setserial is not
installed on the Debian Squeeze box I used to test the automatic PPP
connection.

Crowbar

unread,
May 17, 2012, 10:28:03 AM5/17/12
to
On May 17, 1:18 pm, Pascal Hambourg <boite-a-s...@plouf.fr.eu.org>
wrote:
> Hello,
>
> Crowbar a écrit :
>
>
>
> >> I am relatively new to Linux, but I have gradually been getting up to
> >> speed. I have been fighting with trying to get the PPP link to start
> >> up when linux boots.
>
> >> I am using a Debian 2.6 build. I am connecting to another machine via
> >> PPP over my serial link ttys0.
>
> Do you mean ttyS0 ?
> Is it a direct serial link or through a modem and dial-up line ?

Yep thats right its direct over the serial /dev/ttyS0.


>
> >> My current set up works when I am logged in. I have configured the
> >> interfaces file (/etc/network) to have a ppp0 interface that points to
> >> a peers file that scripts up the required settings for the serial
> >> interface. That script file also points to the chat file, that allows
> >> the ppp hand shaking take place (Who is the client and who is the
> >> server).
>
> >> Using this current configuration I can simply run the command ifup
> >> ppp0, which starts the ppp interface and starts talking no problem.
> >> What I was hoping to do, is have the same config to start up
> >> automatically, so even if I am not looged in, this process occurs.
>
> >> I thought it would be a simple case of changing the ppp0 interface
> >> specified in /etc/network/interfaces to say "auto".
>
> Indeed.
> It works for me, with a v90 dial-up modem on POTS line.

You lucky bugger! :-)

>
> >> When I changed
> >> this config and rebooted my machine, you can see in the boot screen it
> >> says serial connection established and then the hand shaking starts
>
> Huh ?
> Here nothing is printed on the boot screen when the PPP connection
> starts. Just the sound of the modem.

It doesnt actually show the data comming out of the pipe, but mine
screen has print lines, displaying what the ppp is trying to do and
after each attempted PPP request, it resends. It does this until it
times out and says PPP failed to establish link.

>
> >> and then times out and goes to the login screen. Once you log in I can
> >> do an ifup ppp0 and the connection is established as normal. I used
> >> the dmesg command, and I could not see anything out of the ordinary to
> >> say that the serial ports were not working or that ppp was not
> >> running. :-(
>
> >> After talking to one of my friends, he mentioned I should take a look
> >> at the rc3.d directory, as this is where the programs are called in at
> >> the start up process.
>
> Your friend seems to be misinformed. The default runlevel in Debian is
> 2, not 3. Besides, currently the network initscript (which reads
> /etc/network/interfaces) is run during the runelevel "S" (/etc/rcS.d/),
> before entering the final runlevel.

Cool thanks for letting me know, I will have a play. He has not played
with Linux in a while, so he is probably very rusty!

> Adding something like this in /etc/network/interfaces :
> auto ppp-link
> iface ppp-link inet ppp
> provider ppp-link-options
>
> is all that I needed to do to start the PPP connection at boot.
>

That looks surprisingly similar to mine.

auto ppp0
iface ppp0 inet ppp
provider asterix0

> > Just confirmed on my debian buildt the serial interfaces are not
> > working, until after logging in. I have added the setserial to rc3.d
> > and created a symbolic link back to the original file in the init.d. I
> > have also changed the priority level to S01 to try and get the serial
> > to set early. After a reboot that still didnt work. Anyone out there
> > got an ideas?
>
> The setserial initscripts are run in the runlevel "S", too. Actually
> there are two of them : etc-setserial which reads /etc/setserial.conf if
> it exists, and setserial otherwise. Maybe your problem is that the
> latter is run after the network initscript. Note that setserial is not
> installed on the Debian Squeeze box I used to test the automatic PPP
> connection.

I did see the etc-setserial and I have tried linking that in too.

On my build I have configured my serial ports manually using
setserial.conf, I wonder if that is the issue? If I removed the
setserial.conf, would setserial do the job. In my provider config, I
state the serial parameters, so surely it would take the configs from
there? Something to try anyway! ;-)

Thanks for the help all?

Gernot Fink

unread,
May 17, 2012, 11:15:01 AM5/17/12
to
In article <362c343c-d4df-45b3...@c8g2000vbw.googlegroups.com>,
Crowbar <jakal8...@gmail.com> writes:

Check that /etc/inittab dont contain such a line:
mo:23:respawn:/sbin/agetty -h -L 19200 /dev/ttyS0

--
MFG Gernot

Crowbar

unread,
May 24, 2012, 6:22:48 AM5/24/12
to
On May 17, 4:15 pm, g.f...@gmx.net (Gernot Fink) wrote:
> In article <362c343c-d4df-45b3-8d2b-361ba6d27...@c8g2000vbw.googlegroups.com>,
>         Crowbar <jakal81200...@gmail.com> writes:
>
> Check that /etc/inittab dont contain such a line:
> mo:23:respawn:/sbin/agetty -h -L 19200 /dev/ttyS0
>
> --
> MFG Gernot

Hi All,

After struggling I figured out how to make it happen.

The main problem was not in RC3 where I was looking. (I am such a
donut) I needed to be in rcS.d directory, this is all the start up
services. When I looked in this directory the setserial service was at
the back of the queue, with its priority set to S18setserial.
Networking and ifupdown were both further up the boot order.
S13networking & S10ifupdown.

I needed setserial to start before the others, so when the network
interfaces auto ppp0 runs, there is a serial interface to run on as
well. I found out to change the boot order, you have to modify the
scripts.

If you look in init.d and check out the networking and ifupdown
scripts. At the very top are a set of parameters. One being the
#Required-Start parameter, if you set that parameter with the addition
of setserial, the script then knows for it to run, the setserial
script must have been run before it.

Once you have modified the scripts you have to update them using the
following commands.

update-rc.d networking defaults
update-rc.d ifupdown defaults

Now if you go and look in the directory rcS.d you should see that set
serial now sits above ifupdown and networking in the boot order
(S13setserial).

Something else I had to do, was modify the setserial script too before
the previous commands would work. Linux kept spitting back at me
complaining about looping issues, when trying to run the rc-update
command on networing and ifupdown. This was because the setserial
script settings are as followed.

#Required-start: $remote_fs
#Required-stop: $remote_fs

When I changed the script to the settings below and and ran update-
rc.d command like before, the issue went away.

#Required-start: $local_fs
#Required-stop: $local_fs

I am assuming this changed the dependancy to the local file system as
before it was remote and that needs more time to boot. My next
question is, I have I now manipulated this in a bad way?

Either way currently when I boot up, the ppp link runs with out issue
(though I did have to remove nodetach from my ppp script, as that
stopped me from logging in when I tried too (muppet))
0 new messages