LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   eth0 missing after upgrading sarpi-firmware/hack of 17 feb 2021 (https://www.linuxquestions.org/questions/slackware-arm-108/eth0-missing-after-upgrading-sarpi-firmware-hack-of-17-feb-2021-a-4175692012/)

Pigi_102 03-15-2021 02:38 PM

Exaga, I think my english does not help in explaining :)
In my /lib/firmware I don't have this file, and I can't find any reference of it neither in my old packages nor in the new one, and also on raspbian ( that I have d/loaded and installed to be sure that it wasn't an hardware problem ).

It is not referenced in /var/adm/removed_packages and so is missing anywhere on the Pi.

I will download your, and put it in the right directory but as far as I can tell it seems that is not such an important file.

I case I miss something, my problem is with eth0, not on wifi. ( sorry to repeat this but in previous thread someone misunderstood the problem due to my bad english).

And, for what I understand, in which package ( txz ) this file should be found ?

Thanks a lot for you help.

Pigi

Exaga 03-15-2021 04:10 PM

Quote:

Originally Posted by Pigi_102 (Post 6230610)
Exaga, I think my english does not help in explaining :)
In my /lib/firmware I don't have this file, and I can't find any reference of it neither in my old packages nor in the new one, and also on raspbian ( that I have d/loaded and installed to be sure that it wasn't an hardware problem ).

It is not referenced in /var/adm/removed_packages and so is missing anywhere on the Pi.

I will download your, and put it in the right directory but as far as I can tell it seems that is not such an important file.

I case I miss something, my problem is with eth0, not on wifi. ( sorry to repeat this but in previous thread someone misunderstood the problem due to my bad english).

And, for what I understand, in which package ( txz ) this file should be found ?

Thanks a lot for you help.

Pigi

No problem Pigi. I also have problems with English, both spoken and written. :D

brcmfmac43455-sdio.raspberrypi,4-model-b.txt = instructions for wireless device on RPi4 - has no effect on Ethernet. ;)

OK! First thing to do as 'root' user is .... (this is an example - yours will be different)

Code:

root@slackware:~# ifconfig -a

eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.1.14  netmask 255.255.255.0  broadcast 192.168.1.255
        inet6 fe80::2c11:a657:1d7a:7a47  prefixlen 64  scopeid 0x20<link>
        ether b8:27:eb:35:b9:4e  txqueuelen 1000  (Ethernet)
        RX packets 2736663  bytes 3754263539 (3.4 GiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 1376960  bytes 361097015 (344.3 MiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

MAC address in this example = b8:27:eb:35:b9:4e

Take a look to see if you have any Ethernet card in the list (eth*). If your Ethernet card is listed as 'eth0' - or 'eth1' like above - then get the MAC address of 'eth*'...

Code:

root@slackware:~# nano -w /etc/udev/rules.d/70-persistent-net.rules
Then edit the MAC address in this file to match the one on your system that's currently 'eth1'... for example - like this...

Example - if b8:27:eb:35:b9:4e is the MAC address...

Code:

# USB device 0x0424:0xec00 (usb)
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="b8:27:eb:35:b9:4e", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

make sure you get the MAC adress part correct AND make sure it is NAME="eth0" at the end! SAVE and exit the file.

Then reboot the RPi4 device.

When you use 'ifconfig -a' command and if there is NO Ethernet card listed...

Code:

root@slackware:~# dmesg -t -l err > /tmp/dmesg_error.log
This will pipe (write) the output into the '/tmp/dmesg_error.log' file so you can read it easy (use 'nano -w /tmp/dmesg_error.log' command to read it). See if that shows any errors that says anything about Ethernet. If it doesn't then use 'dmesg > /tmp/dmesg.log' instead = same thing but with full output of 'dmesg'.

Paste the output of 'dmesg' here for me to read please. If it works after rebooting no need to do anything else! :cool:

Pigi_102 03-16-2021 02:51 AM

From raspian boot, without any device connected on USB port I can see that my eth0 has dc:a6:32:35:7c:c4 as Mac address.
From "ifconfig -a | grep ether | grep 7c:c4" no one of my interfaces ha this mac address.

In my udev rules file I have:
Code:

root@casa:~# grep eth /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4c:6b:65:7d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="9c:eb:e8:0d:0b:a5", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

Which is correct as I have a couple of usb-to-ethernet dongle and they get their name correctly.
eth0 hs not his reference, but that's fine. It will get the first free eth ;)
It does not seem to be an udev problem.

If I look in the dmesg from the raspbian boot I can see:
Code:

grep eth dmsg.raspbian
[    1.132493] bcmgenet fd580000.ethernet: failed to get enet clock
[    1.134953] bcmgenet fd580000.ethernet: GENET 5.0 EPHY: 0x0000
[    1.137354] bcmgenet fd580000.ethernet: failed to get enet-wol clock
[    1.139723] bcmgenet fd580000.ethernet: failed to get enet-eee clock
[  22.039224] bcmgenet fd580000.ethernet: configuring instance for external RGMII
[  22.039491] bcmgenet fd580000.ethernet eth0: Link is Down

so the driver is bcmgenet.

If I search in my actual boot dmesg I can't find any reference to bcmgenet:
Code:

root@casa:~# grep bcmgenet dmesg.latest
root@casa:~#


If I search for my mac address on dmesg from raspbian I see:
Code:

[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 video=HDMI-A-1:1280x1024M@60 smsc95xx.macaddr=DC:A6:32:95:7C:C4 vc_mem.mem_base=0x3ec00000 vc_mem.mem_size=0x40000000  console=ttyS0,115200 console=tty1 root=PARTUUID=385f3658-02 rootfstype=ext4 elevator=deadline fsck.repair=yes rootwait
if I search in my actual dmesg I see:
Code:

[    0.000000] Kernel command line: coherent_pool=1M 8250.nr_uarts=0 snd_bcm2835.enable_compat_alsa=0 snd_bcm2835.enable_hdmi=1 bcm2708_fb.fbwidth=1280 bcm2708_fb.fbheight=1024 bcm2708_fb.fbswap=1 smsc95xx.macaddr=DC:A6:32:95:7C:C4 vc_mem.mem_base=0x3eb00000 vc_mem.mem_size=0x3ff00000  dwc_otg.lpm_enable=0 console=tty1 nofont root=/dev/sda3 rootfstype=ext4 rootwait ro cgroup_enable=memory
which, at least for the mac, looks identical.

In the kernel ( running ) config the bcmgenet is present and statically compiled:
Code:

root@casa:~# gunzip -c /proc/config.gz  | grep -i GENET
CONFIG_BCMGENET=y

https://pastebin.com/Vqg9QUdA
Here the dmesg from last boot.


And, in case you wanna give look, here the dmesg from raspbian:
https://pastebin.com/TThAGixL

Thanks again

Pigi

Exaga 03-16-2021 04:01 AM

Quote:

Originally Posted by Pigi_102 (Post 6230770)
From raspian boot

... [SNIP!]

In my udev rules file I have:
Code:

root@casa:~# grep eth /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4c:6b:65:7d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="9c:eb:e8:0d:0b:a5", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth2"

... [SNIP!]

Let's not deal with Raspberry Pi OS unless it's a means towards solving your problem with Slackware ARM. I don't have any inclinations towards consulting it in order to address or help fix this particular issue.

So... just to clarify so we're understanding each other... the '/etc/udev/rules.d/70-persistent-net.rules' file you quoted contains NO 'eth0' device. Those listed are 'eth1' and 'eth2' and they do not have matching MAC addresses.

Therefore, you need to carry out what I asked you to do in the previous post and you need to get rid of one of the entries in that file. Please do that and let me know how it goes, and if you need any further assistance then just post a reply.

Pigi_102 03-16-2021 08:02 AM

Exaga, I can't get rid of the lines in file, as I have those two interfaces and need them ( well at least one ).

My setup is the following:

Code:

ISP-router
    |
    |
    |
+--------+
|  eth1  |
|iptables|  (Pi)
|  eth0  |
+--------+
    |
    |
    |
internal net

eth2 is ( at the moment ) up in place of eth0 ( missing )

I can, eventually, and just for test disconnect everything ( except for the SSD ), force an exit in rc.local ( where I start most part of my services ), do the tests, output the dmesg in a file but after that I have to have those lines otherwise my setup won't work and I'm disconnected from internet :doh:

Do you want me to put the line with the mac address in /etc/udev/rules.d/70-persistent-net.rules ?

Pigi

Exaga 03-16-2021 10:38 AM

Quote:

Originally Posted by Pigi_102 (Post 6230830)
Do you want me to put the line with the mac address in /etc/udev/rules.d/70-persistent-net.rules ?

I don't want you to do anything you don't want to do under your own volition. I've already asked you (twice) to get the MAC address from the NIC and put it in the '/etc/udev/rules.d/70-persistent-net.rules' file as NAME="eth0". If you have a custom setup then it might have been wise to tell me about it beforehand so we're not wasting time. But pretty much all we have done is just that so far. And, thus far, I've realised that it's not wireless we're dealing with, it's Ethernet, and not only that but it's a non-standard configuration. So exactly what else am I expected to be dealing with here? :confused:

This is an easy fix when it happens to me (takes a couple of minutes at most) and we're already well into the second DAY deliberating over it ... so the choice is yours what you do from here. I would assume if you've gone to all this trouble of setting up such a configuration successfully then you would not require any help or advice from someone like me.

mralk3 03-16-2021 10:46 AM

Forget about MAC addresses for now. This is a misconfiguration issue. Remove everything from /etc/udev/rules.d/70-persistent-net.rules and save it to a separate file. That way you can restore your settings. Reboot. Report what ifconfig -a lists back here. Do not worry about having internet access while you troubleshoot.

How many network interfaces do you have? What static IP address are you setting for your internal network interface(s)? Do you not have a wireless network interface? What is its address? Which is your public internet facing network hardware?

I believe your missing "eth0" is simply being renamed to either "eth1" or "eth2".

Exaga 03-16-2021 10:49 AM

Quote:

Originally Posted by mralk3 (Post 6230894)
I believe your missing "eth0" is simply being renamed to either "eth1" or "eth2".

Yep it could be either. I'm lost now. It would have saved a LOT of time if this was all explained first.

[EDIT] if it were me I'd probably try removing 'eth2' and changing 'eth1' to 'eth0' and going from there with one of the MAC addresses. Sooner or later it's going to hit the right one. Could be that 'eth0' has shifted to 'eth1' and 'eth1' has shifted to 'eth2'. If not then 'eth2' used to be 'eth0' and just needs renaming to 'eth0'.

[EDIT #2]
[sarcasm]
oh wait but there's another NIC involved that...
[/sarcasm]

Exaga 03-16-2021 11:02 AM

Quote:

Originally Posted by Exaga (Post 6230895)
Yep it could be either. I'm lost now. It would have saved a LOT of time if this was all explained first.

[EDIT] if it were me I'd probably try removing 'eth2' and changing 'eth1' to 'eth0' and going from there with one of the MAC addresses. Sooner or later it's going to hit the right one. Could be that 'eth0' has shifted to 'eth1' and 'eth1' has shifted to 'eth2'. If not then 'eth2' used to be 'eth0' and just needs renaming to 'eth0'.

[EDIT #2]
[sarcasm]
oh wait but there's another NIC involved that...
[/sarcasm]

[EDIT #3]

So it's going to be...

Code:

root@casa:~# nano -w /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4c:6b:65:7d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="9c:eb:e8:0d:0b:a5", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"

or

Code:

root@casa:~# nano -w /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="00:e0:4c:6b:65:7d", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="9c:eb:e8:0d:0b:a5", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"


mralk3 03-16-2021 11:12 AM

I think you can actually empty that file and the Pi will use the correct network interfaces after a reboot. I have never needed to use or edit that file and make my own persistant rules on any router.

Exaga 03-16-2021 11:24 AM

Quote:

Originally Posted by mralk3 (Post 6230900)
I think you can actually empty that file and the Pi will use the correct network interfaces after a reboot. I have never needed to use or edit that file and make my own persistant rules on any router.

That's what I would do as a last resort. Usually I like to define my own shizzle in '70-persistent-net.rules'. Each to their own way though. Whatever works is usually the best thing in most cases. :)

[EDIT] the order the interfaces initialise might also be a factor. I think they are processed in listed order so the primary NIC will need to be first in line for that.

mralk3 03-16-2021 11:31 AM

Quote:

Originally Posted by Exaga (Post 6230902)
That's what I would do as a last resort. Usually I like to define my own shizzle in '70-persistent-net.rules'. Each to their own way though. Whatever works is usually the best thing in most cases. :)

I am pretty sure the system will add the correct values automatically if the file is empty (or maybe missing) after udev is restarted on a reboot.

Pigi_102 03-16-2021 01:41 PM

Mac address for my eth0 is dc:a6:32:35:7c:c4

I have emptied the udev file, as suggested, removed any usb interface and rebooted the Pi.
Th only thing connected to usb was the SSD disk

Everything not tied to normal slackware configuration has been disabled.

This is the ifconfig, after reboot:

Code:


root@casa:~# ifconfig -a
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
        inet 127.0.0.1  netmask 255.0.0.0
        inet6 ::1  prefixlen 128  scopeid 0x10<host>
        loop  txqueuelen 1000  (Local Loopback)
        RX packets 4  bytes 156 (156.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 4  bytes 156 (156.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

wlan0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether dc:a6:32:95:7c:c5  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

The dmesg is here
https://pastebin.com/ei1jzbTG

Exaga I wasn't meaning to offend, in case it could have seemed.

Pigi_102 03-16-2021 01:48 PM

Quote:

Originally Posted by mralk3 (Post 6230894)
I believe your missing "eth0" is simply being renamed to either "eth1" or "eth2".

No, @mralk3 unfortunally is not so easy :)
I've been on slackware since slackware 4 and have got some experience in troubleshooting this udev problem.
I've fighted with udev since it appears far long time ago :)

What happens is that eth0 does not appears at boot with this installation and ( sorry Exaga if I repeat ) appears with another.
Also, the mac address of my eth0 is dc:a6:32:35:7c:c4

No one of my interfaces has this mac address and nowhere in my rc.script/whatever I do change the mac address of any interface.
Code:

root@casa:~# ifconfig -a | egrep "flags|ether"
br0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 0a:05:f1:ae:80:23  txqueuelen 1000  (Ethernet)
docker0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 02:42:63:99:f7:0e  txqueuelen 0  (Ethernet)
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 00:e0:4c:6b:65:7d  txqueuelen 1000  (Ethernet)
eth2: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        ether 9c:eb:e8:0d:0b:a5  txqueuelen 1000  (Ethernet)
lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
tap0: flags=4419<UP,BROADCAST,RUNNING,PROMISC,MULTICAST>  mtu 1500
        ether 0a:05:f1:ae:80:23  txqueuelen 100  (Ethernet)
tap1: flags=4355<UP,BROADCAST,PROMISC,MULTICAST>  mtu 1500
        ether b6:4c:54:15:69:53  txqueuelen 100  (Ethernet)
veth3197a7b: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 3e:ba:25:65:78:71  txqueuelen 0  (Ethernet)
vetha6c4f0c: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 26:f6:4e:4f:dc:db  txqueuelen 0  (Ethernet)
vethdf4b528: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether 8e:75:74:c8:fb:eb  txqueuelen 0  (Ethernet)
vethe83bb80: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether fe:85:e3:12:04:ea  txqueuelen 0  (Ethernet)
wlan0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        ether dc:a6:32:95:7c:c5  txqueuelen 1000  (Ethernet)


Exaga 03-16-2021 02:23 PM

Quote:

Originally Posted by Pigi_102 (Post 6230977)
What happens is that eth0 does not appears at boot with this installation and ( sorry Exaga if I repeat ) appears with another.
Also, the mac address of my eth0 is dc:a6:32:35:7c:c4

Code:

root@casa:~# nano -w /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="dc:a6:32:35:7c:c4", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"

root@casa:~# ifconfig eth1 192.168.1.10 netmask 255.255.255.0 up  ### use your OWN IP address and netmask to suit your network here

root@casa:~# ifconfig eth1  ### get MAC address of eth1

root@casa:~# nano -w /etc/udev/rules.d/70-persistent-net.rules
SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="<- PUT eth1 MAC address here ->", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth1"



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