# dhcpcd freeze the whole system

## stieizc

I'm new to gentoo and actually new to linux(well, I know basic commands, and concepts, though). After five days of struggling--rebuilding, reemerging and a lot of restarting I finally got the system to work.

Now I'm confronted with a new problem: after I generated a driver for my realtek 8168 wired ethernet card using the official driver's autoconfig script and invoke dhpcd , the whole system froze. I couldn't even switch to tty2. Then I tried dhcpcd just after logging in and it froze again. Reemerging doesn't help.

This is the new kernel I've just compiled exluding r8169 driver that the livecd use.

How could I fix this problem?

----------

## DONAHUE

eliminate the manufacturer's driver and use the r8169 driver provided in the kernel as a module

----------

## stieizc

 *DONAHUE wrote:*   

> eliminate the manufacturer's driver and use the r8169 driver provided in the kernel as a module

 

Well, it works for just one boot. I rebooted (using my new kernel) and ifconfig eth0 up and dhcpcd and it froze! It seems that it freezes since the second boot of every new kernel.

It's driving me crazy... I can't even emerge.

----------

## BillWho

stieizc,

If you suspect dhcpcd try assigning a static ip in /etc/conf.d/net

```
config_eth0="192.168.1.100/24 brd 192.168.1.255"

routes_eth0="default via 192.168.1.1"

dns_servers_eth0="8.8.8.8  8.8.4.4"

```

The dns_servers are google's public dns   :Wink: 

----------

## stieizc

 *BillWho wrote:*   

> stieizc,
> 
> If you suspect dhcpcd try assigning a static ip in /etc/conf.d/net
> 
> ```
> ...

 

I'll give it a try right away.

One more thing. My new kernel contains drivers for my b4313 wireless card and I just wanted to try  your suggestion on it . So before configuring I just ifconfig wlan0 up and down it froze again! ifconfig never froze before.

Now I'm thinking that the freezes are not because of dhcpcd but my new kernel. 

Do you guys got any idea on that? I don't know how to get my kernel information out to you.

----------

## DONAHUE

boot cd, mount gentoo partitions, enter chroot, nominally: 

```
mount /dev/sda3 /mnt/gentoo

mount /dev/sda1 /mnt/gentoo/boot

cp /etc/resolv.conf /mnt/gentoo/etc/resolv.conf

mount -t proc none /mnt/gentoo/proc

mount --rbind /sys /mnt/gentoo/sys

mount --rbind /dev /mnt/gentoo/dev

chroot /mnt/gentoo /bin/bash

env-update

source /etc/profile

export PS1="(chroot) $PS1"

emerge wgetpaste

wgetpaste /usr/src/linux/.config

lspci -k | wgetpaste

wgetpaste /proc/cpuinfo

ls -l /etc/init.d/net.* | wgetpaste

wgetpaste /etc/conf.d/net

rc-update show | wgetpaste
```

post the urls returned

----------

## stieizc

 *BillWho wrote:*   

> stieizc,
> 
> If you suspect dhcpcd try assigning a static ip in /etc/conf.d/net
> 
> ```
> ...

 

I changed conf.d/net and ping 192.168.1.1but was told that network is unreachable. eth0 can be found by ifconfig. I'm confused.  :Confused: 

----------

## BillWho

stieizc,

If you can get a connection or maybe chroot:

```
emerge wgetpaste
```

Then 

```
wgetpaste /usr/src/linux/.config
```

and return the link - e.g http://bpaste.net/show/49232/

----------

## stieizc

 *DONAHUE wrote:*   

> boot cd, mount gentoo partitions, enter chroot, nominally: 
> 
> ```
> mount /dev/sda3 /mnt/gentoo
> 
> ...

 

I'll do it right away

----------

## BillWho

 *stieizc wrote:*   

> I changed conf.d/net and ping 192.168.1.1but was told that network is unreachable. eth0 can be found by ifconfig. I'm confused

 

Your router might be on a different segment or eth0/wlan0 is not configured correctly.  Check if your interface has an ip assigned with ifconfig eth0 or ifconfig wlan0

----------

## stieizc

kernel .config:

http://bpaste.net/show/49233

lspci -k:

http://bpaste.net/show/49234

cpuinfo:

http://bpaste.net/show/49235

net.*:

http://bpaste.net/show/49236

conf.d/net

http://bpaste.net/show/49237

rc-update

http://bpaste.net/show/49238

Thank you!

----------

## DONAHUE

remove this from /etc/conf.d/net  *Quote:*   

> dns_domain_lo="gtest"

 

```
rc-uodate add net.eth0 default
```

will go run some meld on your config; be awhile

----------

## BillWho

One thing that's immediately apparent is there's no net.eth0 and net.wlan0 in the default runlevel. Did you set the symlimks to net.lo   :Question: 

Yes you did - never mind   :Embarassed: 

----------

## DONAHUE

if you want it, your kernel strained through pappy's kernel seeds and my configuration is available:

```
cd /usr/src/linux

mv .config config.old

make clean  

make mrproper

wget -o /usr/src/linux/.config http://bpaste.net/raw/49261/

make menuconfig
```

look around, change something, change it back, exit saving the configuration

```
make && make modules_install && make install
```

 ensure grub.conf and /boot are updated to the same name for the new kernel

```
reboot
```

----------

## stieizc

 *DONAHUE wrote:*   

> if you want it, your kernel strained through pappy's kernel seeds and my configuration is available:
> 
> ```
> cd /usr/src/linux
> 
> ...

 

Thank you! I'll take a good look at your .config.

But still I don't know why my computer  froze. I'm already on my way menuconfiging.

By the way, what is "pappy's kernel seeding"?

----------

## stieizc

Wow, you turned off so many things… But I will still give it a try.

Still need time to know what they really do in the system. Is there any chance that I find a intuitive  description for all those features? Though  this may sound ... lazy.

Well I found out that if I use pump instead of dhcpcd and start net.eth0 as default and don't  load wlan0 then everything's fine. I think there must be something wrong with my brcmmsmac driver or my card or brcm specific  driver. Maybe I'll post up a new thread.

Thank  you, BillWho and DONAHUE!

----------

## DONAHUE

enjoy http://kernel-seeds.org/

```
ifconfig -a

ifconfig

lspci -k
```

do the first two show the wireless interface?

does the last show BRCMSMAC driver in use for the wireless NIC? 

if the answer is yes for all, the wireless part of the kernel should be in pretty good shape and you should proceed with 

```
emerge wireless-tools wpa_supplicant 

iwlist scan
```

if iwlist scan scans and shows your network

```
 iwlist scan | wgetpaste
```

and post the url

----------

## stieizc

 *DONAHUE wrote:*   

> enjoy http://kernel-seeds.org/
> 
> ```
> ifconfig -a
> 
> ...

 

I'll give that a try in a few days…Mountain-climbing tomorrow…Thank you!

----------

## stieizc

 *DONAHUE wrote:*   

> enjoy http://kernel-seeds.org/
> 
> ```
> ifconfig -a
> 
> ...

 

Hey I found something. Neither ifconfig -a nor ifconfig shows wlan0, but I didn't start wlan0 on default or my machine would freeze before log-in interface shows up. But lspci -k shows something really interesting. 

It shows that my br4313 card uses bcma instead of BRCMSMAC module. Module bcma seems to be the module under BRCMSMAC. 

Maybe I should change it mannually?

----------

## DONAHUE

presuming you can boot and have a wired connection

```
emerge wgetpaste

lsmod

lsmod | wgetpaste

lspci -k | wgetpaste

dmesg | wgetpaste
```

post url's so we can see relationships. I do not have a 4313 so ...

broadcom drivers are famous for needing blacklists to prevent "almost correct" driver from attaching

----------

## stieizc

 *DONAHUE wrote:*   

> presuming you can boot and have a wired connection
> 
> ```
> emerge wgetpaste
> 
> ...

 

lsmod

http://bpaste.net/show/49717/

I didn't include b43 and b43-legacy even as modules.

lspci -k

http://bpaste.net/show/49718/

dmesg

http://bpaste.net/show/49719/

 *Quote:*   

> broadcom drivers are famous for needing blacklists to prevent "almost correct" driver from attaching

 

Yes, I know that. During my short experience with debian, I was told to use broadcom-sta and it worked alright. But I didn't change the kernel so I knew nothing about bcma and brcmutil and so on.

----------

## DONAHUE

```
ls /lib/firmware/brcm
```

should give

 *Quote:*   

> bcm4329-fullmac-4.bin  bcm43xx-0.fw  bcm43xx_hdr-0.fw  brcmfmac43236b.bin  brcmfmac4329.bin  brcmfmac4330.bin  brcmfmac4334.bin

 if not emerge 

```
linux-firmware

reboot
```

 ifconfig when back up.

If this fails broadcomsta time

----------

## stieizc

What a pity! Broadcom-sta time!

----------

## stieizc

Broadcom-sta works! Though it needs a restart and I haven't test with iwlist yet. But the light i on and I can use fn+f2 to switch it.

Oh I don't know what to say... It made me so depressed.Now I'm vary happy! Thank you so much!

----------

