You are not logged in.
Hi,
I just installed Arch on my new desktop and it doesn't seem to get an IP address (or keep its previously acquired IP) upon start up. I have to issue "dhcpcd eth0" each time after start up to get LAN ethernet working.
How can I bypass this automatically?
Thanks.
Last edited by MTsoul (2009-02-04 08:00:58)
Offline
Without posting any info about your setup,what you have done and you configuration files. there is very little chance of anybody helping you....
Offline
I followed the Beginners Guide in the wiki. I don't know what else there is to post.
Offline
Setup netcfg2 you can't go wrong
Offline
Have you read the wiki?
http://wiki.archlinux.org/index.php/Network
My Arch Linux Stuff • Forum Etiquette • Community Ethos - Arch is not for everyone
Offline
rc.conf ? And if you are using netcfg then the profiles... And if you are getting any errors during boot then those.......
Offline
Here is my rc.conf. Any help would be greatly appreciated.
LOCALE="en_US.utf8"
HARDWARECLOCK="localtime"
USEDIRECTISA="no"
TIMEZONE="Canada/Pacific"
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=(forcedeth slhc snd-mixer-oss snd-pcm-oss snd-hwdep snd-page-alloc snd-pcm snd-timer snd snd-hda-intel soundcore)
# 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="oliveoil"
# 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
#
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
eth="dhcp"
INTERFACES=(eth0)
# 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 @netfs crond alsa)
(Btw is there a better way of handling copy/paste buffers in Awesome? I had to open rc.conf in Firefox and copy/paste within this window.)
Offline
From your rc.conf:
eth="dhcp" <-- TYPO SHOULD BE eth0
INTERFACES=(eth0)
Last edited by ndlarsen (2009-01-27 09:17:10)
I made it long
as I lacked the time to make it short...
Offline
Ah thanks for that. It's stll not working though I don't see any changes..
Offline
Have you tried enabling the gateway, i.e. removing the (!), which disables it?
gateway="default gw 192.168.0.1"
ROUTES=(!gateway)
Bob
Offline
Have you tried enabling the gateway, i.e. removing the (!), which disables it?
gateway="default gw 192.168.0.1" ROUTES=(!gateway)
Bob
The gateway would be populated by the dhcp request. There should be no reason why your machine isn't getting an IP, but try running network without backgrounding it. Change @network to just network in your daemons array.
archlinux - please read this and this — twice — then ask questions.
--
http://rsontech.net | http://github.com/rson
Offline
Get netfs out of the background (remove the @) and reboot.
Wot says?
never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::
Offline
Removed the @ from both network and netfs. Both of they say "Okay" during boot. Nothing's changed.
If I do /etc/rc.d/network down/up, nothing happens. It's like the eth0 is not registered to something unless it's explicitly invoked through dhcpcd. Does this have anything to do with anything?
Offline
Yep, certainly does. I couldn't log in because of hal starting in the background. Worked on one machine, didn't on the other. If I were you I'd play around a little more (or less ) with your rc.conf.
never trust a toad...
::Grateful ArchDonor::
::Grateful Wikipedia Donor::
Offline
Hi,
I just installed Arch on my new desktop and it doesn't seem to get an IP address (or keep its previously acquired IP) upon start up. I have to issue "dhcpcd eth0" each time after start up to get LAN ethernet working. =(
How can I bypass this automatically?
Thanks.
hi
edit the /etc/rc.local file
ie:
sudo nano /etc/rc.local
then write (append) these lines:
dhcpcd -k eth0
dhcpcd -nd eth0 ## (i use oftenly the -nd flag)
edit: has this helped you ?
Last edited by quarkup (2009-01-31 10:41:51)
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
Yeah I put dhcpcd eth0 at the end of my /etc/rc.d/network... seems like a hack but hey it works now. Thanks!
Offline
I had this issue as well, so I just wrote a quick rc.d script for dhcpcd - I usually start it in the background (@) because dhcpcd takes awhile to get my ip.
/etc/rc.d/dhcp:
#!/bin/bash
INTERFACE="`awk '/^INTERFACE/' /etc/rc.conf | sed -e 's/^INTERFACES=(//' -e 's/)$//'`" # Get INTERFACES value from rc.conf, removing parentheses
CONF=/etc/conf.d/dhcpcd
LOG=/var/lib/dhcpcd/dhcpcd.log # Check dhcpcd output if script fails
. /etc/rc.d/functions
. /etc/rc.conf
[ -f $CONF ] && . $CONF
PID="`pidof -o %PPID /sbin/dhcpcd`"
case "$1" in
start)
stat_busy "Starting dhcpcd..."
/sbin/dhcpcd $DHCPCD_ARGS $INTERFACE &>$LOG
if [ $? -gt 0 ]; then
stat_fail
else
add_daemon dhcp
stat_done
fi
;;
stop)
stat_busy "Stopping dhcpcd..."
/sbin/dhcpcd -kx $INTERFACE &>/dev/null
if [ $? -gt 0 ]; then
stat_fail
else
rm_daemon dhcp
stat_done
fi
;;
kill)
stat_busy "Killing dhcpcd..."
kill -9 $PID &>/dev/null
if [ $? -gt 0 ]; then
stat_fail
else
/bin/rm -f /var/run/dhcpcd-$INTERFACE.pid
rm_daemon dhcp
stat_done
fi
;;
restart)
$0 stop
sleep 1
$0 start
;;
*)
echo "Usage: $0 {start|stop|kill|restart}"
esac
exit 0
Last edited by xstaticxgpx (2009-02-04 21:41:32)
Offline
quarkup wrote:edit the /etc/rc.local file
i.e.:vi /etc/rc.local
then insert these lines:
dhcpcd -k eth0 dhcpcd -nd eth0
That's exactly what I did and it worked. Thank you!
If people do not believe that mathematics is simple, it is only because they do not realize how complicated life is.
Simplicity is the ultimate sophistication.
Offline
Another solution I found around is,
If you start X at boot with Method 3 from the Arch wiki (http://wiki.archlinux.org/index.php/Start_X_at_boot),
then you can add to .bash_login:
sudo /etc/rc.d/network start
startx
It's much faster (at least on my computer) than the rc.local solution.
Hope it helps.
Last edited by pixaroglets (2009-09-30 17:52:26)
Offline
MTsoul wrote:Hi,
I just installed Arch on my new desktop and it doesn't seem to get an IP address (or keep its previously acquired IP) upon start up. I have to issue "dhcpcd eth0" each time after start up to get LAN ethernet working.
How can I bypass this automatically?
Thanks.
hi
edit the /etc/rc.local file
ie:sudo nano /etc/rc.local
then write (append) these lines:
dhcpcd -k eth0 dhcpcd -nd eth0 ## (i use oftenly the -nd flag)
edit: has this helped you ?
Thanks for this. I know this is an old thread and its about a wired connection, but I was having a heck of a time getting my wireless to come up without my having to type in dhcpcd eth0.
I have a newer dell laptop I am loading Arch on and the default wiki wireless page worked great for my desktop (all PCs are wireless in my house. Router is next to the tv). On my laptop though I had to download the wireless drivers and install them before doing the install...damn you broadcom!
Anywho it just worked so thanks for posting. I was getting tired of jacking with rc.conf to get it to come up automagically.
Offline
MTsoul wrote:Hi,
I just installed Arch on my new desktop and it doesn't seem to get an IP address (or keep its previously acquired IP) upon start up. I have to issue "dhcpcd eth0" each time after start up to get LAN ethernet working.
How can I bypass this automatically?
Thanks.
hi
edit the /etc/rc.local file
ie:sudo nano /etc/rc.local
then write (append) these lines:
dhcpcd -k eth0 dhcpcd -nd eth0 ## (i use oftenly the -nd flag)
edit: has this helped you ?
Necromancer, I know...
if you want to use this method, but don't want your system to hang until the network is up, use this instead:
dhcpcd -k eth0
dhcpcd -bn eth0 ## the b option loads dhcpcd into bg immediately
Since it's running in the background, boot doesn't wait on it, and you get to your login prompt faster. Also, you lose the debug output, so you might want to try this only after you've gotten quarkup's original version working.
Offline
quarkup wrote:MTsoul wrote:Hi,
I just installed Arch on my new desktop and it doesn't seem to get an IP address (or keep its previously acquired IP) upon start up. I have to issue "dhcpcd eth0" each time after start up to get LAN ethernet working.
How can I bypass this automatically?
Thanks.
hi
edit the /etc/rc.local file
ie:sudo nano /etc/rc.local
then write (append) these lines:
dhcpcd -k eth0 dhcpcd -nd eth0 ## (i use oftenly the -nd flag)
edit: has this helped you ?
Necromancer, I know...
if you want to use this method, but don't want your system to hang until the network is up, use this instead:
dhcpcd -k eth0 dhcpcd -bn eth0 ## the b option loads dhcpcd into bg immediately
Since it's running in the background, boot doesn't wait on it, and you get to your login prompt faster. Also, you lose the debug output, so you might want to try this only after you've gotten quarkup's original version working.
Sorry about resurrecting this old thread.
The Arch Wiki guides us to disable dhcpcd in daemon array. But what we are going is to load and background it at boot. So why is the wiki telling us to do so?
The above trick solved my problem tho!
Last edited by ntony (2012-02-04 01:10:27)
Offline
That wiki article is about wicd, not about networking in general.
Offline
That wiki article is about wicd, not about networking in general.
So applying this trick would cause any problem? Like some people who use static IP for eth0?
Offline
I don't know if it will cause any problems, I'm only saying that the article you refer to as 'the Arch wiki' is about a certain way of managing your network.
If you're running wicd, you should refer to the article. If you think there's an error in the wiki, you can start a discussion on the discussion page.
If you're not using wicd, what's the point of referring to that article?
Offline