Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Distributions > Debian
User Name
Debian This forum is for the discussion of Debian Linux.


  Search this Thread
Old 05-17-2012, 06:02 AM   #1
LQ Newbie
Registered: May 2012
Posts: 4

Rep: Reputation: Disabled
PPP Failing on Boot up due to lack of serial interfaces!

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 my debian build to another machine via PPP over my serial link /dev/ttyS0.

My current set up works fine 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, which contains the ppp hand shaking stuff (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 in the boot process. The goal is to establish a ppp link even if I am not logged in to my build and this occurs when the pc is powered on.

I thought it would be a simple case of changing the ppp0 interface specified in /etc/network/interfaces to say "auto ppp0". 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. :-(

I have just confirmed by using windows hyper terminal from my other PC that in the initial boot phase, there is no ppp chat coming out of the serial interface. The moment I log in and do an ifup ppp0, I can see the data coming out of the serial port.

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 earlier. After a reboot that still didnít work. Anyone out there got any ideas how to activate the serial interfaces before the login screen and allow ppp to run?
Old 05-17-2012, 11:22 PM   #2
Registered: Sep 2009
Posts: 33

Rep: Reputation: 6
the dirty way to start something on boot is adding an entry to rc.local or inittab;

s1:23:respawn:/usr/sbin/pppd /dev/ttyS0 115200
Old 05-24-2012, 05:18 AM   #3
LQ Newbie
Registered: May 2012
Posts: 4

Original Poster
Rep: Reputation: Disabled
Fixed it! (I think)

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 link to run 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.

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. 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 (muppet))


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with too many 'ppp' interfaces started at boot time utumno Linux - Networking 1 06-12-2005 04:11 AM
Is linux so secure just due to lack of users? Nad0xFF Linux - Security 37 04-09-2005 04:38 PM
Paranoia due to lack of knowledge downinthemine Linux - Security 2 12-04-2003 12:37 AM
RH9 won' boot due to lack of space ravykanth Linux - Newbie 6 10-27-2003 10:07 PM
Linux doesn' boot due to lack of hard disk space ravykanth Linux - General 1 10-27-2003 03:44 PM > Forums > Linux Forums > Linux - Distributions > Debian

All times are GMT -5. The time now is 06:00 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration