Raspberry Pi Model B rev 1 - Ethernet problems Topic is solved

Having issues with your DietPi installation, or, found a bug? Post it here.
Post Reply
CrysisLTU
Posts: 3
Joined: Sat Nov 14, 2020 8:30 pm

Raspberry Pi Model B rev 1 - Ethernet problems

Post by CrysisLTU »

As I'm running a project on my ancient 2012 RPi that needs fast network IO, this light-weight, headless OS called DietPi seemed interesting and I decided to try it.

So, I flashed the image, booted it up, did the setup, installed the things I needed thanks to the super easy to use setup wizard, and after it completed, it asked for a reboot. All is fine.

However, after a reboot - Ethernet stopped working. The Pi has three LEDs (FDX, LNK, 10M) related to Ethernet. From a cold boot, all three LEDs are on, however, after a couple of seconds, only the FDX light is on.

FDX light is on even if I unplug Ethernet.

I tried messing around in dietpi.txt, nothing helped.

However, after a few power cycles, somehow Ethernet LEDs stayed on and I was able to successfully join via SSH.

OS is blazing fast, and transferring a video file over Ethernet from the Pi to my PC, the speed is 10.5 MB/s (this is with an overclock, but damn - Raspberry OS only managed 3.5MB/s with the same OC)

I tried rebooting the Pi again, and alas - only the FDX LED is lit. No IP, no nothin'. Re-plugging the Ethernet cable makes no difference.
It feels like the OS is not properly turning on the eth0 device. That's my best guess.


More info:
  • My router doesn't see the Pi.
  • I'm using DHCP.
  • Raspberry Pi OS doesn't and never had this problem on my particular Pi.
  • Confirmed that NET_ETHERNET_ENABLED=1 and NET_WIFI_ENABLED=0
  • Tried different NET_ETH_FORCE_SPEED settings
  • Tried different CONFIG_BOOT_WAIT_FOR_NETWORK settings too
The problem seems to happen randomly, and thus I do not know what could be causing it.

Tried a few times to flash a fresh image to SD. Ethernet always works on first boot, but after a first reboot - stops working. Took me a good amount of power cycles to get it going, but after another power cycle - same issue.

Any ideas?

Other than that, loving the OS. Great work.
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Raspberry Pi Model B rev 1 - Ethernet problems

Post by Joulinar »

Hi,

just for clarification, DietPi is not an own OS. In case of Raspberry Pi, DietPi is an extrem slim (diet) version of Raspberry OS. DietPi is a set of scripts on top, doing all the magic to automate a lot of thinks. Personally I have a RP1 test system working on Ethernet without issues. All configurations on network can be done using dietpi-config. Inside dietpi.txt configuration options starting AUTO are DietPi-Automation settings. They applied on first boot of DietPi only, ONCE!

Did you tried using STATIC ip?
what does ip a gives you?
did you checked kernel messages?

Code: Select all

dmesg -l err,crit,alert,emerg
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
CrysisLTU
Posts: 3
Joined: Sat Nov 14, 2020 8:30 pm

Re: Raspberry Pi Model B rev 1 - Ethernet problems

Post by CrysisLTU »

Ah, I see. Thanks for the clarification.

Just now I had the chance to hook up a display to the Pi (only had SSH previously) and now I can see more of what is going on.

I keep getting:

Code: Select all

[INFO] DietPi-Boot | Waiting for valid network connection before continuing boot | Mode=1
[FAILED] DietPi-Boot | Waiting for valid network connection timed out
[INFO] DietPi-Run_NTPD | Waiting for completion of systemd-timesyncd (60/60)
[INFO] DietPi-Run_NTPD | Timed out waiting for systemd-timesyncd
[FAILED] Network time sync | Exited with error
LAN IP on DietPi seems to show up as IPv6 (four digits::four digits::etc::etc..)

Running ip a gives (I skipped 1: lo):

Code: Select all

2. eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group qien 1000
link/ether *MAC address I think* brd ff:ff:ff:ff:ff:ff
inet6 *my pi's IP in v6 format*/64 scope link
valid_lft forever preferred_lft forever
dmesg -l err,crit,alert,emerg replies with a few lines of:

Code: Select all

mmc0: read transfer error - HSTS 20
Seems like the OS is choosing IPv6 by default. No idea why, everything on my network is running IPv4.

Using dietpi-config indeed it was set to IPv6 by default.

Changed it to IPv4, rebooted, Diet Pi says:

Code: Select all

- LAN IP : Use dietpi-config to setup a connection (eth0)
After logging in:

Code: Select all

-bash: /boot/dietpi/func/dietpi-globals: No such file or directory
[FAILED] DietPi-Login | Failed to load DietPi-Globals. Skipping DietPi login scripts...
ip a didn't change.

Since I didn't know that dietpi.txt is for the first boot only, maybe that screwed up things.

I'll try a fresh install and make sure that IPv6 is disabled, as I think that is the issue.

Will report later.

Thank you
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Raspberry Pi Model B rev 1 - Ethernet problems

Post by Joulinar »

you can try to set STATIC ip as well. Maybe DHCP is taking to much time to come up. And there is an option to force your system to wait on a valid network interface. OK this could end up on an infinity loop if your network is not coming up at all :o
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
CrysisLTU
Posts: 3
Joined: Sat Nov 14, 2020 8:30 pm

Re: Raspberry Pi Model B rev 1 - Ethernet problems

Post by CrysisLTU »

Okay, problem fixed.

The issue is that for some reason (not sure if this is normal) - the very first boot (after flashing the image) uses IPv4, and the initial configuration wizard automatically pre-selects IPv6. No idea is this by default or somehow influenced by the router.

After the first reboot, IPv6 goes into action. I'm not sure how routers manage different IP standards - can you use both v4 and v6 at the same time, or just one or the other, but at least in my case - everything on the network is IPv4, and thus there might have been an incompatibility when IPv6 on the Pi was set up by default.

Either way, I think IPv4 should be pre-selected by default in setup for compatibility reasons (as I'm sure most of the people are using v4).

Problem solved!
User avatar
Joulinar
Posts: 2572
Joined: Sat Nov 16, 2019 12:49 am

Re: Raspberry Pi Model B rev 1 - Ethernet problems

Post by Joulinar »

well you can do this. Right after flashing and before first boot, just set following values inside /boot/dietpi.txt. This can be done on every computer as BootFS is FAT file system

Code: Select all

# IPv6
CONFIG_ENABLE_IPV6=0
Pls let us know if a solution is working. This could help others if they hit by similar situation. Your DietPi Team
Post Reply