View previous topic :: View next topic |
Author |
Message |
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 312 Location: Somewhere in the 77
|
Posted: Thu Aug 08, 2024 12:11 pm Post subject: [SOLVED] RPI4B: Not networking interface with IP at boot |
|
|
Hello,
I followed these instructions to install Gentoo on my Raspberry PI 4B.
I can boot, connect to root, change my key mapping and start to finish installation.
But I have simply no network, at first output of « ip a » return that eth0 is DOWN, with no IP or what ever.
Weirdly, trying to write into /etc/resolv.conf was non allowed, nano saying the file is not found (?!, it is here !).
I was able to remove it, re-write it with the same values on my main system, being:
Code: | # Generated by dhcpcd from enp8s0.dhcp, enp8s0.ra
# /etc/resolv.conf.head can replace this line
nameserver 192.168.1.254
nameserver fd0f:ee:b0::1
# /etc/resolv.conf.tail can replace this line
|
Which after rebooting, is not bringing me anything.
So I take the SystemD path, I created /etc/systemd/network/eth0.network, with this :
Code: |
[Match]
Name=eth0
[Network]
DNS=192.168.1.1
Address=192.168.1.102/24
Gateway=192.168.1.1 |
Note: This has been copied manually, since I can't SSH it.
The answer once I restart systemd-networkd service :
Code: |
localhost systemd-networkd[377]: lo: Gained carrier
localhost systemd-networkd[377]: eth0: Link UP
localhost systemd-networkd[377]: eth0: Gained carrier
localhost systemd-networkd[377]: eth0: Gained IPv6LL
localhost systemd-networkd[377]: Enumeration completed
localhost systemd[1]: Started Network Configuration.
localhost systemd-networkd[377]: eth0: found matching network '/etc/systemd/network/eth0.network', based on potentially unpredictable interface name.
localhost systemd-networkd[377]: eth0: Configuring with /etc/systemd/eth0.network.
localhost systemd-networkd[377]: eth0: Failed to configure DHCPv6 client: No such file or directory
localhost systemd-networkd[377]: eth0: Failed
|
ip a return :
Code: |
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisk noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host noprefixroute
valid_lft forever preferred_lft forever
2: eth0 <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisk mq state UP group default qlen 1000
link/ether dc:a6:32:43:c5:5e brd ff:ff:ff:ff:ff:ff
altname end0
inet6 fe80:dea6:32ff:fe43:c55e/64 scope link proto kernel_ll
valid_lft forever preferred_lft forever
|
ip route returns simply nothing, it seems I can't ping 192.168.1.254 or .1 either, trying this command :
Code: |
ip route ad 192.168.1.1/24 via 192.168.1.254
|
Answers back:
Code: |
Error: Invalid prefix for given prefix lenght.
|
The thing is, my prefix is in my network /24. On my actual system for example, I get :
Code: | inet 192.168.1.44/24 metric 1024 brd 192.168.1.255 scope global dynamic brigde0 |
(note: this is a bridge, nonetheless the line above gives as you see, if I'm not blind, pretty much same info)
Last words: The MAC address of this RPI4B is already known on this network and my ISP routeur gives it 192.168.1.102 when connecting. And yes, the ethernet wire is connected ! And I know the hardware is supposed to works, it was a few days back on Raspberry Pi OS. Everything else seems to works (USB, SD card etc).
Any ideas ?
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website.
Last edited by kgdrenefort on Thu Aug 08, 2024 3:26 pm; edited 1 time in total |
|
Back to top |
|
|
Banana Moderator
Joined: 21 May 2004 Posts: 1720 Location: Germany
|
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 312 Location: Somewhere in the 77
|
Posted: Thu Aug 08, 2024 2:54 pm Post subject: |
|
|
Banana wrote: | Quote: | localhost systemd-networkd[377]: eth0: Failed to configure DHCPv6 client: No such file or directory |
Do you miss a dhcp client? |
The wiki page says you won't have dhcpd after first boot, but it could be installed afterwards. But since I do not have any connection…
Other workaround would be this:
Code: | (…) you can use emerge -pf networkmanager to download all the files you need and copy them to /mnt/gentoo/var/cache/distfiles/. |
Maybe I could from my desktop download the necessary files and install them manually on the RPI.
Nonetheless, I guess it means downloading source code, as you would do when doing an installation with emerge, but stop before keep going.
Then, I have to edit the make.conf of my RPI box to setup properly architecture, etc, and finally asking emerge to install this from source ?
I'm not sure which package should be installed, tho, net-misc/dhcpd ?
Thanks for your answer.
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
kgdrenefort Guru
Joined: 19 Sep 2023 Posts: 312 Location: Somewhere in the 77
|
Posted: Thu Aug 08, 2024 3:25 pm Post subject: |
|
|
Solved, thanks to Jannick on #gentoo-arm@libera.chat.
I was lacking the next command :
Code: | systemd-machine-id-setup |
Then, restarting systemd-networkd got me an IP, .102 as requested, and I can now SSH it.
This topic is solved. I might have not respected the page because I might remember that it's asked to do some extra steps if needed from the usual AMD64 handbook. This systemd step was missed obviously.
Will reread the page and add warning or such for this.
Regards,
GASPARD DE RENEFORT Kévin _________________ Traduction wiki, pour praticiper.
Custom logos/biz card/website. |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|