Ethtool not found with latest pkg

Hi, I'm a newbie to OpenWRT so hope this is a simple issue.

After install ethtool package "ethtool" getting "ethtool: not found" message. Want to check HW for PTP suitability. ethtool is in /usr/sbin but calling it from /usr with './ethtool' reports same message. Tried reboot ... :slight_smile:

ethtool - 5.2-1

NAME="Openwrt"                                                                                                                          
VERSION="19.07.2"                                                                                                                       
ID="openwrt"                                                                                                                            
ID_LIKE="lede openwrt"                                                                                                                  
PRETTY_NAME="Openwrt 19.07.2"                                                                                                           
VERSION_ID="19.07.2"                                                                                                                    
HOME_URL="https://openwrt.org/"                                                                                                         
BUG_URL="https://bugs.openwrt.org/"                                                                                                     
SUPPORT_URL="https://forum.openwrt.org/"                                                                                                
BUILD_ID="r10947-65030d81f3"                                                                                                            
OPENWRT_BOARD="at91/sam9x"                                                                                                              
OPENWRT_ARCH="arm_arm926ej-s"                                                                                                           
OPENWRT_TAINTS="no-all glibc busybox"                                                                                                   
OPENWRT_DEVICE_MANUFACTURER="Microchip Technology Inc"                                                                                  
OPENWRT_DEVICE_MANUFACTURER_URL="www.microchip.com"                                                                                     
OPENWRT_DEVICE_PRODUCT="SAM9X60_EK_board"                                                                                               
OPENWRT_DEVICE_REVISION="sam9x60"                                                                                                       
OPENWRT_RELEASE="Openwrt 19.07.2 linux4sam-2021.04"

Did you install ethtool?
opkg update; opkg install ethtool

EDIT: you should also consider upgrading your installation to at least 19.07.8 (the latest on 19.07) or 21.02.

presumably a typo, maybe check attribute "x" correctly assigned.

Just call ethtool

?

1 Like

Thank you for your assistance, though not yet resolved I believe the issue is covered in an existing support ticket.

According to this ticket I need a latter x-compiler for my build server, Ubuntu 20.04, or a later version of openwrt. I'm doing a git pull from https://github.com/linux4sam/linux-at91, but this appears to build as 19.07.2, where would I find 21.02 please?

Or failing that just a link to update build x-compile chain for the 19.07.2 baseline I believe will resolve the issue.

Illustration of the original issue below,

root@OpenWrt:/usr/sbin# opkg install ethtool
Package ethtool (5.2-1) installed in root is up to date.
root@OpenWrt:/usr/sbin# ethtool
/bin/ash: ethtool: not found
root@OpenWrt:/usr/sbin# ./ethtool 
/bin/ash: ./ethtool: not found
root@OpenWrt:/usr/sbin# ls -l | grep eth
-rwxr-xr-x    1 root     root         73727 Mar 10  2021 ethtool
root@OpenWrt:/usr/sbin#

Thank you,
Gary

I'm confused... what version are you currently running? 19.07.2 or 21.02.1?

Please run the following commands (copy-paste the whole block) and paste the output here, using the "Preformatted text </> " button:
grafik
Remember to redact passwords, MAC addresses and any public IP addresses you may have

ubus call system board

Why not just use the standard repos? Why are you doing a git pull or trying to compile from scratch?

Try this:

opkg remove ethtool
opkg update
opkg install ethtool
root@OpenWrt:/# ubus call system board
{
        "kernel": "5.4.81-linux4sam-2020.10",
        "hostname": "OpenWrt",
        "system": "ARM926EJ-S rev 5 (v5l)",
        "model": "Microchip SAM9X60-EK",
        "board_name": "sam9x60ek",
        "release": {
                "distribution": "Openwrt",
                "version": "19.07.2",
                "revision": "r10947-65030d81f3",
                "target": "at91/sam9x",
                "description": "Openwrt 19.07.2 linux4sam-2021.04"
        }
}

Also removed, updated and re-installed, still not found,

root@OpenWrt:/# opkg install ethtool
Installing ethtool (5.2-1) to root...
Downloading http://downloads.openwrt.org/releases/19.07.2/packages/arm_arm926ej-s/base/ethtool_5.2-1_arm_ark
Configuring ethtool.
root@OpenWrt:/# ethtool
/bin/ash: ethtool: not found
root@OpenWrt:/#

Thank you for helping ..

Does not exist...

https://downloads.openwrt.org/releases/19.07.2/packages/arm_arm926ej-s/packages/

Package released in 21.02.0 -

You would need to upgrade from 19.07.2 to use it.

ethtool does exist for that platform and release version (it is found in the packages/arm_arm926ej-s/base directory).

That is made clear by the download path for the opkg install, and the fact that it succeeded in installing (at least according to the opkg package manager system).

If it didn't exist, opkg would have thrown an error.

Upgrading to 21.02 is not required for ethtool. (although it is recommended for other reasons).

1 Like

Have you ever run opkg upgrade (or used the LuCI "upgrade..." button for packages that are installed on your router?

what is the output of the following:

echo $PATH

https://downloads.openwrt.org/releases/19.07.2/packages/arm_arm926ej-s/base/ethtool_5.2-1_arm_arm926ej-s.ipk

Correct path and package name.

you mean this command:

^^^ is exactly the right command.

I will agree that there is something unusual about the filename that is downloaded

doesn't seem to match this (the actual file in the downloads directory):
https://downloads.openwrt.org/releases/19.07.2/packages/arm_arm926ej-s/base/ethtool_5.2-1_arm_arm926ej-s.ipk

I cannot explain that discrepancy, but the OP has demonstrated that the file is clearly downloaded and installed (again, no opkg errors) and that the binary exists in the expected directory location (/usr/sbin/ethtool).

This package name...

Your assumption was incorrect.

Actually, yours was:

Both of those are factually incorrect.

The build you're running is glibc based, OpenWrt's binary package repositories expect a musl libc environment. The not found error you see is the kernel failing to locate the required dynamic linker /lib/ld-musl-*.so requested by the ethtool executable.

TL;DR: you cannot use official OpenWrt packages with your current build

4 Likes

Good to know.

Thank you for your huge effort, appreciated! Going to move to 21.02, hopefully that will resolve the issue

Regards,
Gary

You do not need to upgrade, you need to use a build based on musl's libc. If you upgrade, but build it yourself around glibc, it will fail again.

Another option is to compile the package yourself, and base it on glibc.

1 Like