How to get ethernet wizard DHCP to run at Boot-Up.

Booting, installing, newbie
Post Reply
Message
Author
Rickrandom
Posts: 195
Joined: Sat 21 Jan 2006, 05:35
Location: Bedfordshire, UK

How to get ethernet wizard DHCP to run at Boot-Up.

#1 Post by Rickrandom »

After a lot of reading the forum and wiki, I seem to have got most of the way to an automatic wireless connection, except the DHCP bit, where I still have to use the wizard.

My rc.local file now contains:

modprobe ndiswrapper
iwconfig wlan0 essid inspiron8200 key 1234567890 mode managed
dhcpcd -t 20 -h puppypc -d wlan0


(There are some sleeps in there as well.)

This gives some errors during the boot process at the dhcpcd line. If I do dhcpcd in RXVT I get

**** dhcpcd: already running
**** dhcpcd: if not then delete /etc/dhcpc/dhcpcd-eth0.pid file

I guess the boot error message is the same, but it's gone before I can read it.

I have also tried the dhcpcd line in rc.local as:

dhcpcd wlan0

I have to go through the Ethernet/Network wizard (the wireless wizard keeps locking up my laptop, so I have used the ethernet wizard) and use the DHCP button. Then I'm connected (I was overjoyed when I first got it to connect!) but I would like the process to be fully automatic.

Maybe I'm missing something obvious - I don't know what dhcpcd does, only that when I use the button in the wizard, it works, so presumably I can just put whatever the button does into my rc.local file????

I have an Acer Aspire 1355XC, with a d-link DWL-610 card.

As a total beginner to Linux, I'm looking for very simple, step-by-step instructions. Any help would be gratefully received.
Last edited by Rickrandom on Sun 22 Jan 2006, 11:56, edited 1 time in total.

User avatar
trapster
Posts: 2117
Joined: Mon 28 Nov 2005, 23:14
Location: Maine, USA
Contact:

#2 Post by trapster »

Try adding the following line in your rc.local file right after the iwconfig line

rm /etc/dhcpc/dhcpcd-eth0.*

reboot
trapster
Maine, USA

Asus eeepc 1005HA PU1X-BK
Frugal install: Slacko
Currently using full install: DebianDog

Rickrandom
Posts: 195
Joined: Sat 21 Jan 2006, 05:35
Location: Bedfordshire, UK

#3 Post by Rickrandom »

Thanks for the prompt advice.

In fact in the line you gave me, I changed dhcpcd-eth0.* to dhcpcd-wlan0.*, as it was the wireless connection that didn't do the DHCP thing.

My rc.local file is now:

echo "Configuring wireless card"
modprobe ndiswrapper
sleep 5
echo "Configuring wireless network"
iwconfig wlan0 essid inspiron8200 key 1234567890 mode managed
sleep 5
iwconfig
sleep 5
echo "Trying rm line..."
rm /etc/dhcpc/dhcpcd-wlan0.*
sleep 5
echo "DHCP in"
dhcpcd -t 20 -h puppypc -d wlan0

in case that's any use to anyone else.

Prior to doing all this in the rc.local file, I tried all the individual commands in RXVT, which certainly helps work out (very roughly) what is going on.

It's quite a learning curve, but I'm getting what I want, so thanks trapster, and thanks to the forum.

mdisaster
Posts: 27
Joined: Fri 04 Nov 2005, 11:00
Location: Rome, Italy

#4 Post by mdisaster »

Yep, that worked for me too:
http://www.murga.org/~puppy/viewtopic.php?t=5535

Some background info:

- dhcpcd make sure that your PC obtains a IP address by the nearest DHCP server (usually in the router).

- the .pid file is created while dhcpcd is running, and apparently doesn't get deleted at shutdown (maybe dhcpcd itself is not closed properly?). You can either shutdown dhcpcd yourself with dhcpcd -k, or just get rid of the unwanted file at startup as trapstes said.

User avatar
CurDeusHomo
Posts: 12
Joined: Mon 28 Nov 2005, 02:42
Location: Chicago
Contact:

#5 Post by CurDeusHomo »

Rickrandom wrote:
echo "Configuring wireless card"
modprobe ndiswrapper
sleep 5
echo "Configuring wireless network"
iwconfig wlan0 essid inspiron8200 key 1234567890 mode managed
sleep 5
iwconfig
sleep 5
echo "Trying rm line..."
rm /etc/dhcpc/dhcpcd-wlan0.*
sleep 5
echo "DHCP in"
dhcpcd -t 20 -h puppypc -d wlan0

in case that's any use to anyone else.
This worked for me, too, using a D-Link DWL-G650. Thanks for sharing the info.
Compaq Armada 1700, PII, 266 MHz, 288 MB RAM, 3.5 GB HD, Puppy 1.0.6 Kernel 2.4.29, IceWM, installed on HD

edr4d
Posts: 61
Joined: Fri 06 Jan 2006, 13:31

#6 Post by edr4d »

Add to rc.local

rm /etc/dhcpc/dhcpcd-wlan0.*

------------------------------------
OR

add to rc.local (for ethernet and USB):

rm /etc/dhcpc/dhcpcd-eth0.*

---------------------------------------

Very important to add the 'rm' lines else it won't work at reboot cause there seems to be an error at every puppy reboot which doesn't delete previous internet instantiations.

Guest

#7 Post by Guest »

rickrandom,

Try taking some of those "sleep"s out of there and I bet you'll boot a lot faster. You have 25 extra seconds in there that you probably don't need.
I would take 1 at a time out and reboot each time to see if it still works, then move on to the next one.

:D

Rickrandom
Posts: 195
Joined: Sat 21 Jan 2006, 05:35
Location: Bedfordshire, UK

#8 Post by Rickrandom »

Thanks for the tip.

In fact I had previously reduced some of them, and they're now 3, 5, 1, 2, 5. I should have posted again - a bit selfish - sorry!

When I reduced some more than that, it wouldn't work, but I can't remember which ones, and I got bored of rebooting again and again.

As an aside, how do I stop it trying to connect on my wired network? I don't bother with it now, but it's what I got working first, and it still boots up and tries to connect. That's another 5 seconds wasted!

yackerena
Posts: 1
Joined: Fri 11 Dec 2009, 06:11

#9 Post by yackerena »

What's the difference between an ethernet port and modem port? I always plug in my dsl connection in the ethernet port and it works, but, can I also plug it in the modem port? What's the difference between an ethernet port and modem port?

Post Reply