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

ID_LIKE="lede openwrt"                                                                                                                  
PRETTY_NAME="Openwrt 19.07.2"                                                                                                           
OPENWRT_TAINTS="no-all glibc busybox"                                                                                                   
OPENWRT_DEVICE_MANUFACTURER="Microchip Technology Inc"                                                                                  
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, 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

Thank you,

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:
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...
Configuring ethtool.
root@OpenWrt:/# ethtool
/bin/ash: ethtool: not found

Thank you for helping ..

Does not exist...

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

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):

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


Good to know.

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


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