# Netmount/"DHCP not starting at boot" issue:

## Hierophant

I've seen several threads on the board about "netmount" failures referencing the inability to start DHCP at boot with an error as follows;

* Bringing eth0 up...                         

*Failed to bring eth0 up                   [ !! ]

*ERROR: Problem starting needed services

*            "netmount" was not started.

I did a bit of poking around and found that netmount referenced the following config files;

/etc/conf.d/basic

/etc/conf.d/netmount

/etc/rc.conf

I nano'd rc.conf and the bit about protocols caught my attention. Apparently (on my system a least) only the following are listed there;

(/snip)

# Num     Protocol

#1:          Unix

#2:          IPv4

#3:          Amateur Radio AX.25

#4:          IPX

#5:          DDP / appletalk

#6:          X.25

#9:          IPv6

#10:        ROSE / Amateur Radio X.25 PLP

#19:        Acorn Econet

# Most users want this:

PROTOCOLS="1 2"

(/snip)

Now, I played with this file a bit to no avail. Is there some bit of dark magic that can be added to this file to start "nemount" (and therefore eth0) at boot - or am I missing something?

I've recompiled my kernel around five times looking for love there - but that's just not the problem (everything else works). My kernel runs on a DELL Inspiron 8000 (1gig, 512ram, CD-RW, DVD, USB, Firewire LCD@16kx12k model) - and I have preempt and ACPI compiled into it.

What am I not seeing here...? 

(Incidentally, I'd like to thank the Gentoo developers for this "anti-distro." The level of control and configurability is what linux -should- be about. Many thanks!)

-Hierophant

----------

## splat

dhcpcd with Gentoo has been giving me problems.

During the install, I found that if I waited until dhcpcd timed out, then ran it again, my Linksys router would give me an ip address.  I ran the install a couple times, and each time I had to run dhcpcd twice.

The problem still persists after installation.  If I run dhcpcd after the netmount error, it works.

Any ideas why I need to run dhcpcd twice in order to get it to function properly?

I have a Linksys LNE100TX card, and I'm using the tulip driver.  This problem doesn't happen under windows 98.

----------

## Hierophant

Does your router authenticate leases by hostname at all? If so, that -could- be your problem. Try;

dhcpcd -h <your_hostname> eth0

It could be that your router thinks each dhcp request is an attempt to reuse a current lease and not a new lease request. That might cause the router to ignore your first attempt. Is the IP you get always the same?

-Hierophant

***********

No one has any idea what's causing all this netmount business?? Someone has to know...

-H.

----------

## splat

I tried using -h with dhcpcd, but I still have to run it twice before it'll work.  I logged into my router to make sure the entry was gone before booting my machine, but that didn't fix it.

I found that if I run /etc/init.d/netmount start after logging into they system, it'll run without problems.

I've gone over everything I can think of, and I'm not sure what I'm missing...

----------

## Hierophant

I had this issue ass-backward...

"netmount" mounts network filesystems (NFS, etc) and it couldn't start because eth0 was not initializing properly. The interface was hosed because I'd forgotten to do the following;

rc-update add pcmcia default

After I got pcmcia added to startup everything went off without a hitch.

On to CD-RW and DVD...

Thread can be closed, etc et al.

-Hierophant

----------

## splat

running /etc/init.d/netmount start after logging in brings up eth0 first

I don't have pcmcia on my system, so I don't think that'll help me   :Confused: 

I think I'll just start a new thread since our problems don't seem to be the same ...

----------

## Hierophant

Hmm....

Netmount tries to mount remote shares, which would require eth0 to be active first. That's why it starts the network when you call it from init.d. You've probably already done/thought of all the following...but here goes;

Do you have the hardware path to your card defined? (if not pcmcia, I'd imagine yours is PCI?)

Do you have the nic module (and any supporting modules) compiled into the kernel or in /etc/modules.autoload?

Did you do rc-update add net.eth0 default ??

Aside from that, you may want to check to see that your nic is getting power, etc.

As I said, you've probably already remembered the above, but just in case...*shrug*

Good luck,

-Hierophant

----------

## splat

Well, I fixed it.

I have a Linksys DSL router with built in 4 port switch.  I also have a Linksys 8 port switch which is properly uplinked to the switch in the router.  The computer I was having problems with was on the 8 port switch.

I found some diagnostic tools at http://www.scyld.com/diag/index.html.  The tulip-diag let me see what state my NIC was in after the first failed attempt with dhcpcd and after the successful second attempt.  I also use the -d opton with dhcpcd for more info.  The first time, the request always times out.   On the second attempt, the tulip driver dumbs my card to 10baseT, half-duplex.  It then get's an IP address.

On a whim, I decided to move my computer to the switch in the router.  That fixed it.  I'm a little puzzled though.  Any idea why that would fix it?

----------

## Hierophant

It sounds like one of your switches is or is set to 10base-T only....(??)

-Hierophant.

----------

