LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM
User Name
Password
Slackware - ARM This forum is for the discussion of Slackware ARM.

Notices


Reply
  Search this Thread
Old 11-12-2023, 05:16 PM   #1
ricky_cardo
Member
 
Registered: Feb 2006
Location: Syracuse, NY
Distribution: Slackware64-Current
Posts: 210

Rep: Reputation: 76
Raspberry Pi 4 Model B Rev 1.1 - DHCP issue on boot.


After recent upgrade the DHCP option in Netconf no longer gets an IP address / nor does it enable eth0.
- I think this started after around mid October... updates I'm no longer getting address on reboot.

Pi4 - plugged in to switch on eth0 had previously worked well ...


PI4 - just reloaded to today's current 11-12-2023 followed the directions and performed a clean install.
same results

I checked /etc/rc.d/rc.inet1.conf
and pretty much only ( USE_DHCP[0]="yes" ) is set.

Here is the dmesg from boot.

Code:
Nov 12 15:58:17 rpi4 rc.inet1[1095]: lo: configuring interface
Nov 12 15:58:17 rpi4 rc.inet1[1095]: eth0: configuring interface
Nov 12 15:58:17 rpi4 rc.inet1[1095]: eth0: starting dhcpcd
Nov 12 15:58:17 rpi4 dhcpcd[1135]: dhcpcd-10.0.4 starting
Nov 12 15:58:18 rpi4 kernel: 8021q: 802.1Q VLAN Support v1.8
Nov 12 15:58:18 rpi4 kernel: bcmgenet fd580000.ethernet: configuring instance for external RGMII (RX delay)
Nov 12 15:58:18 rpi4 dhcpcd[1138]: eth0: waiting for carrier
Nov 12 15:58:18 rpi4 kernel: bcmgenet fd580000.ethernet eth0: Link is Down
Nov 12 15:58:22 rpi4 dhcpcd[1138]: eth0: carrier acquired
Nov 12 15:58:22 rpi4 kernel: IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
Nov 12 15:58:22 rpi4 kernel: bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
Nov 12 15:58:22 rpi4 dhcpcd[1138]: DUID 00:01:00:01:2c:e3:f8:ee:dc:a6:32:4f:d3:1c
Nov 12 15:58:22 rpi4 dhcpcd[1138]: eth0: IAID 32:4f:d3:1c
Nov 12 15:58:22 rpi4 dhcpcd[1138]: eth0: soliciting a DHCP lease
Nov 12 15:58:22 rpi4 dhcpcd[1138]: eth0: offered 192.168.57.214 from 192.168.57.2
Nov 12 15:58:22 rpi4 dhcpcd[1138]: eth0: probing address 192.168.57.214/24
Nov 12 15:58:28 rpi4 dhcpcd[1138]: eth0: leased 192.168.57.214 for 43200 seconds
Nov 12 15:58:28 rpi4 dhcpcd[1138]: eth0: adding route to 192.168.57.0/24
Nov 12 15:58:28 rpi4 dhcpcd[1138]: eth0: adding default route via 192.168.57.2
Nov 12 15:58:28 rpi4 kernel: audit: type=1326 audit(1699822708.299:2): auid=4294967295 uid=68 gid=68 ses=4294967295 pid=1137 comm="dhcpcd" exe="/sbin/dhcpcd" sig=31 arch=c00000b7 syscall=24 compat=0 ip=0xffff98d8eb4c code=0x0
Nov 12 15:58:28 rpi4 rc.inet1[1095]: eth0: failed to obtain DHCP lease
Nov 12 15:58:28 rpi4 kernel: bcmgenet fd580000.ethernet eth0: Link is Down

once rc.local runs:
Code:
Nov 12 15:59:07 rpi4 kernel: bcmgenet fd580000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
Nov 12 15:59:13 rpi4 dhcpcd[1370]: dhcpcd-10.0.4 starting
Nov 12 15:59:13 rpi4 dhcpcd[1373]: DUID 00:01:00:01:2c:e3:f8:ee:dc:a6:32:4f:d3:1c
Nov 12 15:59:13 rpi4 dhcpcd[1373]: eth0: IAID 32:4f:d3:1c
Nov 12 15:59:14 rpi4 dhcpcd[1373]: eth0: soliciting an IPv6 router
Nov 12 15:59:15 rpi4 dhcpcd[1373]: eth0: rebinding lease of 192.168.57.214
Nov 12 15:59:15 rpi4 dhcpcd[1373]: eth0: probing address 192.168.57.214/24
Nov 12 15:59:20 rpi4 dhcpcd[1373]: eth0: leased 192.168.57.214 for 43200 seconds
Nov 12 15:59:20 rpi4 dhcpcd[1373]: eth0: adding route to 192.168.57.0/24
Nov 12 15:59:20 rpi4 dhcpcd[1373]: eth0: adding default route via 192.168.57.2
Nov 12 15:59:20 rpi4 kernel: audit: type=1326 audit(1699822760.699:3): auid=0 uid=68 gid=68 ses=1 pid=1372 comm="dhcpcd" exe="/sbin/dhcpcd" sig=31 arch=c00000b7 syscall=24 compat=0 ip=0xffff991aeb4c code=0x0
System:
Host: rpi4.lehcar.net Kernel: 6.1.62-armv8 arch: aarch64 bits: 64 Console: pty pts/1
Distro: Slackware 15.0
Machine:
Type: ARM System: Raspberry Pi 4 Model B Rev 1.1



I can resolve the issue by adding this to rc.local
but wanted to let you know of this new behavior.

Code:
# check eth0 if down bring up
if [[ $(cat /sys/class/net/eth0/operstate) == "down" ]] ;then 
    /sbin/ifconfig eth0 up
    /sbin/dhcpcd eth0
fi

If you can think of anything to try let me know.

Last edited by ricky_cardo; 11-13-2023 at 06:37 AM. Reason: removed debug echo YES
 
Old 11-14-2023, 12:27 PM   #2
dodoLQ
Member
 
Registered: Dec 2014
Location: France
Distribution: Slackware
Posts: 213

Rep: Reputation: Disabled
Newer devices are intelligent and put themself in "dormant" mode when there's no activities. Here, i wake up my wifi network card (ip link set dev wlan0 up) before running wpa_supplicant and dhclient.
 
1 members found this post helpful.
Old 11-15-2023, 09:19 AM   #3
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,549

Rep: Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313
Quote:
Originally Posted by ricky_cardo View Post
After recent upgrade the DHCP option in Netconf no longer gets an IP address / nor does it enable eth0.
- I think this started after around mid October... updates I'm no longer getting address on reboot.
I've just reinstalled my Rpi4 using the latest -current and DHCP works when NetworkManager is handling it. I haven't tried using rc.inet1 to configure it though.
I noticed that (IIRC) when we moved from DHCPCd v3 I started having issues with the client, and there are some patches applied to rc.inet1 for ARM to address it; but with Network Manager it works reliably. I'm not sure *why* though, as NM also uses dhcpcd.

The installation instructions don't install the latest -current, as the package set is a few weeks old already.
You can reinstall from the latest -current (as of today) by following the old instructions if you want. These instruct you to copy the Slackware tree onto a USB stick. I use NFS myself.

You could also switch to using Network Manager:
Code:
# IPv4 config options for eth0:
IPADDRS[0]=""
USE_DHCP[0]=""
# IPv6 config options for eth0:
IP6ADDRS[0]=""
USE_SLAAC[0]=""
USE_DHCP6[0]=""
# Generic options for eth0:
DHCP_HOSTNAME[0]=""
Make your /etc/rc.d/rc.inet1.conf eth0 settings like that and:

Code:
chmod +x /etc/rc.d/rc.networkmanager
and reboot.
 
1 members found this post helpful.
Old 11-15-2023, 02:36 PM   #4
ricky_cardo
Member
 
Registered: Feb 2006
Location: Syracuse, NY
Distribution: Slackware64-Current
Posts: 210

Original Poster
Rep: Reputation: 76
Good suggestion I switched over to NetworkManager and it works like a champ. I don't know why I was so resistant to rc.networkmanager (I didn't realize it worked well for headless operation too )
I think I got locked into doing things the way I always had in the past


I'll do some more testing too see if I can unearth anything. (plus try the new updates )
- I did notice that using the old method /etc/rc.d/rc.inet1.conf that eth0 looses it's lease after (24 hrs guess here maybe less) so that is curious too.


--Good work btw you and Brent !!! I enjoy the youtube channel too
 
Old 11-15-2023, 09:43 PM   #5
ricky_cardo
Member
 
Registered: Feb 2006
Location: Syracuse, NY
Distribution: Slackware64-Current
Posts: 210

Original Poster
Rep: Reputation: 76
And after the update /etc/rc.d/rc.inet1.conf seems to work on reboot now too




I'll leave this open for a few more hrs to verify it does not drop out at lease expire.
I was trying to find the lease time

I tried this but it is not human readable:
cat /var/lib/dhcpcd/eth0.lease

or
Code:
dhcpcd --dumplease
dhcpcd is not running
I'll just wait and check tomorrow but looks really promising now
maybe check some log files and report back if I find it.


* update (/var/log/messages) has the answer
Nov 15 22:23:43 rpi4 dhcpcd[1010]: eth0: leased 192.168.57.214 for 43200 seconds (aka 12 hrs)

Last edited by ricky_cardo; 11-15-2023 at 09:46 PM.
 
Old 11-16-2023, 03:46 AM   #6
drmozes
Slackware Contributor
 
Registered: Apr 2008
Distribution: Slackware
Posts: 1,549

Rep: Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313Reputation: 1313
Glad it works. I spent a while ages ago trying to figure out what is going on (and didn't) -- I had the same problem on x86 as well.

You'll find this fix in ARM but not in x86: /etc/rc.d/rc.inet1 calls DHCP with the -H option due to low entropy on ARM machines during boot.
It made it work more of the time. dhcpcd without Network Manager works fine on my build machines though.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
[SOLVED] motion install on raspberry pi Raspberry Pi Model B Rev 2: logging issue; howto solve? floppy_stuttgart Linux - Embedded & Single-board computer 7 02-27-2024 10:09 PM
[SOLVED] Raspberry Pi 1 Model B Plus Rev 1.2 for Slackware 15.0? lancsuk Slackware - ARM 9 09-27-2023 06:38 AM
[SOLVED] Raspberry Pi Model B Rev 2 with camera module; HowTo setup in motion? floppy_stuttgart Linux - Embedded & Single-board computer 1 12-31-2020 10:05 AM
New member - Raspberry Pi Model B, Samba4, AirPrint, DHCP server fun! Jonwaldo LinuxQuestions.org Member Intro 0 02-19-2014 06:36 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware > Slackware - ARM

All times are GMT -5. The time now is 05:01 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration