I’m trying to install OpenWrt on an hp-PRODESK-600/8GB ram/240GB ssd with only one Ethernet port. The PRODESK has a monitor and keyboard and mouse and the second Ethernet port necessary for OpenWrt is a USB3<->Ethernet adapter RealTek model RT8153.
Installation is performed using /releases / 23.05.2 / targets / x86 / 64 / generic-ext4-combined-efi.img.gz
The process is going well until I need to select ‘eth1’ for the WAN interface.
To install the RealTek RTL8153 firmware i follow some steps via the LuCI interface.
After some search on the forum I found that a suitable replacement for the RTL8153 would be the r8152-firmware. This is confirmed by proceeding with a successful installation of OpenWrt utilizing the same RTL8153 while installing the r8152-firmware on a Raspberry Pi4. Everything went well and fully functional.
I then assume that this r8152 firmware would also be a correct alternative for this USB3<->Ethernet adapter, on the PRODESK PC.
The problem is that following the firmware installation, no eth1 become available for the WAN interface, contrary to the Pi4 installation.
Now, the installation is halted cause no eth1 is available, despite the fact that the installation via LuCI was successful.
The Question: How should I proceed in order to get eth1 device available for the WAN interface.
It almost work. I now get an eth1 device available in LuCI but on the Interfaces/WAN/eth1 there is an error: Error: Network device is not present
I wonder how OpenWrt makes a logical connection between eth1 and the actual hardware?
The OS does detect a connection when I plug the device into PRODECK USB port but is is called: SuperSpeed USB device number 2 using xhci_hcd
I don't think those are related. But it does seem likely that the drivers are not loaded properly. This particular issue is not part of my expertise, though, so hopefully others will be able to assist.
I didn't do as you suggested cause I was onto another solution and it ended up working. Thanks for your suggestion, it was to be the following step, had the first one not work.
Inspired by FlexMcMurphy's post I followed these steps, despite the different computer:
1- I added this to network file
config interface 'lan'
option ifname 'eth1'
option proto 'dhcp'
2- I installed ethtool so I can investigate better
3- I ran this line opkg install kmod-usb-net-rtl8152
4- connected Internet to the RTL8153 and reboot
5- Access LuCI from another computer and found that eth1 WAN side was getting an IP address, after a stop and restart: Problem solved.
My own conclusion is that the prior LuCI/Network/Interfaces / Add new interface procedure to add the WAN, did not take effect completely. It should have, cause on a precedent installation on a Pi4, it did work fine. On that computer it does not, for some odd reason. So I had to resort to re-installing it from the Terminal.
Being a newbie in networking, I do not understand quite completely what I did but it works now. So, perhaps, time will tell if I am to become a proficient "Networker" ... with more practice, or course.
This post is for future reference for anyone who can find those details helpful.
Successful procedure to install OpenWrt on an hp PRODESK 600, with SSD as the main drive. This was done with a monitor and keyboard attached to the PRODESK, has it makes it easier to manage, but not mandatory.
Another Linux computer with Internet access is mandatory. I utilised Fedora.
"Burn" OpenWrt image to the SSD
Install the SSD onto the mini PC and boot
Connect Ethernet wire between PRODESK and Fedora
From Fedora call Terminal and ssh root@192.168.1.1 to access OpenWrt possibly, ssh may fail due to Host key verification fail.
If this occur, call ssh-keygen -R 192.168.1.1
then repeat ssh root@192.168.1.1
change password on PRODESK with passwd if desired
Modify dhcp with vi /etc/config/dhcp
add line option ignore '1' in the dhcp/lan section
delete line option start '100' in the dhcp/lan section
delete line option limit '150' in the dhcp/lan section
commit changes in vi with :wq
Modify network with vi /etc/config/network
change line option ipaddr '192.168.1.1' to '192.168.1.xxx'
(xxx dependant on your router base dhcp parameters)
add line option dns '192.168.1.1' (router dependant)
add line option gateway '192.168.1.1' (same as dns above)
commit changes in vi with :wq
reboot
Disconnect link between Fedora and PRODESK
Connect both computers on the Router LAN jacks with Ethernet cables At this point Internet should be accessible from both computers Now some OS mods are required on PRODESK
From Fedora Terminal, ssh root@192.168.1.xxx
verify that the current folder is /root If not, move to /root
wget https://downloads.openwrt.org/releases/23.05.2/packages/x86_64/base/lsblk_2.39-2_x86_64.ipk
(no linefeed here, one single line)
sh /etc/uci-defaults/70-rootpt-resize At this point wait for the computer to reboot several times (3 times in my case) and the HDD LED will flash for several seconds. Wait until the process is finished. The LED will stop flashing.
ssh root@192.168.1.xxx
opkg update
opkg install ethtool
opkg install usbutils
opkg update ----- yes----- again-----mandatory
opkg install kmod-usb-net-rtl8152
opkg install fdisk
connect the RTL8153 into PRODESK USB jack
access LuCI from the web browser on Fedora
Menu System/Software - click on Actions / Update list... button
when done Dismiss
in the Filter field - Enter r815
choose to Install if not already installed r8152-firmware
change to Menu Network/Interfaces - click Add new interface
name it WAN
protocol DHCP
device eth1
click Create Interface
Select tab Firewall Settings
Set firewall zone to WAN
Click Save
Click Save & Apply
Connect a Third Ethernet wire from the router into RTL8153
Wait 10 secons and verify that an IP address appear on the WAN interface. Now we revert back some of the dhcp and network parameters
in Fedora Terminal ssh@192.168.1.xxx
Modify dhcp with vi /etc/config/dhcp
delete line option ignore '1' in the dhcp/lan section
add line option start '100' in the dhcp/lan section
add line option limit '150' in the dhcp/lan section
commit changes in vi with :wq
Modify network with vi /etc/config/network
change line option ipaddr '192.168.1.xxx' to '192.168.xxx.xxx'
(xxx dependant on whatever suits your installation)
delete line option dns '192.168.1.1'
delete line option gateway '192.168.1.1'
commit changes in vi with :wq
reboot
disconnect the Internet wire on PRODESK eth0
reconnect an Ethernet wire from PRODESK eht0 to Fedora Now Fedora should be getting an IP address from PRODESK and have access to Internet.