You are not logged in.

#1 2009-09-27 11:14:43

kaddy
Member
From: Perth, Western Australia
Registered: 2009-09-22
Posts: 192

dhcpcd fails at boot (SOLVED)

Hi peoples.....
this is a very common problem in arch so i've seen, but i followed many instructions and looked at the wiki,
and so far i can't fix it....

when i boot into arch... when it gets to "network" it says busy... and ends up failing... dhcp fails.........

to get internet working, i have to open a konsole, log in as root, and enter "dhcpcd" then my internet works....

i've tried quite a few suggestions... such as adding to my /etc/rc.local file... which is this:

#!/bin/bash
#
# /etc/rc.local: Local multi-user startup script.
#
dhcpcd -k eth0 dhcpcd -nd eth0



here is my rc.conf file which to me, looks right



#
# /etc/rc.conf - Main Configuration for Arch Linux
#

# -----------------------------------------------------------------------
# LOCALIZATION
# -----------------------------------------------------------------------
#
# LOCALE: available languages can be listed with the 'locale -a' command
# HARDWARECLOCK: set to "UTC" or "localtime"
# USEDIRECTISA: use direct I/O requests instead of /dev/rtc for hwclock
# TIMEZONE: timezones are found in /usr/share/zoneinfo
# KEYMAP: keymaps are found in /usr/share/kbd/keymaps
# CONSOLEFONT: found in /usr/share/kbd/consolefonts (only needed for non-US)
# CONSOLEMAP: found in /usr/share/kbd/consoletrans
# USECOLOR: use ANSI color sequences in startup messages
#
LOCALE="en_US.utf8"
HARDWARECLOCK=""
USEDIRECTISA="no"
TIMEZONE="Australia/Perth"
KEYMAP="us"
CONSOLEFONT=
CONSOLEMAP=
USECOLOR="yes"

# -----------------------------------------------------------------------
# HARDWARE
# -----------------------------------------------------------------------
#
# MOD_AUTOLOAD: Allow autoloading of modules at boot and when needed
# MOD_BLACKLIST: Prevent udev from loading these modules
# MODULES: Modules to load at boot-up. Prefix with a ! to blacklist.
#
# NOTE: Use of 'MOD_BLACKLIST' is deprecated. Please use ! in the MODULES array.
#
MOD_AUTOLOAD="yes"
#MOD_BLACKLIST=() #deprecated
MODULES=()

# Scan for LVM volume groups at startup, required if you use LVM
USELVM="no"

# -----------------------------------------------------------------------
# NETWORKING
# -----------------------------------------------------------------------
#
# HOSTNAME: Hostname of machine. Should also be put in /etc/hosts
#
HOSTNAME="archbox"

# Use 'ifconfig -a' or 'ls /sys/class/net/' to see all available interfaces.
#
# Interfaces to start at boot-up (in this order)
# Declare each interface then list in INTERFACES
#   - prefix an entry in INTERFACES with a ! to disable it
#   - no hyphens in your interface names - Bash doesn't like it
#
# DHCP:     Set your interface to "dhcp" (eth0="dhcp")
# Wireless: See network profiles below
#

#Static IP example
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
eth0="dhcp"
INTERFACES=(eth0)
ROUTES=(!gateway)

# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)

# Enable these network profiles at boot-up.  These are only useful
# if you happen to need multiple network configurations (ie, laptop users)
#   - set to 'menu' to present a menu during boot-up (dialog package required)
#   - prefix an entry with a ! to disable it
#
# Network profiles are found in /etc/network.d
#
# This now requires the netcfg package
#
#NETWORKS=(main)

# -----------------------------------------------------------------------
# DAEMONS
# -----------------------------------------------------------------------
#
# Daemons to start at boot-up (in this order)
#   - prefix a daemon with a ! to disable it
#   - prefix a daemon with a @ to start it up in the background
#
DAEMONS=(syslog-ng network xorg hal kdm netfs crond)




I even tried making a profile copied from examples..... which for me... was wired ethernet-dhcp, since im using a wired connection with dhcp...... and trying to connect to it using netcfg then profile name..... here is my profile input

CONNECTION="ethernet-iproute"
DESCRIPTION="A basic dhcp ethernet connection using iproute"
INTERFACE="eth0"
IP="dhcp"




and theres also 1 other suggestion that i tried... which was adding "dhcp eth0" to my /etc/rc.d/network but dhcpcd still fails on reboot and i have to keep manually enabling it.....

any suggestions???
thanx in advance

kaddy

Last edited by kaddy (2009-09-28 15:53:04)

Offline

#2 2009-09-27 16:06:55

kaddy
Member
From: Perth, Western Australia
Registered: 2009-09-22
Posts: 192

Re: dhcpcd fails at boot (SOLVED)

lol. anybody?????

I've tried everything in the wiki under networking, i've tried several other suggestions that helped others, but it seems i can only get my internet to work by manually runniny "dhcpcd"

but it is annoying to do that everytime i boot.....(i wonder if i can make it start during boot...? but how? its not a daemon.....?"
anyways.....

more than happy to try any suggestions..... theres bound to be something wrong here... unless dhcpcd is buggy!
I even tried wicd and couldn't get it to work properly.... but thats another story.....

I've tried removing ! from gateway in rc.conf...... i've tried moving the hal daemon last, as i found out it can effect other daemons if run before network........

funny thing is, about 1 out of 10 times, everything starts up ok, with no fails... but after another reboot, back to the norm.

im out of ideas........
im almost gonna give up on this issue........ i don't know what else i can try

sad

Last edited by kaddy (2009-09-27 16:29:00)

Offline

#3 2009-09-28 15:08:54

kaddy
Member
From: Perth, Western Australia
Registered: 2009-09-22
Posts: 192

Re: dhcpcd fails at boot (SOLVED)

bah.... nevermind.
I solved it myself.

I finally got netcfg to work and connect to my profile.

http://wiki.archlinux.org/index.php/Network_Profiles

I couldn't get it working before because I was trying to connect to my profile that had eth0 set....
I changed it to eth2 and edited my Daemons to run net-profiles and put ! infront of netfs and network, and made sure my profile name was next to NETWORK=(profile name)
and all is good.
if it don't work for you, try to connect to eth0 eth1 and eth2, one of em is bound to work if you have more than 1 network card! lol. (I thought i was using eth0, but i am using eth2)

follow instructions from the link about netcfg and all should be good.
Worked for me... So now I'm happy after 3 LONG days of piss fartin about with manual configurations...... But hey.... i did learn alot in the meantime! haha

kaddy

Last edited by kaddy (2009-09-28 15:09:32)

Offline

#4 2009-09-28 15:15:32

kgas
Member
From: Qatar
Registered: 2008-11-08
Posts: 718

Re: dhcpcd fails at boot (SOLVED)

this is a very common problem in arch

so it is your problem. Arch got a very good Documentation and many forget to read / do a proper search including me at times. smile.

Also edit you first post and mark it solved.

Offline

#5 2009-09-28 15:51:48

kaddy
Member
From: Perth, Western Australia
Registered: 2009-09-22
Posts: 192

Re: dhcpcd fails at boot (SOLVED)

I was referring to dhcpcd failing at boot..... it seems to be a very common problem for alot of people that i've seen in the forums, and theres even a bug report i've seen about it..... but the netcfg configuration works for me instead of using the (network) daemon.... so whatever the problem was... (bug, my hardware, or config problem)
its all sorted out now.

Offline

#6 2009-09-29 13:31:48

DrMikeDuke
Member
From: Australia
Registered: 2008-05-12
Posts: 79
Website

Re: dhcpcd fails at boot (SOLVED)

kaddy wrote:

I was referring to dhcpcd failing at boot..... it seems to be a very common problem for alot of people that i've seen in the forums, and theres even a bug report i've seen about it..... but the netcfg configuration works for me instead of using the (network) daemon.... so whatever the problem was... (bug, my hardware, or config problem)
its all sorted out now.

I can comfirm this is a common problem amongst people I know.



Disclaimer: only amongst the people *I* know, we are running x86_64 pretty much exclusively behind a PFSENSE dhcp server/firewall

Last edited by DrMikeDuke (2009-09-29 13:32:16)


Workstation: Core i7 2600k | Asus PBZ68-V/GEN3 | 8GB DDR3-2000 | Gainward GLH GTX570 | Velociraptor 300 | AntecSS 850W | Essence ST | Corsair 800D | Win7x64 Pro/Arch LinuxX64
Server: 2x Six-Core AMD Opteron Processor 8439 SE, 64GB DDR2 ECC, Tyan S2932-SI, Areca ARC-1230 Raid, PCP&C 1Kw PSU, LSi FusionMPT Ultra320 SCSI/Tandberg LTO4 Autoloader
Laptop: Alienware M14xR3

Offline

#7 2009-09-29 13:42:36

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: dhcpcd fails at boot (SOLVED)

Only noticed this thread otherwise I'd have added my 2cs sooner. The problem is not that dhcp is not working but that people often do not think about the order they put daemons in their rc.conf

If you use hal then it should come definitely before xorg (see OPs original rc.conf) to avoid silly problems like these. Unless of course you have a valid reason for putting hal towards the back...

EDIT:
Haaaaaaaaaaaaaaaaaaaang on - this is just occurring on my 32-bit Arch!!! dhcp fails 'cos my wireless eth1 is not recognised!!! Let's see what my pungent comments are worth and whether my daemons are truly all mixed up or whether I have to eat my hat/words/whatever...

Last edited by toad (2009-09-29 14:17:56)


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#8 2009-09-29 14:25:50

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: dhcpcd fails at boot (SOLVED)

Am in the process of eating my hat...

Farted around with daemon order but no use. Changed rc.conf from eth0 to eth1 (my wireless). Automatic network detection on boot is out but wicd does the job. Might change over from dhcpd to dhclient as a result...


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#9 2009-09-29 18:40:53

toad
Member
From: if only I knew
Registered: 2008-12-22
Posts: 1,775
Website

Re: dhcpcd fails at boot (SOLVED)


never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::

Offline

#10 2010-05-04 06:07:21

TimoS
Member
From: Finland
Registered: 2010-05-04
Posts: 1

Re: dhcpcd fails at boot (SOLVED)

I had also problems getting DHCP response from my ADSL modem. At network install and after reboot dhcpcd failed with timeout while dhclient worked without problems. I decided to check out /etc/dhcpcd.conf and found an interesting line. Commenting it out solved the problem for me:

# A ServerID is required by RFC2131.
#require dhcp_server_identifier

In other words, it seems my old but good ADSL modem doesn't implement the standard well enough, that makes dhcpcd to fail, because of its strict expectations with the default settings.

Last edited by TimoS (2010-05-04 06:26:03)

Offline

Board footer

Powered by FluxBB